https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
LinearPWCNSFVMomentumFlux Class Reference

Momentum flux kernel for porous equations written in superficial velocity. More...

#include <LinearPWCNSFVMomentumFlux.h>

Inheritance diagram for LinearPWCNSFVMomentumFlux:
[legend]

Classes

struct  BaffleStressData
 Implicit coefficients and deferred right-hand sides of the stress on a baffle face. More...
 

Public Types

enum  ResidualTagType
 
typedef DataFileName DataFileParameterType
 

Public Member Functions

 LinearPWCNSFVMomentumFlux (const InputParameters &params)
 Construct the porous momentum flux kernel.
 
void addMatrixContribution () override
 Assemble the internal-face matrix with side-specific porosity scaling of advection.
 
Real computeElemRightHandSideContribution () override
 Compute the element-row internal-face right-hand-side contribution.
 
Real computeNeighborRightHandSideContribution () override
 Compute the neighbor-row internal-face right-hand-side contribution.
 
virtual Real computeElemMatrixContribution () override
 
virtual Real computeNeighborMatrixContribution () override
 
virtual Real computeBoundaryMatrixContribution (const LinearFVBoundaryCondition &bc) override
 
virtual Real computeBoundaryRHSContribution (const LinearFVBoundaryCondition &bc) override
 
virtual void setupFaceData (const FaceInfo *face_info) override
 Set the current FaceInfo object.
 
virtual void addRightHandSideContribution () override
 
virtual bool hasFaceSide (const FaceInfo &fi, bool fi_elem_side) const override
 
void setCurrentFaceArea (const Real area)
 
virtual Real computeBoundaryFlux (const LinearFVBoundaryCondition &bc)
 
virtual const MooseLinearVariableFV< Real > & variable () const override
 
void linkTaggedVectorsAndMatrices (const std::set< TagID > &vector_tags, const std::set< TagID > &matrix_tags)
 
virtual bool enabled () const
 
std::shared_ptr< MooseObject > getSharedPtr ()
 
std::shared_ptr< const MooseObject > getSharedPtr () const
 
bool isKokkosObject () const
 
MooseApp & getMooseApp () const
 
const std::string & type () const
 
const std::string & name () const
 
std::string typeAndName () const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
MooseObjectName uniqueName () const
 
const InputParameters & parameters () const
 
const hit::Node * getHitNode () const
 
bool hasBase () const
 
const std::string & getBase () const
 
const T & getParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const T * queryParam (const std::string &name) const
 
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 
T getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &name) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
std::string messagePrefix (const bool hit_prefix=true) const
 
std::string errorPrefix (const std::string &) const
 
void mooseError (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecatedNoTrace (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
void callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &relative_path) const
 
std::string getDataFilePath (const std::string &relative_path) const
 
virtual void initialSetup ()
 
virtual void timestepSetup ()
 
virtual void jacobianSetup ()
 
virtual void residualSetup ()
 
virtual void subdomainSetup ()
 
virtual void customSetup (const ExecFlagType &)
 
const ExecFlagEnum & getExecuteOnEnum () const
 
const Function & getFunction (const std::string &name) const
 
const Function & getFunctionByName (const FunctionName &name) const
 
bool hasFunction (const std::string &param_name) const
 
bool hasFunctionByName (const FunctionName &name) const
 
Moose::Kokkos::Function getKokkosFunction (const std::string &name) const
 
const T & getKokkosFunction (const std::string &name) const
 
Moose::Kokkos::Function getKokkosFunctionByName (const FunctionName &name) const
 
const T & getKokkosFunctionByName (const FunctionName &name) const
 
bool hasKokkosFunction (const std::string &param_name) const
 
bool hasKokkosFunctionByName (const FunctionName &name) const
 
UserObjectName getUserObjectName (const std::string &param_name) const
 
const T & getUserObject (const std::string &param_name, bool is_dependency=true) const
 
const T & getUserObjectByName (const UserObjectName &object_name, bool is_dependency=true) const
 
const UserObjectBase & getUserObjectBase (const std::string &param_name, bool is_dependency=true) const
 
const UserObjectBase & getUserObjectBaseByName (const UserObjectName &object_name, bool is_dependency=true) const
 
bool isImplicit ()
 
Moose::StateArg determineState () const
 
bool isDefaultPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
bool hasPostprocessor (const std::string &param_name, const unsigned int index=0) const
 
bool hasPostprocessorByName (const PostprocessorName &name) const
 
std::size_t coupledPostprocessors (const std::string &param_name) const
 
const PostprocessorName & getPostprocessorName (const std::string &param_name, const unsigned int index=0) const
 
const VectorPostprocessorValue & getVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name) const
 
const VectorPostprocessorValue & getVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValue & getVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const VectorPostprocessorValue & getVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValue & getVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name) const
 
const VectorPostprocessorValue & getVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValue & getVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const VectorPostprocessorValue & getVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast) const
 
const ScatterVectorPostprocessorValue & getScatterVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValue & getScatterVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValue & getScatterVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValue & getScatterVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
bool hasVectorPostprocessor (const std::string &param_name, const std::string &vector_name) const
 
bool hasVectorPostprocessor (const std::string &param_name) const
 
bool hasVectorPostprocessorByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
bool hasVectorPostprocessorByName (const VectorPostprocessorName &name) const
 
const VectorPostprocessorName & getVectorPostprocessorName (const std::string &param_name) const
 
void setRandomResetFrequency (ExecFlagType exec_flag)
 
unsigned long getRandomLong () const
 
Real getRandomReal () const
 
unsigned int getSeed (std::size_t id)
 
unsigned int getMasterSeed () const
 
bool isNodal () const
 
ExecFlagType getResetOnTime () const
 
void setRandomDataPointer (RandomData *random_data)
 
virtual void meshChanged ()
 
void useVectorTag (const TagName &tag_name, VectorTagsKey)
 
void useVectorTag (TagID tag_id, VectorTagsKey)
 
void useMatrixTag (const TagName &tag_name, MatrixTagsKey)
 
void useMatrixTag (TagID tag_id, MatrixTagsKey)
 
bool isVectorTagged ()
 
bool isMatrixTagged ()
 
bool hasVectorTags () const
 
const std::set< TagID > & getVectorTags (VectorTagsKey) const
 
const std::set< TagID > & getMatrixTags (MatrixTagsKey) const
 
const std::vector< SubdomainName > & blocks () const
 
unsigned int numBlocks () const
 
virtual const std::set< SubdomainID > & blockIDs () const
 
unsigned int blocksMaxDimension () const
 
bool hasBlocks (const SubdomainName &name) const
 
bool hasBlocks (const std::vector< SubdomainName > &names) const
 
bool hasBlocks (const std::set< SubdomainName > &names) const
 
bool hasBlocks (SubdomainID id) const
 
bool hasBlocks (const std::vector< SubdomainID > &ids) const
 
bool hasBlocks (const std::set< SubdomainID > &ids) const
 
bool isBlockSubset (const std::set< SubdomainID > &ids) const
 
bool isBlockSubset (const std::vector< SubdomainID > &ids) const
 
bool hasBlockMaterialProperty (const std::string &prop_name)
 
const std::set< SubdomainID > & meshBlockIDs () const
 
virtual bool blockRestricted () const
 
virtual void checkVariable (const MooseVariableBase &variable) const
 
const Moose::Functor< Real > * defaultFunctor (const std::string &name)
 
const Moose::Functor< ADReal > * defaultFunctor (const std::string &name)
 
MooseVariableBase * mooseVariableBase () const
 
MooseVariableField< Real > & mooseVariableField ()
 
MooseVariableFE< Real > * mooseVariable () const
 
MooseVariableFV< Real > * mooseVariableFV () const
 
MooseLinearVariableFV< Real > * mooseLinearVariableFV () const
 
const std::set< MooseVariableFieldBase * > & getMooseVariableDependencies () const
 
std::set< MooseVariableFieldBase * > checkAllVariables (const DofObjectType &dof_object, const std::set< MooseVariableFieldBase * > &vars_to_omit={})
 
virtual std::set< MooseVariableFieldBase * > checkVariables (const libMesh::Node &node, const std::set< MooseVariableFieldBase * > &vars_to_check)
 
std::set< MooseVariableFieldBase * > checkVariables (const libMesh::Elem &element, const std::set< MooseVariableFieldBase * > &vars_to_check)
 
void addMooseVariableDependency (MooseVariableFieldBase *var)
 
void addMooseVariableDependency (const std::vector< MooseVariableFieldBase * > &vars)
 
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
 
