20 params.addClassDescription(
21 "Advects an arbitrary turbulent quantity, the associated nonlinear 'variable'.");
22 params.addRequiredParam<MooseFunctorName>(
NS::density,
"fluid density");
23 params.addParam<std::vector<BoundaryName>>(
24 "walls", {},
"Boundaries that correspond to solid walls.");
25 params.addParam<
bool>(
"neglect_advection_derivatives",
27 "Whether to remove automatic differentiation derivative terms " 28 "for velocity in the advection term");
35 _wall_boundary_names(getParam<
std::vector<BoundaryName>>(
"walls")),
36 _neglect_advection_derivatives(getParam<bool>(
"neglect_advection_derivatives"))
62 return _normal *
v * rho_face * var_face;
78 const Elem * elem = fi.
elemPtr();
114 const Elem * elem = fi.
elemPtr();
123 mooseAssert(
_var.
dofIndices().size() == 1,
"We're currently built to use CONSTANT MONOMIALS");
135 "If the variable is only defined on the neighbor hand side of the face, then that " 136 "means it should have no dof indices on the elem element. Conversely if " 137 "the variable is defined on both sides of the face, then it should have a non-zero " 138 "number of degrees of freedom on the elem element");
144 "We're currently built to use CONSTANT MONOMIALS");
147 std::array<ADReal, 1>{{neighbor_r}},
virtual const std::vector< dof_id_type > & dofIndicesNeighbor() const final
Moose::FV::InterpMethod _advected_interp_method
The interpolation method to use for the advected quantity.
void addResidualsAndJacobian(Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
void accumulateTaggedLocalResidual()
Moose::FV::InterpMethod _velocity_interp_method
The interpolation method to use for the velocity.
Computes the advection term with the assumption that the advected quantity will have special wall tre...
unsigned int number() const
void getWallBoundedElements(const std::vector< BoundaryName > &wall_boundary_name, const FEProblemBase &fe_problem, const SubProblem &subproblem, const std::set< SubdomainID > &block_ids, std::map< const Elem *, bool > &wall_bounded_map)
Map marking wall bounded elements The map passed in wall_bounded_map gets cleared and re-populated...
const FaceInfo * _face_info
Moose::StateArg determineState() const
virtual void initialSetup() override
static const std::string density
const bool _neglect_advection_derivatives
Whether to remove the derivative of this term wrt to velocity.
virtual const std::set< SubdomainID > & blockIDs() const
DualNumber< Real, DNDerivativeType, true > ADReal
const RhieChowInterpolatorBase & _rc_vel_provider
The Rhie-Chow user object that provides us with the velocity.
void computeJacobian() override
virtual VectorValue< ADReal > getVelocity(const Moose::FV::InterpMethod m, const FaceInfo &fi, const Moose::StateArg &time, const THREAD_ID tid, bool subtract_mesh_velocity) const =0
Retrieve a face velocity.
ADReal computeQpResidual() override
LimiterType limiterType(InterpMethod interp_method)
const Elem * neighborPtr() const
bool skipForBoundary(const FaceInfo &fi) const override
FEProblemBase & _fe_problem
const Point & normal() const
unsigned int number() const
static InputParameters validParams()
const std::vector< BoundaryName > & _wall_boundary_names
Wall boundaries.
FaceInfo::VarFaceNeighbors _face_type
const Elem * elemPtr() const
void prepareVectorTagNeighbor(Assembly &assembly, unsigned int ivar)
static const std::string v
void initialSetup() override
An advection kernel that implements interpolation schemes specific to Navier-Stokes flow physics...
DenseVector< Number > _local_re
std::map< const Elem *, bool > _wall_bounded
Maps for wall treatment.
MooseVariableFV< Real > & _var
INSFVTurbulentAdvection(const InputParameters ¶ms)
const Moose::Functor< ADReal > & _rho
void prepareVectorTag(Assembly &assembly, unsigned int ivar)
static InputParameters validParams()
void computeResidual() override
registerMooseObject("NavierStokesApp", INSFVTurbulentAdvection)
Moose::FaceArg makeFace(const FaceInfo &fi, const Moose::FV::LimiterType limiter_type, const bool elem_is_upwind, const bool correct_skewness=false, const Moose::StateArg *state_limiter=nullptr) const
void scalingFactor(const std::vector< Real > &factor)
virtual const std::vector< dof_id_type > & dofIndices() const final
VarFaceNeighbors faceType(const std::pair< unsigned int, unsigned int > &var_sys) const