https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
WCNSFVFlowPhysics Class Referencefinal

Creates all the objects needed to solve the Navier Stokes mass and momentum equations. More...

#include <WCNSFVFlowPhysics.h>

Inheritance diagram for WCNSFVFlowPhysics:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 

Public Member Functions

 WCNSFVFlowPhysics (const InputParameters &parameters)
 
virtual MooseFunctorName getLinearFrictionCoefName () const override
 Get the name of the linear friction coefficient. Returns an empty string if no friction. More...
 
unsigned short getNumberAlgebraicGhostingLayersNeeded () const override
 Return the number of algebraic ghosting layers needed. More...
 
bool hasFlowEquations () const
 Whether the physics is actually creating the flow equations. More...
 
bool addAxisymmetricViscousSourceEnabled () const
 Whether the cylindrical viscous source helper is enabled. More...
 
bool includeSymmetrizedViscousStress () const
 Whether to include the symmetrized contribution in the viscous stress. More...
 
bool includeIsotropicStress () const
 Whether to include the isotropic viscous stress contribution. More...
 
const std::vector< std::string > & getVelocityNames () const
 To interface with other Physics. More...
 
const NonlinearVariableName & getPressureName () const
 
const NonlinearVariableName & getFluidTemperatureName () const
 
MooseFunctorName getPorosityFunctorName (const bool smoothed) const
 
const MooseEnumcompressibility () const
 Return the compressibility of the flow equations selected. More...
 
bool porousMediumTreatment () const
 Return whether a porous medium treatment is applied. More...
 
RealVectorValue gravityVector () const
 Return the gravity vector. More...
 
const MooseFunctorName & densityName () const
 Return the name of the density functor. More...
 
const MooseFunctorName & dynamicViscosityName () const
 Return the name of the dynamic viscosity functor. More...
 
const MooseEnumgetVelocityFaceInterpolationMethod () const
 Get the face interpolation method for velocity. More...
 
const MooseEnumgetMomentumAdvectionFaceInterpolationMethod () const
 Get the face interpolation method for momentum in the advection term. More...
 
const MooseEnumgetMomentumFaceInterpolationMethod () const
 Get the face interpolation method for momentum (mostly used in the stress terms) More...
 
const std::vector< BoundaryName > & getInletBoundaries () const
 Get the inlet boundaries. More...
 
const std::vector< BoundaryName > & getOutletBoundaries () const
 Get the outlet boundaries. More...
 
const std::vector< BoundaryName > & getWallBoundaries () const
 Get the wall boundaries. More...
 
const std::vector< BoundaryName > & getHydraulicSeparators () const
 Get the hydraulic separator boundaries. More...
 
NS::MomentumInletTypes inletBoundaryType (const BoundaryName &boundary_name) const
 Get the type of the inlet BC. More...
 
const std::vector< Point > & getFluxInletDirections () const
 Get the inlet direction if using a flux inlet. More...
 
const std::vector< PostprocessorName > & getFluxInletPPs () const
 Get the inlet flux postprocessor if using a flux inlet. More...
 
const UserObjectName & rhieChowUOName () const
 Return the name of the Rhie Chow user object. More...
 
virtual void act () override final
 
void addBlocks (const std::vector< SubdomainName > &blocks)
 
void addBlocksById (const std::vector< SubdomainID > &block_ids)
 
const std::vector< SubdomainName > & blocks () const
 
bool checkBlockRestrictionIdentical (const std::string &object_name, const std::vector< SubdomainName > &blocks, const bool error_if_not_identical=true) const
 
bool hasBlocks (const std::vector< SubdomainName > &blocks) const
 
const TgetCoupledPhysics (const PhysicsName &phys_name, const bool allow_fail=false) const
 
const std::vector< T *> getCoupledPhysics (const bool allow_fail=false) const
 
unsigned int dimension () const
 
const ActionComponentgetActionComponent (const ComponentName &comp_name) const
 
void checkComponentType (const ActionComponent &component) const
 
virtual void addComponent (const ActionComponent &component)
 
const std::vector< VariableName > & solverVariableNames () const
 
const std::vector< VariableName > & auxVariableNames () const
 
void timedAct ()
 
MooseObjectName uniqueActionName () const
 
const std::string & specificTaskName () const
 
const std::set< std::string > & getAllTasks () const
 
void appendTask (const std::string &task)
 
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 haveParameter (const std::string &name) 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
 
PerfGraphperfGraph ()
 
void assertParamDefined (const std::string &libmesh_dbg_var(param)) const
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () 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)
 

Public Attributes

 usingCombinedWarningSolutionWarnings
 
const ConsoleStream _console
 

Static Public Attributes

static const std::string unique_action_name_param
 
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 auto SYSTEM
 
static constexpr auto NAME
 

Protected Member Functions

virtual void initializePhysicsAdditional () override
 
virtual void actOnAdditionalTasks () override
 
virtual void addInitialConditions () override
 
virtual void addFVBCs () override
 
virtual void addMaterials () override
 
virtual void addPostprocessors () override
 
void addAxisymmetricViscousSource ()
 Adds the cylindrical source kernel for the radial momentum equation when requested and valid. More...
 
void addPorousMediumSpeedMaterial ()
 Add material to define the local speed in porous medium flows. More...
 
void addNonPorousMediumSpeedMaterial ()
 Add material to define the local speed with no porous medium treatment. More...
 
void addFluidPropertiesFunctorMaterial ()
 Function which adds the general functor fluid properties functor material to define fluid functor material property. More...
 
VariableName getFlowVariableName (const std::string &default_name) const
 Convenience routine to be able to retrieve the actual variable names from their default names. More...
 
bool hasTurbulencePhysics () const
 Whether a turbulence Physics has been coupled in, to know which viscosity to pick on symmetry boundary conditions. More...
 
const WCNSFVTurbulencePhysicsBasegetCoupledTurbulencePhysics () const
 Find the turbulence physics. More...
 
std::vector< SubdomainName > getAxisymmetricRZBlocks () const
 Return the set of blocks restricted to an RZ coordinate system. More...
 
bool usingNavierStokesFVSyntax () const
 Detects if we are using the new Physics syntax or the old NavierStokesFV action. More...
 
InputParameters getAdditionalRMParams () const override
 Parameters to change or add relationship managers. More...
 
void assertParamDefined (const std::string &param) const
 
bool isTransient () const
 
FactorygetFactory ()
 
FactorygetFactory () const
 
virtual FEProblemBasegetProblem ()
 
virtual const FEProblemBasegetProblem () const
 
void prepareCopyVariablesFromMesh () const
 
void copyVariablesFromMesh (const std::vector< VariableName > &variables_to_copy, bool are_nonlinear=true)
 
std::string prefix () const
 
void saveSolverVariableName (const VariableName &var_name)
 
void saveAuxVariableName (const VariableName &var_name)
 
bool variableExists (const VariableName &var_name, bool error_if_aux) const
 
bool solverVariableExists (const VariableName &var_name) const
 
const SolverSystemName & getSolverSystem (unsigned int variable_index) const
 
const SolverSystemName & getSolverSystem (const VariableName &variable_name) const
 
void addRequiredPhysicsTask (const std::string &task)
 
void assignBlocks (InputParameters &params, const std::vector< SubdomainName > &blocks) const
 
bool allMeshBlocks (const std::vector< SubdomainName > &blocks) const
 
bool allMeshBlocks (const std::set< SubdomainName > &blocks) const
 
std::set< SubdomainIDgetSubdomainIDs (const std::set< SubdomainName > &blocks) const
 
std::vector< std::string > getSubdomainNamesAndIDs (const std::set< SubdomainID > &blocks) const
 
void addPetscPairsToPetscOptions (const std::vector< std::pair< MooseEnumItem, std::string >> &petsc_pair_options)
 
bool isVariableFV (const VariableName &var_name) const
 
bool isVariableScalar (const VariableName &var_name) const
 
bool shouldCreateVariable (const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_aux)
 
bool shouldCreateIC (const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool ic_is_default_ic, const bool error_if_already_defined) const
 
bool shouldCreateTimeDerivative (const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_already_defined) const
 
void reportPotentiallyMissedParameters (const std::vector< std::string > &param_names, const std::string &object_type, const std::string &object_name="") const
 
virtual void checkIntegrity () const
 
bool addRelationshipManagers (Moose::RelationshipManagerType when_type, const InputParameters &moose_object_pars)
 
void associateWithParameter (const std::string &param_name, InputParameters &params) const
 
void associateWithParameter (const InputParameters &from_params, const std::string &param_name, InputParameters &params) 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
 
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 
void checkParamsBothSetOrNotSet (const std::string &param1, const std::string &param2) const
 
void checkSecondParamSetOnlyIfFirstOneTrue (const std::string &param1, const std::string &param2) const
 
void checkSecondParamSetOnlyIfFirstOneSet (const std::string &param1, const std::string &param2) const
 
void checkSecondParamNotSetIfFirstOneSet (const std::string &param1, const std::string &param2) const
 
void checkVectorParamsSameLength (const std::string &param1, const std::string &param2) const
 
void checkVectorParamAndMultiMooseEnumLength (const std::string &param1, const std::string &param2) const
 
void checkTwoDVectorParamsSameLength (const std::string &param1, const std::string &param2) const
 
void checkVectorParamsNoOverlap (const std::vector< std::string > &param_vecs) const
 
void checkTwoDVectorParamsNoRespectiveOverlap (const std::vector< std::string > &param_vecs) const
 
void checkTwoDVectorParamInnerSameLengthAsOneDVector (const std::string &param1, const std::string &param2) const
 
void checkTwoDVectorParamMultiMooseEnumSameLength (const std::string &param1, const std::string &param2, const bool error_for_param2) const
 
void checkVectorParamNotEmpty (const std::string &param1) const
 
void checkVectorParamsSameLengthIfSet (const std::string &param1, const std::string &param2, const bool ignore_empty_default_param2=false) const
 
void checkVectorParamLengthSameAsCombinedOthers (const std::string &param1, const std::string &param2, const std::string &param3) const
 
void checkBlockwiseConsistency (const std::string &block_param_name, const std::vector< std::string > &parameter_names) const
 
bool parameterConsistent (const InputParameters &other_param, const std::string &param_name) const
 
void warnInconsistent (const InputParameters &parameters, const std::string &param_name) const
 
void errorDependentParameter (const std::string &param1, const std::string &value_not_set, const std::vector< std::string > &dependent_params) const
 
void errorInconsistentDependentParameter (const std::string &param1, const std::string &value_set, const std::vector< std::string > &dependent_params) const
 

Static Protected Member Functions

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

Protected Attributes

const TagName _pressure_tag = "p_tag"
 Name of the vector to hold pressure momentum equation contributions. More...
 
const bool _has_flow_equations
 Boolean to keep track of whether the flow equations should be created. More...
 
const bool _add_rz_viscous_source
 Whether to automatically add the cylindrical viscous source term. More...
 
const MooseEnum _compressibility
 Compressibility type, can be compressible, incompressible or weakly-compressible. More...
 
const bool _solve_for_dynamic_pressure
 Whether we are solving for the total or dynamic pressure. More...
 
const bool _porous_medium_treatment
 Whether to use the porous medium treatment. More...
 
const MooseFunctorName _porosity_name
 Name of the porosity functor. More...
 
MooseFunctorName _flow_porosity_functor_name
 Name of the porosity functor for the flow equations (if smoothed) More...
 
const std::vector< std::string > _velocity_names
 Velocity names. More...
 
const NonlinearVariableName _pressure_name
 Pressure name. More...
 
const NonlinearVariableName _fluid_temperature_name
 Fluid temperature name. More...
 
const MooseFunctorName _density_name
 Name of the density material property. More...
 
const MooseFunctorName _density_gravity_name
 Name of the density material property used for gravity and Boussinesq terms. More...
 
const MooseFunctorName _dynamic_viscosity_name
 Name of the dynamic viscosity material property. More...
 
const bool _include_symmetrized_viscous_stress
 Whether to include the symmetrized viscous stress contribution. More...
 
const bool _include_isotropic_viscous_stress
 Whether to include the isotropic viscous stress contribution. More...
 
const MooseEnum _velocity_interpolation
 The velocity face interpolation method for advecting other quantities. More...
 
const MooseEnum _momentum_advection_interpolation
 The momentum face interpolation method for being advected. More...
 
const MooseEnum _momentum_face_interpolation
 The momentum face interpolation method for stress terms. More...
 
const WCNSFVTurbulencePhysicsBase_turbulence_physics
 Can be set to a coupled turbulence physics. More...
 
std::vector< std::vector< SubdomainName > > _friction_blocks
 Subdomains where we want to have volumetric friction. More...
 
std::vector< std::vector< std::string > > _friction_types
 The friction correlation types used for each block. More...
 
std::vector< std::vector< std::string > > _friction_coeffs
 The coefficients used for each item if friction type. More...
 
const std::vector< BoundaryName > _inlet_boundaries
 Boundaries with a flow inlet specified on them. More...
 
const std::vector< BoundaryName > _outlet_boundaries
 Boundaries with a flow outlet specified on them. More...
 
const std::vector< BoundaryName > _wall_boundaries
 Boundaries which define a wall (slip/noslip/etc.) More...
 
const std::vector< BoundaryName > _hydraulic_separators
 Hydraulic separator boundaries. More...
 
std::map< BoundaryName, MooseEnum_momentum_inlet_types
 Momentum inlet boundary types. More...
 
std::map< BoundaryName, MooseEnum_momentum_outlet_types
 Momentum outlet boundary types. More...
 
std::map< BoundaryName, MooseEnum_momentum_wall_types
 Momentum wall boundary types. More...
 
std::vector< PostprocessorName > _flux_inlet_pps
 Postprocessors describing the momentum inlet for each boundary. Indexing based on the number of flux boundaries. More...
 
std::vector< Point > _flux_inlet_directions
 Direction of each flux inlet. Indexing based on the number of flux boundaries. More...
 
std::map< BoundaryName, std::vector< MooseFunctorName > > _momentum_inlet_functors
 Functors describing the momentum inlet for each boundary. More...
 
std::map< BoundaryName, MooseFunctorName > _pressure_functors
 Functors describing the outlet pressure on each boundary. More...
 
std::map< BoundaryName, std::vector< MooseFunctorName > > _momentum_wall_functors
 Functors describing the momentum for each wall boundary. More...
 
bool _define_variables
 Whether to define variables if they do not exist. More...
 
std::vector< SolverSystemName > _system_names
 
std::vector< unsigned int_system_numbers
 
const bool _verbose
 
const MooseEnum_preconditioning
 
std::vector< SubdomainName > _blocks
 
std::string _registered_identifier
 
std::string _specific_task_name
 
std::set< std::string > _all_tasks
 
ActionWarehouse_awh
 
const std::string & _current_task
 
std::shared_ptr< MooseMesh > & _mesh
 
std::shared_ptr< MooseMesh > & _displaced_mesh
 
std::shared_ptr< FEProblemBase > & _problem
 
PerfID _act_timer
 
MooseApp_app
 
Factory_factory
 
ActionFactory_action_factory
 
const std::string & _type
 
const std::string & _name
 
const InputParameters_pars
 
MooseApp_pg_moose_app
 
const std::string _prefix
 
const Parallel::Communicator & _communicator
 

Private Member Functions

virtual void addSolverVariables () override
 
virtual void addFVKernels () override
 
virtual void addUserObjects () override
 
virtual void addCorrectors () override
 
void addMassTimeKernels ()
 Function adding kernels for the time derivative term of the weakly compressible continuity equation. More...
 
void addMassKernels ()
 Function adding kernels for the incompressible continuity equation. More...
 
void addPressurePinKernel ()
 Function adding the pressure constraint. More...
 
void addMomentumTimeKernels () override
 Functions adding kernels for the incompressible momentum equation If the material properties are not constant, these can be used for weakly-compressible simulations (except the Boussinesq kernel) as well. More...
 
void addMomentumViscousDissipationKernels ()
 
void addMomentumMixingLengthKernels ()
 
void addMomentumAdvectionKernels ()
 
void addMomentumPressureKernels () override
 
void addMomentumGravityKernels () override
 
void addMomentumBoussinesqKernels () override
 
void addMomentumFrictionKernels () override
 
void addInletBC () override
 Functions adding boundary conditions for the incompressible simulation. More...
 
void addOutletBC () override
 
void addWallsBC () override
 
void addSeparatorBC () override
 
bool hasForchheimerFriction () const override
 Return whether a Forchheimer friction model is in use. More...
 
void addRhieChowUserObjects () override
 Function which adds the RhieChow interpolator user objects for weakly and incompressible formulations. More...
 
void checkRhieChowFunctorsDefined () const
 Checks that sufficient Rhie Chow coefficients have been defined for the given dimension, used for scalar or temperature advection by auxiliary variables. More...
 
void addAxisymmetricViscousSourceKernel (const std::vector< SubdomainName > &rz_blocks, unsigned int radial_index) override
 Derived classes must override this hook to add the actual object that implements the axisymmetric viscous source term for their formulation once the helper has determined the relevant blocks and radial component. More...
 

Private Attributes

const unsigned _porosity_smoothing_layers
 The number of smoothing layers if that treatment is used on porosity. More...
 
UserObjectName _rc_uo_name
 Name of the user object in charge of computing the Rhie Chow coefficients. More...
 

Detailed Description

Creates all the objects needed to solve the Navier Stokes mass and momentum equations.

Definition at line 18 of file WCNSFVFlowPhysics.h.

Constructor & Destructor Documentation

◆ WCNSFVFlowPhysics()