Moose::FaceArg makeFace (const FunctorType &functor, 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
 
Moose::FaceArg makeCDFace (const FaceInfo &fi, const bool correct_skewness=false) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
const PostprocessorValue & getPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValue & getPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValue & getPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValue & getPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValue & getPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValue & getPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
virtual const PostprocessorValue & getPostprocessorValueByName (const PostprocessorName &name) const
 
virtual const PostprocessorValue & getPostprocessorValueByName (const PostprocessorName &name) const
 
const PostprocessorValue & getPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValue & getPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValue & getPostprocessorValueOlderByName (const PostprocessorName &name) const
 
const PostprocessorValue & getPostprocessorValueOlderByName (const PostprocessorName &name) const
 
bool isVectorPostprocessorDistributed (const std::string &param_name) const
 
bool isVectorPostprocessorDistributed (const std::string &param_name) const
 
bool isVectorPostprocessorDistributedByName (const VectorPostprocessorName &name) const
 
bool isVectorPostprocessorDistributedByName (const VectorPostprocessorName &name) const
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 
const FVFaceInterpolationMethod & getFVFaceInterpolationMethod (const InterpolationMethodName &name) const
 
const FVAdvectedInterpolationMethod & getFVAdvectedInterpolationMethod (const InterpolationMethodName &name) const
 
bool hasFVInterpolationMethod (const InterpolationMethodName &name) const
 

Static Public Member Functions

static InputParameters validParams ()
 
static void callMooseError (MooseApp *const app, const InputParameters &params, std::string msg, const bool with_prefix, const hit::Node *node, const bool show_trace=true)
 
static std::string deduceFunctorName (const std::string &name, const InputParameters &params)
 
static void setRMParamsAdvection (const InputParameters &obj_params, InputParameters &rm_params, const unsigned short conditional_extended_layers)
 
static void setRMParamsDiffusion (const InputParameters &obj_params, InputParameters &rm_params, const unsigned short conditional_extended_layers)
 

Public Attributes

 usingCombinedWarningSolutionWarnings
 
const ConsoleStream _console
 

Static Public Attributes

static const std::string type_param
 
static const std::string name_param
 
static const std::string unique_name_param
 
static const std::string app_param
 
static const std::string moose_base_param
 
static const std::string kokkos_object_param
 

Protected Member Functions

Real computeAdvectionBoundaryMatrixContribution (const LinearFVAdvectionDiffusionBC *bc) override
 Compute the boundary advection matrix contribution with local porosity scaling.
 
Real computeAdvectionBoundaryRHSContribution (const LinearFVAdvectionDiffusionBC *bc) override
 Compute the boundary advection right-hand-side contribution with local porosity scaling.
 
Real computeInternalAdvectionElemMatrixContribution ()
 Computes the matrix contribution of the advective flux on the element side of current face when the face is an internal face (doesn't have associated boundary conditions).
 
Real computeInternalAdvectionNeighborMatrixContribution ()
 Computes the matrix contribution of the advective flux on the neighbor side of current face when the face is an internal face (doesn't have associated boundary conditions).
 
Real computeInternalStressMatrixContribution ()
 Computes the matrix contribution of the stress term on the current face when the face is an internal face (doesn't have associated boundary conditions).
 
Real computeInternalStressRHSContribution ()
 Computes the right hand side contribution of the stress term on the current face when the face is an internal face (doesn't have associated boundary conditions).
 
Real computeInternalStressTransmissibility () const
 Computes the implicit internal-face stress transmissibility.
 
Real computeInternalStressExplicitCorrection () const
 Computes the explicit internal-face stress correction.
 
Real computeCellStressExplicitCorrection (const ElemInfo &cell_info, const RealVectorValue &nonorthogonal_correction_vector) const
 Compute the explicit stress correction reconstructed from one adjacent cell.
 
Real computeStressBoundaryMatrixContribution (const LinearFVAdvectionDiffusionBC *bc)
 Computes the matrix contributions of the boundary conditions resulting from the stress tensor.
 
Real computeStressBoundaryRHSContribution (const LinearFVAdvectionDiffusionBC *bc)
 Computes the right hand side contributions of the boundary conditions resulting from the stress tensor.
 
const MooseLinearVariableFVReal & velocityVar (unsigned int dir) const
 Helper to access the velocity variable for a given direction.
 
const LinearFVGradientReader & velocityGradientField (unsigned int dir) const
 Helper to access the velocity gradient field for a given direction.
 
std::string deduceFunctorName (const std::string &name) const
 
Moose::FaceArg singleSidedFaceArg (const FaceInfo *fi, Moose::FV::LimiterType limiter_type=Moose::FV::LimiterType::CentralDifference, bool correct_skewness=false) const
 
void requestVariableCellGradient (const std::string &variable_name)
 
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 
virtual void addUserObjectDependencyHelper (const UserObjectBase &) const
 
virtual void addPostprocessorDependencyHelper (const PostprocessorName &) const
 
virtual void addVectorPostprocessorDependencyHelper (const VectorPostprocessorName &) const
 
T & declareRestartableData (const std::string &data_name, Args &&... args)
 
ManagedValue< T > declareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
const T & getRestartableData (const std::string &data_name) const
 
T & declareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
T & declareRecoverableData (const std::string &data_name, Args &&... args)
 
T & declareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args)
 
T & declareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args)
 
std::string restartableName (const std::string &data_name) const
 
void prepareVectorTag (Assembly &assembly, unsigned int ivar)
 
void prepareVectorTag (Assembly &assembly, unsigned int ivar, ResidualTagType tag_type)
 
void prepareVectorTag (Assembly &assembly, unsigned int ivar, ResidualTagType tag_type)
 
void prepareVectorTag (Assembly &assembly, unsigned int ivar, ResidualTagType tag_type)
 
void prepareVectorTag (Assembly &assembly, unsigned int ivar, ResidualTagType tag_type)
 
void prepareVectorTagNeighbor (Assembly &assembly, unsigned int ivar)
 
void prepareVectorTagLower (Assembly &assembly, unsigned int ivar)
 
void prepareMatrixTag (Assembly &assembly, unsigned int ivar, unsigned int jvar)
 
void prepareMatrixTag (Assembly &assembly, unsigned int ivar, unsigned int jvar, DenseMatrix< Number > &k) const
 
void prepareMatrixTagNonlocal (Assembly &assembly, unsigned int ivar, unsigned int jvar)
 
void prepareMatrixTagNeighbor (Assembly &assembly, unsigned int ivar, unsigned int jvar, Moose::DGJacobianType type)
 
void prepareMatrixTagNeighbor (Assembly &assembly, unsigned int ivar, unsigned int jvar, Moose::DGJacobianType type, DenseMatrix< Number > &k) const
 
void prepareMatrixTagLower (Assembly &assembly, unsigned int ivar, unsigned int jvar, Moose::ConstraintJacobianType type)
 
void accumulateTaggedLocalResidual ()
 
void assignTaggedLocalResidual ()
 
void accumulateTaggedLocalMatrix ()
 
void accumulateTaggedLocalMatrix (Assembly &assembly, unsigned int ivar, unsigned int jvar, const DenseMatrix< Number > &k)
 
void accumulateTaggedLocalMatrix (Assembly &assembly, unsigned int ivar, unsigned int jvar, Moose::DGJacobianType type, const DenseMatrix< Number > &k)
 
void accumulateTaggedNonlocalMatrix ()
 
void assignTaggedLocalMatrix ()
 
void addResiduals (Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
 
void addResiduals (Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, const std::vector< Real > &scaling_factors)
 
void addResiduals (Assembly &assembly, const DenseVector< T > &residuals, const Indices &dof_indices, Real scaling_factor)
 
void addResiduals (Assembly &assembly, const ADResidualsPacket &packet)
 
void addResidualsAndJacobian (Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
 
void addResidualsAndJacobian (Assembly &assembly, const ADResidualsPacket &packet)
 
void addJacobian (Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
 
void addJacobian (Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, const std::vector< Real > &scaling_factors)
 
void addJacobian (Assembly &assembly, const ADResidualsPacket &packet)
 
void addJacobian (Assembly &assembly, const DenseMatrix< Real > &local_k, const std::vector< dof_id_type > &row_indices, const std::vector< dof_id_type > &column_indices, Real scaling_factor)
 
void addResidualsWithoutConstraints (Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
 
void addResidualsAndJacobianWithoutConstraints (Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
 
void addJacobianWithoutConstraints (Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
 
void addJacobianElement (Assembly &assembly, Real value, dof_id_type row_index, dof_id_type column_index, Real scaling_factor)
 
void setResidual (SystemBase &sys, const T &residual, MooseVariableFE< T > &var)
 
void setResidual (SystemBase &sys, Real residual, dof_id_type dof_index)
 
void setResidual (SystemBase &sys, SetResidualFunctor set_residual_functor)
 
virtual bool hasBlockMaterialPropertyHelper (const std::string &prop_name)
 
void initializeBlockRestrictable (const MooseObject *moose_object)
 
void initializeKokkosBlockRestrictable ()
 
Moose::CoordinateSystemType getBlockCoordSystem ()
 
KOKKOS_FUNCTION dof_id_type numKokkosBlockElements () const
 
KOKKOS_FUNCTION dof_id_type numKokkosBlockNodes () const
 
KOKKOS_FUNCTION dof_id_type numKokkosBlockSides () const
 
KOKKOS_FUNCTION ContiguousElementID kokkosBlockElementID (Moose::Kokkos::ThreadID tid) const
 
KOKKOS_FUNCTION ContiguousElementID kokkosBlockNodeID (Moose::Kokkos::ThreadID tid) const
 
KOKKOS_FUNCTION auto kokkosBlockElementSideID (Moose::Kokkos::ThreadID tid) const
 
const Moose::Functor< T > & getFunctor (const std::string &name)
 
const Moose::Functor< T > & getFunctor (const std::string &name, THREAD_ID tid)
 
const Moose::Functor< T > & getFunctor (const std::string &name, SubProblem &subproblem)
 
const Moose::Functor< T > & getFunctor (const std::string &name, SubProblem &subproblem, THREAD_ID tid)
 
bool isFunctor (const std::string &name) const
 
bool isFunctor (const std::string &name, const SubProblem &subproblem) const
 
Moose::ElemArg makeElemArg (const Elem *elem, bool correct_skewnewss=false) const
 
void checkFunctorSupportsSideIntegration (const std::string &name, bool qp_integration)
 
const Moose::Functor< T > & getFunctorByName (const std::string &name)
 
virtual const OutputTools< Real >::VariableValue & value ()
 
virtual const OutputTools< Real >::VariableValue & valueOld ()
 
virtual const OutputTools< Real >::VariableValue & valueOlder ()
 
virtual const OutputTools< Real >::VariableValue & dot ()
 
virtual const OutputTools< Real >::VariableValue & dotDot ()
 
virtual const OutputTools< Real >::VariableValue & dotOld ()
 
virtual const OutputTools< Real >::VariableValue & dotDotOld ()
 
virtual const VariableValue & dotDu ()
 
virtual const VariableValue & dotDotDu ()
 
virtual const OutputTools< Real >::VariableGradient & gradient ()
 
virtual const OutputTools< Real >::VariableGradient & gradientOld ()
 
virtual const OutputTools< Real >::VariableGradient & gradientOlder ()
 
virtual const OutputTools< Real >::VariableSecond & second ()
 
virtual const OutputTools< Real >::VariableSecond & secondOld ()
 
virtual const OutputTools< Real >::VariableSecond & secondOlder ()
 
virtual const OutputTools< Real >::VariableTestSecond & secondTest ()
 
virtual const OutputTools< Real >::VariableTestSecond & secondTestFace ()
 
virtual const OutputTools< Real >::VariablePhiSecond & secondPhi ()
 
virtual const OutputTools< Real >::VariablePhiSecond & secondPhiFace ()
 

Protected Attributes

const unsigned int _dim
 The dimension of the mesh.
 
const RhieChowMassFlux & _mass_flux_provider
 The Rhie-Chow user object that provides us with the face velocity.
 
const Moose::Functor< Real > & _mu
 The functor for the dynamic viscosity.
 
const bool _use_nonorthogonal_correction
 Switch to enable/disable nonorthogonal correction in the stress term.
 
const bool _use_deviatoric_terms
 Switch to enable/disable deviatoric parts in the stress term.
 
const FVAdvectedInterpolationMethod & _adv_interp_method
 The interpolation method to use for the advected quantity.
 
const LinearFVGradientReader *const _advected_gradient_field
 Gradient field used by advected interpolations that require gradients.
 
FVAdvectedInterpolationMethod::AdvectedSystemContribution _adv_interp_result
 Current advected interpolation contribution on the face.
 
VectorValue< Real > _elem_grad_storage
 Reusable gradient storage used when advected interpolation requires gradients.
 
VectorValue< Real > _neighbor_grad_storage
 
Real _face_mass_flux
 Container for the mass flux on the face which will be reused in the advection term's matrix and right hand side contribution.
 
Real _boundary_normal_factor
 Multiplier that ensures the normal of the boundary always points outwards, even in cases when the boundary is within the mesh.
 
Real _stress_matrix_contribution
 The cached matrix contribution.
 
Real _stress_rhs_contribution
 The cached right hand side contribution.
 
const unsigned int _index
 Index x|y|z, this is mainly to handle the deviatoric parts correctly in in the stress term.
 
std::array< const MooseLinearVariableFVReal *, 3 > _velocity_vars
 Velocity variables for each coordinate direction.
 
const LinearFVGradientReader * _gradient_field
 Gradient field used for the kernel variable nonorthogonal correction.
 
std::array< const LinearFVGradientReader *, 3 > _velocity_gradient_fields
 Gradient fields used for velocity variables in deviatoric stress terms.
 
const Moose::CoordinateSystemType _coord_type
 Coordinate system of the blocks this kernel operates on.
 
const unsigned int _rz_radial_coord
 Axisymmetric radial coordinate index (only used when in RZ)
 
const FaceInfo * _current_face_info
 
Real _current_face_area
 
FaceInfo::VarFaceNeighbors _current_face_type
 
bool _cached_matrix_contribution
 
bool _cached_rhs_contribution
 
const bool _force_boundary_execution
 
DenseVector< dof_id_type > _dof_indices
 
DenseMatrix< Real > _matrix_contribution
 
DenseVector< Real > _rhs_contribution
 
MooseLinearVariableFV< Real > & _var
 
const unsigned int _var_num
 
const unsigned int _sys_num
 
FEProblemBase & _fe_problem
 
SystemBase & _sys
 
libMesh::LinearImplicitSystem & _linear_system
 
const THREAD_ID _tid
 
MooseMesh & _mesh
 
std::vector< NumericVector< Number > * > _vectors
 
std::vector< SparseMatrix< Number > * > _matrices
 
const bool & _enabled
 
MooseApp & _app
 
Factory & _factory
 
ActionFactory & _action_factory
 
const std::string & _type
 
const std::string & _name
 
const InputParameters & _pars
 
const ExecFlagEnum & _execute_enum
 
const ExecFlagType & _current_execute_flag
 
const InputParameters & _ti_params
 
FEProblemBase & _ti_feproblem
 
bool _is_implicit
 
Real & _t
 
const Real & _t_old
 
int & _t_step
 
Real & _dt
 
Real & _dt_old
 
bool _is_transient
 
MooseApp & _restartable_app
 
const std::string _restartable_system_name
 
const THREAD_ID _restartable_tid
 
const bool _restartable_read_only
 
FEProblemBase & _mci_feproblem
 
SubProblem & _subproblem
 
DenseVector< Number > _local_re
 
DenseMatrix< Number > _local_ke
 
DenseMatrix< Number > _nonlocal_ke
 
const MaterialData * _blk_material_data
 
bool _nodal
 
MooseVariableFE< Real > * _variable
 
MooseVariableFV< Real > * _fv_variable
 
MooseLinearVariableFV< Real > * _linear_fv_variable
 
MooseVariableField< Real > * _field_variable
 
Assembly * _mvi_assembly
 
const Parallel::Communicator & _communicator
 
const InputParameters & _fvim_params
 
FEProblemBase & _fvim_feproblem
 
const THREAD_ID _fvim_tid
 

Private Member Functions

Real computeBaffleAdvectionExplicitCorrection (bool elem_side) const
 Compute the correction that replaces the shared advected state with the baffle face state: the upstream interstitial tangential velocity and this side's extrapolated normal velocity.
 
BaffleStressData baffleStressData () const
 Compute the stress on the current baffle face, per unit face area.
 
bool isClearFluidSide (bool elem_side) const
 Whether one side of the current face is clear fluid, i.e.
 
Real inversePorosity (bool elem_side) const
 Return the inverse porosity on one side of the current face.
 
const Moose::Functor< T > * defaultFunctor (const std::string &name)
 
const Moose::Functor< Real > * defaultFunctor (const std::string &name)
 
const Moose::Functor< ADReal > * defaultFunctor (const std::string &name)
 
const Moose::Functor< T > & getFunctorByName (const std::string &name, SubProblem &subproblem, THREAD_ID tid)
 
const Moose::FunctionBase * getKokkosFunctionByNameHelper (const FunctionName &name) const
 
const UserObjectBase & getUserObjectFromFEProblem (const UserObjectName &object_name, const THREAD_ID tid=0) const
 
const T & castUserObject (const UserObjectBase &uo_base, const std::string &param_name="") const
 
void mooseObjectError (const std::string &param_name, std::stringstream &oss) const
 
const std::string & userObjectType (const UserObjectBase &uo) const
 
const std::string & userObjectName (const UserObjectBase &uo) const
 
const PostprocessorName & getPostprocessorNameInternal (const std::string &param_name, const unsigned int index, const bool allow_default_value=true) const
 
bool isDefaultPostprocessorValueByName (const PostprocessorName &name) const
 
PostprocessorValue getDefaultPostprocessorValueByName (const PostprocessorName &name) const
 
void checkParam (const std::string &param_name, const unsigned int index=std::numeric_limits< unsigned int >::max()) const
 
bool postprocessorsAdded () const
 
const VectorPostprocessorValue & getVectorPostprocessorByNameHelper (const VectorPostprocessorName &name, const std::string &vector_name, bool broadcast, std::size_t t_index) const
 
const VectorPostprocessorContext< VectorPostprocessorValue > & getVectorPostprocessorContextByNameHelper (const VectorPostprocessorName &name, const std::string &vector_name) const
 
bool vectorPostprocessorsAdded () const
 
RestartableDataValue & registerRestartableDataOnApp (std::unique_ptr< RestartableDataValue > data, THREAD_ID tid) const
 
void registerRestartableNameWithFilterOnApp (const std::string &name, Moose::RESTARTABLE_FILTER filter)
 
RestartableData< T > & declareRestartableDataHelper (const std::string &data_name, void *context, Args &&... args) const
 
void prepareVectorTagInternal (Assembly &assembly, unsigned int ivar, const std::set< TagID > &vector_tags, const std::set< TagID > &absolute_value_vector_tags)
 
void checkForNans () const
 
virtual bool isADObject () const override
 
std::set< MooseVariableFieldBase * > checkVariablesHelper (const DofObjectType &dof_object, const std::set< MooseVariableFieldBase * > &vars_to_check)
 
const PostprocessorValue & getPostprocessorValueInternal (const std::string &param_name, unsigned int index, std::size_t t_index) const
 
const PostprocessorValue & getPostprocessorValueInternal (const std::string &param_name, unsigned int index, std::size_t t_index) const
 
const PostprocessorValue & getPostprocessorValueByNameInternal (const PostprocessorName &name, std::size_t t_index) const
 
const PostprocessorValue & getPostprocessorValueByNameInternal (const PostprocessorName &name, std::size_t t_index) const
 
void possiblyCheckHasVectorPostprocessor (const std::string &param_name, const std::string &vector_name) const
 
void possiblyCheckHasVectorPostprocessor (const std::string &param_name, const std::string &vector_name) const
 
void possiblyCheckHasVectorPostprocessorByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
void possiblyCheckHasVectorPostprocessorByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 

Static Private Member Functions

static const hit::Node * getHitNode (const InputParameters &params)
 
static std::string messagePrefix (const InputParameters &params, const bool hit_prefix)
 
static void setRMParams (const InputParameters &obj_params, InputParameters &rm_params, const unsigned short ghost_layers)
 
static void parameterError (const InputParameters &obj_params, const std::string &parameter_name, const std::string &function_name, const std::string &description)
 

Private Attributes

const PorousRhieChowMassFlux & _porous_mass_flux_provider
 Porous Rhie-Chow object supplying porosity and pressure-baffle data.
 
const ParallelParamObject & _parent
 
const MooseBase & _si_moose_base
 
const FEProblemBase * _si_problem
 
ExecFlagEnum _empty_execute_enum
 
const MooseObject & _fni_object
 
const InputParameters & _fni_params
 
FEProblemBase & _fni_feproblem
 
const THREAD_ID _fni_tid
 
const MooseObject & _uoi_moose_object
 
const FEProblemBase & _uoi_feproblem
 
const THREAD_ID _uoi_tid
 
const std::string _ti_name
 
const MooseObject & _ppi_moose_object
 
const InputParameters & _ppi_params
 
const FEProblemBase & _ppi_feproblem
 
std::map< PostprocessorName, std::unique_ptr< PostprocessorValue > > _default_values
 
const bool _broadcast_by_default
 
const MooseObject & _vpi_moose_object
 
const FEProblemBase & _vpi_feproblem
 
const THREAD_ID _vpi_tid
 
RandomData * _random_data
 
MooseRandom * _generator
 
FEProblemBase & _ri_problem
 
const std::string _ri_name
 
unsigned int _master_seed
 
bool _is_nodal
 
ExecFlagType _reset_on
 
const Node *const & _curr_node
 
const Elem *const & _curr_element
 
const RestartableDataMapName _metaname
 
std::string _restartable_name
 
std::set< TagID > _vector_tags
 
std::set< TagID > _abs_vector_tags
 
std::set< TagID > _matrix_tags
 
std::set< TagID > _non_ref_vector_tags
 
std::set< TagID > _non_ref_abs_vector_tags
 
std::set< TagID > _ref_vector_tags
 
std::set< TagID > _ref_abs_vector_tags
 
const MooseObject & _moose_object
 
const InputParameters & _tag_params
 
std::vector< DenseVector< Number > * > _re_blocks
 
std::vector< DenseVector< Number > * > _absre_blocks
 
std::vector< DenseMatrix< Number > * > _ke_blocks
 
std::vector< Real > _absolute_residuals
 
std::set< SubdomainID > _blk_ids
 
std::vector< SubdomainID > _vec_ids
 
std::vector< SubdomainName > _blocks
 
const bool _blk_dual_restrictable
 
FEProblemBase * _blk_feproblem
 
const MooseMesh * _blk_mesh
 
const std::set< BoundaryID > _empty_boundary_ids
 
const std::set< BoundaryID > & _boundary_ids
 
THREAD_ID _blk_tid
 
const std::string & _blk_name
 
unsigned int _blk_dim
 
Moose::Kokkos::Array< ContiguousElementID > _kokkos_element_ids
 
Moose::Kokkos::Array< ContiguousNodeID > _kokkos_node_ids
 
Moose::Kokkos::Array< Moose::Kokkos::Pair< ContiguousElementID, unsigned int > > _kokkos_element_side_ids
 
const InputParameters & _fi_params
 
const std::string _fi_name
 
SubProblem *const _fi_subproblem
 
const THREAD_ID _fi_tid
 
std::vector< std::unique_ptr< Moose::Functor< Real > > > _default_real_functors
 
std::vector< std::unique_ptr< Moose::Functor< ADReal > > > _default_ad_real_functors
 
std::set< MooseVariableFieldBase * > _moose_variable_dependencies
 

Detailed Description

Momentum flux kernel for porous equations written in superficial velocity.

The advective contribution is divided by the porosity on each side of a face. Internal baffle faces advect the upstream interstitial tangential velocity with each side's normal velocity and transmit only a shear traction that depends on which sides are clear fluid.

Definition at line 23 of file LinearPWCNSFVMomentumFlux.h.

Constructor & Destructor Documentation

◆ LinearPWCNSFVMomentumFlux()

LinearPWCNSFVMomentumFlux::LinearPWCNSFVMomentumFlux ( const InputParameters &  params)

Construct the porous momentum flux kernel.

Parameters
paramsThe input parameters for the kernel

Definition at line 27 of file LinearPWCNSFVMomentumFlux.C.

29 _porous_mass_flux_provider(getUserObject<PorousRhieChowMassFlux>("rhie_chow_user_object"))
30{
31}
const PorousRhieChowMassFlux & _porous_mass_flux_provider
Porous Rhie-Chow object supplying porosity and pressure-baffle data.
Kernel that implements the stress tensor and advection terms for the momentum equation.

Member Function Documentation

◆ addMatrixContribution()

void LinearPWCNSFVMomentumFlux::addMatrixContribution ( )
overridevirtual

Assemble the internal-face matrix with side-specific porosity scaling of advection.

Reimplemented from LinearFVFluxKernel.

Definition at line 34 of file LinearPWCNSFVMomentumFlux.C.

35{
36 // porosity jumps are always internal to the domain
37 if (_current_face_type != FaceInfo::VarFaceNeighbors::BOTH)
38 {
40 return;
41 }
42
45
48
49 BaffleStressData stress;
51 stress = baffleStressData();
52 else
53 {
54 const Real transmissibility = computeInternalStressMatrixContribution();
55 stress = {transmissibility, -transmissibility, -transmissibility, transmissibility, 0.0, 0.0};
56 }
57
58 const Real scale_elem = inversePorosity(/*elem_side=*/true);
59 const Real scale_neighbor = inversePorosity(/*elem_side=*/false);
60
61 // No per-side block check is needed: the base class requires the kernel and the variable to
62 // share a block restriction, so on a face with the variable on both sides both cells are in
63 // this kernel's blocks.
64 _matrix_contribution(0, 0) = (adv_elem * scale_elem + stress.elem_elem) * _current_face_area;
66 (adv_neighbor * scale_elem + stress.elem_neighbor) * _current_face_area;
68 (-adv_elem * scale_neighbor + stress.neighbor_elem) * _current_face_area;
70 (-adv_neighbor * scale_neighbor + stress.neighbor_neighbor) * _current_face_area;
71
72 for (auto & matrix : _matrices)
73 (*matrix).add_matrix(_matrix_contribution, _dof_indices.get_values());
74}
const std::vector< std::vector< dof_id_type > > & dofIndices() const
const ElemInfo * elemInfo() const
const ElemInfo * neighborInfo() const
FaceInfo::VarFaceNeighbors _current_face_type
DenseMatrix< Real > _matrix_contribution
DenseVector< dof_id_type > _dof_indices
virtual void addMatrixContribution() override
const FaceInfo * _current_face_info
const unsigned int _sys_num
const unsigned int _var_num
Real inversePorosity(bool elem_side) const
Return the inverse porosity on one side of the current face.
BaffleStressData baffleStressData() const
Compute the stress on the current baffle face, per unit face area.
std::vector< SparseMatrix< Number > * > _matrices
Real computeInternalStressMatrixContribution()
Computes the matrix contribution of the stress term on the current face when the face is an internal ...
Real computeInternalAdvectionElemMatrixContribution()
Computes the matrix contribution of the advective flux on the element side of current face when the f...
Real computeInternalAdvectionNeighborMatrixContribution()
Computes the matrix contribution of the advective flux on the neighbor side of current face when the ...
bool faceIsBaffle(const FaceInfo &fi) const
Whether a face is governed by a pressure-jump model.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ baffleStressData()

LinearPWCNSFVMomentumFlux::BaffleStressData LinearPWCNSFVMomentumFlux::baffleStressData ( ) const
private

Compute the stress on the current baffle face, per unit face area.

Only a shear traction is transmitted: between two clear sides with the two-point transmissibility, from a clear side against the superficial cell velocity of a porous side, and none between two porous sides.

Definition at line 166 of file LinearPWCNSFVMomentumFlux.C.

167{
168 const auto & fi = *_current_face_info;
169 const auto & elem_info = *fi.elemInfo();
170 const auto & neighbor_info = *fi.neighborInfo();
171 const auto state = determineState();
172 const auto & normal = fi.normal();
173
174 // A side of unit porosity is clear fluid; any other side is a porous medium. The viscous
175 // (Brinkman) layer on the porous side of an interface is of the order of the square root of the
176 // permeability, much thinner than the cells next to a lumped interface. Clear fluid therefore
177 // shears against the porous side as against a rough wall moving with the superficial velocity
178 // of the porous medium at the interface, and two porous sides transmit no shear.
179 const bool elem_clear = isClearFluidSide(/*elem_side=*/true);
180 const bool neighbor_clear = isClearFluidSide(/*elem_side=*/false);
181 if (!elem_clear && !neighbor_clear)
182 return {0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
183
184 // Viscosity varies continuously, so the face value serves both half-cells, as on ordinary faces.
185 const Real face_viscosity = _mu(makeCDFace(fi), state);
186 if (face_viscosity == 0.0)
187 return {0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
188
189 const auto elem_to_face = fi.faceCentroid() - elem_info.centroid();
190 const auto face_to_neighbor = neighbor_info.centroid() - fi.faceCentroid();
191 const Real elem_distance =
192 _use_nonorthogonal_correction ? std::abs(elem_to_face * normal) : elem_to_face.norm();
193 const Real neighbor_distance =
194 _use_nonorthogonal_correction ? std::abs(face_to_neighbor * normal) : face_to_neighbor.norm();
195
196 // The shear traction q_t = T (I - n n) (U_N,f - U_P,f) acts between the superficial face
197 // velocities of the two sides. A clear side extrapolates its face velocity across its half-cell,
198 // whose resistance is d_s / mu_f; a porous side adds no resistance. Hence
199 // 1 / T = sum of d_s / mu_f over the clear sides,
200 // which for two clear sides is the ordinary two-point transmissibility.
201 Real distance = 0.0;
202 if (elem_clear)
203 distance += elem_distance;
204 if (neighbor_clear)
205 distance += neighbor_distance;
206 const Real transmissibility = face_viscosity / distance;
207
208 // The explicit nonorthogonal corrections c_s = grad(U)_s . (n - d_Pf,s / d_s) of each clear
209 // half-cell enter the same balance as the face values.
210 RealVectorValue elem_correction;
211 RealVectorValue neighbor_correction;
213 {
214 const auto elem_correction_vector = normal - elem_to_face / elem_distance;
215 const auto neighbor_correction_vector = normal - face_to_neighbor / neighbor_distance;
216 for (const auto component : make_range(_dim))
217 {
218 const auto & gradient = velocityGradientField(component);
219 if (elem_clear)
220 elem_correction(component) = gradient.gradient(elem_info) * elem_correction_vector;
221 if (neighbor_clear)
222 neighbor_correction(component) =
223 gradient.gradient(neighbor_info) * neighbor_correction_vector;
224 }
225 }
226
227 RealVectorValue elem_velocity;
228 RealVectorValue neighbor_velocity;
229 for (const auto component : make_range(_dim))
230 {
231 const auto & velocity = velocityVar(component);
232 elem_velocity(component) = velocity.getElemValue(elem_info, state);
233 neighbor_velocity(component) = velocity.getElemValue(neighbor_info, state);
234 }
235
236 // A porous side's face velocity is the extrapolated face state that the baffle advection also
237 // uses, so the clear fluid shears against the porous velocity at the interface rather than at
238 // the cell center. It is exact for a linear velocity and so needs no nonorthogonal correction.
239 const auto elem_face_velocity =
240 elem_clear ? RealVectorValue(elem_velocity - elem_distance * elem_correction)
241 : _porous_mass_flux_provider.baffleFaceVelocity(fi, /*elem_side=*/true);
242 const auto neighbor_face_velocity =
243 neighbor_clear ? RealVectorValue(neighbor_velocity + neighbor_distance * neighbor_correction)
244 : _porous_mass_flux_provider.baffleFaceVelocity(fi, /*elem_side=*/false);
245 const auto face_velocity_difference = neighbor_face_velocity - elem_face_velocity;
246 const auto shear_traction =
247 transmissibility * (face_velocity_difference - (face_velocity_difference * normal) * normal);
248
249 // There is no normal viscous stress on a baffle face: the pressure jump carries the normal
250 // momentum balance, and a normal stress of the interstitial velocity would read the jump of
251 // mdot / (rho_f eps_s) as a gradient. The element row adds -q_t, the neighbor row +q_t. The part
252 // proportional to the kernel variable is implicit; everything else, including the coupling to the
253 // other velocity components, is lagged on the right-hand side.
254 const Real n_i = normal(_index);
255 const Real coefficient = transmissibility * (1.0 - n_i * n_i);
256
257 BaffleStressData data;
258 data.elem_elem = coefficient;
259 data.elem_neighbor = -coefficient;
260 data.neighbor_elem = -coefficient;
261 data.neighbor_neighbor = coefficient;
262 data.elem_rhs =
263 shear_traction(_index) + coefficient * (elem_velocity(_index) - neighbor_velocity(_index));
264 data.neighbor_rhs =
265 -shear_traction(_index) + coefficient * (neighbor_velocity(_index) - elem_velocity(_index));
266
267 // The deviatoric stress is lagged in each clear half-cell.
269 {
270 if (elem_clear)
271 data.elem_rhs +=
272 face_viscosity * computeCellStressExplicitCorrection(elem_info, RealVectorValue());
273 if (neighbor_clear)
274 data.neighbor_rhs -=
275 face_viscosity * computeCellStressExplicitCorrection(neighbor_info, RealVectorValue());
276 }
277
278 return data;
279}
Moose::FaceArg makeCDFace(const FaceInfo &fi, const bool correct_skewness=false) const
bool isClearFluidSide(bool elem_side) const
Whether one side of the current face is clear fluid, i.e.
const MooseLinearVariableFVReal & velocityVar(unsigned int dir) const
Helper to access the velocity variable for a given direction.
const Moose::Functor< Real > & _mu
The functor for the dynamic viscosity.
Real computeCellStressExplicitCorrection(const ElemInfo &cell_info, const RealVectorValue &nonorthogonal_correction_vector) const
Compute the explicit stress correction reconstructed from one adjacent cell.
const LinearFVGradientReader & velocityGradientField(unsigned int dir) const
Helper to access the velocity gradient field for a given direction.
const unsigned int _index
Index x|y|z, this is mainly to handle the deviatoric parts correctly in in the stress term.
const bool _use_deviatoric_terms
Switch to enable/disable deviatoric parts in the stress term.
const unsigned int _dim
The dimension of the mesh.
const bool _use_nonorthogonal_correction
Switch to enable/disable nonorthogonal correction in the stress term.
virtual const OutputTools< Real >::VariableGradient & gradient()
Moose::StateArg determineState() const
LIBMESH_DEVICE_INLINE auto norm(const T &a)
VectorValue< Real > RealVectorValue
IntRange< T > make_range(T beg, T end)
Real distance(const Point &p)

Referenced by addMatrixContribution(), computeElemRightHandSideContribution(), and computeNeighborRightHandSideContribution().

◆ computeAdvectionBoundaryMatrixContribution()

Real LinearPWCNSFVMomentumFlux::computeAdvectionBoundaryMatrixContribution ( const LinearFVAdvectionDiffusionBC *  bc)
overrideprotectedvirtual

Compute the boundary advection matrix contribution with local porosity scaling.

Reimplemented from LinearWCNSFVMomentumFlux.

Definition at line 105 of file LinearPWCNSFVMomentumFlux.C.

107{
108 const auto boundary_value_matrix_contrib = bc->computeBoundaryValueMatrixContribution();
109 const bool elem_side = _current_face_type != FaceInfo::VarFaceNeighbors::NEIGHBOR;
110 return boundary_value_matrix_contrib * _face_mass_flux * inversePorosity(elem_side);
111}
virtual Real computeBoundaryValueMatrixContribution() const=0
Real _face_mass_flux
Container for the mass flux on the face which will be reused in the advection term's matrix and right...

◆ computeAdvectionBoundaryRHSContribution()

Real LinearPWCNSFVMomentumFlux::computeAdvectionBoundaryRHSContribution ( const LinearFVAdvectionDiffusionBC *  bc)
overrideprotectedvirtual

Compute the boundary advection right-hand-side contribution with local porosity scaling.

Reimplemented from LinearWCNSFVMomentumFlux.

Definition at line 114 of file LinearPWCNSFVMomentumFlux.C.

116{
117 const auto boundary_value_rhs_contrib = bc->computeBoundaryValueRHSContribution();
118 const bool elem_side = _current_face_type != FaceInfo::VarFaceNeighbors::NEIGHBOR;
119 return -boundary_value_rhs_contrib * _face_mass_flux * inversePorosity(elem_side);
120}
virtual Real computeBoundaryValueRHSContribution() const=0

◆ computeBaffleAdvectionExplicitCorrection()

Real LinearPWCNSFVMomentumFlux::computeBaffleAdvectionExplicitCorrection ( bool  elem_side) const
private

Compute the correction that replaces the shared advected state with the baffle face state: the upstream interstitial tangential velocity and this side's extrapolated normal velocity.

Parameters
elem_sideWhether to compute the correction for the element side

Definition at line 123 of file LinearPWCNSFVMomentumFlux.C.

124{
126 return 0.0;
127
128 const auto state_arg = determineState();
129
130 const auto & fi = *_current_face_info;
131 const Real u_elem = _var.getElemValue(*fi.elemInfo(), state_arg);
132 const Real u_neighbor = _var.getElemValue(*fi.neighborInfo(), state_arg);
133 // Keep the shared internal-face stencil, then explicitly replace the interpolated superficial
134 // velocity on baffle faces. Interpolating across the baffle would mix the two sides of the
135 // velocity jump, and the cell value alone would miss the variation between the cell center and
136 // the face.
137 const Real shared_advected_velocity = _adv_interp_result.weights_matrix.first * u_elem +
138 _adv_interp_result.weights_matrix.second * u_neighbor;
139
140 // With V_s the velocity of side s extrapolated to the face, both sides advect the interstitial
141 // tangential velocity u_t,f = (I - n n) V_up / eps_up of the upstream side, so the tangential
142 // momentum flux mdot u_t,f leaving one side enters the other and the face is no source of
143 // tangential momentum. Mass conservation fixes the normal superficial velocity from the shared
144 // face mass flux, U_n = mdot / rho_f, with the face-interpolated density rho_f standing in for
145 // both sides because density is assumed to vary smoothly across the baffle. The pressure jump
146 // balances the normal momentum difference. Side s therefore advects
147 // V*_s = eps_s u_t,f + U_n n.
148 const auto & normal = fi.normal();
149 const bool upstream_elem_side = _face_mass_flux >= 0.0;
150 const auto upstream_velocity =
151 _porous_mass_flux_provider.baffleFaceVelocity(fi, upstream_elem_side);
152 const auto interstitial_tangential_velocity =
153 (upstream_velocity - (upstream_velocity * normal) * normal) *
154 inversePorosity(upstream_elem_side);
155 const Real normal_velocity = _porous_mass_flux_provider.baffleNormalVelocity(fi);
156 const Real baffle_advected_velocity =
157 interstitial_tangential_velocity(_index) / inversePorosity(elem_side) +
158 normal_velocity * normal(_index);
159 const Real factor = elem_side ? 1.0 : -1.0;
160
161 return factor * _face_mass_flux * inversePorosity(elem_side) *
162 (shared_advected_velocity - baffle_advected_velocity) * _current_face_area;
163}
MooseLinearVariableFV< Real > & _var
FVAdvectedInterpolationMethod::AdvectedSystemContribution _adv_interp_result
Current advected interpolation contribution on the face.
Real getElemValue(const ElemInfo &elem_info, const StateArg &state) const
Real baffleNormalVelocity(const FaceInfo &fi) const
Return the normal superficial velocity at a baffle face, recovered from the shared face mass flux and...
RealVectorValue baffleFaceVelocity(const FaceInfo &fi, bool elem_side) const
Return the superficial velocity at a baffle face as seen from one side.

Referenced by computeElemRightHandSideContribution(), and computeNeighborRightHandSideContribution().

◆ computeBoundaryMatrixContribution()

Real LinearWCNSFVMomentumFlux::computeBoundaryMatrixContribution ( const LinearFVBoundaryCondition &  bc)
overridevirtualinherited

Implements LinearFVFluxKernel.

Definition at line 168 of file LinearWCNSFVMomentumFlux.C.

169{
170 const auto * const adv_diff_bc = cast_ptr<const LinearFVAdvectionDiffusionBC *>(&bc);
171
172 mooseAssert(adv_diff_bc, "This should be a valid BC!");
173 return (computeStressBoundaryMatrixContribution(adv_diff_bc) +
176}
virtual Real computeAdvectionBoundaryMatrixContribution(const LinearFVAdvectionDiffusionBC *bc)
Computes the matrix contributions of the boundary conditions resulting from the advection term.
Real computeStressBoundaryMatrixContribution(const LinearFVAdvectionDiffusionBC *bc)
Computes the matrix contributions of the boundary conditions resulting from the stress tensor.

◆ computeBoundaryRHSContribution()

Real LinearWCNSFVMomentumFlux::computeBoundaryRHSContribution ( const LinearFVBoundaryCondition &  bc)
overridevirtualinherited

Implements LinearFVFluxKernel.

Definition at line 179 of file LinearWCNSFVMomentumFlux.C.

180{
181 const auto * const adv_diff_bc = cast_ptr<const LinearFVAdvectionDiffusionBC *>(&bc);
182 mooseAssert(adv_diff_bc, "This should be a valid BC!");
183 return (computeStressBoundaryRHSContribution(adv_diff_bc) +
186}
virtual Real computeAdvectionBoundaryRHSContribution(const LinearFVAdvectionDiffusionBC *bc)
Computes the right hand side contributions of the boundary conditions resulting from the advection te...
Real computeStressBoundaryRHSContribution(const LinearFVAdvectionDiffusionBC *bc)
Computes the right hand side contributions of the boundary conditions resulting from the stress tenso...

◆ computeCellStressExplicitCorrection()

Real LinearWCNSFVMomentumFlux::computeCellStressExplicitCorrection ( const ElemInfo &  cell_info,
const RealVectorValue &  nonorthogonal_correction_vector 
) const
protectedinherited

Compute the explicit stress correction reconstructed from one adjacent cell.

Parameters
cell_infoThe cell where velocity gradients and values are evaluated
nonorthogonal_correction_vectorThe geometric correction vector for this cell

Definition at line 269 of file LinearWCNSFVMomentumFlux.C.

271{
272 Real correction = 0.0;
273
275 {
276 mooseAssert(_gradient_field, "Gradient field should be registered when gradients are needed.");
277 // Get the kernel variable gradient from this cell.
278 correction += _gradient_field->gradient(cell_info) * nonorthogonal_correction_vector;
279 }
280
281 // Scenario (2), account for the deviatoric parts of the stress tensor.
283 {
284 std::array<RealGradient, 3> gradients;
285 Real trace = 0.0;
286 RealVectorValue deviatoric_vector;
287
288 // Loop over every velocity component to form the symmetric gradient pieces.
289 for (const auto dir : make_range(_dim))
290 {
291 gradients[dir] = velocityGradientField(dir).gradient(cell_info);
292 trace += gradients[dir](dir);
293 }
294
295 if (_coord_type == Moose::CoordinateSystemType::COORD_RZ)
297 cell_info.centroid()(_rz_radial_coord);
298
299 // Assemble the explicit transpose/trace contribution component by component.
300 for (const auto dir : make_range(_dim))
301 {
302 gradients[dir](dir) -= 2.0 / 3.0 * trace;
303 deviatoric_vector(dir) = gradients[dir](_index);
304 }
305
306 correction += deviatoric_vector * _current_face_info->normal();
307 }
308
309 return correction;
310}
const Point & centroid() const
const Point & normal() const
RealVectorValue gradient(const ElemInfo &elem_info) const
const unsigned int _rz_radial_coord
Axisymmetric radial coordinate index (only used when in RZ)
const Moose::CoordinateSystemType _coord_type
Coordinate system of the blocks this kernel operates on.
const LinearFVGradientReader * _gradient_field
Gradient field used for the kernel variable nonorthogonal correction.
Real trace(const RealTensor &A, const unsigned int &dim)

Referenced by baffleStressData(), LinearWCNSFVMomentumFlux::computeInternalStressExplicitCorrection(), and LinearWCNSFVMomentumFlux::computeStressBoundaryRHSContribution().

◆ computeElemMatrixContribution()

Real LinearWCNSFVMomentumFlux::computeElemMatrixContribution ( )
overridevirtualinherited

◆ computeElemRightHandSideContribution()

Real LinearPWCNSFVMomentumFlux::computeElemRightHandSideContribution ( )
overridevirtual

Compute the element-row internal-face right-hand-side contribution.

Reimplemented from LinearWCNSFVMomentumFlux.

Definition at line 77 of file LinearPWCNSFVMomentumFlux.C.

78{
80 const Real stress_rhs =
83 const Real advection_rhs = correct_baffle
84 ? 0.0
86 inversePorosity(/*elem_side=*/true) * _current_face_area;
87 return stress_rhs + advection_rhs + computeBaffleAdvectionExplicitCorrection(/*elem_side=*/true);
88}
Real computeBaffleAdvectionExplicitCorrection(bool elem_side) const
Compute the correction that replaces the shared advected state with the baffle face state: the upstre...
Real computeInternalStressRHSContribution()
Computes the right hand side contribution of the stress term on the current face when the face is an ...
Real elem_rhs
Explicit parts of the element and neighbor rows.

◆ computeInternalAdvectionElemMatrixContribution()

Real LinearWCNSFVMomentumFlux::computeInternalAdvectionElemMatrixContribution ( )
protectedinherited

Computes the matrix contribution of the advective flux on the element side of current face when the face is an internal face (doesn't have associated boundary conditions).

Definition at line 189 of file LinearWCNSFVMomentumFlux.C.

190{
192}

Referenced by addMatrixContribution(), and LinearWCNSFVMomentumFlux::computeElemMatrixContribution().

◆ computeInternalAdvectionNeighborMatrixContribution()

Real LinearWCNSFVMomentumFlux::computeInternalAdvectionNeighborMatrixContribution ( )
protectedinherited

Computes the matrix contribution of the advective flux on the neighbor side of current face when the face is an internal face (doesn't have associated boundary conditions).

Definition at line 195 of file LinearWCNSFVMomentumFlux.C.

196{
198}

Referenced by addMatrixContribution(), and LinearWCNSFVMomentumFlux::computeNeighborMatrixContribution().

◆ computeInternalStressExplicitCorrection()

Real LinearWCNSFVMomentumFlux::computeInternalStressExplicitCorrection ( ) const
protectedinherited

Computes the explicit internal-face stress correction.

Definition at line 239 of file LinearWCNSFVMomentumFlux.C.

240{
241 // We can have contributions to the right hand side in two occasions:
242 // (1) when we use nonorthogonal correction for the normal gradients
243 // (2) when we request the deviatoric parts of the stress tensor. (needed for space-dependent
244 // viscosities for example)
246 return 0.0;
247
248 // Scenario (1), add the nonorthogonal correction. In 1D, there is no correction.
249 RealVectorValue correction_vector;
251 correction_vector =
254
255 // Interpolate the two cell corrections to the face.
256 const auto interp_coeffs =
257 interpCoeffs(Moose::FV::InterpMethod::Average, *_current_face_info, true);
258 const Real elem_correction =
260 const Real neighbor_correction =
262
263 const auto face_arg = makeCDFace(*_current_face_info);
264 return _mu(face_arg, determineState()) *
265 (interp_coeffs.first * elem_correction + interp_coeffs.second * neighbor_correction);
266}
const Point & eCN() const
std::pair< Real, Real > interpCoeffs(const InterpMethod m, const FaceInfo &fi, const bool one_is_elem, const T &face_flux=0.0)

Referenced by LinearWCNSFVMomentumFlux::computeInternalStressRHSContribution().

◆ computeInternalStressMatrixContribution()

Real LinearWCNSFVMomentumFlux::computeInternalStressMatrixContribution ( )
protectedinherited

Computes the matrix contribution of the stress term on the current face when the face is an internal face (doesn't have associated boundary conditions).

Definition at line 201 of file LinearWCNSFVMomentumFlux.C.

202{
203 // If we don't have the value yet, we compute it
205 {
208 }
209
211}
bool _cached_matrix_contribution
Real _stress_matrix_contribution
The cached matrix contribution.
Real computeInternalStressTransmissibility() const
Computes the implicit internal-face stress transmissibility.

Referenced by addMatrixContribution(), LinearWCNSFVMomentumFlux::computeElemMatrixContribution(), and LinearWCNSFVMomentumFlux::computeNeighborMatrixContribution().

◆ computeInternalStressRHSContribution()

Real LinearWCNSFVMomentumFlux::computeInternalStressRHSContribution ( )
protectedinherited

Computes the right hand side contribution of the stress term on the current face when the face is an internal face (doesn't have associated boundary conditions).

Definition at line 214 of file LinearWCNSFVMomentumFlux.C.

215{
217 {
220 }
221
223}
Real _stress_rhs_contribution
The cached right hand side contribution.
Real computeInternalStressExplicitCorrection() const
Computes the explicit internal-face stress correction.

Referenced by computeElemRightHandSideContribution(), LinearWCNSFVMomentumFlux::computeElemRightHandSideContribution(), computeNeighborRightHandSideContribution(), and LinearWCNSFVMomentumFlux::computeNeighborRightHandSideContribution().

◆ computeInternalStressTransmissibility()

Real LinearWCNSFVMomentumFlux::computeInternalStressTransmissibility ( ) const
protectedinherited

Computes the implicit internal-face stress transmissibility.

Definition at line 226 of file LinearWCNSFVMomentumFlux.C.

227{
228 const auto face_arg = makeCDFace(*_current_face_info);
229
230 // A nonorthogonal correction uses the normal component of the cell-to-cell vector.
233 : _current_face_info->dCNMag();
234
235 return _mu(face_arg, determineState()) / d;
236}
const Point & dCN() const

Referenced by LinearWCNSFVMomentumFlux::computeInternalStressMatrixContribution().

◆ computeNeighborMatrixContribution()

Real LinearWCNSFVMomentumFlux::computeNeighborMatrixContribution ( )
overridevirtualinherited

◆ computeNeighborRightHandSideContribution()

Real LinearPWCNSFVMomentumFlux::computeNeighborRightHandSideContribution ( )
overridevirtual

Compute the neighbor-row internal-face right-hand-side contribution.

Reimplemented from LinearWCNSFVMomentumFlux.

Definition at line 91 of file LinearPWCNSFVMomentumFlux.C.

92{
94 const Real stress_rhs =
97 const Real advection_rhs = correct_baffle
98 ? 0.0
100 inversePorosity(/*elem_side=*/false) * _current_face_area;
101 return stress_rhs + advection_rhs + computeBaffleAdvectionExplicitCorrection(/*elem_side=*/false);
102}

◆ computeStressBoundaryMatrixContribution()

Real LinearWCNSFVMomentumFlux::computeStressBoundaryMatrixContribution ( const LinearFVAdvectionDiffusionBC *  bc)
protectedinherited

Computes the matrix contributions of the boundary conditions resulting from the stress tensor.

Parameters
bcThe boundary condition whose contributions should be used

Definition at line 313 of file LinearWCNSFVMomentumFlux.C.

315{
316 auto grad_contrib = bc->computeBoundaryGradientMatrixContribution();
317 // If the boundary condition does not include the diffusivity contribution then
318 // add it here.
320 {
321 const auto face_arg = singleSidedFaceArg(_current_face_info);
322 grad_contrib *= _mu(face_arg, determineState());
323 }
324
325 return grad_contrib;
326}
virtual Real computeBoundaryGradientMatrixContribution() const=0
virtual bool includesMaterialPropertyMultiplier() const
Moose::FaceArg singleSidedFaceArg(const FaceInfo *fi, Moose::FV::LimiterType limiter_type=Moose::FV::LimiterType::CentralDifference, bool correct_skewness=false) const

Referenced by LinearWCNSFVMomentumFlux::computeBoundaryMatrixContribution().

◆ computeStressBoundaryRHSContribution()

Real LinearWCNSFVMomentumFlux::computeStressBoundaryRHSContribution ( const LinearFVAdvectionDiffusionBC *  bc)
protectedinherited

Computes the right hand side contributions of the boundary conditions resulting from the stress tensor.

Parameters
bcThe boundary condition whose contributions should be used

Definition at line 329 of file LinearWCNSFVMomentumFlux.C.

331{
332 const auto face_arg = singleSidedFaceArg(_current_face_info);
333 auto grad_contrib = bc->computeBoundaryGradientRHSContribution();
334 // If the boundary condition does not include the diffusivity contribution then
335 // add it here.
337 grad_contrib *= _mu(face_arg, determineState());
338
339 // We add the nonorthogonal corrector for the face here. Potential idea: we could do
340 // this in the boundary condition too. For now, however, we keep it like this.
342 {
343 // We support internal boundaries as well. In that case we have to decide on which side
344 // of the boundary we are on.
345 const auto elem_info = (_current_face_type == FaceInfo::VarFaceNeighbors::ELEM)
348
349 // Unit vector to the boundary. Unfortunately, we have to recompute it because the value
350 // stored in the face info is only correct for external boundaries
351 const auto e_Cf = _current_face_info->faceCentroid() - elem_info->centroid();
352 const auto correction_vector =
353 _current_face_info->normal() - 1 / (_current_face_info->normal() * e_Cf) * e_Cf;
354
355 const auto state_arg = determineState();
356 mooseAssert(_gradient_field, "Gradient field should be registered when gradients are needed.");
357 grad_contrib += _mu(face_arg, state_arg) * _gradient_field->gradient(*elem_info) *
358 _boundary_normal_factor * correction_vector;
359 }
360
361 // Complete prescribed fluxes already include all applicable stress contributions.
363 {
364 // We might be on a face which is an internal boundary so we want to make sure we
365 // get the gradient from the right side.
366 const auto elem_info = (_current_face_type == FaceInfo::VarFaceNeighbors::ELEM)
369
370 // A zero correction vector restricts the cell correction to its deviatoric part; the
371 // boundary nonorthogonal correction is added above. We support internal boundaries too so
372 // we have to make sure the normal points always outward.
373 grad_contrib += _mu(face_arg, determineState()) * _boundary_normal_factor *
375 }
376
377 return grad_contrib;
378}
const Point & faceCentroid() const
virtual bool providesCompleteBoundaryFlux() const
virtual Real computeBoundaryGradientRHSContribution() const=0
virtual bool needsBoundaryNonorthogonalCorrection() const
Real _boundary_normal_factor
Multiplier that ensures the normal of the boundary always points outwards, even in cases when the bou...

Referenced by LinearWCNSFVMomentumFlux::computeBoundaryRHSContribution().

◆ inversePorosity()

Real LinearPWCNSFVMomentumFlux::inversePorosity ( bool  elem_side) const
private

Return the inverse porosity on one side of the current face.

Parameters
elem_sideWhether to evaluate porosity on the element side

Definition at line 290 of file LinearPWCNSFVMomentumFlux.C.

291{
293 *_current_face_info, elem_side, determineState());
294 if (porosity <= 0.0)
295 mooseError("porosity must be positive on face ", _current_face_info->id(), ".");
296
297 return 1.0 / porosity;
298}
dof_id_type id() const
void mooseError(Args &&... args) const
Real getFaceSidePorosity(const FaceInfo &fi, bool elem_side, const Moose::StateArg &time) const
Return the porosity on one side of a face.

Referenced by addMatrixContribution(), computeAdvectionBoundaryMatrixContribution(), computeAdvectionBoundaryRHSContribution(), computeBaffleAdvectionExplicitCorrection(), computeElemRightHandSideContribution(), and computeNeighborRightHandSideContribution().

◆ isClearFluidSide()

bool LinearPWCNSFVMomentumFlux::isClearFluidSide ( bool  elem_side) const
private

Whether one side of the current face is clear fluid, i.e.

has unit porosity.

Parameters
elem_sideWhether to check the element side

Definition at line 282 of file LinearPWCNSFVMomentumFlux.C.

283{
284 return MooseUtils::absoluteFuzzyEqual(_porous_mass_flux_provider.getFaceSidePorosity(
285 *_current_face_info, elem_side, determineState()),
286 1.0);
287}

Referenced by baffleStressData().

◆ setupFaceData()

void LinearWCNSFVMomentumFlux::setupFaceData ( const FaceInfo *  face_info)
overridevirtualinherited

Set the current FaceInfo object.

We override this here to make sure the face velocity evaluation happens only once and that it can be reused for the matrix and right hand side contributions.

Parameters
face_infoThe face info which will be used as current face info

Reimplemented from LinearFVFluxKernel.

Definition at line 397 of file LinearWCNSFVMomentumFlux.C.

398{
400
401 // Multiplier that ensures the normal of the boundary always points outwards, even in cases
402 // when the boundary is within the mesh.
403 _boundary_normal_factor = (_current_face_type == FaceInfo::VarFaceNeighbors::ELEM) ? 1.0 : -1.0;
404
405 // Caching the mass flux on the face which will be reused in the advection term's matrix and
406 // right hand side contributions
408
409 if (_current_face_type == FaceInfo::VarFaceNeighbors::BOTH)
410 {
411 const auto state = determineState();
412 const auto & elem_info = *_current_face_info->elemInfo();
413 const auto & neighbor_info = *_current_face_info->neighborInfo();
414
415 const Real elem_value = _var.getElemValue(elem_info, state);
416 const Real neighbor_value = _var.getElemValue(neighbor_info, state);
417
419 {
420 mooseAssert(_advected_gradient_field,
421 "Gradient field should be registered when gradients are needed.");
424 }
425
427 elem_value,
428 neighbor_value,
432 }
433
434 // We'll have to set this to zero to make sure that we don't accumulate values over multiple
435 // faces. The matrix contribution should be fine.
437}
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
virtual void setupFaceData(const FaceInfo *face_info)
const LinearFVGradientReader *const _advected_gradient_field
Gradient field used by advected interpolations that require gradients.
VectorValue< Real > _elem_grad_storage
Reusable gradient storage used when advected interpolation requires gradients.
const FVAdvectedInterpolationMethod & _adv_interp_method
The interpolation method to use for the advected quantity.
VectorValue< Real > _neighbor_grad_storage
const RhieChowMassFlux & _mass_flux_provider
The Rhie-Chow user object that provides us with the face velocity.
Real getMassFlux(const FaceInfo &fi) const
Get the face velocity times density (used in advection terms)

◆ validParams()

InputParameters LinearPWCNSFVMomentumFlux::validParams ( )
static

Definition at line 20 of file LinearPWCNSFVMomentumFlux.C.

21{
23 params.addClassDescription("Momentum flux kernel with porous-specific advection handling.");
24 return params;
25}
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()

◆ velocityGradientField()

const LinearFVGradientReader & LinearWCNSFVMomentumFlux::velocityGradientField ( unsigned int  dir) const
protectedinherited

Helper to access the velocity gradient field for a given direction.

Definition at line 448 of file LinearWCNSFVMomentumFlux.C.

449{
450 mooseAssert(dir < _velocity_gradient_fields.size() && _velocity_gradient_fields[dir],
451 "Velocity gradient field for requested direction is not available.");
452 return *_velocity_gradient_fields[dir];
453}
std::array< const LinearFVGradientReader *, 3 > _velocity_gradient_fields
Gradient fields used for velocity variables in deviatoric stress terms.

Referenced by baffleStressData(), and LinearWCNSFVMomentumFlux::computeCellStressExplicitCorrection().

◆ velocityVar()

const MooseLinearVariableFVReal & LinearWCNSFVMomentumFlux::velocityVar ( unsigned int  dir) const
protectedinherited

Helper to access the velocity variable for a given direction.

Definition at line 440 of file LinearWCNSFVMomentumFlux.C.

441{
442 mooseAssert(dir < _velocity_vars.size() && _velocity_vars[dir],
443 "Velocity variable for requested direction is not available.");
444 return *_velocity_vars[dir];
445}
std::array< const MooseLinearVariableFVReal *, 3 > _velocity_vars
Velocity variables for each coordinate direction.

Referenced by baffleStressData(), and LinearWCNSFVMomentumFlux::computeCellStressExplicitCorrection().

Member Data Documentation

◆ _adv_interp_method

const FVAdvectedInterpolationMethod& LinearWCNSFVMomentumFlux::_adv_interp_method
protectedinherited

The interpolation method to use for the advected quantity.

Definition at line 124 of file LinearWCNSFVMomentumFlux.h.

Referenced by LinearWCNSFVMomentumFlux::setupFaceData().

◆ _adv_interp_result

FVAdvectedInterpolationMethod::AdvectedSystemContribution LinearWCNSFVMomentumFlux::_adv_interp_result
protectedinherited

◆ _advected_gradient_field

const LinearFVGradientReader* const LinearWCNSFVMomentumFlux::_advected_gradient_field
protectedinherited

Gradient field used by advected interpolations that require gradients.

Definition at line 127 of file LinearWCNSFVMomentumFlux.h.

Referenced by LinearWCNSFVMomentumFlux::setupFaceData().

◆ _boundary_normal_factor

Real LinearWCNSFVMomentumFlux::_boundary_normal_factor
protectedinherited

Multiplier that ensures the normal of the boundary always points outwards, even in cases when the boundary is within the mesh.

Definition at line 142 of file LinearWCNSFVMomentumFlux.h.

Referenced by LinearWCNSFVMomentumFlux::computeStressBoundaryRHSContribution(), and LinearWCNSFVMomentumFlux::setupFaceData().

◆ _coord_type

const Moose::CoordinateSystemType LinearWCNSFVMomentumFlux::_coord_type
protectedinherited

Coordinate system of the blocks this kernel operates on.

Definition at line 164 of file LinearWCNSFVMomentumFlux.h.

Referenced by LinearWCNSFVMomentumFlux::computeCellStressExplicitCorrection().

◆ _dim

const unsigned int LinearWCNSFVMomentumFlux::_dim
protectedinherited

◆ _elem_grad_storage

VectorValue<Real> LinearWCNSFVMomentumFlux::_elem_grad_storage
protectedinherited

Reusable gradient storage used when advected interpolation requires gradients.

Definition at line 133 of file LinearWCNSFVMomentumFlux.h.

Referenced by LinearWCNSFVMomentumFlux::setupFaceData().

◆ _face_mass_flux

Real LinearWCNSFVMomentumFlux::_face_mass_flux
protectedinherited

◆ _gradient_field

const LinearFVGradientReader* LinearWCNSFVMomentumFlux::_gradient_field
protectedinherited

Gradient field used for the kernel variable nonorthogonal correction.

Definition at line 158 of file LinearWCNSFVMomentumFlux.h.

Referenced by LinearWCNSFVMomentumFlux::computeCellStressExplicitCorrection(), and LinearWCNSFVMomentumFlux::computeStressBoundaryRHSContribution().

◆ _index

const unsigned int LinearWCNSFVMomentumFlux::_index
protectedinherited

Index x|y|z, this is mainly to handle the deviatoric parts correctly in in the stress term.

Definition at line 152 of file LinearWCNSFVMomentumFlux.h.

Referenced by baffleStressData(), computeBaffleAdvectionExplicitCorrection(), and LinearWCNSFVMomentumFlux::computeCellStressExplicitCorrection().

◆ _mass_flux_provider

const RhieChowMassFlux& LinearWCNSFVMomentumFlux::_mass_flux_provider
protectedinherited

The Rhie-Chow user object that provides us with the face velocity.

Definition at line 112 of file LinearWCNSFVMomentumFlux.h.

Referenced by LinearWCNSFVMomentumFlux::setupFaceData().

◆ _mu

const Moose::Functor<Real>& LinearWCNSFVMomentumFlux::_mu
protectedinherited

◆ _neighbor_grad_storage

VectorValue<Real> LinearWCNSFVMomentumFlux::_neighbor_grad_storage
protectedinherited

Definition at line 134 of file LinearWCNSFVMomentumFlux.h.

Referenced by LinearWCNSFVMomentumFlux::setupFaceData().

◆ _porous_mass_flux_provider

const PorousRhieChowMassFlux& LinearPWCNSFVMomentumFlux::_porous_mass_flux_provider
private

◆ _rz_radial_coord

const unsigned int LinearWCNSFVMomentumFlux::_rz_radial_coord
protectedinherited

Axisymmetric radial coordinate index (only used when in RZ)

Definition at line 167 of file LinearWCNSFVMomentumFlux.h.

Referenced by LinearWCNSFVMomentumFlux::computeCellStressExplicitCorrection().

◆ _stress_matrix_contribution

Real LinearWCNSFVMomentumFlux::_stress_matrix_contribution
protectedinherited

The cached matrix contribution.

Definition at line 145 of file LinearWCNSFVMomentumFlux.h.

Referenced by LinearWCNSFVMomentumFlux::computeInternalStressMatrixContribution().

◆ _stress_rhs_contribution

Real LinearWCNSFVMomentumFlux::_stress_rhs_contribution
protectedinherited

The cached right hand side contribution.

Definition at line 148 of file LinearWCNSFVMomentumFlux.h.

Referenced by LinearWCNSFVMomentumFlux::computeInternalStressRHSContribution(), and LinearWCNSFVMomentumFlux::setupFaceData().

◆ _use_deviatoric_terms

const bool LinearWCNSFVMomentumFlux::_use_deviatoric_terms
protectedinherited

◆ _use_nonorthogonal_correction

const bool LinearWCNSFVMomentumFlux::_use_nonorthogonal_correction
protectedinherited

◆ _velocity_gradient_fields

std::array<const LinearFVGradientReader *, 3> LinearWCNSFVMomentumFlux::_velocity_gradient_fields
protectedinherited

Gradient fields used for velocity variables in deviatoric stress terms.

Definition at line 161 of file LinearWCNSFVMomentumFlux.h.

Referenced by LinearWCNSFVMomentumFlux::LinearWCNSFVMomentumFlux(), and LinearWCNSFVMomentumFlux::velocityGradientField().

◆ _velocity_vars

std::array<const MooseLinearVariableFVReal *, 3> LinearWCNSFVMomentumFlux::_velocity_vars
protectedinherited

Velocity variables for each coordinate direction.

Definition at line 155 of file LinearWCNSFVMomentumFlux.h.

Referenced by LinearWCNSFVMomentumFlux::LinearWCNSFVMomentumFlux(), and LinearWCNSFVMomentumFlux::velocityVar().


The documentation for this class was generated from the following files: