22 "advection term for a turbulence variable.");
25 "rhie_chow_user_object",
26 "The rhie-chow user-object which is used to determine the face velocity.");
29 "advected_interp_method_name",
30 "Name of the FVInterpolationMethod to use for the advected quantity.");
32 params.
addParam<std::vector<BoundaryName>>(
33 "walls", {},
"Boundaries that correspond to solid walls.");
41 _mass_flux_provider(getUserObject<
RhieChowMassFlux>(
"rhie_chow_user_object")),
42 _adv_interp_method(getFVAdvectedInterpolationMethod(
43 getParam<InterpolationMethodName>(
"advected_interp_method_name"))),
45 _wall_boundary_names(getParam<
std::vector<BoundaryName>>(
"walls"))
101 "We should only have one boundary on every face.");
119 else if ((
_current_face_type == FaceInfo::VarFaceNeighbors::NEIGHBOR) && !(bounded_neigh))
121 const auto dof_id_neighbor =
165 "We should only have one boundary on every face.");
183 else if ((
_current_face_type == FaceInfo::VarFaceNeighbors::NEIGHBOR) && !(bounded_neigh))
185 const auto dof_id_neighbor =
223 mooseAssert(adv_bc,
"This should be a valid BC!");
225 const auto boundary_value_matrix_contrib = adv_bc->computeBoundaryValueMatrixContribution();
228 const auto factor = (
_current_face_type == FaceInfo::VarFaceNeighbors::ELEM) ? 1.0 : -1.0;
237 mooseAssert(adv_bc,
"This should be a valid BC!");
240 const auto factor = (
_current_face_type == FaceInfo::VarFaceNeighbors::ELEM ? 1.0 : -1.0);
242 const auto boundary_value_rhs_contrib = adv_bc->computeBoundaryValueRHSContribution();
registerMooseObject("NavierStokesApp", LinearFVTurbulentAdvection)
bool hasBlocks(const SubdomainName &name) const
virtual const std::set< SubdomainID > & blockIDs() const
SubdomainID subdomain_id() const
const std::vector< std::vector< dof_id_type > > & dofIndices() const
virtual Moose::FV::GradientLimiterType gradientLimiter() const
virtual AdvectedSystemContribution advectedInterpolate(const FaceInfo &face, Real elem_value, Real neighbor_value, const VectorValue< Real > *elem_grad, const VectorValue< Real > *neighbor_grad, Real mass_flux) const=0
virtual bool needsGradients() const
const std::set< BoundaryID > & boundaryIDs() const
const Elem * neighborPtr() const
const ElemInfo * elemInfo() const
const ElemInfo * neighborInfo() const
const Elem * elemPtr() const
void setupFaceData(const FaceInfo *face_info, const FaceInfo::VarFaceNeighbors face_type)
FaceInfo::VarFaceNeighbors _current_face_type
DenseMatrix< Real > _matrix_contribution
virtual void setupFaceData(const FaceInfo *face_info)
DenseVector< Real > _rhs_contribution
DenseVector< dof_id_type > _dof_indices
const bool _force_boundary_execution
const FaceInfo * _current_face_info
static InputParameters validParams()
MooseLinearVariableFV< Real > & _var
const unsigned int _sys_num
const unsigned int _var_num
An advection kernel that implements the advection term for the turbulent variables limited for the fi...
virtual Real computeNeighborRightHandSideContribution() override
virtual Real computeElemRightHandSideContribution() override
const RhieChowMassFlux & _mass_flux_provider
The Rhie-Chow user object that provides us with the face velocity.
virtual Real computeNeighborMatrixContribution() override
VectorValue< Real > _neighbor_grad_storage
virtual void addRightHandSideContribution() override
VectorValue< Real > _elem_grad_storage
Reusable gradient storage used when advected interpolation requires gradients.
const std::vector< BoundaryName > & _wall_boundary_names
Wall boundaries.
virtual Real computeBoundaryRHSContribution(const LinearFVBoundaryCondition &bc) override
virtual void addMatrixContribution() override
const FVAdvectedInterpolationMethod & _adv_interp_method
The interpolation method to use for the advected quantity.
virtual Real computeBoundaryMatrixContribution(const LinearFVBoundaryCondition &bc) override
virtual Real computeElemMatrixContribution() override
virtual void initialSetup() override
FVAdvectedInterpolationMethod::AdvectedSystemContribution _adv_interp_result
Cached weights/correction for the current face (refreshed in setupFaceData)
LinearFVTurbulentAdvection(const InputParameters ¶ms)
std::unordered_set< const Elem * > _wall_bounded
List for wall bounded elements.
Real _mass_face_flux
Container for the mass flux on the face which will be reused in the advection term's matrix and right...
virtual void setupFaceData(const FaceInfo *face_info) override
static InputParameters validParams()
FEProblemBase & _fe_problem
libMesh::LinearImplicitSystem & _linear_system
void computeCellGradients()
Real getElemValue(const ElemInfo &elem_info, const StateArg &state) const
LinearFVBoundaryCondition * getBoundaryCondition(const BoundaryID bd_id) const
VectorValue< Real > gradSln(const ElemInfo &elem_info, const StateArg &state) const
User object responsible for determining the face fluxes using the Rhie-Chow interpolation in a segreg...
Real getMassFlux(const FaceInfo &fi) const
Get the face velocity times density (used in advection terms)
virtual void initialSetup()
Moose::StateArg determineState() const
std::vector< T > & get_values()
NumericVector< Number > * rhs
SparseMatrix< Number > * matrix
void getWallBoundedElements(const std::vector< BoundaryName > &wall_boundary_name, const FEProblemBase &fe_problem, const SubProblem &subproblem, const std::set< SubdomainID > &block_ids, std::unordered_set< const Elem * > &wall_bounded)
Map marking wall bounded elements The map passed in wall_bounded_map gets cleared and re-populated.
std::pair< Real, Real > weights_matrix