WCNSFVFlowPhysics::WCNSFVFlowPhysics ( const InputParameters parameters)

Definition at line 90 of file WCNSFVFlowPhysics.C.

92  _porosity_smoothing_layers(isParamValid("porosity_smoothing_layers")
93  ? getParam<unsigned short>("porosity_smoothing_layers")
94  : 0)
95 {
96  _flow_porosity_functor_name = isParamValid("porosity_smoothing_layers") &&
97  getParam<unsigned short>("porosity_smoothing_layers")
100 
101  // Most likely to be a mistake
102  if (getParam<bool>("pin_pressure") &&
103  getParam<std::vector<MooseFunctorName>>("pressure_functors").size())
104  paramError("pin_pressure", "Cannot pin the pressure if a pressure boundary exists");
105 
106  // Pressure pin checks
107  checkSecondParamSetOnlyIfFirstOneTrue("pin_pressure", "pinned_pressure_type");
108  checkSecondParamSetOnlyIfFirstOneTrue("pin_pressure", "pinned_pressure_value");
109  if (getParam<bool>("pin_pressure"))
110  {
111  if ((std::string(getParam<MooseEnum>("pinned_pressure_type")).find("point") !=
112  std::string::npos) &&
113  !isParamSetByUser("pinned_pressure_point"))
114  paramError("pinned_pressure_point",
115  "This parameter must be set to specify the pinned pressure point");
116  else if ((std::string(getParam<MooseEnum>("pinned_pressure_type")).find("point") ==
117  std::string::npos) &&
118  isParamSetByUser("pinned_pressure_point"))
119  paramError("pinned_pressure_point",
120  "This parameter should not be given by the user with the corresponding "
121  "pinned_pressure_type setting: " +
122  std::string(getParam<MooseEnum>("pinned_pressure_type")) + ".");
123  }
124 
125  // Porosity correction checks
126  checkSecondParamSetOnlyIfFirstOneTrue("porous_medium_treatment", "use_friction_correction");
127  checkSecondParamSetOnlyIfFirstOneTrue("use_friction_correction", "consistent_scaling");
128  checkSecondParamSetOnlyIfFirstOneTrue("porous_medium_treatment",
129  "porosity_interface_pressure_treatment");
130  if (getParam<MooseEnum>("porosity_interface_pressure_treatment") != "bernoulli")
131  errorDependentParameter("porosity_interface_pressure_treatment",
132  "bernoulli",
133  {"pressure_allow_expansion_on_bernoulli_faces",
134  "pressure_drop_sidesets",
135  "pressure_drop_form_factors"});
136 
137  // Porous media parameters
138  checkSecondParamSetOnlyIfFirstOneTrue("porous_medium_treatment", "porosity_smoothing_layers");
139 }
KOKKOS_INLINE_FUNCTION const T * find(const T &target, const T *const begin, const T *const end)
void paramError(const std::string &param, Args... args) const
static const std::string smoothed_porosity
Definition: NS.h:109
const unsigned _porosity_smoothing_layers
The number of smoothing layers if that treatment is used on porosity.
const InputParameters & parameters() const
const MooseFunctorName _porosity_name
Name of the porosity functor.
void errorDependentParameter(const std::string &param1, const std::string &value_not_set, const std::vector< std::string > &dependent_params) const
MooseFunctorName _flow_porosity_functor_name
Name of the porosity functor for the flow equations (if smoothed)
WCNSFVFlowPhysicsBase(const InputParameters &parameters)
bool isParamValid(const std::string &name) const
void checkSecondParamSetOnlyIfFirstOneTrue(const std::string &param1, const std::string &param2) const
bool isParamSetByUser(const std::string &name) const

Member Function Documentation

◆ actOnAdditionalTasks()

void WCNSFVFlowPhysicsBase::actOnAdditionalTasks ( )
overrideprotectedvirtualinherited

Reimplemented from PhysicsBase.

Definition at line 289 of file WCNSFVFlowPhysicsBase.C.

290 {
291  // Turbulence physics would not be initialized before this task
292  if (_current_task == "get_turbulence_physics")
294 }
const std::string & _current_task
const WCNSFVTurbulencePhysicsBase * getCoupledTurbulencePhysics() const
Find the turbulence physics.
const WCNSFVTurbulencePhysicsBase * _turbulence_physics
Can be set to a coupled turbulence physics.

◆ addAxisymmetricViscousSource()

void WCNSFVFlowPhysicsBase::addAxisymmetricViscousSource ( )
protectedinherited

Adds the cylindrical source kernel for the radial momentum equation when requested and valid.

Definition at line 567 of file WCNSFVFlowPhysicsBase.C.

Referenced by addFVKernels().

568 {
570  return;
571 
572  const auto rz_blocks = getAxisymmetricRZBlocks();
573  if (rz_blocks.empty())
574  return;
575 
576  const auto radial_index = getProblem().mesh().getAxisymmetricRadialCoord();
577  addAxisymmetricViscousSourceKernel(rz_blocks, radial_index);
578 }
const bool _has_flow_equations
Boolean to keep track of whether the flow equations should be created.
virtual void addAxisymmetricViscousSourceKernel(const std::vector< SubdomainName > &, unsigned int)
Derived classes must override this hook to add the actual object that implements the axisymmetric vis...
virtual FEProblemBase & getProblem()
unsigned int getAxisymmetricRadialCoord() const
std::vector< SubdomainName > getAxisymmetricRZBlocks() const
Return the set of blocks restricted to an RZ coordinate system.
const bool _add_rz_viscous_source
Whether to automatically add the cylindrical viscous source term.
virtual MooseMesh & mesh() override

◆ addAxisymmetricViscousSourceEnabled()

bool WCNSFVFlowPhysicsBase::addAxisymmetricViscousSourceEnabled ( ) const
inlineinherited

Whether the cylindrical viscous source helper is enabled.

Definition at line 39 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSFVTurbulencePhysics::addAxisymmetricTurbulentViscousSource().

39 { return _add_rz_viscous_source; }
const bool _add_rz_viscous_source
Whether to automatically add the cylindrical viscous source term.

◆ addAxisymmetricViscousSourceKernel()

void WCNSFVFlowPhysics::addAxisymmetricViscousSourceKernel ( const std::vector< SubdomainName > &  ,
unsigned int   
)
overrideprivatevirtual

Derived classes must override this hook to add the actual object that implements the axisymmetric viscous source term for their formulation once the helper has determined the relevant blocks and radial component.

Reimplemented from WCNSFVFlowPhysicsBase.

Definition at line 502 of file WCNSFVFlowPhysics.C.

504 {
505  InputParameters params = getFactory().getValidParams("INSFVMomentumViscousSourceRZ");
506  assignBlocks(params, rz_blocks);
507  params.set<MooseFunctorName>(NS::mu) = _dynamic_viscosity_name;
508  params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
509  params.set<MooseEnum>("momentum_component") = NS::directions[radial_index];
510  params.set<bool>("complete_expansion") = includeSymmetrizedViscousStress();
511  params.set<NonlinearVariableName>("variable") = _velocity_names[radial_index];
512 
513  getProblem().addFVKernel("INSFVMomentumViscousSourceRZ",
514  prefix() + "ins_momentum_viscous_source_rz_" +
515  NS::directions[radial_index],
516  params);
517 }
std::string prefix() const
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
Factory & getFactory()
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
bool includeSymmetrizedViscousStress() const
Whether to include the symmetrized contribution in the viscous stress.
static const std::string directions[3]
Definition: NS.h:23
virtual FEProblemBase & getProblem()
static const std::string mu
Definition: NS.h:127
const std::vector< std::string > _velocity_names
Velocity names.
const MooseFunctorName _dynamic_viscosity_name
Name of the dynamic viscosity material property.
const UserObjectName & rhieChowUOName() const
Return the name of the Rhie Chow user object.
virtual void addFVKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)

◆ addCorrectors()

void WCNSFVFlowPhysics::addCorrectors ( )
overrideprivatevirtual

Reimplemented from PhysicsBase.

Definition at line 1082 of file WCNSFVFlowPhysics.C.

1083 {
1084  if (!_has_flow_equations)
1085  return;
1086 
1087  // Pressure pin
1088  if (getParam<bool>("pin_pressure"))
1089  {
1090  const auto pin_type = getParam<MooseEnum>("pinned_pressure_type");
1091  std::string object_type = "NSPressurePin";
1092 
1093  // No need for the user object
1094  if (pin_type == "point-value" || pin_type == "average")
1095  return;
1096 
1097  // Create the average value postprocessor if needed
1098  if (pin_type == "average-uo")
1099  {
1100  // Volume average by default, but we could do inlet or outlet for example
1101  InputParameters params = getFactory().getValidParams("ElementAverageValue");
1102  params.set<std::vector<VariableName>>("variable") = {_pressure_name};
1103  assignBlocks(params, _blocks);
1104  params.set<std::vector<OutputName>>("outputs") = {"none"};
1105  getProblem().addPostprocessor("ElementAverageValue", "ns_pressure_average", params);
1106  }
1107 
1108  InputParameters params = getFactory().getValidParams(object_type);
1109  if (pin_type == "point-value" || pin_type == "point-value-uo")
1110  params.set<MooseEnum>("pin_type") = "point-value";
1111  else
1112  params.set<MooseEnum>("pin_type") = "average";
1113 
1114  params.set<PostprocessorName>("phi0") = getParam<PostprocessorName>("pinned_pressure_value");
1115  params.set<NonlinearVariableName>("variable") = _pressure_name;
1116  if (pin_type == "point-value" || pin_type == "point-value-uo")
1117  params.set<Point>("point") = getParam<Point>("pinned_pressure_point");
1118  else if (pin_type == "average-uo")
1119  params.set<PostprocessorName>("pressure_average") = "ns_pressure_average";
1120 
1121  getProblem().addUserObject(object_type, prefix() + "ins_mass_pressure_pin", params);
1122  }
1123 }
std::string prefix() const
const bool _has_flow_equations
Boolean to keep track of whether the flow equations should be created.
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
Factory & getFactory()
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
const NonlinearVariableName _pressure_name
Pressure name.
static const std::string pin_type
std::vector< SubdomainName > _blocks
virtual FEProblemBase & getProblem()
virtual void addPostprocessor(const std::string &pp_name, const std::string &name, InputParameters &parameters)
virtual std::vector< std::shared_ptr< UserObject > > addUserObject(const std::string &user_object_name, const std::string &name, InputParameters &parameters)

◆ addFluidPropertiesFunctorMaterial()

void WCNSFVFlowPhysicsBase::addFluidPropertiesFunctorMaterial ( )
protectedinherited

Function which adds the general functor fluid properties functor material to define fluid functor material property.

Definition at line 351 of file WCNSFVFlowPhysicsBase.C.

Referenced by WCNSFVFlowPhysicsBase::addMaterials().

352 {
353  // Not very future-proof but it works
354  const bool use_ad = !dynamic_cast<WCNSLinearFVFlowPhysics *>(this);
355  const std::string class_name =
356  use_ad ? "GeneralFunctorFluidProps" : "NonADGeneralFunctorFluidProps";
357  InputParameters params = getFactory().getValidParams(class_name);
358  assignBlocks(params, _blocks);
359 
360  params.set<MooseFunctorName>(NS::pressure) = _pressure_name;
361  params.set<MooseFunctorName>(NS::T_fluid) = _fluid_temperature_name;
362  params.set<MooseFunctorName>(NS::speed) = NS::speed;
363  params.applySpecificParameters(parameters(), {NS::fluid, NS::density, "mu_rampdown"});
365  params.set<bool>("force_define_density") = true;
367  {
368  params.set<MooseFunctorName>(NS::porosity) = "1";
369  params.set<MooseFunctorName>("characteristic_length") = "1";
370  }
371  else
372  // not implemented yet
373  paramInfo(
374  NS::fluid,
375  "Specifying the fluid properties user object does not define the GeneralFunctorFluidProps "
376  "when using the porous medium treatment. You have to define this object in the input");
377 
378  // Dynamic pressure
379  params.set<bool>("solving_for_dynamic_pressure") = _solve_for_dynamic_pressure;
381  {
382  params.set<Point>("reference_pressure_point") = getParam<Point>("reference_pressure_point");
383  if (!isParamSetByUser("reference_pressure_point"))
384  paramWarning("reference_pressure_point",
385  "Default value of (0,0,0) used. If this point is outside the flow domain, the "
386  "simulation will error");
387  params.set<Real>("reference_pressure") = getParam<Real>("reference_pressure");
388  }
389  params.set<Point>("gravity") = getParam<RealVectorValue>("gravity");
390 
392  getProblem().addFunctorMaterial(class_name, prefix() + "functor_fluidprops", params);
393 }
std::string prefix() const
Creates all the objects needed to solve the Navier-Stokes equations with the SIMPLE algorithm using t...
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
Factory & getFactory()
static const std::string speed
Definition: NS.h:147
void applySpecificParameters(const InputParameters &common, const std::vector< std::string > &include, bool allow_private=false)
const MooseFunctorName _density_name
Name of the density material property.
const InputParameters & parameters() const
T & set(const std::string &name, bool quiet_mode=false)
static const std::string density
Definition: NS.h:34
InputParameters getValidParams(const std::string &name) const
static const std::string fluid
Definition: NS.h:88
virtual void addFunctorMaterial(const std::string &functor_material_name, const std::string &name, InputParameters &parameters)
const NonlinearVariableName _pressure_name
Pressure name.
const bool _porous_medium_treatment
Whether to use the porous medium treatment.
std::vector< SubdomainName > _blocks
virtual FEProblemBase & getProblem()
static const std::string porosity
Definition: NS.h:108
static const std::string T_fluid
Definition: NS.h:110
const bool _solve_for_dynamic_pressure
Whether we are solving for the total or dynamic pressure.
const NonlinearVariableName _fluid_temperature_name
Fluid temperature name.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string pressure
Definition: NS.h:57
void paramWarning(const std::string &param, Args... args) const
bool parsesToReal(const std::string &input, Real *parsed_real)
bool isParamSetByUser(const std::string &name) const
void paramInfo(const std::string &param, Args... args) const

◆ addFVBCs()

void WCNSFVFlowPhysicsBase::addFVBCs ( )
overrideprotectedvirtualinherited

Reimplemented from PhysicsBase.

Definition at line 297 of file WCNSFVFlowPhysicsBase.C.

298 {
299  addInletBC();
300  addOutletBC();
301  addWallsBC();
302  addSeparatorBC();
303 }
virtual void addSeparatorBC()=0
virtual void addOutletBC()=0
virtual void addWallsBC()=0
virtual void addInletBC()=0
Functions adding boundary conditions for the flow simulation.

◆ addFVKernels()

void WCNSFVFlowPhysics::addFVKernels ( )
overrideprivatevirtual

Implements WCNSFVFlowPhysicsBase.

Definition at line 268 of file WCNSFVFlowPhysics.C.

269 {
270  if (!_has_flow_equations)
271  return;
272 
273  // Mass equation: time derivative
274  if (_compressibility == "weakly-compressible" &&
275  shouldCreateTimeDerivative(_pressure_name, _blocks, /*error if already defined*/ false))
277 
278  // Mass equation: divergence of momentum
279  addMassKernels();
280 
281  // Pressure pin
282  if (getParam<bool>("pin_pressure"))
284 
285  // Momentum equation: time derivative
286  if (isTransient())
288 
289  // Momentum equation: momentum advection
291 
292  // Momentum equation: momentum viscous stress
295 
296  // Momentum equation: pressure term
298 
299  // Momentum equation: gravity source term
301 
302  // Momentum equation: friction kernels
303  if (_friction_types.size())
305 
306  // Momentum equation: boussinesq approximation
307  if (getParam<bool>("boussinesq_approximation"))
309 }
void addMomentumTimeKernels() override
Functions adding kernels for the incompressible momentum equation If the material properties are not ...
const bool _has_flow_equations
Boolean to keep track of whether the flow equations should be created.
void addMomentumBoussinesqKernels() override
std::vector< std::vector< std::string > > _friction_types
The friction correlation types used for each block.
void addMomentumViscousDissipationKernels()
void addMassKernels()
Function adding kernels for the incompressible continuity equation.
void addPressurePinKernel()
Function adding the pressure constraint.
const NonlinearVariableName _pressure_name
Pressure name.
bool shouldCreateTimeDerivative(const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_already_defined) const
std::vector< SubdomainName > _blocks
void addMassTimeKernels()
Function adding kernels for the time derivative term of the weakly compressible continuity equation...
void addMomentumPressureKernels() override
void addAxisymmetricViscousSource()
Adds the cylindrical source kernel for the radial momentum equation when requested and valid...
const MooseEnum _compressibility
Compressibility type, can be compressible, incompressible or weakly-compressible. ...
void addMomentumFrictionKernels() override
void addMomentumGravityKernels() override
void addMomentumAdvectionKernels()
bool isTransient() const

◆ addInitialConditions()

void WCNSFVFlowPhysicsBase::addInitialConditions ( )
overrideprotectedvirtualinherited

Reimplemented from PhysicsBase.

Definition at line 396 of file WCNSFVFlowPhysicsBase.C.

