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

A user object which implements the Rhie Chow interpolation for segregated momentum-pressure systems. More...

#include <INSFVRhieChowInterpolatorSegregated.h>

Inheritance diagram for INSFVRhieChowInterpolatorSegregated:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 
enum  ResidualTagType
 

Public Member Functions

 INSFVRhieChowInterpolatorSegregated (const InputParameters &params)
 
VectorValue< ADRealgetVelocity (const Moose::FV::InterpMethod m, const FaceInfo &fi, const Moose::StateArg &time, const THREAD_ID tid, bool subtract_mesh_velocity) const override
 Get the face velocity (used in advection terms)
 
void initFaceVelocities ()
 Initialize the container for face velocities.
 
void computeFaceVelocity ()
 Update the values of the face velocities in the containers.
 
void computeCellVelocity ()
 Update the cell values of the velocity variables.
 
void addToA (const libMesh::Elem *, unsigned int, const ADReal &) override
 We disable this for the segregated solver.
 
void meshChanged () override
 
void initialize () override
 
void execute () override
 
void finalize () override
 
bool segregated () const override
 Bool of the Rhie Chow user object is used in monolithic/segregated approaches.
 
void linkMomentumSystem (std::vector< NonlinearSystemBase * > momentum_systems, const std::vector< unsigned int > &momentum_system_numbers, const TagID pressure_gradient_tag)
 Update the momentum system-related information.
 
void computeHbyA (bool verbose)
 Computes the inverse of the digaonal (1/A) of the system matrix plus the H/A components for the pressure equation plus Rhie-Chow interpolation.
 
virtual Real getVolumetricFaceFlux (const Moose::FV::InterpMethod m, const FaceInfo &fi, const Moose::StateArg &time, const THREAD_ID tid, bool subtract_mesh_velocity) const override
 Retrieve the volumetric face flux, will not include derivatives.
 
Moose::FV::InterpMethod velocityInterpolationMethod () const
 Return the interpolation method used for velocity.
 
virtual void ghostADataOnBoundary (const BoundaryID)
 makes sure coefficient data gets communicated on both sides of a given boundary.
 
const INSFVPressureVariablepressure (THREAD_ID tid) const
 
const INSFVVelocityVariablevel () const
 
bool hasFaceSide (const FaceInfo &fi, const bool fi_elem_side) const override
 
virtual bool supportMeshVelocity () const
 Returns whether the UO can support mesh velocity advection.
 
virtual Real spatialValue (const Point &) const
 
virtual const std::vector< Point > spatialPoints () const
 
void setPrimaryThreadCopy (UserObject *primary)
 
UserObjectprimaryThreadCopy ()
 
SubProblemgetSubProblem () const
 
bool shouldDuplicateInitialExecution () const
 
void gatherSum (T &value)
 
void gatherMax (T &value)
 
void gatherMin (T &value)
 
void gatherProxyValueMax (T1 &proxy, T2 &value)
 
void gatherProxyValueMin (T1 &proxy, T2 &value)
 
std::set< UserObjectName > getDependObjects () const
 
const std::set< std::string > & getRequestedItems () override
 
const std::set< std::string > & getSuppliedItems () override
 
unsigned int systemNumber () const
 
virtual bool needThreadedCopy () const
 
virtual bool enabled () const
 
std::shared_ptr< MooseObjectgetSharedPtr ()
 
std::shared_ptr< const MooseObjectgetSharedPtr () const
 
bool isKokkosObject () const
 
MooseAppgetMooseApp () 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 InputParametersparameters () const
 
const hit::Node * getHitNode () const
 
bool hasBase () const
 
const std::string & getBase () const
 
const TgetParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const TqueryParam (const std::string &name) const
 
