20 "Computes residual for the turbulent scaled diffusion operator for finite volume method.");
22 "scaling_coef", 1.0,
"Scaling factor to divide the diffusion coefficient with");
23 params.
addParam<std::vector<BoundaryName>>(
24 "walls", {},
"Boundaries that correspond to solid walls.");
31 _scaling_coef(getFunctor<
ADReal>(
"scaling_coef")),
32 _wall_boundary_names(getParam<
std::vector<BoundaryName>>(
"walls")),
33 _preserve_sparsity_pattern(_fe_problem.preserveMatrixSparsityPattern())
62 if (!coeff_elem.value() && !coeff_neighbor.value())
68 return 0 * (coeff_elem + coeff_neighbor) *
85 coeff =
_coeff(face, state);
89 return -1 * coeff / scaling_coef * dudn;
103 const Elem * elem = fi.
elemPtr();
139 const Elem * elem = fi.
elemPtr();
148 mooseAssert(
_var.
dofIndices().size() == 1,
"We're currently built to use CONSTANT MONOMIALS");
160 "If the variable is only defined on the neighbor hand side of the face, then that " 161 "means it should have no dof indices on the elem element. Conversely if " 162 "the variable is defined on both sides of the face, then it should have a non-zero " 163 "number of degrees of freedom on the elem element");
169 "We're currently built to use CONSTANT MONOMIALS");
172 std::array<ADReal, 1>{{neighbor_r}},
virtual const std::vector< dof_id_type > & dofIndicesNeighbor() const final
static InputParameters validParams()
virtual ADReal gradUDotNormal(const Moose::StateArg &time, const bool correct_skewness) const
void addResidualsAndJacobian(Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
void accumulateTaggedLocalResidual()
INSFVTurbulentDiffusion implements a standard diffusion term for a turbulent problem: ...
Moose::ElemArg elemArg(bool correct_skewness=false) const
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
const Moose::FV::InterpMethod _coeff_interp_method
virtual const std::set< SubdomainID > & blockIDs() const
DualNumber< Real, DNDerivativeType, true > ADReal
const bool _preserve_sparsity_pattern
Whether a Newton's method is being used (and we need to preserve the sparsity pattern in edge cases) ...
void computeJacobian() override
virtual bool skipForBoundary(const FaceInfo &fi) const
registerMooseObject("NavierStokesApp", INSFVTurbulentDiffusion)
bool isInternalFace(const FaceInfo &) const
virtual ADReal computeQpResidual() override final
const Elem * neighborPtr() const
const Moose::Functor< ADReal > & _scaling_coef
const bool _correct_skewness
INSFVTurbulentDiffusion(const InputParameters ¶ms)
static InputParameters validParams()
const std::vector< BoundaryName > & _wall_boundary_names
Wall boundaries.
FEProblemBase & _fe_problem
const Point & normal() const
unsigned int number() const
virtual void initialSetup() override
std::map< const Elem *, bool > _wall_bounded
Maps for wall treatment.
FaceInfo::VarFaceNeighbors _face_type
const Elem * elemPtr() const
const Moose::Functor< ADReal > & _coeff
void prepareVectorTagNeighbor(Assembly &assembly, unsigned int ivar)
Moose::ElemArg neighborArg(bool correct_skewness=false) const
DenseVector< Number > _local_re
Moose::FaceArg singleSidedFaceArg(const FaceInfo *fi=nullptr, Moose::FV::LimiterType limiter_type=Moose::FV::LimiterType::CentralDifference, bool correct_skewness=false, const Moose::StateArg *state_limiter=nullptr) const
MooseVariableFV< Real > & _var
void prepareVectorTag(Assembly &assembly, unsigned int ivar)
virtual void initialSetup()
void computeResidual() override
void interpolate(InterpMethod m, T &result, const T2 &value1, const T3 &value2, const FaceInfo &fi, const bool one_is_elem)
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