397 {
398  if (!_define_variables && parameters().isParamSetByUser("initial_velocity") &&
399  parameters().isParamSetByUser("velocity_variable") &&
400  getParam<std::vector<FunctionName>>("initial_velocity").size() != 0)
401  // TODO: Rework and remove this last statement once the NSFV action is removed
402  paramError("initial_velocity",
403  "Velocity is defined externally of WCNSFVFlowPhysicsBase, so should the inital "
404  "conditions");
405  if (!_define_variables && parameters().isParamSetByUser("initial_pressure") &&
406  parameters().isParamSetByUser("pressure_variable"))
407  paramError("initial_pressure",
408  "Pressure is defined externally of WCNSFVFlowPhysicsBase, so should the inital "
409  "condition");
410 
411  // Check dimension
412  if (getParam<std::vector<FunctionName>>("initial_velocity").size() != dimension() &&
413  getParam<std::vector<FunctionName>>("initial_velocity").size() != 3 &&
414  getParam<std::vector<FunctionName>>("initial_velocity").size() != 0)
415  // TODO: Rework and remove this last statement once the NSFV action is removed
416  paramError("initial_velocity",
417  "The number of velocity components in the " + type() + " initial condition is not " +
418  std::to_string(dimension()) + " or 3!");
419 
420  InputParameters params = getFactory().getValidParams("FVFunctionIC");
421  assignBlocks(params, _blocks);
422  auto vvalue = getParam<std::vector<FunctionName>>("initial_velocity");
423 
424  for (const auto d : make_range(dimension()))
425  {
426  params.set<VariableName>("variable") = _velocity_names[d];
427  params.set<FunctionName>("function") = vvalue[d];
428 
430  _blocks,
431  /*whether IC is a default*/ !isParamSetByUser("initial_velocity"),
432  /*error if already an IC*/ isParamSetByUser("initial_velocity")))
434  "FVFunctionIC", prefix() + _velocity_names[d] + "_ic", params);
435  }
436 
438  _blocks,
439  /*whether IC is a default*/ !isParamSetByUser("initial_pressure"),
440  /*error if already an IC*/ isParamSetByUser("initial_pressure")))
441  {
442  params.set<VariableName>("variable") = _pressure_name;
443  params.set<FunctionName>("function") = getParam<FunctionName>("initial_pressure");
444 
445  getProblem().addFVInitialCondition("FVFunctionIC", prefix() + _pressure_name + "_ic", params);
446  }
447 }
std::string prefix() const
virtual void addFVInitialCondition(const std::string &ic_name, const std::string &name, InputParameters &parameters)
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
Factory & getFactory()
void paramError(const std::string &param, Args... args) const
const T & getParam(const std::string &name) const
const InputParameters & parameters() const
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
const NonlinearVariableName _pressure_name
Pressure name.
bool shouldCreateIC(const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool ic_is_default_ic, const bool error_if_already_defined) const
std::vector< SubdomainName > _blocks
unsigned int dimension() const
virtual FEProblemBase & getProblem()
const std::vector< std::string > _velocity_names
Velocity names.
const std::string & type() const
bool _define_variables
Whether to define variables if they do not exist.
IntRange< T > make_range(T beg, T end)
bool isParamSetByUser(const std::string &name) const

◆ addInletBC()

void WCNSFVFlowPhysics::addInletBC ( )
overrideprivatevirtual

Functions adding boundary conditions for the incompressible simulation.

These are used for weakly-compressible simulations as well.

Implements WCNSFVFlowPhysicsBase.

Definition at line 725 of file WCNSFVFlowPhysics.C.

726 {
727  // Check the size of the BC parameters
728  unsigned int num_velocity_functor_inlets = 0;
729  for (const auto & [bdy, momentum_outlet_type] : _momentum_inlet_types)
730  if (momentum_outlet_type == "fixed-velocity" || momentum_outlet_type == "fixed-pressure")
731  num_velocity_functor_inlets++;
732 
733  if (num_velocity_functor_inlets != _momentum_inlet_functors.size())
734  paramError("momentum_inlet_functors",
735  "Size (" + std::to_string(_momentum_inlet_functors.size()) +
736  ") is not the same as the number of entries in the momentum_inlet_types "
737  "subvector for fixed-velocities/pressures functors (size " +
738  std::to_string(num_velocity_functor_inlets) + ")");
739 
740  unsigned int flux_bc_counter = 0;
741  unsigned int velocity_pressure_counter = 0;
742  for (const auto & [inlet_bdy, momentum_inlet_type] : _momentum_inlet_types)
743  {
744  if (momentum_inlet_type == "fixed-velocity")
745  {
746  const std::string bc_type = "INSFVInletVelocityBC";
747  InputParameters params = getFactory().getValidParams(bc_type);
748  params.set<std::vector<BoundaryName>>("boundary") = {inlet_bdy};
749  if (_momentum_inlet_functors.size() < velocity_pressure_counter + 1)
750  paramError("momentum_inlet_functors",
751  "More non-flux inlets than inlet functors (" +
752  std::to_string(_momentum_inlet_functors.size()) + ")");
753 
754  // Check that enough functors have been provided for the dimension of the problem
755  const auto momentum_functors = libmesh_map_find(_momentum_inlet_functors, inlet_bdy);
756  if (momentum_functors.size() < dimension())
757  paramError("momentum_inlet_functors",
758  "Subvector for boundary '" + inlet_bdy + "' (size " +
759  std::to_string(momentum_functors.size()) +
760  ") is not the same size as the number of dimensions of the physics (" +
761  std::to_string(dimension()) + ")");
762 
763  for (const auto d : make_range(dimension()))
764  {
765  params.set<NonlinearVariableName>("variable") = _velocity_names[d];
766  params.set<MooseFunctorName>("functor") = momentum_functors[d];
767 
768  getProblem().addFVBC(bc_type, _velocity_names[d] + "_" + inlet_bdy, params);
769  }
770  ++velocity_pressure_counter;
771  }
772  else if (momentum_inlet_type == "fixed-pressure")
773  {
774  const std::string bc_type = "INSFVOutletPressureBC";
775  InputParameters params = getFactory().getValidParams(bc_type);
776  params.set<NonlinearVariableName>("variable") = _pressure_name;
777  if (_momentum_inlet_functors.size() < velocity_pressure_counter + 1)
778  paramError("momentum_inlet_functors",
779  "More non-flux inlets than inlet functors (" +
780  std::to_string(_momentum_inlet_functors.size()) + ")");
781 
782  params.set<FunctionName>("function") =
783  libmesh_map_find(_momentum_inlet_functors, inlet_bdy)[0];
784  params.set<std::vector<BoundaryName>>("boundary") = {inlet_bdy};
785 
786  getProblem().addFVBC(bc_type, _pressure_name + "_" + inlet_bdy, params);
787  ++velocity_pressure_counter;
788  }
789  else if (momentum_inlet_type == "flux-mass" || momentum_inlet_type == "flux-velocity")
790  {
791  {
792  const std::string bc_type =
793  _porous_medium_treatment ? "PWCNSFVMomentumFluxBC" : "WCNSFVMomentumFluxBC";
794  InputParameters params = getFactory().getValidParams(bc_type);
795 
796  if (_flux_inlet_directions.size())
797  params.set<Point>("direction") = _flux_inlet_directions[flux_bc_counter];
798 
799  params.set<MooseFunctorName>(NS::density) = _density_name;
800  params.set<std::vector<BoundaryName>>("boundary") = {inlet_bdy};
801  params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
803  params.set<MooseFunctorName>(NS::porosity) = _porosity_name;
804  if (_flux_inlet_pps.size() < flux_bc_counter + 1)
805  paramError("flux_inlet_pps",
806  "More inlet flux BCs than inlet flux pps (" +
807  std::to_string(_flux_inlet_pps.size()) + ")");
808 
809  if (momentum_inlet_type == "flux-mass")
810  {
811  params.set<PostprocessorName>("mdot_pp") = _flux_inlet_pps[flux_bc_counter];
812  params.set<PostprocessorName>("area_pp") = "area_pp_" + inlet_bdy;
813  }
814  else
815  params.set<PostprocessorName>("velocity_pp") = _flux_inlet_pps[flux_bc_counter];
816 
817  for (const auto d : make_range(dimension()))
818  params.set<MooseFunctorName>(NS::velocity_vector[d]) = _velocity_names[d];
819 
820  for (const auto d : make_range(dimension()))
821  {
822  params.set<MooseEnum>("momentum_component") = NS::directions[d];
823  params.set<NonlinearVariableName>("variable") = _velocity_names[d];
824 
825  getProblem().addFVBC(bc_type, _velocity_names[d] + "_" + inlet_bdy, params);
826  }
827  }
828  {
829  const std::string bc_type = "WCNSFVMassFluxBC";
830  InputParameters params = getFactory().getValidParams(bc_type);
831  params.set<MooseFunctorName>(NS::density) = _density_name;
832  params.set<NonlinearVariableName>("variable") = _pressure_name;
833  params.set<std::vector<BoundaryName>>("boundary") = {inlet_bdy};
834 
835  if (_flux_inlet_directions.size())
836  params.set<Point>("direction") = _flux_inlet_directions[flux_bc_counter];
837 
838  if (momentum_inlet_type == "flux-mass")
839  {
840  params.set<PostprocessorName>("mdot_pp") = _flux_inlet_pps[flux_bc_counter];
841  params.set<PostprocessorName>("area_pp") = "area_pp_" + inlet_bdy;
842  }
843  else
844  params.set<PostprocessorName>("velocity_pp") = _flux_inlet_pps[flux_bc_counter];
845 
846  for (const auto d : make_range(dimension()))
847  params.set<MooseFunctorName>(NS::velocity_vector[d]) = _velocity_names[d];
848 
849  getProblem().addFVBC(bc_type, _pressure_name + "_" + inlet_bdy, params);
850  }
851 
852  // need to increment flux_bc_counter
853  ++flux_bc_counter;
854  }
855  }
856 }
Factory & getFactory()
std::map< BoundaryName, MooseEnum > _momentum_inlet_types
Momentum inlet boundary types.
void paramError(const std::string &param, Args... args) const
const MooseFunctorName _density_name
Name of the density material property.
T & set(const std::string &name, bool quiet_mode=false)
static const std::string density
Definition: NS.h:34
InputParameters getValidParams(const std::string &name) const
std::map< BoundaryName, std::vector< MooseFunctorName > > _momentum_inlet_functors
Functors describing the momentum inlet for each boundary.
const NonlinearVariableName _pressure_name
Pressure name.
const MooseFunctorName _porosity_name
Name of the porosity functor.
const bool _porous_medium_treatment
Whether to use the porous medium treatment.
unsigned int dimension() const
static const std::string directions[3]
Definition: NS.h:23
virtual FEProblemBase & getProblem()
static const std::string porosity
Definition: NS.h:108
std::vector< PostprocessorName > _flux_inlet_pps
Postprocessors describing the momentum inlet for each boundary. Indexing based on the number of flux ...
const std::vector< std::string > _velocity_names
Velocity names.
const UserObjectName & rhieChowUOName() const
Return the name of the Rhie Chow user object.
IntRange< T > make_range(T beg, T end)
const std::string velocity_vector[3]
Definition: NS.h:50
std::vector< Point > _flux_inlet_directions
Direction of each flux inlet. Indexing based on the number of flux boundaries.
virtual void addFVBC(const std::string &fv_bc_name, const std::string &name, InputParameters &parameters)

◆ addMassKernels()

void WCNSFVFlowPhysics::addMassKernels ( )
private

Function adding kernels for the incompressible continuity equation.

Definition at line 333 of file WCNSFVFlowPhysics.C.

Referenced by addFVKernels().

334 {
335  std::string kernel_type = "INSFVMassAdvection";
336  std::string kernel_name = prefix() + "ins_mass_advection";
337 
339  {
340  kernel_type = "PINSFVMassAdvection";
341  kernel_name = prefix() + "pins_mass_advection";
342  }
343 
344  InputParameters params = getFactory().getValidParams(kernel_type);
345  assignBlocks(params, _blocks);
346  params.set<NonlinearVariableName>("variable") = _pressure_name;
347  params.set<MooseFunctorName>(NS::density) = _density_name;
348  params.set<MooseEnum>("velocity_interp_method") = _velocity_interpolation;
349  params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
350  params.set<MooseEnum>("advected_interp_method") =
351  getParam<MooseEnum>("mass_advection_interpolation");
352 
353  getProblem().addFVKernel(kernel_type, kernel_name, params);
354 }
std::string prefix() const
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
Factory & getFactory()
const MooseFunctorName _density_name
Name of the density material property.
T & set(const std::string &name, bool quiet_mode=false)
static const std::string density
Definition: NS.h:34
InputParameters getValidParams(const std::string &name) const
const NonlinearVariableName _pressure_name
Pressure name.
const bool _porous_medium_treatment
Whether to use the porous medium treatment.
std::vector< SubdomainName > _blocks
virtual FEProblemBase & getProblem()
const MooseEnum _velocity_interpolation
The velocity face interpolation method for advecting other quantities.
const UserObjectName & rhieChowUOName() const
Return the name of the Rhie Chow user object.
virtual void addFVKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)

◆ addMassTimeKernels()

void WCNSFVFlowPhysics::addMassTimeKernels ( )
private

Function adding kernels for the time derivative term of the weakly compressible continuity equation.

Definition at line 312 of file WCNSFVFlowPhysics.C.

Referenced by addFVKernels().

313 {
314  std::string mass_kernel_type = "WCNSFVMassTimeDerivative";
315  std::string kernel_name = prefix() + "wcns_mass_time";
316 
318  {
319  mass_kernel_type = "PWCNSFVMassTimeDerivative";
320  kernel_name = prefix() + "pwcns_mass_time";
321  }
322 
323  InputParameters params = getFactory().getValidParams(mass_kernel_type);
324  assignBlocks(params, _blocks);
325  params.set<NonlinearVariableName>("variable") = _pressure_name;
326  params.set<MooseFunctorName>(NS::time_deriv(NS::density)) = NS::time_deriv(_density_name);
328  params.set<MooseFunctorName>(NS::porosity) = _flow_porosity_functor_name;
329  getProblem().addFVKernel(mass_kernel_type, kernel_name, params);
330 }
std::string prefix() const
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
Factory & getFactory()
const MooseFunctorName _density_name
Name of the density material property.
T & set(const std::string &name, bool quiet_mode=false)
static const std::string density
Definition: NS.h:34
InputParameters getValidParams(const std::string &name) const
const NonlinearVariableName _pressure_name
Pressure name.
const bool _porous_medium_treatment
Whether to use the porous medium treatment.
std::vector< SubdomainName > _blocks
virtual FEProblemBase & getProblem()
static const std::string porosity
Definition: NS.h:108
MooseFunctorName _flow_porosity_functor_name
Name of the porosity functor for the flow equations (if smoothed)
virtual void addFVKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
std::string time_deriv(const std::string &var)
Definition: NS.h:98

◆ addMaterials()

void WCNSFVFlowPhysicsBase::addMaterials ( )
overrideprotectedvirtualinherited

Reimplemented from PhysicsBase.

Definition at line 306 of file WCNSFVFlowPhysicsBase.C.

307 {
310  else
312 
313  if (isParamValid(NS::fluid))
315 }
static const std::string fluid
Definition: NS.h:88
const bool _porous_medium_treatment
Whether to use the porous medium treatment.
void addPorousMediumSpeedMaterial()
Add material to define the local speed in porous medium flows.
void addNonPorousMediumSpeedMaterial()
Add material to define the local speed with no porous medium treatment.
void addFluidPropertiesFunctorMaterial()
Function which adds the general functor fluid properties functor material to define fluid functor mat...
virtual bool hasForchheimerFriction() const =0
Return whether a Forchheimer friction model is in use.
bool isParamValid(const std::string &name) const

◆ addMomentumAdvectionKernels()

void WCNSFVFlowPhysics::addMomentumAdvectionKernels ( )
private

Definition at line 415 of file WCNSFVFlowPhysics.C.

Referenced by addFVKernels().

416 {
417  std::string kernel_type = "INSFVMomentumAdvection";
418  std::string kernel_name = prefix() + "ins_momentum_advection_";
419 
421  {
422  kernel_type = "PINSFVMomentumAdvection";
423  kernel_name = prefix() + "pins_momentum_advection_";
424  }
425 
426  InputParameters params = getFactory().getValidParams(kernel_type);
427  assignBlocks(params, _blocks);
428  params.set<MooseFunctorName>(NS::density) = _density_name;
429  params.set<MooseEnum>("velocity_interp_method") = _velocity_interpolation;
430  params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
431  params.set<MooseEnum>("advected_interp_method") = _momentum_advection_interpolation;
433  params.set<MooseFunctorName>(NS::porosity) = _flow_porosity_functor_name;
435 
436  for (const auto d : make_range(dimension()))
437  {
438  params.set<NonlinearVariableName>("variable") = _velocity_names[d];
439  params.set<MooseEnum>("momentum_component") = NS::directions[d];
440 
441  getProblem().addFVKernel(kernel_type, kernel_name + NS::directions[d], params);
442  }
443 }
std::string prefix() const
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
Factory & getFactory()
void applySpecificParameters(const InputParameters &common, const std::vector< std::string > &include, bool allow_private=false)
const MooseFunctorName _density_name
Name of the density material property.
const InputParameters & parameters() const
T & set(const std::string &name, bool quiet_mode=false)
static const std::string density
Definition: NS.h:34
InputParameters getValidParams(const std::string &name) const
const MooseEnum _momentum_advection_interpolation
The momentum face interpolation method for being advected.
const bool _porous_medium_treatment
Whether to use the porous medium treatment.
std::vector< SubdomainName > _blocks
unsigned int dimension() const
static const std::string directions[3]
Definition: NS.h:23
virtual FEProblemBase & getProblem()
static const std::string porosity
Definition: NS.h:108
const std::vector< std::string > _velocity_names
Velocity names.
static std::vector< std::string > listOfCommonParams()
MooseFunctorName _flow_porosity_functor_name
Name of the porosity functor for the flow equations (if smoothed)
const MooseEnum _velocity_interpolation
The velocity face interpolation method for advecting other quantities.
const UserObjectName & rhieChowUOName() const
Return the name of the Rhie Chow user object.
IntRange< T > make_range(T beg, T end)
virtual void addFVKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)