const TgetRenamedParam (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 customSetup (const ExecFlagType &)
 
const ExecFlagEnumgetExecuteOnEnum () const
 
UserObjectName getUserObjectName (const std::string &param_name) const
 
const TgetUserObject (const std::string &param_name, bool is_dependency=true) const
 
const TgetUserObjectByName (const UserObjectName &object_name, bool is_dependency=true) const
 
const UserObjectBasegetUserObjectBase (const std::string &param_name, bool is_dependency=true) const
 
const UserObjectBasegetUserObjectBaseByName (const UserObjectName &object_name, bool is_dependency=true) const
 
const std::vector< MooseVariableScalar * > & getCoupledMooseScalarVars ()
 
const std::set< TagID > & getScalarVariableCoupleableVectorTags () const
 
const std::set< TagID > & getScalarVariableCoupleableMatrixTags () const
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, MaterialData &material_data, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, MaterialData &material_data, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, const unsigned int state=0)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name, MaterialData &material_data)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data, const unsigned int state)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyByName (const std::string &prop_name_in)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOldByName (const std::string &prop_name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOlderByName (const std::string &prop_name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialProperty (const std::string &name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOld (const std::string &name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOlder (const std::string &name)
 
std::pair< const MaterialProperty< T > *, std::set< SubdomainID > > getBlockMaterialProperty (const MaterialPropertyName &name)
 
std::pair< Moose::Kokkos::MaterialProperty< T, dimension >, std::set< SubdomainID > > getKokkosBlockMaterialProperty (const MaterialPropertyName &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty ()
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialPropertyByName (const std::string &prop_name)
 
const MaterialProperty< T > & getZeroMaterialProperty (Ts... args)
 
std::set< SubdomainIDgetMaterialPropertyBlocks (const std::string &name)
 
std::vector< SubdomainName > getMaterialPropertyBlockNames (const std::string &name)
 
std::set< BoundaryIDgetMaterialPropertyBoundaryIDs (const std::string &name)
 
std::vector< BoundaryName > getMaterialPropertyBoundaryNames (const std::string &name)
 
void checkBlockAndBoundaryCompatibility (std::shared_ptr< MaterialBase > discrete)
 
std::unordered_map< SubdomainID, std::vector< MaterialBase * > > buildRequiredMaterials (bool allow_stateful=true)
 
void statefulPropertiesAllowed (bool)
 
virtual bool getMaterialPropertyCalled () const
 
virtual const std::unordered_set< unsigned int > & getMatPropDependencies () const
 
virtual void resolveOptionalProperties ()
 
const GenericMaterialProperty< T, is_ad > & getPossiblyConstantGenericMaterialPropertyByName (const MaterialPropertyName &prop_name, MaterialData &material_data, const unsigned int state)
 
bool isImplicit ()
 
Moose::StateArg determineState () const
 
virtual void threadJoin (const UserObject &) override
 
virtual void threadJoin (const UserObject &) override
 
virtual void subdomainSetup () override
 
virtual void subdomainSetup () override
 
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 GenericOptionalMaterialProperty< T, is_ad > & getGenericOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const GenericOptionalMaterialProperty< T, is_ad > & getGenericOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalMaterialProperty< T > & getOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalMaterialProperty< T > & getOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalADMaterialProperty< T > & getOptionalADMaterialProperty (const std::string &name)
 
const OptionalADMaterialProperty< T > & getOptionalADMaterialProperty (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOld (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOld (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOlder (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOlder (const std::string &name)
 
MaterialBasegetMaterial (const std::string &name)
 
MaterialBasegetMaterial (const std::string &name)
 
MaterialBasegetMaterialByName (const std::string &name, bool no_warn=false)
 
MaterialBasegetMaterialByName (const std::string &name, bool no_warn=false)
 
bool hasMaterialProperty (const std::string &name)
 
bool hasMaterialProperty (const std::string &name)
 
bool hasMaterialPropertyByName (const std::string &name)
 
bool hasMaterialPropertyByName (const std::string &name)
 
bool hasADMaterialProperty (const std::string &name)
 
bool hasADMaterialProperty (const std::string &name)
 
bool hasADMaterialPropertyByName (const std::string &name)
 
bool hasADMaterialPropertyByName (const std::string &name)
 
bool hasKokkosMaterialProperty (const std::string &name)
 
bool hasKokkosMaterialProperty (const std::string &name)
 
bool hasKokkosMaterialPropertyByName (const std::string &name)
 
bool hasKokkosMaterialPropertyByName (const std::string &name)
 
bool hasGenericMaterialProperty (const std::string &name)
 
bool hasGenericMaterialProperty (const std::string &name)
 
bool hasGenericMaterialPropertyByName (const std::string &name)
 
bool hasGenericMaterialPropertyByName (const std::string &name)
 
const FunctiongetFunction (const std::string &name) const
 
const FunctiongetFunctionByName (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 TgetKokkosFunction (const std::string &name) const
 
Moose::Kokkos::Function getKokkosFunctionByName (const FunctionName &name) const
 
const TgetKokkosFunctionByName (const FunctionName &name) const
 
bool hasKokkosFunction (const std::string &param_name) const
 
bool hasKokkosFunctionByName (const FunctionName &name) 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 VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOldByName (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
 
TgetSampler (const std::string &name)
 
SamplergetSampler (const std::string &name)
 
TgetSamplerByName (const SamplerName &name)
 
SamplergetSamplerByName (const SamplerName &name)
 
virtual void meshDisplaced ()
 
PerfGraphperfGraph ()
 
const PostprocessorValuegetPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (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 DistributiongetDistribution (const std::string &name) const
 
const TgetDistribution (const std::string &name) const
 
const DistributiongetDistribution (const std::string &name) const
 
const TgetDistribution (const std::string &name) const
 
const DistributiongetDistributionByName (const DistributionName &name) const
 
const TgetDistributionByName (const std::string &name) const
 
const DistributiongetDistributionByName (const DistributionName &name) const
 
const TgetDistributionByName (const std::string &name) const
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () 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 MooseVariableFieldBase &variable) const
 
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 Moose::Functor< Real > * defaultFunctor (const std::string &name)
 
const Moose::Functor< ADReal > * defaultFunctor (const std::string &name)
 

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 void sort (typename std::vector< T > &vector)
 
static void sortDFS (typename std::vector< T > &vector)
 
static void cyclicDependencyError (CyclicDependencyException< T2 > &e, const std::string &header, NameFunc &&name_func)
 
static void cyclicDependencyError (CyclicDependencyException< T2 > &e, const std::string &header)
 
static std::string deduceFunctorName (const std::string &name, const InputParameters &params)
 

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
 
static constexpr PropertyValue::id_type default_property_id
 
static constexpr PropertyValue::id_type zero_property_id
 
static constexpr auto SYSTEM
 
static constexpr auto NAME
 

Protected Member Functions

void populateHbyA (const std::vector< std::unique_ptr< NumericVector< Number > > > &raw_hbya, const std::vector< unsigned int > &var_nums)
 Populate the face values of the H/A field.
 
virtual const Moose::FunctorBase< ADReal > & epsilon (THREAD_ID tid) const
 A virtual method that allows us to only implement getVelocity once for free and porous flows.
 
template<typename Container >
void fillContainer (const std::string &var_name, Container &container)
 Fill the passed-in variable container with the thread copies of var_name.
 
template<typename VarType >
void checkBlocks (const VarType &var) const
 Check the block consistency between the passed in var and us.
 
virtual void addPostprocessorDependencyHelper (const PostprocessorName &name) const override
 
virtual void addVectorPostprocessorDependencyHelper (const VectorPostprocessorName &name) const override
 
virtual void addUserObjectDependencyHelper (const UserObjectBase &uo) const override
 
void addReporterDependencyHelper (const ReporterName &reporter_name) override
 
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 
const ReporterContextBasegetReporterContextBaseByName (const ReporterName &reporter_name) const
 
const ReporterNamegetReporterName (const std::string &param_name) const
 
TdeclareRestartableData (const std::string &data_name, Args &&... args)
 
ManagedValue< TdeclareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
const TgetRestartableData (const std::string &data_name) const
 
TdeclareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
TdeclareRecoverableData (const std::string &data_name, Args &&... args)
 
TdeclareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args)
 
TdeclareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args)
 
std::string restartableName (const std::string &data_name) const
 
const TgetMeshProperty (const std::string &data_name, const std::string &prefix)
 
const TgetMeshProperty (const std::string &data_name)
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name) const
 
bool hasMeshProperty (const std::string &data_name) const
 
std::string meshPropertyName (const std::string &data_name) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const
 
std::string timedSectionName (const std::string &section_name) const
 
bool isCoupledScalar (const std::string &var_name, unsigned int i=0) const
 
unsigned int coupledScalarComponents (const std::string &var_name) const
 
unsigned int coupledScalar (const std::string &var_name, unsigned int comp=0) const
 
libMesh::Order coupledScalarOrder (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< is_ad > & coupledGenericScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< false > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
const GenericVariableValue< true > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
const VariableValuecoupledVectorTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 
const VariableValuecoupledMatrixTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 
const VariableValuecoupledScalarValueOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarValueOlder (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDot (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDu (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDotDu (const std::string &var_name, unsigned int comp=0) const
 
const MooseVariableScalargetScalarVar (const std::string &var_name, unsigned int comp) const
 
virtual void checkMaterialProperty (const std::string &name, const unsigned int state)
 
virtual void getKokkosMaterialPropertyHook (const std::string &, const unsigned int)
 
void markMatPropRequested (const std::string &)
 
MaterialPropertyName getMaterialPropertyName (const std::string &name) const
 
void checkExecutionStage ()
 
const TgetReporterValue (const std::string &param_name, const std::size_t time_index=0)
 
const TgetReporterValue (const std::string &param_name, ReporterMode mode, const std::size_t time_index=0)
 
const TgetReporterValue (const std::string &param_name, const std::size_t time_index=0)
 
const TgetReporterValue (const std::string &param_name, ReporterMode mode, const std::size_t time_index=0)
 
const TgetReporterValueByName (const ReporterName &reporter_name, const std::size_t time_index=0)
 
const TgetReporterValueByName (const ReporterName &reporter_name, ReporterMode mode, const std::size_t time_index=0)
 
const TgetReporterValueByName (const ReporterName &reporter_name, const std::size_t time_index=0)
 
const TgetReporterValueByName (const ReporterName &reporter_name, ReporterMode mode, const std::size_t time_index=0)
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
const GenericMaterialProperty< T, is_ad > * defaultGenericMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > * defaultGenericMaterialProperty (const std::string &name)
 
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > * defaultADMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > * defaultADMaterialProperty (const std::string &name)
 
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
 
void prepareVectorTag (Assembly &assembly, unsigned int ivar)
 
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)
 
std::string deduceFunctorName (const std::string &name) 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)
 

Static Protected Member Functions

static std::string meshPropertyName (const std::string &data_name, const std::string &prefix)
 

Protected Attributes

FaceCenteredMapFunctor< RealVectorValue, std::unordered_map< dof_id_type, RealVectorValue > > _HbyA
 A map functor from faces to $HbyA_{ij} = (A_{offdiag}*\mathrm{(predicted~velocity)} - \mathrm{Source})_{ij}/A_{ij}$.
 
std::vector< std::unique_ptr< NumericVector< Number > > > _HbyA_raw
 We hold on to the cell-based HbyA vectors so that we can easily reconstruct the cell velocities as well.
 
CellCenteredMapFunctor< RealVectorValue, std::unordered_map< dof_id_type, RealVectorValue > > _Ainv
 A map functor from element IDs to $1/A_i$.
 
std::unique_ptr< PiecewiseByBlockLambdaFunctor< ADRealVectorValue > > _vel
 A functor for computing the (non-RC corrected) velocity.
 
FaceCenteredMapFunctor< RealVectorValue, std::unordered_map< dof_id_type, RealVectorValue > > _face_velocity
 A map functor from faces to face velocities which are used in the advection terms.
 
std::vector< NonlinearSystemBase * > _momentum_systems
 Pointers to the nonlinear system(s) corresponding to the momentum equation(s)
 
std::vector< unsigned int_momentum_system_numbers
 Numbers of the momentum system(s)
 
std::vector< libMesh::NonlinearImplicitSystem * > _momentum_implicit_systems
 Pointers to the momentum equation implicit system(s)
 
TagID _pressure_gradient_tag
 Residual tag corresponding to the pressure gradient contribution.
 
MooseMesh_moose_mesh
 The MooseMesh that this user object operates on.
 
const libMesh::MeshBase_mesh
 The libMesh mesh that this object acts on.
 
const unsigned int _dim
 The dimension of the mesh, e.g. 3 for hexes and tets, 2 for quads and tris.
 
INSFVPressureVariable *const _p
 The thread 0 copy of the pressure variable.
 
INSFVVelocityVariable *const _u
 The thread 0 copy of the x-velocity variable.
 
INSFVVelocityVariable *const _v
 The thread 0 copy of the y-velocity variable (null if the problem is 1D)
 
INSFVVelocityVariable *const _w
 The thread 0 copy of the z-velocity variable (null if the problem is not 3D)
 
std::vector< MooseVariableFVReal * > _ps
 All the thread copies of the pressure variable.
 
std::vector< MooseVariableFVReal * > _us
 All the thread copies of the x-velocity variable.
 
std::vector< MooseVariableFVReal * > _vs
 All the thread copies of the y-velocity variable.
 
std::vector< MooseVariableFVReal * > _ws
 All the thread copies of the z-velocity variable.
 
std::vector< unsigned int_var_numbers
 The velocity variable numbers.
 
Moose::FV::InterpMethod _velocity_interp_method
 The interpolation method to use for the velocity.
 
const bool _displaced
 Whether this object is operating on the displaced mesh.
 
const Moose::CoordinateSystemType_coord_sys
 
const THREAD_ID _tid
 
SubProblem_subproblem
 
SubProblem_subproblem
 
FEProblemBase_fe_problem
 
SystemBase_sys
 
Assembly_assembly
 
const bool _duplicate_initial_execution
 
std::set< std::string > _depend_uo
 
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
 
MooseApp_restartable_app
 
const std::string _restartable_system_name
 
const THREAD_ID _restartable_tid
 
const bool _restartable_read_only
 
FEProblemBase_mci_feproblem
 
FEProblemBase_mdi_feproblem
 
MooseApp_pg_moose_app
 
const std::string _prefix
 
FEProblemBase_sc_fe_problem
 
const THREAD_ID _sc_tid
 
const Real & _real_zero
 
const VariableValue_scalar_zero
 
const Point & _point_zero
 
const InputParameters_mi_params
 
const std::string _mi_name
 
const MooseObjectName _mi_moose_object_name
 
FEProblemBase_mi_feproblem
 
SubProblem_mi_subproblem
 
const THREAD_ID _mi_tid
 
const bool _is_kokkos_object
 
const Moose::MaterialDataType _material_data_type
 
MaterialData_material_data
 
bool _stateful_allowed
 
bool _get_material_property_called
 
std::vector< std::unique_ptr< PropertyValue > > _default_properties
 
std::unordered_set< unsigned int_material_property_dependencies
 
const MaterialPropertyName _get_suffix
 
const bool _use_interpolated_state
 
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
 
const Parallel::Communicator & _communicator
 
const MaterialData_blk_material_data
 
DenseVector< Number > _local_re
 
DenseMatrix< Number > _local_ke
 
DenseMatrix< Number > _nonlocal_ke
 

Static Protected Attributes

static const std::string _interpolated_old
 
static const std::string _interpolated_older
 

Private Member Functions

const Moose::FunctionBasegetKokkosFunctionByNameHelper (const FunctionName &name) const
 
const UserObjectBasegetUserObjectFromFEProblem (const UserObjectName &object_name, const THREAD_ID tid=0) const
 
const TcastUserObject (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 VectorPostprocessorValuegetVectorPostprocessorByNameHelper (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
 
bool reportersAdded () const
 
void possiblyCheckHasReporter (const ReporterName &reporter_name, const std::string &param_name="") const
 
RestartableDataValueregisterRestartableDataOnApp (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
 
virtual std::string meshPropertyPrefix (const std::string &data_name) const
 
const RestartableDataValuegetMeshPropertyInternal (const std::string &data_name, const std::string &prefix) const
 
void mooseErrorInternal (Args &&... args) const
 
const VariableValuegetDefaultValue (const std::string &var_name) const
 
const ADVariableValuegetADDefaultValue (const std::string &var_name) const
 
void checkVar (const std::string &var_name) const
 
void validateExecutionerType (const std::string &name, const std::string &fn_name) const
 
Moose::MaterialDataType getMaterialDataType (const std::set< BoundaryID > &boundary_ids) const
 
unsigned int getMaxQps () const
 
void addConsumedPropertyName (const MooseObjectName &obj_name, const std::string &prop_name)
 
const PostprocessorValuegetPostprocessorValueInternal (const std::string &param_name, unsigned int index, std::size_t t_index) const
 
const PostprocessorValuegetPostprocessorValueInternal (const std::string &param_name, unsigned int index, std::size_t t_index) const
 
const PostprocessorValuegetPostprocessorValueByNameInternal (const PostprocessorName &name, std::size_t t_index) const
 
const PostprocessorValuegetPostprocessorValueByNameInternal (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
 
void prepareVectorTagInternal (Assembly &assembly, unsigned int ivar, const std::set< TagID > &vector_tags, const std::set< TagID > &absolute_value_vector_tags)
 
void checkForNans () const
 
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)
 
virtual bool isADObject () const override
 

Static Private Member Functions

static const hit::Node * getHitNode (const InputParameters &params)
 
static std::string messagePrefix (const InputParameters &params, const bool hit_prefix)
 

Private Attributes

const Moose::ConstantFunctor< ADReal_unity_functor {1}
 A unity functor used in the epsilon virtual method.
 
UserObject_primary_thread_copy
 
std::set< std::string > _supplied_uo
 
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 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
 
const InputParameters_ri_params
 
FEProblemBase_ri_fe_problem_base
 
const ReporterData_ri_reporter_data
 
const MooseObject_ri_moose_object
 
const InputParameters_dni_params
 
FEProblemBase_dni_feproblem
 
const MooseObject *const _dni_moose_object_ptr
 
const InputParameters_si_params
 
FEProblemBase_si_feproblem
 
THREAD_ID _si_tid
 
const RestartableDataMapName _metaname
 
std::string _restartable_name
 
MooseApp_meta_data_app
 
const MooseObject *const _meta_data_object
 
const InputParameters_sc_parameters
 
const std::string & _sc_name
 
const bool _sc_is_implicit
 
std::unordered_map< std::string, std::vector< MooseVariableScalar * > > _coupled_scalar_vars
 
std::unordered_map< std::string, std::unique_ptr< VariableValue > > _default_value
 
std::unordered_map< std::string, std::unique_ptr< ADVariableValue > > _dual_default_value
 
std::vector< MooseVariableScalar * > _coupled_moose_scalar_vars
 
std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > _sc_coupled_vars
 
std::set< TagID_sc_coupleable_vector_tags
 
std::set< TagID_sc_coupleable_matrix_tags
 
const MooseObject_mi_moose_object
 
const bool _mi_boundary_restricted
 
const std::set< SubdomainID > & _mi_block_ids
 
const std::set< BoundaryID > & _mi_boundary_ids
 
std::vector< std::unique_ptr< OptionalMaterialPropertyProxyBase< MaterialPropertyInterface > > > _optional_property_proxies
 
const std::string _ti_name
 
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
 
const MooseObject_moose_object
 
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
 
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 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
 
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
 

Detailed Description

A user object which implements the Rhie Chow interpolation for segregated momentum-pressure systems.

Definition at line 33 of file INSFVRhieChowInterpolatorSegregated.h.

Constructor & Destructor Documentation

◆ INSFVRhieChowInterpolatorSegregated()

INSFVRhieChowInterpolatorSegregated::INSFVRhieChowInterpolatorSegregated ( const InputParameters params)

Definition at line 50 of file INSFVRhieChowInterpolatorSegregated.C.

53 _HbyA(_moose_mesh, blockIDs(), "HbyA"),
54 _Ainv(_moose_mesh, blockIDs(), "Ainv", false),
56 name(),
57 [this](const auto & r, const auto & t) -> ADRealVectorValue
58 {
59 ADRealVectorValue velocity((*_u)(r, t));
60 if (_dim >= 2)
61 velocity(1) = (*_v)(r, t);
62 if (_dim >= 3)
63 velocity(2) = (*_w)(r, t);
64 return velocity;
65 },
66 std::set<ExecFlagType>({EXEC_ALWAYS}),
68 blockIDs())),
69 _face_velocity(_moose_mesh, blockIDs(), "face_values")
70{
71 if (_displaced)
72 paramError("use_displaced_mesh",
73 "The segregated Rhie-Chow user object does not currently support operation on a "
74 "displaced mesh");
75
76 // Register the elemental/face functors which will be queried in the pressure equation
77 for (const auto tid : make_range(libMesh::n_threads()))
78 {
81 }
82
83 if (_velocity_interp_method == Moose::FV::InterpMethod::Average)
84 paramError("velocity_interp_method",
85 "Segregated momentum-pressure solvers do not allow average interpolation methods!");
86
87 if (!dynamic_cast<SIMPLENonlinearAssembly *>(getMooseApp().getExecutioner()))
88 mooseError(this->name(), " should only be used with a segregated thermal-hydraulics solver!");
89}
const ExecFlagType EXEC_ALWAYS
virtual const std::set< SubdomainID > & blockIDs() const
std::unique_ptr< PiecewiseByBlockLambdaFunctor< ADRealVectorValue > > _vel
A functor for computing the (non-RC corrected) velocity.
FaceCenteredMapFunctor< RealVectorValue, std::unordered_map< dof_id_type, RealVectorValue > > _face_velocity
A map functor from faces to face velocities which are used in the advection terms.
CellCenteredMapFunctor< RealVectorValue, std::unordered_map< dof_id_type, RealVectorValue > > _Ainv
A map functor from element IDs to $1/A_i$.
FaceCenteredMapFunctor< RealVectorValue, std::unordered_map< dof_id_type, RealVectorValue > > _HbyA
A map functor from faces to $HbyA_{ij} = (A_{offdiag}*\mathrm{(predicted~velocity)} - \mathrm{Source}...
const std::string & name() const
void paramError(const std::string &param, Args... args) const
void mooseError(Args &&... args) const
MooseApp & getMooseApp() const
const bool _displaced
Whether this object is operating on the displaced mesh.
Moose::FV::InterpMethod _velocity_interp_method
The interpolation method to use for the velocity.
MooseMesh & _moose_mesh
The MooseMesh that this user object operates on.
INSFVVelocityVariable *const _u
The thread 0 copy of the x-velocity variable.
const unsigned int _dim
The dimension of the mesh, e.g. 3 for hexes and tets, 2 for quads and tris.
Executioner set up to solve a thermal-hydraulics problem using the SIMPLENonlinearAssembly algorithm.
void addFunctor(const std::string &name, const Moose::FunctorBase< T > &functor, const THREAD_ID tid)
SubProblem & _subproblem
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
IntRange< T > make_range(T beg, T end)
unsigned int n_threads()

Member Function Documentation

◆ addToA()

void INSFVRhieChowInterpolatorSegregated::addToA ( const libMesh::Elem ,
unsigned int  ,
const ADReal  
)
inlineoverridevirtual

We disable this for the segregated solver.

Implements RhieChowInterpolatorBase.

Definition at line 54 of file INSFVRhieChowInterpolatorSegregated.h.

57 {
59 "addToA function is not implemented for the RhieChow interpolation in segregated solvers.");
60 }

◆ checkBlocks()

template<typename VarType >
void RhieChowInterpolatorBase::checkBlocks ( const VarType &  var) const
protectedinherited

Check the block consistency between the passed in var and us.

Definition at line 181 of file RhieChowInterpolatorBase.h.

182{
183 const auto & var_blocks = var.blockIDs();
184 const auto & uo_blocks = blockIDs();
185
186 // Error if this UO has any blocks that the variable does not
187 std::set<SubdomainID> uo_blocks_minus_var_blocks;
188 std::set_difference(uo_blocks.begin(),
189 uo_blocks.end(),
190 var_blocks.begin(),
191 var_blocks.end(),
192 std::inserter(uo_blocks_minus_var_blocks, uo_blocks_minus_var_blocks.end()));
193 if (uo_blocks_minus_var_blocks.size() > 0)
194 mooseError("Block restriction of interpolator user object '",
195 this->name(),
196 "' (",
198 ") includes blocks not in the block restriction of variable '",
199 var.name(),
200 "' (",
201 Moose::stringify(var.blocks()),
202 ")");
203
204 // Get the blocks in the variable but not this UO
205 std::set<SubdomainID> var_blocks_minus_uo_blocks;
206 std::set_difference(var_blocks.begin(),
207 var_blocks.end(),
208 uo_blocks.begin(),
209 uo_blocks.end(),
210 std::inserter(var_blocks_minus_uo_blocks, var_blocks_minus_uo_blocks.end()));
211
212 // For each block in the variable but not this UO, error if there is connection
213 // to any blocks on the UO.
214 for (auto & block_id : var_blocks_minus_uo_blocks)
215 {
216 const auto connected_blocks = _moose_mesh.getBlockConnectedBlocks(block_id);
217 std::set<SubdomainID> connected_blocks_on_uo;
218 std::set_intersection(connected_blocks.begin(),
219 connected_blocks.end(),
220 uo_blocks.begin(),
221 uo_blocks.end(),
222 std::inserter(connected_blocks_on_uo, connected_blocks_on_uo.end()));
223 if (connected_blocks_on_uo.size() > 0)
224 mooseError("Block restriction of interpolator user object '",
225 this->name(),
226 "' (",
227 Moose::stringify(uo_blocks),
228 ") doesn't match the block restriction of variable '",
229 var.name(),
230 "' (",
231 Moose::stringify(var_blocks),
232 ")");
233 }
234}
const std::vector< SubdomainName > & blocks() const
const std::set< SubdomainID > & getBlockConnectedBlocks(const SubdomainID subdomain_id) const
std::string stringify(const T &t)

Referenced by INSFVRhieChowInterpolator::INSFVRhieChowInterpolator(), and RhieChowInterpolatorBase::RhieChowInterpolatorBase().

◆ computeCellVelocity()

void INSFVRhieChowInterpolatorSegregated::computeCellVelocity ( )

Update the cell values of the velocity variables.

Definition at line 230 of file INSFVRhieChowInterpolatorSegregated.C.

231{
232 std::vector<unsigned int> var_nums = {_momentum_implicit_systems[0]->variable_number(_u->name())};
233 if (_v)
234 var_nums.push_back(_momentum_implicit_systems[1]->variable_number(_v->name()));
235 if (_w)
236 var_nums.push_back(_momentum_implicit_systems[2]->variable_number(_w->name()));
237
238 const auto time_arg = Moose::currentState();
239
240 for (auto & elem :
241 as_range(_mesh.active_local_elements_begin(), _mesh.active_local_elements_end()))
242 {
243 if (hasBlocks(elem->subdomain_id()))
244 {
245 const auto elem_arg = makeElemArg(elem);
246 const RealVectorValue Ainv = _Ainv(elem_arg, time_arg);
247 const RealVectorValue & grad_p = raw_value(_p->gradient(elem_arg, time_arg));
248
249 for (auto comp_index : make_range(_dim))
250 {
251 // If we are doing segregated momentum components we need to access different vector
252 // components otherwise everything is in the same vector (with different variable names)
253 const unsigned int system_number = _momentum_implicit_systems[comp_index]->number();
254 const auto index = elem->dof_number(system_number, var_nums[comp_index], 0);
255
256 // We set the dof value in the solution vector the same logic applies:
257 // u_C = -(H/A)_C - (1/A)_C*grad(p)_C where C is the cell index
258 _momentum_implicit_systems[comp_index]->solution->set(
259 index, -(*_HbyA_raw[comp_index])(index)-Ainv(comp_index) * grad_p(comp_index));
260 }
261 }
262 }
263
264 for (auto system_i : index_range(_momentum_implicit_systems))
265 {
266 _momentum_implicit_systems[system_i]->solution->close();
267 _momentum_implicit_systems[system_i]->update();
268 _momentum_systems[system_i]->setSolution(
269 *_momentum_implicit_systems[system_i]->current_local_solution);
270 }
271}
bool hasBlocks(const SubdomainName &name) const
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
std::vector< NonlinearSystemBase * > _momentum_systems
Pointers to the nonlinear system(s) corresponding to the momentum equation(s)
std::vector< std::unique_ptr< NumericVector< Number > > > _HbyA_raw
We hold on to the cell-based HbyA vectors so that we can easily reconstruct the cell velocities as we...
std::vector< libMesh::NonlinearImplicitSystem * > _momentum_implicit_systems
Pointers to the momentum equation implicit system(s)
GradientType gradient(const ElemArg &elem, const StateArg &state) const
INSFVPressureVariable *const _p
The thread 0 copy of the pressure variable.
INSFVVelocityVariable *const _w
The thread 0 copy of the z-velocity variable (null if the problem is not 3D)
const libMesh::MeshBase & _mesh
The libMesh mesh that this object acts on.
INSFVVelocityVariable *const _v
The thread 0 copy of the y-velocity variable (null if the problem is 1D)
auto raw_value(const Eigen::Map< T > &in)
StateArg currentState()
SimpleRange< IndexType > as_range(const std::pair< IndexType, IndexType > &p)
auto index_range(const T &sizable)
VectorValue< Real > RealVectorValue

Referenced by SIMPLESolveNonlinearAssembly::solve().

◆ computeFaceVelocity()

void INSFVRhieChowInterpolatorSegregated::computeFaceVelocity ( )

Update the values of the face velocities in the containers.

Definition at line 170 of file INSFVRhieChowInterpolatorSegregated.C.

171{
172 const auto time_arg = Moose::currentState();
173
174 for (auto & fi : _fe_problem.mesh().faceInfo())
175 {
176 if (hasBlocks(fi->elemPtr()->subdomain_id()) ||
177 (fi->neighborPtr() && hasBlocks(fi->neighborPtr()->subdomain_id())))
178 {
179 // On internal face we just use the interpolated H/A and the pressure face gradient
180 // So u_f = -(H/A)_f - (1/A)_f*grad(p)_f
181 // Notice the (-) sign on H/A which is because we use the Jacobian/Residual
182 // computations and we get -H instead of H.
183 if (_u->isInternalFace(*fi))
184 {
185 const Moose::FaceArg face{
186 fi, Moose::FV::LimiterType::CentralDifference, true, false, nullptr, nullptr};
187
188 RealVectorValue Ainv;
189 RealVectorValue HbyA = MetaPhysicL::raw_value(_HbyA(face, time_arg));
190
191 interpolate(Moose::FV::InterpMethod::Average,
192 Ainv,
193 _Ainv(makeElemArg(fi->elemPtr()), time_arg),
194 _Ainv(makeElemArg(fi->neighborPtr()), time_arg),
195 *fi,
196 true);
197
198 RealVectorValue grad_p = MetaPhysicL::raw_value(_p->gradient(face, time_arg));
199 for (const auto comp_index : make_range(_dim))
200 _face_velocity[fi->id()](comp_index) =
201 -HbyA(comp_index) - Ainv(comp_index) * grad_p(comp_index);
202 }
203 else
204 {
205 const Elem * const boundary_elem =
206 hasBlocks(fi->elemPtr()->subdomain_id()) ? fi->elemPtr() : fi->neighborPtr();
207 const Moose::FaceArg boundary_face{
208 fi, Moose::FV::LimiterType::CentralDifference, true, false, boundary_elem, nullptr};
209
210 // If we have a dirichlet boundary conditions, this sill give us the exact value of the
211 // velocity on the face as expected (see populateHbyA())
212 if (_u->isDirichletBoundaryFace(*fi, boundary_elem, time_arg))
213 _face_velocity[fi->id()] = -MetaPhysicL::raw_value(_HbyA(boundary_face, time_arg));
214 else
215 {
216 const RealVectorValue & Ainv = MetaPhysicL::raw_value(_Ainv(boundary_face, time_arg));
217 const RealVectorValue & HbyA = MetaPhysicL::raw_value(_HbyA(boundary_face, time_arg));
218 const RealVectorValue & grad_p =
219 MetaPhysicL::raw_value(_p->gradient(boundary_face, time_arg));
220 for (const auto comp_index : make_range(_dim))
221 _face_velocity[fi->id()](comp_index) =
222 -HbyA(comp_index) - Ainv(comp_index) * grad_p(comp_index);
223 }
224 }
225 }
226 }
227}
virtual bool isDirichletBoundaryFace(const FaceInfo &fi, const Elem *elem, const Moose::StateArg &state) const
bool isInternalFace(const FaceInfo &) const
FEProblemBase & _fe_problem
MeshBase & mesh
void interpolate(InterpMethod m, T &result, const T2 &value1, const T3 &value2, const FaceInfo &fi, const bool one_is_elem)

Referenced by SIMPLESolveNonlinearAssembly::solve().

◆ computeHbyA()

void INSFVRhieChowInterpolatorSegregated::computeHbyA ( bool  verbose)

Computes the inverse of the digaonal (1/A) of the system matrix plus the H/A components for the pressure equation plus Rhie-Chow interpolation.

Definition at line 329 of file INSFVRhieChowInterpolatorSegregated.C.

330{
331 if (verbose)
332 {
333 _console << "************************************" << std::endl;
334 _console << "Computing HbyA" << std::endl;
335 _console << "************************************" << std::endl;
336 }
338 "The momentum system shall be linked before calling this function!");
339
340 NonlinearImplicitSystem * momentum_system = _momentum_implicit_systems[0];
341
342 std::vector<unsigned int> var_nums = {_momentum_implicit_systems[0]->variable_number(_u->name())};
343 if (_v)
344 var_nums.push_back(_momentum_implicit_systems[1]->variable_number(_v->name()));
345 if (_w)
346 var_nums.push_back(_momentum_implicit_systems[2]->variable_number(_w->name()));
347
348 _HbyA_raw.clear();
349 for (auto system_i : index_range(_momentum_systems))
350 {
352
353 momentum_system = _momentum_implicit_systems[system_i];
354
355 NumericVector<Number> & rhs = *(momentum_system->rhs);
356 NumericVector<Number> & current_local_solution = *(momentum_system->current_local_solution);
357 NumericVector<Number> & solution = *(momentum_system->solution);
358 PetscMatrix<Number> * mmat = dynamic_cast<PetscMatrix<Number> *>(momentum_system->matrix);
359 mooseAssert(mmat,
360 "The matrices used in the segregated INSFVRhieChow objects need to be convertable "
361 "to PetscMAtrix!");
362
363 if (verbose)
364 {
365 _console << "Matrix in rc object" << std::endl;
366 mmat->print();
367 }
368
369 auto Ainv = current_local_solution.zero_clone();
370 PetscVector<Number> * Ainv_petsc = dynamic_cast<PetscVector<Number> *>(Ainv.get());
371
372 mmat->get_diagonal(*Ainv_petsc);
373
374 auto working_vector = momentum_system->current_local_solution->zero_clone();
375 PetscVector<Number> * working_vector_petsc =
376 dynamic_cast<PetscVector<Number> *>(working_vector.get());
377 mooseAssert(working_vector_petsc,
378 "The vectors used in the segregated INSFVRhieChow objects need to be convertable "
379 "to PetscVectors!");
380
381 *working_vector_petsc = 1.0;
382 Ainv_petsc->pointwise_divide(*working_vector_petsc, *Ainv_petsc);
383
384 _HbyA_raw.push_back(current_local_solution.zero_clone());
385 NumericVector<Number> & HbyA = *(_HbyA_raw.back());
386
387 if (verbose)
388 {
389 _console << "Velocity solution in H(u)" << std::endl;
390 solution.print();
391 }
392
393 // We fill the 1/A functor
394 auto active_local_begin =
395 _mesh.evaluable_elements_begin(momentum_system->get_dof_map(), var_nums[system_i]);
396 auto active_local_end =
397 _mesh.evaluable_elements_end(momentum_system->get_dof_map(), var_nums[system_i]);
398
399 const auto & state = Moose::currentState();
400 for (auto it = active_local_begin; it != active_local_end; ++it)
401 {
402 const Elem * elem = *it;
403 if (this->hasBlocks(elem->subdomain_id()))
404 {
405 const Moose::ElemArg & elem_arg = makeElemArg(elem);
406 Real coord_multiplier;
407 const auto coord_type = _fe_problem.getCoordSystem(elem->subdomain_id());
408 const unsigned int rz_radial_coord =
410
412 elem->vertex_average(), coord_multiplier, coord_type, rz_radial_coord);
413
414 const Real volume = _moose_mesh.elemInfo(elem->id()).volume();
415 const auto dof_index = elem->dof_number(momentum_system->number(), var_nums[system_i], 0);
416 _Ainv[elem->id()](system_i) = MetaPhysicL::raw_value(epsilon(_tid)(elem_arg, state)) *
417 (*Ainv_petsc)(dof_index)*volume * coord_multiplier;
418 }
419 }
420
421 // Now we set the diagonal of our system matrix to 0 so we can create H*u
422 // TODO: Add a function for this in libmesh
423 *working_vector_petsc = 0.0;
424 LibmeshPetscCall(MatDiagonalSet(mmat->mat(), working_vector_petsc->vec(), INSERT_VALUES));
425
426 if (verbose)
427 {
428 _console << "H" << std::endl;
429 mmat->print();
430 }
431
432 // We need to subtract the contribution of the pressure gradient from the residual (right hand
433 // side). We plug working_vector=0 in here to get the right hand side contribution
435
436 // Now we reorganize the association between tags and vectors to make sure
437 // that the next solve is perfect
438 _momentum_systems[system_i]->associateVectorToTag(
439 momentum_system->get_vector(_fe_problem.vectorTagName(0)), 0);
440 _momentum_systems[system_i]->associateVectorToTag(
441 momentum_system->get_vector(_fe_problem.vectorTagName(_pressure_gradient_tag)),
443 _momentum_systems[system_i]->setSolution(current_local_solution);
444
445 if (verbose)
446 {
447 _console << "total RHS" << std::endl;
448 rhs.print();
449 _console << "pressure RHS" << std::endl;
450 HbyA.print();
451 }
452
453 // We correct the right hand side to exclude the pressure contribution
454 HbyA.scale(-1.0);
455 HbyA.add(-1.0, rhs);
456
457 if (verbose)
458 {
459 _console << "H RHS" << std::endl;
460 HbyA.print();
461 }
462
463 // Create H(u)
464 mmat->vector_mult(*working_vector_petsc, solution);
465
466 if (verbose)
467 {
468 _console << " H(u)" << std::endl;
469 working_vector_petsc->print();
470 }
471
472 // Create H(u) - RHS
473 HbyA.add(*working_vector_petsc);
474
475 if (verbose)
476 {
477 _console << " H(u)-rhs-relaxation_source" << std::endl;
478 HbyA.print();
479 }
480
481 // Create 1/A*(H(u)-RHS)
482 HbyA.pointwise_mult(HbyA, *Ainv);
483
484 if (verbose)
485 {
486 _console << " (H(u)-rhs)/A" << std::endl;
487 HbyA.print();
488 }
489 }
490
491 populateHbyA(_HbyA_raw, var_nums);
492
493 if (verbose)
494 {
495 _console << "************************************" << std::endl;
496 _console << "DONE Computing HbyA " << std::endl;
497 _console << "************************************" << std::endl;
498 }
499}
const ConsoleStream _console
Real volume() const
void setCurrentNonlinearSystem(const unsigned int nl_sys_num)
virtual void computeResidualTag(const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual, TagID tag)
TagID _pressure_gradient_tag
Residual tag corresponding to the pressure gradient contribution.
void populateHbyA(const std::vector< std::unique_ptr< NumericVector< Number > > > &raw_hbya, const std::vector< unsigned int > &var_nums)
Populate the face values of the H/A field.
std::vector< unsigned int > _momentum_system_numbers
Numbers of the momentum system(s)
const ElemInfo & elemInfo(const dof_id_type id) const
virtual const Moose::FunctorBase< ADReal > & epsilon(THREAD_ID tid) const
A virtual method that allows us to only implement getVelocity once for free and porous flows.
virtual TagName vectorTagName(const TagID tag) const
unsigned int getAxisymmetricRadialCoord() const
Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) const
const THREAD_ID _tid
void coordTransformFactor(const P &point, C &factor, const Moose::CoordinateSystemType coord_type, const unsigned int rz_radial_coord=libMesh::invalid_uint)
Real volume(const MeshBase &mesh, unsigned int dim=libMesh::invalid_uint)
const unsigned int invalid_uint
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Referenced by SIMPLESolveNonlinearAssembly::solve().

◆ epsilon()

const Moose::FunctorBase< ADReal > & RhieChowInterpolatorBase::epsilon ( THREAD_ID  tid) const
inlineprotectedvirtualinherited

A virtual method that allows us to only implement getVelocity once for free and porous flows.

Reimplemented in PINSFVRhieChowInterpolator, and PINSFVRhieChowInterpolatorSegregated.

Definition at line 154 of file RhieChowInterpolatorBase.h.

155{
156 return _unity_functor;
157}
const Moose::ConstantFunctor< ADReal > _unity_functor
A unity functor used in the epsilon virtual method.

Referenced by computeHbyA(), and INSFVRhieChowInterpolator::getVelocity().

◆ execute()

void INSFVRhieChowInterpolatorSegregated::execute ( )
inlineoverridevirtual

Implements GeneralUserObject.

Definition at line 64 of file INSFVRhieChowInterpolatorSegregated.h.

64{}

◆ fillContainer()

template<typename Container >
void RhieChowInterpolatorBase::fillContainer ( const std::string &  var_name,
Container &  container 
)
protectedinherited

Fill the passed-in variable container with the thread copies of var_name.

Definition at line 168 of file RhieChowInterpolatorBase.h.

169{
170 typedef typename Container::value_type ContainedType;
171 for (const auto tid : make_range(libMesh::n_threads()))
172 {
173 auto * const var = static_cast<ContainedType>(
174 &UserObject::_subproblem.getVariable(tid, getParam<VariableName>(name)));
175 container[tid] = var;
176 }
177}
virtual const MooseVariableFieldBase & getVariable(const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const=0

Referenced by INSFVRhieChowInterpolator::INSFVRhieChowInterpolator(), and RhieChowInterpolatorBase::RhieChowInterpolatorBase().

◆ finalize()

void INSFVRhieChowInterpolatorSegregated::finalize ( )
inlineoverridevirtual

Implements GeneralUserObject.

Definition at line 65 of file INSFVRhieChowInterpolatorSegregated.h.

65{}

◆ getVelocity()

VectorValue< ADReal > INSFVRhieChowInterpolatorSegregated::getVelocity ( const Moose::FV::InterpMethod  m,
const FaceInfo fi,
const Moose::StateArg time,
const THREAD_ID  tid,
bool  subtract_mesh_velocity 
) const
overridevirtual

Get the face velocity (used in advection terms)

Implements RhieChowInterpolatorBase.

Definition at line 158 of file INSFVRhieChowInterpolatorSegregated.C.

163{
164 if (m != Moose::FV::InterpMethod::RhieChow)
165 mooseError("Segregated solution algorithms only support Rhie-Chow interpolation!");
166 return _face_velocity.evaluate(&fi);
167}
ValueType evaluate(const FaceInfo *const fi) const
Evaluate the face functor using a FaceInfo argument.

◆ getVolumetricFaceFlux()

Real RhieChowInterpolatorBase::getVolumetricFaceFlux ( const Moose::FV::InterpMethod  m,
const FaceInfo fi,
const Moose::StateArg time,
const THREAD_ID  tid,
bool  subtract_mesh_velocity 
) const
overridevirtualinherited

Retrieve the volumetric face flux, will not include derivatives.

Parameters
mThe velocity interpolation method. This is either Rhie-Chow or Average. Rhie-Chow is recommended as it avoids checkerboards in the pressure field
fiThe face that we wish to retrieve the velocity for
tidThe thread ID
Returns
The face velocity

Implements RhieChowFaceFluxProvider.

Definition at line 131 of file RhieChowInterpolatorBase.C.

136{
137 return raw_value(this->getVelocity(m, fi, time, tid, subtract_mesh_velocity)) * fi.normal();
138}
const Point & normal() const
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.

◆ ghostADataOnBoundary()

virtual void RhieChowInterpolatorBase::ghostADataOnBoundary ( const BoundaryID  )
inlinevirtualinherited

makes sure coefficient data gets communicated on both sides of a given boundary.

This is a virtual function, mostly used for monolithic approaches.

Reimplemented in INSFVRhieChowInterpolator.

Definition at line 76 of file RhieChowInterpolatorBase.h.

76{}

Referenced by VolumetricFlowRate::initialSetup().

◆ hasFaceSide()

bool RhieChowFaceFluxProvider::hasFaceSide ( const FaceInfo fi,
const bool  fi_elem_side 
) const
overridevirtualinherited

Implements FaceArgInterface.

Definition at line 27 of file RhieChowFaceFluxProvider.C.

28{
29 if (fi_elem_side)
30 return hasBlocks(fi.elem().subdomain_id());
31 else
32 return fi.neighborPtr() && hasBlocks(fi.neighbor().subdomain_id());
33}
const Elem & elem() const
const Elem * neighborPtr() const
const Elem & neighbor() const

◆ initFaceVelocities()

void INSFVRhieChowInterpolatorSegregated::initFaceVelocities ( )

Initialize the container for face velocities.

Definition at line 126 of file INSFVRhieChowInterpolatorSegregated.C.

127{
128 for (auto & fi : _fe_problem.mesh().faceInfo())
129 {
130 if (hasBlocks(fi->elemPtr()->subdomain_id()) ||
131 (fi->neighborPtr() && hasBlocks(fi->neighborPtr()->subdomain_id())))
132 {
133 // On internal face we do a regular interpoaltion with geometric weights
134 if (_u->isInternalFace(*fi))
135 {
136 const Moose::FaceArg face{
137 fi, Moose::FV::LimiterType::CentralDifference, true, false, nullptr, nullptr};
138
140 }
141 // On the boundary, we just take the boundary values
142 else
143 {
144 const Elem * const boundary_elem =
145 hasBlocks(fi->elemPtr()->subdomain_id()) ? fi->elemPtr() : fi->neighborPtr();
146
147 const Moose::FaceArg boundary_face{
148 fi, Moose::FV::LimiterType::CentralDifference, true, false, boundary_elem, nullptr};
149
150 _face_velocity[fi->id()] =
151 MetaPhysicL::raw_value((*_vel)(boundary_face, Moose::currentState()));
152 }
153 }
154 }
155}

Referenced by SIMPLESolveNonlinearAssembly::linkRhieChowUserObject().

◆ initialize()

void INSFVRhieChowInterpolatorSegregated::initialize ( )
overridevirtual

Implements GeneralUserObject.

Definition at line 116 of file INSFVRhieChowInterpolatorSegregated.C.

117{
118 for (const auto & pair : _HbyA)
119 _HbyA[pair.first] = 0;
120
121 for (const auto & pair : _Ainv)
122 _Ainv[pair.first] = 0;
123}

◆ linkMomentumSystem()

void INSFVRhieChowInterpolatorSegregated::linkMomentumSystem ( std::vector< NonlinearSystemBase * >  momentum_systems,
const std::vector< unsigned int > &  momentum_system_numbers,
const TagID  pressure_gradient_tag 
)

Update the momentum system-related information.

Parameters
momentum_systemsPointers to the momentum systems which are solved for the momentum vector components
momentum_system_numbersThe numbers of these systems
pressure_gradient_tagThe tag which is associated with the pressure gradient kernels. This is needed for separating the pressure contibution from other terms in the momentum systems.

Definition at line 92 of file INSFVRhieChowInterpolatorSegregated.C.

96{
97 _momentum_systems = momentum_systems;
98 _momentum_system_numbers = momentum_system_numbers;
99 _pressure_gradient_tag = pressure_gradient_tag;
100
102 for (auto & system : _momentum_systems)
104 dynamic_cast<NonlinearImplicitSystem *>(&system->system()));
105}

Referenced by SIMPLESolveNonlinearAssembly::linkRhieChowUserObject().

◆ meshChanged()

void INSFVRhieChowInterpolatorSegregated::meshChanged ( )
overridevirtual

Reimplemented from GeneralUserObject.

Definition at line 108 of file INSFVRhieChowInterpolatorSegregated.C.

109{
110 _HbyA.clear();
111 _Ainv.clear();
112 _face_velocity.clear();
113}

◆ populateHbyA()

void INSFVRhieChowInterpolatorSegregated::populateHbyA ( const std::vector< std::unique_ptr< NumericVector< Number > > > &  raw_hbya,
const std::vector< unsigned int > &  var_nums 
)
protected

Populate the face values of the H/A field.

Definition at line 274 of file INSFVRhieChowInterpolatorSegregated.C.

277{
278 for (auto & fi : _fe_problem.mesh().faceInfo())
279 {
280 if (hasBlocks(fi->elemPtr()->subdomain_id()) ||
281 (fi->neighborPtr() && hasBlocks(fi->neighborPtr()->subdomain_id())))
282 {
283 // If we are on an internal face, we just interpolate the values to the faces.
284 // Otherwise, depending on the boundary type, we take the velocity value or
285 // extrapolated HbyA values.
286 if (_u->isInternalFace(*fi))
287 {
288 const Elem * elem = fi->elemPtr();
289 const Elem * neighbor = fi->neighborPtr();
290 for (auto comp_index : make_range(_dim))
291 {
292 unsigned int system_number = _momentum_implicit_systems[comp_index]->number();
293 const auto dof_index_elem = elem->dof_number(system_number, var_nums[comp_index], 0);
294 const auto dof_index_neighbor =
295 neighbor->dof_number(system_number, var_nums[comp_index], 0);
296
297 interpolate(Moose::FV::InterpMethod::Average,
298 _HbyA[fi->id()](comp_index),
299 (*raw_hbya[comp_index])(dof_index_elem),
300 (*raw_hbya[comp_index])(dof_index_neighbor),
301 *fi,
302 true);
303 }
304 }
305 else
306 {
307 const Elem * const boundary_elem =
308 hasBlocks(fi->elemPtr()->subdomain_id()) ? fi->elemPtr() : fi->neighborPtr();
309
310 const Moose::FaceArg boundary_face{
311 fi, Moose::FV::LimiterType::CentralDifference, true, false, boundary_elem, nullptr};
312
313 if (_u->isDirichletBoundaryFace(*fi, boundary_elem, Moose::currentState()))
314 _HbyA[fi->id()] = -MetaPhysicL::raw_value((*_vel)(boundary_face, Moose::currentState()));
315 else
316 for (const auto comp_index : make_range(_dim))
317 {
318 unsigned int system_number = _momentum_implicit_systems[comp_index]->number();
319 const auto dof_index_elem =
320 boundary_elem->dof_number(system_number, var_nums[comp_index], 0);
321 _HbyA[fi->id()](comp_index) = (*raw_hbya[comp_index])(dof_index_elem);
322 }
323 }
324 }
325 }
326}

Referenced by computeHbyA().

◆ pressure()

const INSFVPressureVariable & RhieChowInterpolatorBase::pressure ( THREAD_ID  tid) const
inlineinherited
Returns
The pressure variable corresponding to the provided thread ID

Definition at line 160 of file RhieChowInterpolatorBase.h.

161{
162 mooseAssert(tid < _ps.size(), "Attempt to access out-of-bounds in pressure variable container");
163 return *cast_ptr<INSFVPressureVariable *>(_ps[tid]);
164}
std::vector< MooseVariableFVReal * > _ps
All the thread copies of the pressure variable.

◆ segregated()

bool INSFVRhieChowInterpolatorSegregated::segregated ( ) const
inlineoverridevirtual

Bool of the Rhie Chow user object is used in monolithic/segregated approaches.

Implements RhieChowInterpolatorBase.

Definition at line 67 of file INSFVRhieChowInterpolatorSegregated.h.

67{ return true; };

◆ supportMeshVelocity()

virtual bool RhieChowFaceFluxProvider::supportMeshVelocity ( ) const
inlinevirtualinherited

Returns whether the UO can support mesh velocity advection.

Reimplemented in RhieChowMassFlux.

Definition at line 49 of file RhieChowFaceFluxProvider.h.

49{ return true; }

Referenced by VolumetricFlowRate::VolumetricFlowRate().

◆ validParams()

InputParameters INSFVRhieChowInterpolatorSegregated::validParams ( )
static

Definition at line 33 of file INSFVRhieChowInterpolatorSegregated.C.

34{
36
37 params.addClassDescription("Computes H/A and 1/A together with face velocities for segregated "
38 "momentum-pressure equations.");
39
40 // We disable the execution of this, should only provide functions
41 // for the SIMPLENonlinearAssembly executioner
42 ExecFlagEnum & exec_enum = params.set<ExecFlagEnum>("execute_on", true);
43 exec_enum.addAvailableFlags(EXEC_NONE);
44 exec_enum = {EXEC_NONE};
45 params.suppressParameter<ExecFlagEnum>("execute_on");
46
47 return params;
48}
const ExecFlagType EXEC_NONE
void addAvailableFlags(const ExecFlagType &flag, Args... flags)
static InputParameters validParams()

Referenced by PINSFVRhieChowInterpolatorSegregated::validParams().

◆ vel()

const INSFVVelocityVariable * RhieChowInterpolatorBase::vel ( ) const
inlineinherited

Definition at line 83 of file RhieChowInterpolatorBase.h.

83{ return _u; }

Referenced by INSFVRhieChowInterpolator::getVelocity().

◆ velocityInterpolationMethod()

Moose::FV::InterpMethod RhieChowInterpolatorBase::velocityInterpolationMethod ( ) const
inlineinherited

Return the interpolation method used for velocity.

Definition at line 70 of file RhieChowInterpolatorBase.h.

Member Data Documentation

◆ _Ainv

CellCenteredMapFunctor<RealVectorValue, std::unordered_map<dof_id_type, RealVectorValue> > INSFVRhieChowInterpolatorSegregated::_Ainv
protected

A map functor from element IDs to $1/A_i$.

Where $A_i$ is the diagonal of the system matrix for the momentum equation.

Definition at line 111 of file INSFVRhieChowInterpolatorSegregated.h.

Referenced by computeCellVelocity(), computeFaceVelocity(), computeHbyA(), initialize(), and meshChanged().

◆ _dim

const unsigned int RhieChowInterpolatorBase::_dim
protectedinherited

◆ _displaced

const bool RhieChowInterpolatorBase::_displaced
protectedinherited

Whether this object is operating on the displaced mesh.

Definition at line 146 of file RhieChowInterpolatorBase.h.

Referenced by INSFVRhieChowInterpolator::execute(), and INSFVRhieChowInterpolator::INSFVRhieChowInterpolator().

◆ _face_velocity

FaceCenteredMapFunctor<RealVectorValue, std::unordered_map<dof_id_type, RealVectorValue> > INSFVRhieChowInterpolatorSegregated::_face_velocity
protected

A map functor from faces to face velocities which are used in the advection terms.

Definition at line 120 of file INSFVRhieChowInterpolatorSegregated.h.

Referenced by computeFaceVelocity(), getVelocity(), initFaceVelocities(), and meshChanged().

◆ _HbyA

FaceCenteredMapFunctor<RealVectorValue, std::unordered_map<dof_id_type, RealVectorValue> > INSFVRhieChowInterpolatorSegregated::_HbyA
protected

A map functor from faces to $HbyA_{ij} = (A_{offdiag}*\mathrm{(predicted~velocity)} - \mathrm{Source})_{ij}/A_{ij}$.

So this contains the off-diagonal part of the system matrix multiplied by the predicted velocity minus the source terms from the right hand side of the linearized momentum predictor step.

Definition at line 98 of file INSFVRhieChowInterpolatorSegregated.h.

Referenced by computeFaceVelocity(), initialize(), meshChanged(), and populateHbyA().

◆ _HbyA_raw

std::vector<std::unique_ptr<NumericVector<Number> > > INSFVRhieChowInterpolatorSegregated::_HbyA_raw
protected

We hold on to the cell-based HbyA vectors so that we can easily reconstruct the cell velocities as well.

This vector might be either of size 1 or DIM depending on if we segregate the velocity components as well.

Definition at line 105 of file INSFVRhieChowInterpolatorSegregated.h.

Referenced by computeCellVelocity(), and computeHbyA().

◆ _mesh

const libMesh::MeshBase& RhieChowInterpolatorBase::_mesh
protectedinherited

◆ _momentum_implicit_systems

std::vector<libMesh::NonlinearImplicitSystem *> INSFVRhieChowInterpolatorSegregated::_momentum_implicit_systems
protected

Pointers to the momentum equation implicit system(s)

Definition at line 129 of file INSFVRhieChowInterpolatorSegregated.h.

Referenced by computeCellVelocity(), computeHbyA(), linkMomentumSystem(), and populateHbyA().

◆ _momentum_system_numbers

std::vector<unsigned int> INSFVRhieChowInterpolatorSegregated::_momentum_system_numbers
protected

Numbers of the momentum system(s)

Definition at line 126 of file INSFVRhieChowInterpolatorSegregated.h.

Referenced by computeHbyA(), and linkMomentumSystem().

◆ _momentum_systems

std::vector<NonlinearSystemBase *> INSFVRhieChowInterpolatorSegregated::_momentum_systems
protected

Pointers to the nonlinear system(s) corresponding to the momentum equation(s)

Definition at line 123 of file INSFVRhieChowInterpolatorSegregated.h.

Referenced by computeCellVelocity(), computeHbyA(), and linkMomentumSystem().

◆ _moose_mesh

MooseMesh& RhieChowInterpolatorBase::_moose_mesh
protectedinherited

◆ _p

INSFVPressureVariable* const RhieChowInterpolatorBase::_p
protectedinherited

◆ _pressure_gradient_tag

TagID INSFVRhieChowInterpolatorSegregated::_pressure_gradient_tag
protected

Residual tag corresponding to the pressure gradient contribution.

Definition at line 132 of file INSFVRhieChowInterpolatorSegregated.h.

Referenced by computeHbyA(), and linkMomentumSystem().

◆ _ps

std::vector<MooseVariableFVReal *> RhieChowInterpolatorBase::_ps
protectedinherited

◆ _u

INSFVVelocityVariable* const RhieChowInterpolatorBase::_u
protectedinherited

◆ _unity_functor

const Moose::ConstantFunctor<ADReal> RhieChowInterpolatorBase::_unity_functor {1}
privateinherited

A unity functor used in the epsilon virtual method.

Definition at line 150 of file RhieChowInterpolatorBase.h.

150{1};

Referenced by RhieChowInterpolatorBase::epsilon().

◆ _us

std::vector<MooseVariableFVReal *> RhieChowInterpolatorBase::_us
protectedinherited

◆ _v

INSFVVelocityVariable* const RhieChowInterpolatorBase::_v
protectedinherited

The thread 0 copy of the y-velocity variable (null if the problem is 1D)

Definition at line 122 of file RhieChowInterpolatorBase.h.

Referenced by computeCellVelocity(), computeHbyA(), INSFVRhieChowInterpolator::getVelocity(), and RhieChowInterpolatorBase::RhieChowInterpolatorBase().

◆ _var_numbers

std::vector<unsigned int> RhieChowInterpolatorBase::_var_numbers
protectedinherited

◆ _vel

std::unique_ptr<PiecewiseByBlockLambdaFunctor<ADRealVectorValue> > INSFVRhieChowInterpolatorSegregated::_vel
protected

A functor for computing the (non-RC corrected) velocity.

Definition at line 114 of file INSFVRhieChowInterpolatorSegregated.h.

Referenced by initFaceVelocities(), and populateHbyA().

◆ _velocity_interp_method

Moose::FV::InterpMethod RhieChowInterpolatorBase::_velocity_interp_method
protectedinherited

◆ _vs

std::vector<MooseVariableFVReal *> RhieChowInterpolatorBase::_vs
protectedinherited

◆ _w

INSFVVelocityVariable* const RhieChowInterpolatorBase::_w
protectedinherited

The thread 0 copy of the z-velocity variable (null if the problem is not 3D)

Definition at line 125 of file RhieChowInterpolatorBase.h.

Referenced by computeCellVelocity(), computeHbyA(), INSFVRhieChowInterpolator::getVelocity(), and RhieChowInterpolatorBase::RhieChowInterpolatorBase().

◆ _ws

std::vector<MooseVariableFVReal *> RhieChowInterpolatorBase::_ws
protectedinherited

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