25 "Computes the directed force coming from friction and pressure differences on a surface. One "
26 "can use this object for the computation of the drag and lift coefficient as well.");
27 params.
addRequiredParam<MooseFunctorName>(
"vel_x",
"The velocity in direction x.");
28 params.
addParam<MooseFunctorName>(
"vel_y",
"The velocity in direction y.");
29 params.
addParam<MooseFunctorName>(
"vel_z",
"The velocity in direction z.");
33 "The direction in which the force is computed.");
39 _mu(getFunctor<Real>(
NS::
mu)),
40 _pressure(getFunctor<Real>(
NS::pressure)),
41 _direction(getParam<RealVectorValue>(
"principal_direction"))
49 "For 2D meshes the second velocity component should be provided as well!");
56 "For 3D meshes the third velocity component should be provided as well!");
74 mooseAssert(fi,
"We should have a face info in " +
name());
78 {fi, Moose::FV::LimiterType::CentralDifference,
true,
false,
nullptr,
nullptr});
81 RealTensorValue pressure_term;
82 RealVectorValue cell_velocity = 0;
83 RealVectorValue face_velocity = 0;
84 const Real pressure =
_pressure(face_arg, state);
85 const Real
mu =
_mu(face_arg, state);
90 pressure_term(i, i) = -pressure;
93 const auto shear_force =
mu *
94 (cell_velocity - face_velocity -
95 (cell_velocity - face_velocity) * fi->
normal() * fi->
normal()) /
104 mooseError(this->
type() +
" does not have an implementation for quadrature-based evaluation!");
registerMooseObject("NavierStokesApp", IntegralDirectedSurfaceForce)
const Point & normal() const
const Elem * elemPtr() const
const Point & dCN() const
Postprocessor which computes the directed force coming from friction and pressure differences on a su...
IntegralDirectedSurfaceForce(const InputParameters ¶meters)
const Moose::Functor< Real > & _pressure
Pressure field.
Real computeQpIntegral() override
const RealVectorValue _direction
The direction in which the force is measured.
static InputParameters validParams()
std::vector< const Moose::Functor< Real > * > _vel_components
Velocity components.
const Moose::Functor< Real > & _mu
The dynamic viscosity.
Real computeFaceInfoIntegral(const FaceInfo *fi) override
const std::string & type() const
const std::string & name() const
void paramError(const std::string ¶m, Args... args) const
void mooseError(Args &&... args) const
bool isParamValid(const std::string &name) const
virtual unsigned int dimension() const
static InputParameters validParams()
Moose::StateArg determineState() const
static const std::string mu
static const std::string pressure