◆ addMomentumBoussinesqKernels()

void WCNSFVFlowPhysics::addMomentumBoussinesqKernels ( )
overrideprivatevirtual

Implements WCNSFVFlowPhysicsBase.

Definition at line 584 of file WCNSFVFlowPhysics.C.

Referenced by addFVKernels().

585 {
586  if (_compressibility == "weakly-compressible")
587  paramError("boussinesq_approximation",
588  "We cannot use boussinesq approximation while running in weakly-compressible mode!");
589 
590  std::string kernel_type = "INSFVMomentumBoussinesq";
591  std::string kernel_name = prefix() + "ins_momentum_boussinesq_";
592 
594  {
595  kernel_type = "PINSFVMomentumBoussinesq";
596  kernel_name = prefix() + "pins_momentum_boussinesq_";
597  }
598 
599  InputParameters params = getFactory().getValidParams(kernel_type);
600  assignBlocks(params, _blocks);
601  params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
602  params.set<MooseFunctorName>(NS::T_fluid) = _fluid_temperature_name;
603  params.set<MooseFunctorName>(NS::density) = _density_gravity_name;
604  params.set<RealVectorValue>("gravity") = getParam<RealVectorValue>("gravity");
605  params.set<Real>("ref_temperature") = getParam<Real>("ref_temperature");
606  params.set<MooseFunctorName>("alpha_name") = getParam<MooseFunctorName>("thermal_expansion");
608  params.set<MooseFunctorName>(NS::porosity) = _flow_porosity_functor_name;
609  // User declared the flow to be incompressible, we have to trust them
610  params.set<bool>("_override_constant_check") = true;
611 
612  for (const auto d : make_range(dimension()))
613  {
614  if (getParam<RealVectorValue>("gravity")(d) != 0)
615  {
616  params.set<MooseEnum>("momentum_component") = NS::directions[d];
617  params.set<NonlinearVariableName>("variable") = _velocity_names[d];
618 
619  getProblem().addFVKernel(kernel_type, kernel_name + NS::directions[d], params);
620  }
621  }
622 }
std::string prefix() const
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
Factory & getFactory()
void paramError(const std::string &param, Args... args) const
const MooseFunctorName _density_gravity_name
Name of the density material property used for gravity and Boussinesq terms.
T & set(const std::string &name, bool quiet_mode=false)
static const std::string density
Definition: NS.h:34
InputParameters getValidParams(const std::string &name) const
const bool _porous_medium_treatment
Whether to use the porous medium treatment.
std::vector< SubdomainName > _blocks
unsigned int dimension() const
static const std::string directions[3]
Definition: NS.h:23
virtual FEProblemBase & getProblem()
static const std::string porosity
Definition: NS.h:108
static const std::string T_fluid
Definition: NS.h:110
const std::vector< std::string > _velocity_names
Velocity names.
const MooseEnum _compressibility
Compressibility type, can be compressible, incompressible or weakly-compressible. ...
MooseFunctorName _flow_porosity_functor_name
Name of the porosity functor for the flow equations (if smoothed)
const NonlinearVariableName _fluid_temperature_name
Fluid temperature name.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const UserObjectName & rhieChowUOName() const
Return the name of the Rhie Chow user object.
IntRange< T > make_range(T beg, T end)
virtual void addFVKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)

◆ addMomentumFrictionKernels()

void WCNSFVFlowPhysics::addMomentumFrictionKernels ( )
overrideprivatevirtual

Implements WCNSFVFlowPhysicsBase.

Definition at line 625 of file WCNSFVFlowPhysics.C.

Referenced by addFVKernels().

626 {
627  unsigned int num_friction_blocks = _friction_blocks.size();
628  unsigned int num_used_blocks = num_friction_blocks ? num_friction_blocks : 1;
629 
630  const std::string kernel_type = "PINSFVMomentumFriction";
631  InputParameters params = getFactory().getValidParams(kernel_type);
632  params.set<MooseFunctorName>(NS::density) = _density_name;
633  params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
635  params.set<MooseFunctorName>(NS::speed) = NS::speed;
636  params.set<bool>("standard_friction_formulation") =
637  getParam<bool>("standard_friction_formulation");
638  params.set<bool>("is_porous_medium") = _porous_medium_treatment;
639 
640  for (const auto block_i : make_range(num_used_blocks))
641  {
642  std::string block_name = "";
643  if (num_friction_blocks)
644  {
645  params.set<std::vector<SubdomainName>>("block") = _friction_blocks[block_i];
646  block_name = Moose::stringify(_friction_blocks[block_i]);
647  }
648  else
649  {
650  assignBlocks(params, _blocks);
651  block_name = std::to_string(block_i);
652  }
653 
654  for (const auto d : make_range(dimension()))
655  {
656  params.set<NonlinearVariableName>("variable") = _velocity_names[d];
657  params.set<MooseEnum>("momentum_component") = NS::directions[d];
658  for (unsigned int type_i = 0; type_i < _friction_types[block_i].size(); ++type_i)
659  {
660  const auto upper_name = MooseUtils::toUpper(_friction_types[block_i][type_i]);
661  if (upper_name == "DARCY")
662  {
663  params.set<MooseFunctorName>(NS::mu) = _dynamic_viscosity_name;
664  params.set<MooseFunctorName>("Darcy_name") = _friction_coeffs[block_i][type_i];
665  }
666  else if (upper_name == "FORCHHEIMER")
667  {
668  params.set<MooseFunctorName>(NS::speed) = NS::speed;
669  params.set<MooseFunctorName>("Forchheimer_name") = _friction_coeffs[block_i][type_i];
670  }
671  else
672  paramError("friction_types",
673  "Friction type '",
674  _friction_types[block_i][type_i],
675  "' is not implemented");
676  }
677 
678  getProblem().addFVKernel(kernel_type,
679  prefix() + "momentum_friction_" + block_name + "_" +
680  NS::directions[d],
681  params);
682  }
683 
684  if (_porous_medium_treatment && getParam<bool>("use_friction_correction"))
685  {
686  const std::string correction_kernel_type = "PINSFVMomentumFrictionCorrection";
687  InputParameters corr_params = getFactory().getValidParams(correction_kernel_type);
688  if (num_friction_blocks)
689  corr_params.set<std::vector<SubdomainName>>("block") = _friction_blocks[block_i];
690  else
691  assignBlocks(corr_params, _blocks);
692  corr_params.set<MooseFunctorName>(NS::density) = _density_name;
693  corr_params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
694  corr_params.set<Real>("consistent_scaling") = getParam<Real>("consistent_scaling");
695  for (const auto d : make_range(dimension()))
696  {
697  corr_params.set<NonlinearVariableName>("variable") = _velocity_names[d];
698  corr_params.set<MooseEnum>("momentum_component") = NS::directions[d];
699  for (unsigned int type_i = 0; type_i < _friction_types[block_i].size(); ++type_i)
700  {
701  const auto upper_name = MooseUtils::toUpper(_friction_types[block_i][type_i]);
702  if (upper_name == "DARCY")
703  {
704  corr_params.set<MooseFunctorName>(NS::mu) = _dynamic_viscosity_name;
705  corr_params.set<MooseFunctorName>("Darcy_name") = _friction_coeffs[block_i][type_i];
706  }
707  else if (upper_name == "FORCHHEIMER")
708  {
709  corr_params.set<MooseFunctorName>(NS::speed) = NS::speed;
710  corr_params.set<MooseFunctorName>("Forchheimer_name") =
711  _friction_coeffs[block_i][type_i];
712  }
713  }
714 
715  getProblem().addFVKernel(correction_kernel_type,
716  prefix() + "pins_momentum_friction_correction_" + block_name +
717  "_" + NS::directions[d],
718  corr_params);
719  }
720  }
721  }
722 }
std::string prefix() const
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
Factory & getFactory()
std::vector< std::vector< std::string > > _friction_types
The friction correlation types used for each block.
void paramError(const std::string &param, Args... args) const
static const std::string speed
Definition: NS.h:147
const MooseFunctorName _density_name
Name of the density material property.
T & set(const std::string &name, bool quiet_mode=false)
static const std::string density
Definition: NS.h:34
InputParameters getValidParams(const std::string &name) const
const bool _porous_medium_treatment
Whether to use the porous medium treatment.
std::vector< SubdomainName > _blocks
unsigned int dimension() const
static const std::string directions[3]
Definition: NS.h:23
std::string toUpper(std::string name)
virtual FEProblemBase & getProblem()
std::vector< std::vector< SubdomainName > > _friction_blocks
Subdomains where we want to have volumetric friction.
static const std::string mu
Definition: NS.h:127
const std::vector< std::string > _velocity_names
Velocity names.
const MooseFunctorName _dynamic_viscosity_name
Name of the dynamic viscosity material property.
std::string stringify(const T &t)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const UserObjectName & rhieChowUOName() const
Return the name of the Rhie Chow user object.
IntRange< T > make_range(T beg, T end)
virtual void addFVKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
std::vector< std::vector< std::string > > _friction_coeffs
The coefficients used for each item if friction type.
bool hasForchheimerFriction() const override
Return whether a Forchheimer friction model is in use.

◆ addMomentumGravityKernels()

void WCNSFVFlowPhysics::addMomentumGravityKernels ( )
overrideprivatevirtual

Implements WCNSFVFlowPhysicsBase.

Definition at line 549 of file WCNSFVFlowPhysics.C.

Referenced by addFVKernels().

550 {
552  {
553  std::string kernel_type = "INSFVMomentumGravity";
554  std::string kernel_name = prefix() + "ins_momentum_gravity_";
555 
557  {
558  kernel_type = "PINSFVMomentumGravity";
559  kernel_name = prefix() + "pins_momentum_gravity_";
560  }
561 
562  InputParameters params = getFactory().getValidParams(kernel_type);
563  assignBlocks(params, _blocks);
564  params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
565  params.set<MooseFunctorName>(NS::density) = _density_gravity_name;
566  params.set<RealVectorValue>("gravity") = getParam<RealVectorValue>("gravity");
568  params.set<MooseFunctorName>(NS::porosity) = _flow_porosity_functor_name;
569 
570  for (const auto d : make_range(dimension()))
571  {
572  if (getParam<RealVectorValue>("gravity")(d) != 0)
573  {
574  params.set<MooseEnum>("momentum_component") = NS::directions[d];
575  params.set<NonlinearVariableName>("variable") = _velocity_names[d];
576 
577  getProblem().addFVKernel(kernel_type, kernel_name + NS::directions[d], params);
578  }
579  }
580  }
581 }
std::string prefix() const
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
Factory & getFactory()
const MooseFunctorName _density_gravity_name
Name of the density material property used for gravity and Boussinesq terms.
const InputParameters & parameters() const
T & set(const std::string &name, bool quiet_mode=false)
static const std::string density
Definition: NS.h:34
InputParameters getValidParams(const std::string &name) const
const bool _porous_medium_treatment
Whether to use the porous medium treatment.
std::vector< SubdomainName > _blocks
unsigned int dimension() const
static const std::string directions[3]
Definition: NS.h:23
virtual FEProblemBase & getProblem()
static const std::string porosity
Definition: NS.h:108
const std::vector< std::string > _velocity_names
Velocity names.
const bool _solve_for_dynamic_pressure
Whether we are solving for the total or dynamic pressure.
MooseFunctorName _flow_porosity_functor_name
Name of the porosity functor for the flow equations (if smoothed)
const UserObjectName & rhieChowUOName() const
Return the name of the Rhie Chow user object.
IntRange< T > make_range(T beg, T end)
bool isParamValid(const std::string &name) const
virtual void addFVKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)

◆ addMomentumMixingLengthKernels()

void WCNSFVFlowPhysics::addMomentumMixingLengthKernels ( )
private

◆ addMomentumPressureKernels()

void WCNSFVFlowPhysics::addMomentumPressureKernels ( )
overrideprivatevirtual

Implements WCNSFVFlowPhysicsBase.

Definition at line 520 of file WCNSFVFlowPhysics.C.

Referenced by addFVKernels().

521 {
522  std::string kernel_type = "INSFVMomentumPressure";
523  std::string kernel_name = prefix() + "ins_momentum_pressure_";
524 
526  {
527  kernel_type = "PINSFVMomentumPressure";
528  kernel_name = prefix() + "pins_momentum_pressure_";
529  }
530 
531  InputParameters params = getFactory().getValidParams(kernel_type);
532  assignBlocks(params, _blocks);
533  params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
534  params.set<MooseFunctorName>("pressure") = _pressure_name;
535  params.set<bool>("correct_skewness") =
536  getParam<MooseEnum>("pressure_face_interpolation") == "skewness-corrected";
538  params.set<MooseFunctorName>(NS::porosity) = _flow_porosity_functor_name;
539 
540  for (const auto d : make_range(dimension()))
541  {
542  params.set<MooseEnum>("momentum_component") = NS::directions[d];
543  params.set<NonlinearVariableName>("variable") = _velocity_names[d];
544  getProblem().addFVKernel(kernel_type, kernel_name + NS::directions[d], params);
545  }
546 }
std::string prefix() const
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
Factory & getFactory()
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
const NonlinearVariableName _pressure_name
Pressure name.
const bool _porous_medium_treatment
Whether to use the porous medium treatment.
std::vector< SubdomainName > _blocks
unsigned int dimension() const
static const std::string directions[3]
Definition: NS.h:23
virtual FEProblemBase & getProblem()
static const std::string porosity
Definition: NS.h:108
const std::vector< std::string > _velocity_names
Velocity names.
MooseFunctorName _flow_porosity_functor_name
Name of the porosity functor for the flow equations (if smoothed)
const UserObjectName & rhieChowUOName() const
Return the name of the Rhie Chow user object.
IntRange< T > make_range(T beg, T end)
virtual void addFVKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)

◆ addMomentumTimeKernels()

void WCNSFVFlowPhysics::addMomentumTimeKernels ( )
overrideprivatevirtual

Functions adding kernels for the incompressible momentum equation If the material properties are not constant, these can be used for weakly-compressible simulations (except the Boussinesq kernel) as well.

Implements WCNSFVFlowPhysicsBase.

Definition at line 376 of file WCNSFVFlowPhysics.C.

Referenced by addFVKernels().

377 {
378  std::string kernel_type = (_compressibility == "weakly-compressible")
379  ? "WCNSFVMomentumTimeDerivative"
380  : "INSFVMomentumTimeDerivative";
381  std::string kernel_name = prefix() +
382  ((_compressibility == "weakly-compressible") ? "wcns_" : "ins_") +
383  "momentum_time_";
384 
386  {
387  // Porosity does not appear in the term
388  kernel_type = (_compressibility == "weakly-compressible") ? "WCNSFVMomentumTimeDerivative"
389  : "PINSFVMomentumTimeDerivative";
390  kernel_name = prefix() + ((_compressibility == "weakly-compressible") ? "pwcns_" : "pins_") +
391  "momentum_time_";
392  }
393 
394  InputParameters params = getFactory().getValidParams(kernel_type);
395  assignBlocks(params, _blocks);
396  params.set<MooseFunctorName>(NS::density) = _density_name;
397  if (_compressibility == "weakly-compressible")
398  params.set<MooseFunctorName>(NS::time_deriv(NS::density)) = NS::time_deriv(_density_name);
399 
400  params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
401  params.set<bool>("contribute_to_rc") =
402  getParam<bool>("time_derivative_contributes_to_RC_coefficients");
403 
404  for (const auto d : make_range(dimension()))
405  {
406  params.set<NonlinearVariableName>("variable") = _velocity_names[d];
407  params.set<MooseEnum>("momentum_component") = NS::directions[d];
408 
409  if (shouldCreateTimeDerivative(_velocity_names[d], _blocks, /*error if already defined*/ false))
410  getProblem().addFVKernel(kernel_type, kernel_name + _velocity_names[d], params);
411  }
412 }
std::string prefix() const
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
Factory & getFactory()
const MooseFunctorName _density_name
Name of the density material property.
T & set(const std::string &name, bool quiet_mode=false)
static const std::string density
Definition: NS.h:34
InputParameters getValidParams(const std::string &name) const
bool shouldCreateTimeDerivative(const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_already_defined) const
const bool _porous_medium_treatment
Whether to use the porous medium treatment.
std::vector< SubdomainName > _blocks
unsigned int dimension() const
static const std::string directions[3]
Definition: NS.h:23
virtual FEProblemBase & getProblem()
const std::vector< std::string > _velocity_names
Velocity names.
const MooseEnum _compressibility
Compressibility type, can be compressible, incompressible or weakly-compressible. ...
const UserObjectName & rhieChowUOName() const
Return the name of the Rhie Chow user object.
IntRange< T > make_range(T beg, T end)
virtual void addFVKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
std::string time_deriv(const std::string &var)
Definition: NS.h:98

◆ addMomentumViscousDissipationKernels()

void WCNSFVFlowPhysics::addMomentumViscousDissipationKernels ( )
private

Definition at line 446 of file WCNSFVFlowPhysics.C.

Referenced by addFVKernels().

447 {
448  std::string kernel_type = "INSFVMomentumDiffusion";
449  std::string kernel_name = prefix() + "ins_momentum_diffusion_";
450 
452  {
453  kernel_type = "PINSFVMomentumDiffusion";
454  kernel_name = prefix() + "pins_momentum_diffusion_";
455  }
456 
457  InputParameters params = getFactory().getValidParams(kernel_type);
458  assignBlocks(params, _blocks);
459  params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
460  params.set<MooseFunctorName>(NS::mu) = _dynamic_viscosity_name;
461  const bool user_include_iso = includeIsotropicStress();
462  if (user_include_iso && _porous_medium_treatment)
463  paramWarning("include_isotropic_viscous_stress",
464  "Including the isotropic viscous stress is not supported with the porous medium "
465  "treatment. Ignoring the request.");
466  const bool include_isotropic = (!_porous_medium_treatment) && user_include_iso;
467  if (include_isotropic)
468  params.set<bool>("include_isotropic_viscous_stress") = true;
469  params.set<MooseEnum>("mu_interp_method") = getParam<MooseEnum>("mu_interp_method");
470  params.set<MooseEnum>("variable_interp_method") =
471  getParam<MooseEnum>("momentum_face_interpolation");
472  bool include_symmetric = includeSymmetrizedViscousStress();
473  if (include_symmetric && _porous_medium_treatment)
474  {
475  paramWarning("include_symmetrized_viscous_stress",
476  "Including the symmetrized viscous stress is not supported with the porous "
477  "medium treatment. Ignoring the request.");
478  include_symmetric = false;
479  }
480  if (include_symmetric || include_isotropic)
481  {
482  params.set<bool>("complete_expansion") = true;
483  const std::string u_names[3] = {"u", "v", "w"};
484  for (unsigned int i = 0; i < dimension(); ++i)
485  params.set<MooseFunctorName>(u_names[i]) = _velocity_names[i];
486  }
487 
489  params.set<MooseFunctorName>(NS::porosity) = _flow_porosity_functor_name;
490  // Currently only Newton method for WCNSFVFlowPhysics
491  params.set<bool>("newton_solve") = true;
492  for (const auto d : make_range(dimension()))
493  {
494  params.set<NonlinearVariableName>("variable") = _velocity_names[d];
495  params.set<MooseEnum>("momentum_component") = NS::directions[d];
496 
497  getProblem().addFVKernel(kernel_type, kernel_name + NS::directions[d], params);
498  }
499 }
std::string prefix() const
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
bool includeIsotropicStress() const
Whether to include the isotropic viscous stress contribution.
Factory & getFactory()
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
const bool _porous_medium_treatment
Whether to use the porous medium treatment.
std::vector< SubdomainName > _blocks
unsigned int dimension() const
bool includeSymmetrizedViscousStress() const
Whether to include the symmetrized contribution in the viscous stress.
static const std::string directions[3]
Definition: NS.h:23
virtual FEProblemBase & getProblem()
static const std::string porosity
Definition: NS.h:108
static const std::string mu
Definition: NS.h:127
const std::vector< std::string > _velocity_names
Velocity names.
const MooseFunctorName _dynamic_viscosity_name
Name of the dynamic viscosity material property.
MooseFunctorName _flow_porosity_functor_name
Name of the porosity functor for the flow equations (if smoothed)
const UserObjectName & rhieChowUOName() const
Return the name of the Rhie Chow user object.
IntRange< T > make_range(T beg, T end)
void paramWarning(const std::string &param, Args... args) const
virtual void addFVKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)

◆ addNonPorousMediumSpeedMaterial()

void WCNSFVFlowPhysicsBase::addNonPorousMediumSpeedMaterial ( )
protectedinherited

Add material to define the local speed with no porous medium treatment.

Definition at line 336 of file WCNSFVFlowPhysicsBase.C.

Referenced by WCNSFVFlowPhysicsBase::addMaterials().

337 {
338  const std::string class_name = "ADVectorMagnitudeFunctorMaterial";
339  InputParameters params = getFactory().getValidParams(class_name);
340  assignBlocks(params, _blocks);
341 
342  const std::vector<std::string> param_names{"x_functor", "y_functor", "z_functor"};
343  for (unsigned int dim_i = 0; dim_i < dimension(); ++dim_i)
344  params.set<MooseFunctorName>(param_names[dim_i]) = _velocity_names[dim_i];
345  params.set<MooseFunctorName>("vector_magnitude_name") = NS::speed;
346 
347  getProblem().addFunctorMaterial(class_name, prefix() + "ins_speed_material", params);
348 }
std::string prefix() const
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
Factory & getFactory()
static const std::string speed
Definition: NS.h:147
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
virtual void addFunctorMaterial(const std::string &functor_material_name, const std::string &name, InputParameters &parameters)
std::vector< SubdomainName > _blocks
unsigned int dimension() const
virtual FEProblemBase & getProblem()
const std::vector< std::string > _velocity_names
Velocity names.

◆ addOutletBC()

void WCNSFVFlowPhysics::addOutletBC ( )
overrideprivatevirtual

Implements WCNSFVFlowPhysicsBase.

Definition at line 859 of file WCNSFVFlowPhysics.C.

860 {
861  // Check the BCs size
862  unsigned int num_pressure_outlets = 0;
863  for (const auto & [bdy, momentum_outlet_type] : _momentum_outlet_types)
864  if (momentum_outlet_type == "fixed-pressure" ||
865  momentum_outlet_type == "fixed-pressure-zero-gradient")
866  num_pressure_outlets++;
867 
868  if (num_pressure_outlets != _pressure_functors.size())
869  paramError("pressure_functors",
870  "Size (" + std::to_string(_pressure_functors.size()) +
871  ") is not the same as the number of pressure outlet boundaries in "
872  "'fixed-pressure/fixed-pressure-zero-gradient' (size " +
873  std::to_string(num_pressure_outlets) + ")");
874 
875  const std::string u_names[3] = {"u", "v", "w"};
876  for (const auto & [outlet_bdy, momentum_outlet_type] : _momentum_outlet_types)
877  {
878  if (momentum_outlet_type == "zero-gradient" ||
879  momentum_outlet_type == "fixed-pressure-zero-gradient")
880  {
881  {
882  const std::string bc_type = _porous_medium_treatment ? "PINSFVMomentumAdvectionOutflowBC"
883  : "INSFVMomentumAdvectionOutflowBC";
884  InputParameters params = getFactory().getValidParams(bc_type);
885  params.set<std::vector<BoundaryName>>("boundary") = {outlet_bdy};
887  params.set<MooseFunctorName>(NS::porosity) = _flow_porosity_functor_name;
888  params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
889  params.set<MooseFunctorName>(NS::density) = _density_name;
890 
891  for (unsigned int i = 0; i < dimension(); ++i)
892  params.set<MooseFunctorName>(u_names[i]) = _velocity_names[i];
893 
894  for (const auto d : make_range(dimension()))
895  {
896  params.set<NonlinearVariableName>("variable") = _velocity_names[d];
897  params.set<MooseEnum>("momentum_component") = NS::directions[d];
898 
899  getProblem().addFVBC(bc_type, _velocity_names[d] + "_" + outlet_bdy, params);
900  }
901  }
902  }
903 
904  if (momentum_outlet_type == "fixed-pressure" ||
905  momentum_outlet_type == "fixed-pressure-zero-gradient")
906  {
907  const std::string bc_type = "INSFVOutletPressureBC";
908  InputParameters params = getFactory().getValidParams(bc_type);
909  params.set<NonlinearVariableName>("variable") = _pressure_name;
910  params.set<MooseFunctorName>("functor") = libmesh_map_find(_pressure_functors, outlet_bdy);
911  params.set<std::vector<BoundaryName>>("boundary") = {outlet_bdy};
912 
913  getProblem().addFVBC(bc_type, _pressure_name + "_" + outlet_bdy, params);
914  }
915  else if (momentum_outlet_type == "zero-gradient")
916  {
917  const std::string bc_type = "INSFVMassAdvectionOutflowBC";
918  InputParameters params = getFactory().getValidParams(bc_type);
919  params.set<NonlinearVariableName>("variable") = _pressure_name;
920  params.set<MooseFunctorName>(NS::density) = _density_name;
921  params.set<std::vector<BoundaryName>>("boundary") = {outlet_bdy};
922 
923  for (const auto d : make_range(dimension()))
924  params.set<MooseFunctorName>(u_names[d]) = _velocity_names[d];
925 
926  getProblem().addFVBC(bc_type, _pressure_name + "_" + outlet_bdy, params);
927  }
928  }
929 }
Factory & getFactory()
void paramError(const std::string &param, Args... args) const
const MooseFunctorName _density_name
Name of the density material property.
T & set(const std::string &name, bool quiet_mode=false)
static const std::string density
Definition: NS.h:34
InputParameters getValidParams(const std::string &name) const
const NonlinearVariableName _pressure_name
Pressure name.
const bool _porous_medium_treatment
Whether to use the porous medium treatment.
unsigned int dimension() const
static const std::string directions[3]
Definition: NS.h:23
virtual FEProblemBase & getProblem()
static const std::string porosity
Definition: NS.h:108
std::map< BoundaryName, MooseEnum > _momentum_outlet_types
Momentum outlet boundary types.
const std::vector< std::string > _velocity_names
Velocity names.
MooseFunctorName _flow_porosity_functor_name
Name of the porosity functor for the flow equations (if smoothed)
std::map< BoundaryName, MooseFunctorName > _pressure_functors
Functors describing the outlet pressure on each boundary.
const UserObjectName & rhieChowUOName() const
Return the name of the Rhie Chow user object.
IntRange< T > make_range(T beg, T end)
virtual void addFVBC(const std::string &fv_bc_name, const std::string &name, InputParameters &parameters)

◆ addPorousMediumSpeedMaterial()

void WCNSFVFlowPhysicsBase::addPorousMediumSpeedMaterial ( )
protectedinherited

Add material to define the local speed in porous medium flows.

Definition at line 318 of file WCNSFVFlowPhysicsBase.C.

Referenced by WCNSFVFlowPhysicsBase::addMaterials().

319 {
320  InputParameters params = getFactory().getValidParams("PINSFVSpeedFunctorMaterial");
321  assignBlocks(params, _blocks);
322 
323  for (unsigned int dim_i = 0; dim_i < dimension(); ++dim_i)
324  params.set<MooseFunctorName>(NS::superficial_velocity_vector[dim_i]) = _velocity_names[dim_i];
326  params.set<MooseFunctorName>(NS::porosity) = _flow_porosity_functor_name;
327  else
328  params.set<MooseFunctorName>(NS::porosity) = "1";
329  params.set<bool>("define_interstitial_velocity_components") = _porous_medium_treatment;
330 
332  "PINSFVSpeedFunctorMaterial", prefix() + "pins_speed_material", params);
333 }
std::string prefix() const
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
Factory & getFactory()
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
virtual void addFunctorMaterial(const std::string &functor_material_name, const std::string &name, InputParameters &parameters)
const bool _porous_medium_treatment
Whether to use the porous medium treatment.
std::vector< SubdomainName > _blocks
unsigned int dimension() const
virtual FEProblemBase & getProblem()
static const std::string porosity
Definition: NS.h:108
static const std::string superficial_velocity_vector[3]
Definition: NS.h:55
const std::vector< std::string > _velocity_names
Velocity names.
MooseFunctorName _flow_porosity_functor_name
Name of the porosity functor for the flow equations (if smoothed)

◆ addPostprocessors()

void WCNSFVFlowPhysicsBase::addPostprocessors ( )
overrideprotectedvirtualinherited

Reimplemented from PhysicsBase.

Definition at line 457 of file WCNSFVFlowPhysicsBase.C.

458 {
459  const auto momentum_inlet_types = getParam<MultiMooseEnum>("momentum_inlet_types");
460 
461  for (unsigned int bc_ind = 0; bc_ind < momentum_inlet_types.size(); ++bc_ind)
462  if (momentum_inlet_types[bc_ind] == "flux-mass" ||
463  momentum_inlet_types[bc_ind] == "flux-velocity")
464  {
465  const std::string pp_type = "AreaPostprocessor";
466  InputParameters params = getFactory().getValidParams(pp_type);
467  params.set<std::vector<BoundaryName>>("boundary") = {_inlet_boundaries[bc_ind]};
468  params.set<ExecFlagEnum>("execute_on") = EXEC_INITIAL;
469 
470  const auto name_pp = "area_pp_" + _inlet_boundaries[bc_ind];
471  if (!getProblem().hasUserObject(name_pp))
472  getProblem().addPostprocessor(pp_type, name_pp, params);
473  }
474 }
Factory & getFactory()
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
bool hasUserObject(const std::string &name) const
virtual FEProblemBase & getProblem()
virtual void addPostprocessor(const std::string &pp_name, const std::string &name, InputParameters &parameters)
const std::vector< BoundaryName > _inlet_boundaries
Boundaries with a flow inlet specified on them.

◆ addPressurePinKernel()

void WCNSFVFlowPhysics::addPressurePinKernel ( )
private

Function adding the pressure constraint.

Definition at line 357 of file WCNSFVFlowPhysics.C.

Referenced by addFVKernels().

358 {
359  const auto pin_type = getParam<MooseEnum>("pinned_pressure_type");
360  const auto object_type =
361  (pin_type == "average") ? "FVIntegralValueConstraint" : "FVPointValueConstraint";
362  InputParameters params = getFactory().getValidParams(object_type);
363  if (pin_type != "point-value" && pin_type != "average")
364  return;
365 
366  params.set<CoupledName>("lambda") = {"lambda"};
367  params.set<PostprocessorName>("phi0") = getParam<PostprocessorName>("pinned_pressure_value");
368  params.set<NonlinearVariableName>("variable") = _pressure_name;
369  if (pin_type == "point-value")
370  params.set<Point>("point") = getParam<Point>("pinned_pressure_point");
371 
372  getProblem().addFVKernel(object_type, prefix() + "ins_mass_pressure_pin", params);
373 }
std::string prefix() const
Factory & getFactory()
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
const NonlinearVariableName _pressure_name
Pressure name.
static const std::string pin_type
virtual FEProblemBase & getProblem()
std::vector< VariableName > CoupledName
virtual void addFVKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)

◆ addRhieChowUserObjects()

void WCNSFVFlowPhysics::addRhieChowUserObjects ( )
overrideprivatevirtual

Function which adds the RhieChow interpolator user objects for weakly and incompressible formulations.

Implements WCNSFVFlowPhysicsBase.

Definition at line 1150 of file WCNSFVFlowPhysics.C.

Referenced by addUserObjects().

1151 {
1152  mooseAssert(dimension(), "0-dimension not supported");
1153 
1154  // First make sure that we only add this object once
1155  // Potential cases:
1156  // - there is a flow physics, and an advection one (UO should be added by one)
1157  // - there is only an advection physics (UO should be created)
1158  // - there are two advection physics on different blocks with set velocities (first one picks)
1159  // Counting RC UOs defined on the same blocks seems to be the most fool proof option
1160  std::vector<UserObject *> objs;
1161  getProblem()
1162  .theWarehouse()
1163  .query()
1164  .condition<AttribSystem>("UserObject")
1165  .condition<AttribThread>(0)
1166  .queryInto(objs);
1167  bool have_matching_rc_uo = false;
1168  for (const auto & obj : objs)
1169  if (const auto * const rc_obj = dynamic_cast<INSFVRhieChowInterpolator *>(obj); rc_obj)
1170  // Latter check is for whether one of the RC user object is defined everywhere
1171  if (rc_obj->blocks() == _blocks || (rc_obj->blocks().size() == 0 || _blocks.size() == 0))
1172  {
1173  have_matching_rc_uo = true;
1174  _rc_uo_name = rc_obj->name();
1175  break;
1176  }
1177 
1178  if (have_matching_rc_uo)
1179  return;
1180 
1181  _rc_uo_name =
1182  _porous_medium_treatment ? +"pins_rhie_chow_interpolator" : "ins_rhie_chow_interpolator";
1183 
1184  const std::string u_names[3] = {"u", "v", "w"};
1185  const auto object_type =
1186  _porous_medium_treatment ? "PINSFVRhieChowInterpolator" : "INSFVRhieChowInterpolator";
1187 
1188  auto params = getFactory().getValidParams(object_type);
1189  assignBlocks(params, _blocks);
1190  for (unsigned int d = 0; d < dimension(); ++d)
1191  params.set<VariableName>(u_names[d]) = _velocity_names[d];
1192 
1193  params.set<VariableName>("pressure") = _pressure_name;
1194 
1196  {
1197  params.set<MooseFunctorName>(NS::porosity) = _porosity_name;
1198  unsigned short smoothing_layers = isParamValid("porosity_smoothing_layers")
1199  ? getParam<unsigned short>("porosity_smoothing_layers")
1200  : 0;
1201  params.set<unsigned short>("smoothing_layers") = smoothing_layers;
1202  }
1203 
1204  if (!_has_flow_equations)
1205  {
1207  params.set<MooseFunctorName>("a_u") = "ax";
1208  params.set<MooseFunctorName>("a_v") = "ay";
1209  params.set<MooseFunctorName>("a_w") = "az";
1210  }
1211 
1212  params.applySpecificParameters(parameters(), INSFVRhieChowInterpolator::listOfCommonParams());
1213  getProblem().addUserObject(object_type, _rc_uo_name, params);
1214 }
const bool _has_flow_equations
Boolean to keep track of whether the flow equations should be created.
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
Factory & getFactory()
const InputParameters & parameters() const
InputParameters getValidParams(const std::string &name) const
UserObjectName _rc_uo_name
Name of the user object in charge of computing the Rhie Chow coefficients.
void checkRhieChowFunctorsDefined() const
Checks that sufficient Rhie Chow coefficients have been defined for the given dimension, used for scalar or temperature advection by auxiliary variables.
const NonlinearVariableName _pressure_name
Pressure name.
const MooseFunctorName _porosity_name
Name of the porosity functor.
const bool _porous_medium_treatment
Whether to use the porous medium treatment.
std::vector< SubdomainName > _blocks
unsigned int dimension() const
virtual FEProblemBase & getProblem()
static const std::string porosity
Definition: NS.h:108
TheWarehouse & theWarehouse() const
const std::vector< std::string > _velocity_names
Velocity names.
static std::vector< std::string > listOfCommonParams()
virtual std::vector< std::shared_ptr< UserObject > > addUserObject(const std::string &user_object_name, const std::string &name, InputParameters &parameters)
Query query()
bool isParamValid(const std::string &name) const

◆ addSeparatorBC()

void WCNSFVFlowPhysics::addSeparatorBC ( )
overrideprivatevirtual

Implements WCNSFVFlowPhysicsBase.

Definition at line 1050 of file WCNSFVFlowPhysics.C.

1051 {
1052  if (_hydraulic_separators.size())
1053  {
1054  std::string bc_type = "INSFVVelocityHydraulicSeparatorBC";
1055  InputParameters params = getFactory().getValidParams(bc_type);
1056  params.set<std::vector<BoundaryName>>("boundary") = _hydraulic_separators;
1057  params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
1058 
1059  for (const auto d : make_range(dimension()))
1060  {
1061  params.set<NonlinearVariableName>("variable") = _velocity_names[d];
1062  params.set<MooseEnum>("momentum_component") = NS::directions[d];
1063  getProblem().addFVBC(bc_type, prefix() + _velocity_names[d] + "_separators", params);
1064  }
1065 
1066  bc_type = "INSFVScalarFieldSeparatorBC";
1067  params = getFactory().getValidParams(bc_type);
1068  params.set<std::vector<BoundaryName>>("boundary") = _hydraulic_separators;
1069  params.set<NonlinearVariableName>("variable") = _pressure_name;
1070  getProblem().addFVBC(bc_type, prefix() + _pressure_name + "_separators", params);
1071  }
1072 }
std::string prefix() const
Factory & getFactory()
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
const NonlinearVariableName _pressure_name
Pressure name.
unsigned int dimension() const
static const std::string directions[3]
Definition: NS.h:23
virtual FEProblemBase & getProblem()
const std::vector< std::string > _velocity_names
Velocity names.
const UserObjectName & rhieChowUOName() const
Return the name of the Rhie Chow user object.
IntRange< T > make_range(T beg, T end)
const std::vector< BoundaryName > _hydraulic_separators
Hydraulic separator boundaries.
virtual void addFVBC(const std::string &fv_bc_name, const std::string &name, InputParameters &parameters)

◆ addSolverVariables()

void WCNSFVFlowPhysics::addSolverVariables ( )
overrideprivatevirtual

Implements WCNSFVFlowPhysicsBase.

Definition at line 142 of file WCNSFVFlowPhysics.C.

143 {
144  if (!_has_flow_equations)
145  return;
146 
147  for (const auto d : make_range(dimension()))
150 
151  // Check number of variables
152  if (_velocity_names.size() != dimension() && _velocity_names.size() != 3)
153  paramError("velocity_variable",
154  "The number of velocity variable names supplied to the NSFVAction is not " +
155  Moose::stringify(dimension()) + " (mesh dimension)" +
156  ((dimension() == 3) ? "" : " or 3!") + "\nVelocity variables " +
158 
159  // Velocities
160  for (const auto d : make_range(dimension()))
161  {
162  if (!shouldCreateVariable(_velocity_names[d], _blocks, /*error if aux*/ true))
163  reportPotentiallyMissedParameters({"system_names",
164  "momentum_scaling",
165  "momentum_face_interpolation",
166  "momentum_two_term_bc_expansion"},
167  "INSFVVelocityVariable");
168  else if (_define_variables)
169  {
170  std::string variable_type = "INSFVVelocityVariable";
172  variable_type = "PINSFVSuperficialVelocityVariable";
173 
174  auto params = getFactory().getValidParams(variable_type);
175  assignBlocks(params, _blocks); // TODO: check wrt components
176  params.set<std::vector<Real>>("scaling") = {getParam<Real>("momentum_scaling")};
177  params.set<MooseEnum>("face_interp_method") =
178  getParam<MooseEnum>("momentum_face_interpolation");
179  params.set<bool>("two_term_boundary_expansion") =
180  getParam<bool>("momentum_two_term_bc_expansion");
181 
182  params.set<SolverSystemName>("solver_sys") = getSolverSystem(_velocity_names[d]);
183  getProblem().addVariable(variable_type, _velocity_names[d], params);
184  }
185  else
186  paramError("velocity_variable",
187  "Variable (" + _velocity_names[d] +
188  ") supplied to the WCNSFVFlowPhysics does not exist!");
189  }
190 
191  // Pressure
192  const bool using_bernouilli_pressure_var =
194  getParam<MooseEnum>("porosity_interface_pressure_treatment") != "automatic";
195  const auto pressure_type =
196  using_bernouilli_pressure_var ? "BernoulliPressureVariable" : "INSFVPressureVariable";
197  if (!shouldCreateVariable(_pressure_name, _blocks, /*error if aux*/ true))
198  {
199  std::vector<std::string> potentially_missed = {"system_names",
200  "mass_scaling",
201  "pressure_face_interpolation",
202  "pressure_two_term_bc_expansion"};
203  if (using_bernouilli_pressure_var)
204  {
205  std::vector<std::string> other_missed = {"pressure_allow_expansion_on_bernoulli_faces",
206  "pressure_drop_sidesets",
207  "pressure_drop_form_factors"};
208  potentially_missed.insert(potentially_missed.end(), other_missed.begin(), other_missed.end());
209  }
210  reportPotentiallyMissedParameters(potentially_missed, pressure_type);
211  }
212  else if (_define_variables)
213  {
214  auto params = getFactory().getValidParams(pressure_type);
215  assignBlocks(params, _blocks);
216  params.set<std::vector<Real>>("scaling") = {getParam<Real>("mass_scaling")};
217  params.set<MooseEnum>("face_interp_method") =
218  getParam<MooseEnum>("pressure_face_interpolation");
219  params.set<bool>("two_term_boundary_expansion") =
220  getParam<bool>("pressure_two_term_bc_expansion");
221 
222  if (using_bernouilli_pressure_var)
223  {
224  params.set<MooseFunctorName>("u") = _velocity_names[0];
225  if (dimension() >= 2)
226  params.set<MooseFunctorName>("v") = _velocity_names[1];
227  if (dimension() == 3)
228  params.set<MooseFunctorName>("w") = _velocity_names[2];
229  params.set<MooseFunctorName>(NS::porosity) = _porosity_name;
230  params.set<MooseFunctorName>(NS::density) = _density_name;
231  params.set<bool>("allow_two_term_expansion_on_bernoulli_faces") =
232  getParam<bool>("pressure_allow_expansion_on_bernoulli_faces");
233  params.set<std::vector<BoundaryName>>("pressure_drop_sidesets") =
234  getParam<std::vector<BoundaryName>>("pressure_drop_sidesets");
235  params.set<std::vector<Real>>("pressure_drop_form_factors") =
236  getParam<std::vector<Real>>("pressure_drop_form_factors");
237  }
238  params.set<SolverSystemName>("solver_sys") = getSolverSystem(_pressure_name);
239  getProblem().addVariable(pressure_type, _pressure_name, params);
240  }
241  else
242  paramError("pressure_variable",
243  "Variable (" + _pressure_name +
244  ") supplied to the WCNSFVFlowPhysics does not exist!");
245 
246  // Add lagrange multiplier for pinning pressure, if needed
247  if (getParam<bool>("pin_pressure"))
248  {
249  auto type = getParam<MooseEnum>("pinned_pressure_type");
250  auto lm_params = getFactory().getValidParams("MooseVariableScalar");
251  lm_params.set<MooseEnum>("family") = "scalar";
252  lm_params.set<MooseEnum>("order") = "first";
253 
254  if ((type == "point-value" || type == "average"))
255  {
256  if (!_problem->hasScalarVariable("lambda"))
257  {
258  lm_params.set<SolverSystemName>("solver_sys") = getSolverSystem("lambda");
259  getProblem().addVariable("MooseVariableScalar", "lambda", lm_params);
260  }
261  else
262  reportPotentiallyMissedParameters({"system_names"}, "MooseVariableScalar");
263  }
264  }
265 }
const bool _has_flow_equations
Boolean to keep track of whether the flow equations should be created.
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
bool shouldCreateVariable(const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_aux)
Factory & getFactory()
void paramError(const std::string &param, Args... args) const
const T & getParam(const std::string &name) const
const MooseFunctorName _density_name
Name of the density material property.
T & set(const std::string &name, bool quiet_mode=false)
static const std::string density
Definition: NS.h:34
InputParameters getValidParams(const std::string &name) const
void reportPotentiallyMissedParameters(const std::vector< std::string > &param_names, const std::string &object_type, const std::string &object_name="") const
const NonlinearVariableName _pressure_name
Pressure name.
const MooseFunctorName _porosity_name
Name of the porosity functor.
const bool _porous_medium_treatment
Whether to use the porous medium treatment.
std::vector< SubdomainName > _blocks
unsigned int dimension() const
virtual FEProblemBase & getProblem()
static const std::string porosity
Definition: NS.h:108
const SolverSystemName & getSolverSystem(unsigned int variable_index) const
const std::vector< std::string > _velocity_names
Velocity names.
const std::string & type() const
std::string stringify(const T &t)
virtual void addVariable(const std::string &var_type, const std::string &var_name, InputParameters &params)
bool _define_variables
Whether to define variables if they do not exist.
IntRange< T > make_range(T beg, T end)
std::shared_ptr< FEProblemBase > & _problem
void saveSolverVariableName(const VariableName &var_name)

◆ addUserObjects()

void WCNSFVFlowPhysics::addUserObjects ( )
overrideprivatevirtual

Implements WCNSFVFlowPhysicsBase.

Definition at line 1075 of file WCNSFVFlowPhysics.C.

1076 {
1077  // Rhie Chow user object for interpolation velocities
1079 }
void addRhieChowUserObjects() override
Function which adds the RhieChow interpolator user objects for weakly and incompressible formulations...

◆ addWallsBC()

void WCNSFVFlowPhysics::addWallsBC ( )
overrideprivatevirtual

Implements WCNSFVFlowPhysicsBase.

Definition at line 932 of file WCNSFVFlowPhysics.C.

933 {
934  const std::string u_names[3] = {"u", "v", "w"};
935 
936  // Count the number of fixed velocity wall boundaries (moving walls)
937  unsigned int num_functor_walls = 0;
938  for (const auto & [boundary_name, momentum_wall_type] : _momentum_wall_types)
939  if (momentum_wall_type == "noslip")
940  num_functor_walls++;
941  if (_momentum_wall_functors.size() && num_functor_walls != _momentum_wall_functors.size())
942  paramError("momentum_wall_functors",
943  "If any wall functors are specified, the number of boundaries requiring a momentum "
944  "functor (" +
945  std::to_string(num_functor_walls) + ") and the number of functors specified (" +
946  std::to_string(_momentum_wall_functors.size()) + ") must match");
947  for (const auto & wall_functors : _momentum_wall_functors)
948  if (wall_functors.second.size() != dimension())
949  paramError("momentum_wall_functors",
950  "Number of wall functors (" + std::to_string(wall_functors.second.size()) +
951  ") must match dimension (" + std::to_string(dimension()) +
952  ").\nFunctors currently specified:" + Moose::stringify(wall_functors.second));
953 
954  for (const auto & [boundary_name, wall_type] : _momentum_wall_types)
955  {
956  if (wall_type == "noslip")
957  {
958  const std::string bc_type = "INSFVNoSlipWallBC";
959  InputParameters params = getFactory().getValidParams(bc_type);
960  params.set<std::vector<BoundaryName>>("boundary") = {boundary_name};
961 
962  for (const auto d : make_range(dimension()))
963  {
964  params.set<NonlinearVariableName>("variable") = _velocity_names[d];
965  if (_momentum_wall_functors.count(boundary_name) == 0)
966  params.set<FunctionName>("function") = "0";
967  else
968  params.set<FunctionName>("function") = _momentum_wall_functors[boundary_name][d];
969 
970  getProblem().addFVBC(bc_type, _velocity_names[d] + "_" + boundary_name, params);
971  }
972  }
973  else if (wall_type == "wallfunction")
974  {
975  const std::string bc_type = "INSFVWallFunctionBC";
976  InputParameters params = getFactory().getValidParams(bc_type);
977  params.set<MooseFunctorName>(NS::mu) = _dynamic_viscosity_name;
978  params.set<MooseFunctorName>(NS::density) = _density_name;
979  params.set<std::vector<BoundaryName>>("boundary") = {boundary_name};
980  params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
981 
982  for (const auto d : make_range(dimension()))
983  params.set<MooseFunctorName>(u_names[d]) = _velocity_names[d];
984 
985  for (const auto d : make_range(dimension()))
986  {
987  params.set<NonlinearVariableName>("variable") = _velocity_names[d];
988  params.set<MooseEnum>("momentum_component") = NS::directions[d];
989 
990  getProblem().addFVBC(bc_type, _velocity_names[d] + "_" + boundary_name, params);
991  }
992  }
993  else if (wall_type == "slip")
994  {
995  const std::string bc_type = "INSFVNaturalFreeSlipBC";
996  InputParameters params = getFactory().getValidParams(bc_type);
997  params.set<std::vector<BoundaryName>>("boundary") = {boundary_name};
998  params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
999 
1000  for (const auto d : make_range(dimension()))
1001  {
1002  params.set<NonlinearVariableName>("variable") = _velocity_names[d];
1003  params.set<MooseEnum>("momentum_component") = NS::directions[d];
1004 
1005  getProblem().addFVBC(bc_type, _velocity_names[d] + "_" + boundary_name, params);
1006  }
1007  }
1008  else if (wall_type == "symmetry")
1009  {
1010  {
1011  std::string bc_type;
1013  bc_type = "PINSFVSymmetryVelocityBC";
1014  else
1015  bc_type = "INSFVSymmetryVelocityBC";
1016 
1017  InputParameters params = getFactory().getValidParams(bc_type);
1018  params.set<std::vector<BoundaryName>>("boundary") = {boundary_name};
1019 
1020  MooseFunctorName viscosity_name = _dynamic_viscosity_name;
1021  if (hasTurbulencePhysics())
1022  viscosity_name = NS::total_viscosity;
1023  params.set<MooseFunctorName>(NS::mu) = viscosity_name;
1024  params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
1025 
1026  for (const auto d : make_range(dimension()))
1027  params.set<MooseFunctorName>(u_names[d]) = _velocity_names[d];
1028 
1029  for (const auto d : make_range(dimension()))
1030  {
1031  params.set<NonlinearVariableName>("variable") = _velocity_names[d];
1032  params.set<MooseEnum>("momentum_component") = NS::directions[d];
1033 
1034  getProblem().addFVBC(bc_type, _velocity_names[d] + "_" + boundary_name, params);
1035  }
1036  }
1037  {
1038  const std::string bc_type = "INSFVSymmetryPressureBC";
1039  InputParameters params = getFactory().getValidParams(bc_type);
1040  params.set<NonlinearVariableName>("variable") = _pressure_name;
1041  params.set<std::vector<BoundaryName>>("boundary") = {boundary_name};
1042 
1043  getProblem().addFVBC(bc_type, _pressure_name + "_" + boundary_name, params);
1044  }
1045  }
1046  }
1047 }
Factory & getFactory()
void paramError(const std::string &param, Args... args) const
const MooseFunctorName _density_name
Name of the density material property.
T & set(const std::string &name, bool quiet_mode=false)
static const std::string density
Definition: NS.h:34
InputParameters getValidParams(const std::string &name) const
std::map< BoundaryName, std::vector< MooseFunctorName > > _momentum_wall_functors
Functors describing the momentum for each wall boundary.
const NonlinearVariableName _pressure_name
Pressure name.
const bool _porous_medium_treatment
Whether to use the porous medium treatment.
unsigned int dimension() const
static const std::string directions[3]
Definition: NS.h:23
virtual FEProblemBase & getProblem()
static const std::string mu
Definition: NS.h:127
const std::vector< std::string > _velocity_names
Velocity names.
const MooseFunctorName _dynamic_viscosity_name
Name of the dynamic viscosity material property.
std::string stringify(const T &t)
std::map< BoundaryName, MooseEnum > _momentum_wall_types
Momentum wall boundary types.
bool hasTurbulencePhysics() const
Whether a turbulence Physics has been coupled in, to know which viscosity to pick on symmetry boundar...
const UserObjectName & rhieChowUOName() const
Return the name of the Rhie Chow user object.
IntRange< T > make_range(T beg, T end)
virtual void addFVBC(const std::string &fv_bc_name, const std::string &name, InputParameters &parameters)
static const std::string total_viscosity
Definition: NS.h:79

◆ checkRhieChowFunctorsDefined()

void WCNSFVFlowPhysics::checkRhieChowFunctorsDefined ( ) const
private

Checks that sufficient Rhie Chow coefficients have been defined for the given dimension, used for scalar or temperature advection by auxiliary variables.

Definition at line 1217 of file WCNSFVFlowPhysics.C.

Referenced by addRhieChowUserObjects().

1218 {
1219  if (!getProblem().hasFunctor("ax", /*thread_id=*/0))
1220  mooseError("Rhie Chow coefficient ax must be provided for advection by auxiliary velocities");
1221  if (dimension() >= 2 && !getProblem().hasFunctor("ay", /*thread_id=*/0))
1222  mooseError("Rhie Chow coefficient ay must be provided for advection by auxiliary velocities");
1223  if (dimension() == 3 && !getProblem().hasFunctor("az", /*thread_id=*/0))
1224  mooseError("Rhie Chow coefficient az must be provided for advection by auxiliary velocities");
1225 }
unsigned int dimension() const
virtual FEProblemBase & getProblem()
void mooseError(Args &&... args) const

◆ compressibility()

const MooseEnum& WCNSFVFlowPhysicsBase::compressibility ( ) const
inlineinherited

Return the compressibility of the flow equations selected.

Definition at line 53 of file WCNSFVFlowPhysicsBase.h.

53 { return _compressibility; }
const MooseEnum _compressibility
Compressibility type, can be compressible, incompressible or weakly-compressible. ...

◆ densityName()

const MooseFunctorName& WCNSFVFlowPhysicsBase::densityName ( ) const
inlineinherited

◆ dynamicViscosityName()

const MooseFunctorName& WCNSFVFlowPhysicsBase::dynamicViscosityName ( ) const
inlineinherited

◆ getAdditionalRMParams()

InputParameters NavierStokesPhysicsBase::getAdditionalRMParams ( ) const
overrideprotectedvirtualinherited

Parameters to change or add relationship managers.

Reimplemented from PhysicsBase.

Definition at line 42 of file NavierStokesPhysicsBase.C.

43 {
44  unsigned short necessary_layers = getParam<unsigned short>("ghost_layers");
45  necessary_layers = std::max(necessary_layers, getNumberAlgebraicGhostingLayersNeeded());
46 
47  // Just an object that has a ghost_layers parameter
48  const std::string kernel_type = "INSFVMixingLengthReynoldsStress";
49  InputParameters params = getFactory().getValidParams(kernel_type);
50  params.template set<unsigned short>("ghost_layers") = necessary_layers;
51 
52  return params;
53 }
Factory & getFactory()
InputParameters getValidParams(const std::string &name) const
virtual unsigned short getNumberAlgebraicGhostingLayersNeeded() const =0
Return the number of ghosting layers needed.

◆ getAxisymmetricRZBlocks()

std::vector< SubdomainName > WCNSFVFlowPhysicsBase::getAxisymmetricRZBlocks ( ) const
protectedinherited

Return the set of blocks restricted to an RZ coordinate system.

Definition at line 536 of file WCNSFVFlowPhysicsBase.C.

Referenced by WCNSFVTurbulencePhysics::addAxisymmetricTurbulentViscousSource(), and WCNSFVFlowPhysicsBase::addAxisymmetricViscousSource().

537 {
538  std::vector<SubdomainName> rz_blocks;
539  const auto & mesh = getProblem().mesh();
540 
541  const bool use_all_blocks =
542  _blocks.empty() || allMeshBlocks(_blocks) ||
543  std::find(_blocks.begin(), _blocks.end(), "ANY_BLOCK_ID") != _blocks.end();
544 
545  std::vector<SubdomainID> block_ids;
546  if (use_all_blocks)
547  {
548  const auto & mesh_blocks = mesh.meshSubdomains();
549  block_ids.insert(block_ids.end(), mesh_blocks.begin(), mesh_blocks.end());
550  }
551  else
552  block_ids = mesh.getSubdomainIDs(_blocks);
553 
554  for (const auto subdomain_id : block_ids)
555  if (mesh.getCoordSystem(subdomain_id) == Moose::COORD_RZ)
556  {
557  auto name = mesh.getSubdomainName(subdomain_id);
558  if (name.empty())
559  name = Moose::stringify(subdomain_id);
560  rz_blocks.push_back(name);
561  }
562 
563  return rz_blocks;
564 }
MeshBase & mesh
bool allMeshBlocks(const std::vector< SubdomainName > &blocks) const
std::vector< SubdomainName > _blocks
virtual FEProblemBase & getProblem()
const std::string & name() const
std::string stringify(const T &t)
virtual MooseMesh & mesh() override

◆ getCoupledTurbulencePhysics()

const WCNSFVTurbulencePhysicsBase * WCNSFVFlowPhysicsBase::getCoupledTurbulencePhysics ( ) const
protectedinherited

Find the turbulence physics.

Definition at line 503 of file WCNSFVFlowPhysicsBase.C.

Referenced by WCNSFVFlowPhysicsBase::actOnAdditionalTasks().

504 {
505  // User passed it, just use that
506  if (isParamValid("coupled_turbulence_physics"))
507  return getCoupledPhysics<WCNSFVTurbulencePhysicsBase>(
508  getParam<PhysicsName>("coupled_turbulence_physics"));
509  // Look for any physics of the right type, and check the block restriction
510  else
511  {
512  const auto all_turbulence_physics = getCoupledPhysics<const WCNSFVTurbulencePhysicsBase>(true);
513  for (const auto physics : all_turbulence_physics)
514  {
516  physics->name(), physics->blocks(), /*error_if_not_identical=*/false))
517  return physics;
518  else if (_verbose)
519  mooseInfoRepeated("Detected Turbulence Physics '" + physics->name() +
520  "' with an incompatible block restriction. It will thus not be coupled "
521  "to this flow equations physics");
522  }
523  }
524  // Did not find one
525  return nullptr;
526 }
void mooseInfoRepeated(Args &&... args)
const bool _verbose
bool checkBlockRestrictionIdentical(const std::string &object_name, const std::vector< SubdomainName > &blocks, const bool error_if_not_identical=true) const
bool isParamValid(const std::string &name) const

◆ getFlowVariableName()

VariableName WCNSFVFlowPhysicsBase::getFlowVariableName ( const std::string &  default_name) const
protectedinherited

Convenience routine to be able to retrieve the actual variable names from their default names.

Definition at line 477 of file WCNSFVFlowPhysicsBase.C.

478 {
479  if (short_name == NS::pressure)
480  return getPressureName();
481  else if (short_name == NS::velocity_x && dimension() > 0)
482  return getVelocityNames()[0];
483  else if (short_name == NS::velocity_y && dimension() > 1)
484  return getVelocityNames()[1];
485  else if (short_name == NS::velocity_z && dimension() > 2)
486  return getVelocityNames()[2];
487  else if (short_name == NS::temperature)
488  return getFluidTemperatureName();
489  else
490  mooseError("Short Variable name '", short_name, "' not recognized.");
491 }
const std::vector< std::string > & getVelocityNames() const
To interface with other Physics.
static const std::string velocity_z
Definition: NS.h:49
static const std::string velocity_x
Definition: NS.h:47
static const std::string temperature
Definition: NS.h:60
unsigned int dimension() const
const NonlinearVariableName & getFluidTemperatureName() const
static const std::string velocity_y
Definition: NS.h:48
static const std::string pressure
Definition: NS.h:57
void mooseError(Args &&... args) const
const NonlinearVariableName & getPressureName() const

◆ getFluidTemperatureName()

const NonlinearVariableName& WCNSFVFlowPhysicsBase::getFluidTemperatureName ( ) const
inlineinherited

Definition at line 48 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSFVTurbulencePhysics::addFluidEnergyTurbulenceKernels(), and WCNSFVFlowPhysicsBase::getFlowVariableName().

48 { return _fluid_temperature_name; }
const NonlinearVariableName _fluid_temperature_name
Fluid temperature name.

◆ getFluxInletDirections()

const std::vector<Point>& WCNSFVFlowPhysicsBase::getFluxInletDirections ( ) const
inlineinherited

Get the inlet direction if using a flux inlet.

Definition at line 89 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSFVFluidHeatTransferPhysics::addEnergyInletBC(), and WCNSFVScalarTransportPhysics::addScalarInletBC().

89 { return _flux_inlet_directions; }
std::vector< Point > _flux_inlet_directions
Direction of each flux inlet. Indexing based on the number of flux boundaries.

◆ getFluxInletPPs()

const std::vector<PostprocessorName>& WCNSFVFlowPhysicsBase::getFluxInletPPs ( ) const
inlineinherited

Get the inlet flux postprocessor if using a flux inlet.

Definition at line 91 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSFVFluidHeatTransferPhysics::addEnergyInletBC(), and WCNSFVScalarTransportPhysics::addScalarInletBC().

91 { return _flux_inlet_pps; }
std::vector< PostprocessorName > _flux_inlet_pps
Postprocessors describing the momentum inlet for each boundary. Indexing based on the number of flux ...

◆ getHydraulicSeparators()

const std::vector<BoundaryName>& WCNSFVFlowPhysicsBase::getHydraulicSeparators ( ) const
inlineinherited

Get the hydraulic separator boundaries.

Definition at line 81 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSFVFluidHeatTransferPhysics::addEnergySeparatorBC().

81 { return _hydraulic_separators; }
const std::vector< BoundaryName > _hydraulic_separators
Hydraulic separator boundaries.

◆ getInletBoundaries()

const std::vector<BoundaryName>& WCNSFVFlowPhysicsBase::getInletBoundaries ( ) const
inlineinherited

◆ getLinearFrictionCoefName()

MooseFunctorName WCNSFVFlowPhysics::getLinearFrictionCoefName ( ) const
overridevirtual

Get the name of the linear friction coefficient. Returns an empty string if no friction.

Implements WCNSFVFlowPhysicsBase.

Definition at line 1228 of file WCNSFVFlowPhysics.C.

1229 {
1230  // Check all blocks. If more than one block, they would need to be consolidated #include in
1231  // a single functor material. We won't implement this for now
1232  if (_friction_types.empty())
1233  return "";
1234  else if (_friction_types.size() == 1)
1235  {
1236  for (const auto & type_i : index_range(_friction_types[0]))
1237  {
1238  const auto upper_name = MooseUtils::toUpper(_friction_types[0][type_i]);
1239  if (upper_name == "DARCY")
1240  return _friction_coeffs[0][type_i];
1241  }
1242  // No linear type found
1243  return "";
1244  }
1245  else if (_friction_types.size() > 1)
1246  {
1247  bool linear_friction_factor_found = false;
1248  MooseFunctorName linear_friction_factor;
1249  for (const auto block_i : index_range(_friction_types))
1250  for (const auto type_i : index_range(_friction_types[block_i]))
1251  {
1252  const auto upper_name = MooseUtils::toUpper(_friction_types[block_i][type_i]);
1253  if (upper_name == "DARCY" && !linear_friction_factor_found)
1254  {
1255  linear_friction_factor_found = true;
1256  linear_friction_factor = _friction_types[block_i][type_i];
1257  }
1258  else if (upper_name == "DARCY" && !linear_friction_factor_found)
1259  if (linear_friction_factor != _friction_types[block_i][type_i])
1260  mooseError("Multiple linear friction factor with different names have been specified. "
1261  "This is not currently supported as a single name should be retrievable. "
1262  "Use a PiecewiseByBlockFunctorMaterial to consolidate them.");
1263  }
1264  if (linear_friction_factor_found)
1265  return linear_friction_factor;
1266  else
1267  return "";
1268  }
1269  mooseError("Should not get here");
1270 }
std::vector< std::vector< std::string > > _friction_types
The friction correlation types used for each block.
std::string toUpper(std::string name)
void mooseError(Args &&... args) const
auto index_range(const T &sizable)
std::vector< std::vector< std::string > > _friction_coeffs
The coefficients used for each item if friction type.

◆ getMomentumAdvectionFaceInterpolationMethod()

const MooseEnum& WCNSFVFlowPhysicsBase::getMomentumAdvectionFaceInterpolationMethod ( ) const
inlineinherited

Get the face interpolation method for momentum in the advection term.

Definition at line 65 of file WCNSFVFlowPhysicsBase.h.

66  {
68  }
const MooseEnum _momentum_advection_interpolation
The momentum face interpolation method for being advected.

◆ getMomentumFaceInterpolationMethod()

const MooseEnum& WCNSFVFlowPhysicsBase::getMomentumFaceInterpolationMethod ( ) const
inlineinherited

Get the face interpolation method for momentum (mostly used in the stress terms)

Definition at line 70 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSFVTwoPhaseMixturePhysics::addAdvectionSlipTerm(), and WCNSFVTurbulencePhysics::addFlowTurbulenceKernels().

71  {
73  }
const MooseEnum _momentum_face_interpolation
The momentum face interpolation method for stress terms.

◆ getNumberAlgebraicGhostingLayersNeeded()

unsigned short WCNSFVFlowPhysics::getNumberAlgebraicGhostingLayersNeeded ( ) const
overridevirtual

Return the number of algebraic ghosting layers needed.

Implements NavierStokesPhysicsBase.

Definition at line 1136 of file WCNSFVFlowPhysics.C.

1137 {
1139  if (_porous_medium_treatment && isParamValid("porosity_smoothing_layers"))
1140  ghost_layers = std::max(getParam<unsigned short>("porosity_smoothing_layers"), ghost_layers);
1141  if ((_porous_medium_treatment &&
1142  getParam<MooseEnum>("porosity_interface_pressure_treatment") != "automatic") ||
1143  getParam<MooseEnum>("momentum_face_interpolation") == "skewness-corrected" ||
1144  getParam<MooseEnum>("pressure_face_interpolation") == "skewness-corrected")
1145  ghost_layers = std::max(ghost_layers, (unsigned short)3);
1146  return ghost_layers;
1147 }
unsigned short getNumberAlgebraicGhostingLayersNeeded() const override
Return the number of algebraic ghosting layers needed.
const bool _porous_medium_treatment
Whether to use the porous medium treatment.
bool isParamValid(const std::string &name) const

◆ getOutletBoundaries()

const std::vector<BoundaryName>& WCNSFVFlowPhysicsBase::getOutletBoundaries ( ) const
inlineinherited

Get the outlet boundaries.

Definition at line 77 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSLinearFVFluidHeatTransferPhysics::addEnergyOutletBC(), and WCNSLinearFVScalarTransportPhysics::addScalarOutletBC().

77 { return _outlet_boundaries; }
const std::vector< BoundaryName > _outlet_boundaries
Boundaries with a flow outlet specified on them.

◆ getPorosityFunctorName()

MooseFunctorName WCNSFVFlowPhysicsBase::getPorosityFunctorName ( const bool  smoothed) const
inherited

Definition at line 494 of file WCNSFVFlowPhysicsBase.C.

Referenced by WCNSFVFluidHeatTransferPhysics::addEnergyHeatConductionKernels(), WCNSFVFluidHeatTransferPhysics::addEnergyTimeKernels(), WCNSFVScalarTransportPhysics::addScalarAdvectionKernels(), and WCNSFVCoupledAdvectionPhysicsHelper::getPorosityFunctorName().

495 {
496  if (smoothed)
498  else
499  return _porosity_name;
500 }
const MooseFunctorName _porosity_name
Name of the porosity functor.
MooseFunctorName _flow_porosity_functor_name
Name of the porosity functor for the flow equations (if smoothed)

◆ getPressureName()

const NonlinearVariableName& WCNSFVFlowPhysicsBase::getPressureName ( ) const
inlineinherited

◆ getVelocityFaceInterpolationMethod()

const MooseEnum& WCNSFVFlowPhysicsBase::getVelocityFaceInterpolationMethod ( ) const
inlineinherited

Get the face interpolation method for velocity.

Definition at line 63 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSFVTwoPhaseMixturePhysics::addAdvectionSlipTerm().

63 { return _velocity_interpolation; }
const MooseEnum _velocity_interpolation
The velocity face interpolation method for advecting other quantities.

◆ getVelocityNames()

const std::vector<std::string>& WCNSFVFlowPhysicsBase::getVelocityNames ( ) const
inlineinherited

◆ getWallBoundaries()

const std::vector<BoundaryName>& WCNSFVFlowPhysicsBase::getWallBoundaries ( ) const
inlineinherited

Get the wall boundaries.

Definition at line 79 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSLinearFVFluidHeatTransferPhysics::addEnergyWallBC(), and WCNSFVFluidHeatTransferPhysics::addEnergyWallBC().

79 { return _wall_boundaries; }
const std::vector< BoundaryName > _wall_boundaries
Boundaries which define a wall (slip/noslip/etc.)

◆ gravityVector()

RealVectorValue WCNSFVFlowPhysicsBase::gravityVector ( ) const
inlineinherited

Return the gravity vector.

Definition at line 57 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSFVTwoPhaseMixturePhysics::addFunctorMaterials(), WCNSLinearFVTwoPhaseMixturePhysics::addMaterials(), and WCNSLinearFVTwoPhaseMixturePhysics::checkIntegrity().

57 { return getParam<RealVectorValue>("gravity"); }

◆ hasFlowEquations()

bool WCNSFVFlowPhysicsBase::hasFlowEquations ( ) const
inlineinherited

Whether the physics is actually creating the flow equations.

Definition at line 37 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSFVTurbulencePhysics::addFlowTurbulenceKernels(), WCNSLinearFVTwoPhaseMixturePhysics::addFVKernels(), WCNSFVTwoPhaseMixturePhysics::addFVKernels(), and WCNSFVTurbulencePhysicsBase::retrieveCoupledPhysics().

37 { return _has_flow_equations; }
const bool _has_flow_equations
Boolean to keep track of whether the flow equations should be created.

◆ hasForchheimerFriction()

bool WCNSFVFlowPhysics::hasForchheimerFriction ( ) const
overrideprivatevirtual

Return whether a Forchheimer friction model is in use.

Implements WCNSFVFlowPhysicsBase.

Definition at line 1126 of file WCNSFVFlowPhysics.C.

Referenced by addMomentumFrictionKernels().

1127 {
1128  for (const auto block_i : index_range(_friction_types))
1129  for (const auto type_i : index_range(_friction_types[block_i]))
1130  if (MooseUtils::toUpper(_friction_types[block_i][type_i]) == "FORCHHEIMER")
1131  return true;
1132  return false;
1133 }
std::vector< std::vector< std::string > > _friction_types
The friction correlation types used for each block.
std::string toUpper(std::string name)
auto index_range(const T &sizable)

◆ hasTurbulencePhysics()

bool WCNSFVFlowPhysicsBase::hasTurbulencePhysics ( ) const
inlineprotectedinherited

Whether a turbulence Physics has been coupled in, to know which viscosity to pick on symmetry boundary conditions.

Definition at line 156 of file WCNSFVFlowPhysicsBase.h.

Referenced by addWallsBC().

157  {
160  else
161  return false;
162  }
bool hasTurbulenceModel() const
Whether a turbulence model is in use.
const WCNSFVTurbulencePhysicsBase * _turbulence_physics
Can be set to a coupled turbulence physics.

◆ includeIsotropicStress()

bool WCNSFVFlowPhysicsBase::includeIsotropicStress ( ) const
inlineinherited

Whether to include the isotropic viscous stress contribution.

Definition at line 43 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSFVTurbulencePhysics::addFlowTurbulenceKernels(), and addMomentumViscousDissipationKernels().

const bool _include_isotropic_viscous_stress
Whether to include the isotropic viscous stress contribution.

◆ includeSymmetrizedViscousStress()

bool WCNSFVFlowPhysicsBase::includeSymmetrizedViscousStress ( ) const
inlineinherited

Whether to include the symmetrized contribution in the viscous stress.

Definition at line 41 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSFVTurbulencePhysics::addAxisymmetricTurbulentViscousSource(), addAxisymmetricViscousSourceKernel(), WCNSLinearFVFlowPhysics::addMomentumFluxKernels(), and addMomentumViscousDissipationKernels().

const bool _include_symmetrized_viscous_stress
Whether to include the symmetrized viscous stress contribution.

◆ initializePhysicsAdditional()

void WCNSFVFlowPhysicsBase::initializePhysicsAdditional ( )
overrideprotectedvirtualinherited

Reimplemented from PhysicsBase.

Reimplemented in WCNSLinearFVFlowPhysics.

Definition at line 283 of file WCNSFVFlowPhysicsBase.C.

Referenced by WCNSLinearFVFlowPhysics::initializePhysicsAdditional().

284 {
285  getProblem().needFV();
286 }
virtual void needFV() override
virtual FEProblemBase & getProblem()

◆ inletBoundaryType()

NS::MomentumInletTypes WCNSFVFlowPhysicsBase::inletBoundaryType ( const BoundaryName &  boundary_name) const
inlineinherited

Get the type of the inlet BC.

Definition at line 83 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSFVFluidHeatTransferPhysics::addEnergyInletBC().

84  {
86  static_cast<int>(libmesh_map_find(_momentum_inlet_types, boundary_name)));
87  }
MomentumInletTypes
Definition: NS.h:215
std::map< BoundaryName, MooseEnum > _momentum_inlet_types
Momentum inlet boundary types.

◆ porousMediumTreatment()

bool WCNSFVFlowPhysicsBase::porousMediumTreatment ( ) const
inlineinherited

Return whether a porous medium treatment is applied.

Definition at line 55 of file WCNSFVFlowPhysicsBase.h.

55 { return _porous_medium_treatment; }
const bool _porous_medium_treatment
Whether to use the porous medium treatment.

◆ rhieChowUOName()

const UserObjectName & WCNSFVFlowPhysicsBase::rhieChowUOName ( ) const
inherited

◆ usingNavierStokesFVSyntax()

bool NavierStokesPhysicsBase::usingNavierStokesFVSyntax ( ) const
inlineprotectedinherited

Detects if we are using the new Physics syntax or the old NavierStokesFV action.

Definition at line 32 of file NavierStokesPhysicsBase.h.

33  {
34  return (parameters().get<std::string>("registered_identifier") == "Modules/NavierStokesFV");
35  }
const InputParameters & parameters() const

◆ validParams()

InputParameters WCNSFVFlowPhysics::validParams ( )
static

Definition at line 24 of file WCNSFVFlowPhysics.C.

25 {
27  params.addClassDescription(
28  "Define the Navier Stokes weakly-compressible mass and momentum equations");
29 
30  // Rhie Chow interpolation parameters
31  params.transferParam<Real>(INSFVMomentumAdvection::validParams(), "characteristic_speed");
32  params.addParam<bool>(
33  "time_derivative_contributes_to_RC_coefficients",
34  true,
35  "Whether the time derivative term should contribute to the Rhie Chow coefficients. This adds "
36  "stabilization, but makes the solution dependent on the time step size");
37  params.addParamNamesToGroup("time_derivative_contributes_to_RC_coefficients characteristic_speed",
38  "Numerical scheme");
39 
40  // Used for flow mixtures, where one phase is solid / not moving under the action of gravity
41  params.addParam<MooseFunctorName>(
42  "density_for_gravity_terms",
43  "If specified, replaces the 'density' for the Boussinesq and gravity momentum kernels");
44 
45  // Additional porous media parameters
46  params.transferParam<unsigned short>(NSFVBase::validParams(), "porosity_smoothing_layers");
47 
48  // Techniques to limit or remove oscillations at porosity jump interfaces
49  params.transferParam<MooseEnum>(NSFVBase::validParams(), "porosity_interface_pressure_treatment");
50  params.transferParam<std::vector<BoundaryName>>(NSFVBase::validParams(),
51  "pressure_drop_sidesets");
52  params.transferParam<std::vector<Real>>(NSFVBase::validParams(), "pressure_drop_form_factors");
53 
54  // Friction correction, a technique to limit oscillations at friction interfaces
55  params.transferParam<bool>(NSFVBase::validParams(), "use_friction_correction");
56  params.transferParam<Real>(NSFVBase::validParams(), "consistent_scaling");
57 
58  // Couple to turbulence physics
59  params.addParam<PhysicsName>("coupled_turbulence_physics",
60  "Turbulence Physics coupled with the flow");
61 
62  // Spatial discretization scheme
63  // Specify the numerical schemes for interpolations of velocity and pressure
64  params.transferParam<MooseEnum>(NSFVBase::validParams(), "pressure_face_interpolation");
65  params.transferParam<MooseEnum>(NSFVBase::validParams(), "mass_advection_interpolation");
66  params.transferParam<bool>(NSFVBase::validParams(),
67  "pressure_allow_expansion_on_bernoulli_faces");
68 
69  // Nonlinear solver parameters
70  params.transferParam<Real>(NSFVBase::validParams(), "mass_scaling");
71  params.transferParam<Real>(NSFVBase::validParams(), "momentum_scaling");
72 
73  // Parameter groups
74  params.addParamNamesToGroup("coupled_turbulence_physics", "Coupled Physics");
75  params.addParamNamesToGroup(
76  "porosity_interface_pressure_treatment pressure_allow_expansion_on_bernoulli_faces "
77  "porosity_smoothing_layers use_friction_correction consistent_scaling "
78  "pressure_drop_sidesets pressure_drop_form_factors",
79  "Flow medium discontinuity treatment");
80  params.addParamNamesToGroup("pressure_face_interpolation "
81  "mass_advection_interpolation momentum_advection_interpolation "
82  "mass_scaling momentum_scaling characteristic_speed",
83  "Numerical scheme");
84 
85  // TODO Add default preconditioning and move scaling parameters to a preconditioning group
86 
87  return params;
88 }
static InputParameters validParams()
Definition: NSFVBase.C:371
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
static InputParameters validParams()
static InputParameters validParams()
void transferParam(const InputParameters &source_param, const std::string &name, const std::string &new_name="", const std::string &new_description="")
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)

Member Data Documentation

◆ _add_rz_viscous_source

const bool WCNSFVFlowPhysicsBase::_add_rz_viscous_source
protectedinherited

Whether to automatically add the cylindrical viscous source term.

Definition at line 176 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSFVFlowPhysicsBase::addAxisymmetricViscousSource(), and WCNSFVFlowPhysicsBase::addAxisymmetricViscousSourceEnabled().

◆ _compressibility

const MooseEnum WCNSFVFlowPhysicsBase::_compressibility
protectedinherited

◆ _define_variables

bool NavierStokesPhysicsBase::_define_variables
protectedinherited

◆ _density_gravity_name

const MooseFunctorName WCNSFVFlowPhysicsBase::_density_gravity_name
protectedinherited

Name of the density material property used for gravity and Boussinesq terms.

Definition at line 200 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSLinearFVFlowPhysics::addFunctorMaterials(), WCNSLinearFVFlowPhysics::addMomentumBoussinesqKernels(), addMomentumBoussinesqKernels(), and addMomentumGravityKernels().

◆ _density_name

const MooseFunctorName WCNSFVFlowPhysicsBase::_density_name
protectedinherited

◆ _dynamic_viscosity_name

const MooseFunctorName WCNSFVFlowPhysicsBase::_dynamic_viscosity_name
protectedinherited

◆ _flow_porosity_functor_name

MooseFunctorName WCNSFVFlowPhysicsBase::_flow_porosity_functor_name
protectedinherited

◆ _fluid_temperature_name

const NonlinearVariableName WCNSFVFlowPhysicsBase::_fluid_temperature_name
protectedinherited

◆ _flux_inlet_directions

std::vector<Point> WCNSFVFlowPhysicsBase::_flux_inlet_directions
protectedinherited

Direction of each flux inlet. Indexing based on the number of flux boundaries.

Definition at line 246 of file WCNSFVFlowPhysicsBase.h.

Referenced by addInletBC(), WCNSFVFlowPhysicsBase::getFluxInletDirections(), and WCNSFVFlowPhysicsBase::WCNSFVFlowPhysicsBase().

◆ _flux_inlet_pps

std::vector<PostprocessorName> WCNSFVFlowPhysicsBase::_flux_inlet_pps
protectedinherited

Postprocessors describing the momentum inlet for each boundary. Indexing based on the number of flux boundaries.

Definition at line 244 of file WCNSFVFlowPhysicsBase.h.

Referenced by addInletBC(), and WCNSFVFlowPhysicsBase::getFluxInletPPs().

◆ _friction_blocks

std::vector<std::vector<SubdomainName> > WCNSFVFlowPhysicsBase::_friction_blocks
protectedinherited

Subdomains where we want to have volumetric friction.

Definition at line 221 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSLinearFVFlowPhysics::addMomentumFrictionKernels(), addMomentumFrictionKernels(), and WCNSFVFlowPhysicsBase::WCNSFVFlowPhysicsBase().

◆ _friction_coeffs

std::vector<std::vector<std::string> > WCNSFVFlowPhysicsBase::_friction_coeffs
protectedinherited

The coefficients used for each item if friction type.

Definition at line 225 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSLinearFVFlowPhysics::addMomentumFrictionKernels(), addMomentumFrictionKernels(), and getLinearFrictionCoefName().

◆ _friction_types

std::vector<std::vector<std::string> > WCNSFVFlowPhysicsBase::_friction_types
protectedinherited

◆ _has_flow_equations

const bool WCNSFVFlowPhysicsBase::_has_flow_equations
protectedinherited

◆ _hydraulic_separators

const std::vector<BoundaryName> WCNSFVFlowPhysicsBase::_hydraulic_separators
protectedinherited

◆ _include_isotropic_viscous_stress

const bool WCNSFVFlowPhysicsBase::_include_isotropic_viscous_stress
protectedinherited

Whether to include the isotropic viscous stress contribution.

Definition at line 206 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSFVFlowPhysicsBase::includeIsotropicStress().

◆ _include_symmetrized_viscous_stress

const bool WCNSFVFlowPhysicsBase::_include_symmetrized_viscous_stress
protectedinherited

Whether to include the symmetrized viscous stress contribution.

Definition at line 204 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSFVFlowPhysicsBase::includeSymmetrizedViscousStress().

◆ _inlet_boundaries

const std::vector<BoundaryName> WCNSFVFlowPhysicsBase::_inlet_boundaries
protectedinherited

◆ _momentum_advection_interpolation

const MooseEnum WCNSFVFlowPhysicsBase::_momentum_advection_interpolation
protectedinherited

◆ _momentum_face_interpolation

const MooseEnum WCNSFVFlowPhysicsBase::_momentum_face_interpolation
protectedinherited

The momentum face interpolation method for stress terms.

Definition at line 215 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSFVFlowPhysicsBase::getMomentumFaceInterpolationMethod().

◆ _momentum_inlet_functors

std::map<BoundaryName, std::vector<MooseFunctorName> > WCNSFVFlowPhysicsBase::_momentum_inlet_functors
protectedinherited

Functors describing the momentum inlet for each boundary.

Definition at line 249 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSLinearFVFlowPhysics::addInletBC(), addInletBC(), and WCNSFVFlowPhysicsBase::WCNSFVFlowPhysicsBase().

◆ _momentum_inlet_types

std::map<BoundaryName, MooseEnum> WCNSFVFlowPhysicsBase::_momentum_inlet_types
protectedinherited

◆ _momentum_outlet_types

std::map<BoundaryName, MooseEnum> WCNSFVFlowPhysicsBase::_momentum_outlet_types
protectedinherited

Momentum outlet boundary types.

Definition at line 239 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSLinearFVFlowPhysics::addOutletBC(), addOutletBC(), and WCNSFVFlowPhysicsBase::WCNSFVFlowPhysicsBase().

◆ _momentum_wall_functors

std::map<BoundaryName, std::vector<MooseFunctorName> > WCNSFVFlowPhysicsBase::_momentum_wall_functors
protectedinherited

Functors describing the momentum for each wall boundary.

Definition at line 253 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSLinearFVFlowPhysics::addWallsBC(), addWallsBC(), and WCNSFVFlowPhysicsBase::WCNSFVFlowPhysicsBase().

◆ _momentum_wall_types

std::map<BoundaryName, MooseEnum> WCNSFVFlowPhysicsBase::_momentum_wall_types
protectedinherited

Momentum wall boundary types.

Definition at line 241 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSLinearFVFlowPhysics::addWallsBC(), addWallsBC(), and WCNSFVFlowPhysicsBase::WCNSFVFlowPhysicsBase().

◆ _outlet_boundaries

const std::vector<BoundaryName> WCNSFVFlowPhysicsBase::_outlet_boundaries
protectedinherited

Boundaries with a flow outlet specified on them.

Definition at line 230 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSFVFlowPhysicsBase::getOutletBoundaries(), and WCNSFVFlowPhysicsBase::WCNSFVFlowPhysicsBase().

◆ _porosity_name

const MooseFunctorName WCNSFVFlowPhysicsBase::_porosity_name
protectedinherited

◆ _porosity_smoothing_layers

const unsigned WCNSFVFlowPhysics::_porosity_smoothing_layers
private

The number of smoothing layers if that treatment is used on porosity.

Definition at line 74 of file WCNSFVFlowPhysics.h.

◆ _porous_medium_treatment

const bool WCNSFVFlowPhysicsBase::_porous_medium_treatment
protectedinherited

◆ _pressure_functors

std::map<BoundaryName, MooseFunctorName> WCNSFVFlowPhysicsBase::_pressure_functors
protectedinherited

Functors describing the outlet pressure on each boundary.

Definition at line 251 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSLinearFVFlowPhysics::addOutletBC(), addOutletBC(), and WCNSFVFlowPhysicsBase::WCNSFVFlowPhysicsBase().

◆ _pressure_name

const NonlinearVariableName WCNSFVFlowPhysicsBase::_pressure_name
protectedinherited

◆ _pressure_tag

const TagName WCNSFVFlowPhysicsBase::_pressure_tag = "p_tag"
protectedinherited

Name of the vector to hold pressure momentum equation contributions.

Definition at line 171 of file WCNSFVFlowPhysicsBase.h.

◆ _rc_uo_name

UserObjectName WCNSFVFlowPhysics::_rc_uo_name
private

Name of the user object in charge of computing the Rhie Chow coefficients.

Definition at line 77 of file WCNSFVFlowPhysics.h.

Referenced by addRhieChowUserObjects().

◆ _solve_for_dynamic_pressure

const bool WCNSFVFlowPhysicsBase::_solve_for_dynamic_pressure
protectedinherited

◆ _turbulence_physics

const WCNSFVTurbulencePhysicsBase* WCNSFVFlowPhysicsBase::_turbulence_physics
protectedinherited

◆ _velocity_interpolation

const MooseEnum WCNSFVFlowPhysicsBase::_velocity_interpolation
protectedinherited

The velocity face interpolation method for advecting other quantities.

Definition at line 211 of file WCNSFVFlowPhysicsBase.h.

Referenced by addMassKernels(), addMomentumAdvectionKernels(), and WCNSFVFlowPhysicsBase::getVelocityFaceInterpolationMethod().

◆ _velocity_names

const std::vector<std::string> WCNSFVFlowPhysicsBase::_velocity_names
protectedinherited

◆ _wall_boundaries

const std::vector<BoundaryName> WCNSFVFlowPhysicsBase::_wall_boundaries
protectedinherited

Boundaries which define a wall (slip/noslip/etc.)

Definition at line 232 of file WCNSFVFlowPhysicsBase.h.

Referenced by WCNSLinearFVFlowPhysics::addWallsBC(), WCNSFVFlowPhysicsBase::getWallBoundaries(), and WCNSFVFlowPhysicsBase::WCNSFVFlowPhysicsBase().


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