https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Static 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.
 
unsigned short getNumberAlgebraicGhostingLayersNeeded () const override
 Return the number of algebraic ghosting layers needed.
 
virtual std::vector< UserObjectName > getSuppliedUserObjects () const override
 
bool hasFlowEquations () const
 Whether the physics is actually creating the flow equations.
 
bool addAxisymmetricViscousSourceEnabled () const
 Whether the cylindrical viscous source helper is enabled.
 
bool includeSymmetrizedViscousStress () const
 Whether to include the symmetrized contribution in the viscous stress.
 
bool includeIsotropicStress () const
 Whether to include the isotropic viscous stress contribution.
 
const std::vector< std::string > & getVelocityNames () const
 To interface with other Physics.
 
const NonlinearVariableName & getPressureName () const
 
const NonlinearVariableName & getFluidTemperatureName () const
 
MooseFunctorName getPorosityFunctorName (const bool smoothed) const
 
const MooseEnum & compressibility () const
 Return the compressibility of the flow equations selected.
 
bool porousMediumTreatment () const
 Return whether a porous medium treatment is applied.
 
RealVectorValue gravityVector () const
 Return the gravity vector.
 
const MooseFunctorName & densityName () const
 Return the name of the density functor.
 
const MooseFunctorName & dynamicViscosityName () const
 Return the name of the dynamic viscosity functor.
 
const MooseEnum & getVelocityFaceInterpolationMethod () const
 Get the face interpolation method for velocity.
 
const MooseEnum & getMomentumAdvectionFaceInterpolationMethod () const
 Get the face interpolation method for momentum in the advection term.
 
const MooseEnum & getMomentumFaceInterpolationMethod () const
 Get the face interpolation method for momentum (mostly used in the stress terms)
 
const std::vector< BoundaryName > & getInletBoundaries () const
 Get the inlet boundaries.
 
const std::vector< BoundaryName > & getOutletBoundaries () const
 Get the outlet boundaries.
 
const std::vector< BoundaryName > & getWallBoundaries () const
 Get the wall boundaries.
 
const std::vector< BoundaryName > & getHydraulicSeparators () const
 Get the hydraulic separator boundaries.
 
NS::MomentumInletTypes inletBoundaryType (const BoundaryName &boundary_name) const
 Get the type of the inlet BC.
 
const std::vector< Point > & getFluxInletDirections () const
 Get the inlet direction if using a flux inlet.
 
const std::vector< PostprocessorName > & getFluxInletPPs () const
 Get the inlet flux postprocessor if using a flux inlet.
 
const UserObjectName & rhieChowUOName () const
 Return the name of the Rhie Chow user object.
 
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 T * getCoupledPhysics (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 ActionComponent & getActionComponent (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)
 
MooseApp & getMooseApp () const
 
const std::string & type () const
 
const std::string & name () const
 
std::string typeAndName () const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
MooseObjectName uniqueName () const
 
const InputParameters & parameters () const
 
const hit::Node * getHitNode () const
 
bool hasBase () const
 
const std::string & getBase () const
 
const T & getParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const T * queryParam (const std::string &name) const
 
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 
T getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &name) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
std::string messagePrefix (const bool hit_prefix=true) const
 
std::string errorPrefix (const std::string &) const
 
void mooseError (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecatedNoTrace (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
void callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &relative_path) const
 
std::string getDataFilePath (const std::string &relative_path) const
 
PerfGraph & perfGraph ()
 
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.
 
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 material property.
 
VariableName getFlowVariableName (const std::string &default_name) const
 Convenience routine to be able to retrieve the actual variable names from their default names.
 
bool hasTurbulencePhysics () const
 Whether a turbulence Physics has been coupled in, to know which viscosity to pick on symmetry boundary conditions.
 
const WCNSFVTurbulencePhysicsBase * getCoupledTurbulencePhysics () const
 Find the turbulence physics.
 
std::vector< SubdomainName > getAxisymmetricRZBlocks () const
 Return the set of blocks restricted to an RZ coordinate system.
 
bool usingNavierStokesFVSyntax () const
 Detects if we are using the new Physics syntax or the old NavierStokesFV action.
 
InputParameters getAdditionalRMParams () const override
 Parameters to change or add relationship managers.
 
void addFVAdvectedInterpolationMethod (const MooseEnum &interpolation_method)
 Add the FVInterpolationMethod object for an advected interpolation method if absent.
 
void assertParamDefined (const std::string &param) const
 
bool isTransient () const
 
Factory & getFactory ()
 
Factory & getFactory () const
 
virtual FEProblemBase & getProblem ()
 
virtual const FEProblemBase & getProblem () const
 
void prepareCopyVariablesFromMesh () const
 
void copyVariablesFromMesh (const std::vector< VariableName > &variables_to_copy, bool are_nonlinear=true)
 
std::string prefix () const
 
void addUserObject (const std::string &uo_type, const std::string &uo_name, InputParameters &params)
 
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< SubdomainID > getSubdomainIDs (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
 
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 T & getMeshProperty (const std::string &data_name, const std::string &prefix)
 
const T & getMeshProperty (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 checkAtMostOneParamSetByUser (const std::vector< std::string > &params) 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.
 
const bool _has_flow_equations
 Boolean to keep track of whether the flow equations should be created.
 
const bool _add_rz_viscous_source
 Whether to automatically add the cylindrical viscous source term.
 
const MooseEnum _compressibility
 Compressibility type, can be compressible, incompressible or weakly-compressible.
 
const bool _solve_for_dynamic_pressure
 Whether we are solving for the total or dynamic pressure.
 
const bool _porous_medium_treatment
 Whether to use the porous medium treatment.
 
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)
 
const std::vector< std::string > _velocity_names
 Velocity names.
 
const NonlinearVariableName _pressure_name
 Pressure name.
 
const NonlinearVariableName _fluid_temperature_name
 Fluid temperature name.
 
const MooseFunctorName _density_name
 Name of the density material property.
 
const MooseFunctorName _density_gravity_name
 Name of the density material property used for gravity and Boussinesq terms.
 
const MooseFunctorName _dynamic_viscosity_name
 Name of the dynamic viscosity material property.
 
const bool _include_symmetrized_viscous_stress
 Whether to include the symmetrized viscous stress contribution.
 
const bool _include_isotropic_viscous_stress
 Whether to include the isotropic viscous stress contribution.
 
const MooseEnum _velocity_interpolation
 The velocity face interpolation method for advecting other quantities.
 
const MooseEnum _momentum_advection_interpolation
 The momentum face interpolation method for being advected.
 
const MooseEnum _momentum_face_interpolation
 The momentum face interpolation method for stress terms.
 
const WCNSFVTurbulencePhysicsBase * _turbulence_physics
 Can be set to a coupled turbulence physics.
 
std::vector< std::vector< SubdomainName > > _friction_blocks
 Subdomains where we want to have volumetric friction.
 
std::vector< std::vector< std::string > > _friction_types
 The friction correlation types used for each block.
 
std::vector< std::vector< std::string > > _friction_coeffs
 The coefficients used for each item if friction type.
 
const std::vector< BoundaryName > _inlet_boundaries
 Boundaries with a flow inlet specified on them.
 
const std::vector< BoundaryName > _outlet_boundaries
 Boundaries with a flow outlet specified on them.
 
const std::vector< BoundaryName > _wall_boundaries
 Boundaries which define a wall (slip/noslip/etc.)
 
const std::vector< BoundaryName > _hydraulic_separators
 Hydraulic separator boundaries.
 
std::map< BoundaryName, MooseEnum > _momentum_inlet_types
 Momentum inlet boundary types.
 
std::map< BoundaryName, MooseEnum > _momentum_outlet_types
 Momentum outlet boundary types.
 
std::map< BoundaryName, MooseEnum > _momentum_wall_types
 Momentum wall boundary types.
 
std::vector< PostprocessorName > _flux_inlet_pps
 Postprocessors describing the momentum inlet for each boundary. Indexing based on the number of flux boundaries.
 
std::vector< Point > _flux_inlet_directions
 Direction of each flux inlet. Indexing based on the number of flux boundaries.
 
std::map< BoundaryName, std::vector< MooseFunctorName > > _momentum_inlet_functors
 Functors describing the momentum inlet for each boundary.
 
std::map< BoundaryName, MooseFunctorName > _pressure_functors
 Functors describing the outlet pressure on each boundary.
 
std::map< BoundaryName, std::vector< MooseFunctorName > > _momentum_wall_functors
 Functors describing the momentum for each wall boundary.
 
bool _define_variables
 Whether to define variables if they do not exist.
 
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.
 
void addMassKernels ()
 Function adding kernels for the incompressible continuity equation.
 
void addPressurePinKernel ()
 Function adding the pressure constraint.
 
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.
 
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.
 
void addOutletBC () override
 
void addWallsBC () override
 
void addSeparatorBC () override
 
bool hasForchheimerFriction () const override
 Return whether a Forchheimer friction model is in use.
 
void addRhieChowUserObjects () override
 Function which adds the RhieChow interpolator user objects for weakly and incompressible formulations.
 
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.
 
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.
 
virtual void addRelationshipManagers (Moose::RelationshipManagerType input_rm_type) override
 
bool addRelationshipManagers (Moose::RelationshipManagerType when_type, const InputParameters &moose_object_pars)
 
virtual void addRelationshipManagers (Moose::RelationshipManagerType when_type)
 
void initializePhysics ()
 
virtual void checkIntegrityEarly () const
 
virtual void addAuxiliaryVariables ()
 
virtual void addFEKernels ()
 
virtual void addFVInterpolationMethods ()
 
virtual void addNodalKernels ()
 
virtual void addDiracKernels ()
 
virtual void addDGKernels ()
 
virtual void addScalarKernels ()
 
virtual void addInterfaceKernels ()
 
virtual void addFVInterfaceKernels ()
 
virtual void addFEBCs ()
 
virtual void addNodalBCs ()
 
virtual void addPeriodicBCs ()
 
virtual void addFunctions ()
 
virtual void addAuxiliaryKernels ()
 
virtual void addFunctorMaterials ()
 
virtual void addMultiApps ()
 
virtual void addTransfers ()
 
virtual void addVectorPostprocessors ()
 
virtual void addReporters ()
 
virtual void addOutputs ()
 
virtual void addPreconditioning ()
 
virtual void addExecutioner ()
 
virtual void addExecutors ()
 
void checkRequiredTasks () const
 
bool addRelationshipManager (Moose::RelationshipManagerType input_rm_type, const InputParameters &moose_object_pars, std::string rm_name, Moose::RelationshipManagerType rm_type, Moose::RelationshipManagerInputParameterCallback rm_input_parameter_func, Moose::RMSystemType sys_type=Moose::RMSystemType::NONE)
 
virtual std::string meshPropertyPrefix (const std::string &data_name) const
 
const RestartableDataValue & getMeshPropertyInternal (const std::string &data_name, const std::string &prefix) const
 
void mooseErrorInternal (Args &&... args) const
 
const T & forwardGetParam (const std::string &param_name) const
 
const InputParameters & forwardParameters () const
 
bool forwardIsParamSetByUser (const std::string &param_name) const
 
bool forwardIsParamValid (const std::string &param_name) const
 
void forwardParamError (Args &&... args) const
 
void forwardMooseError (Args &&... args) const
 
void forwardMooseWarning (Args &&... args) const
 
const std::string & forwardType () const
 
virtual const std::string & forwardName () const
 
const std::vector< SubdomainName > & forwardBlocks () const
 

Static Private Member Functions

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

Private Attributes

const unsigned _porosity_smoothing_layers
 The number of smoothing layers if that treatment is used on porosity.
 
UserObjectName _rc_uo_name
 Name of the user object in charge of computing the Rhie Chow coefficients.
 
MooseEnum _is_transient
 
std::vector< VariableName > _solver_var_names
 
std::vector< VariableName > _aux_var_names
 
unsigned int _dim
 
std::set< std::string > _required_tasks
 
const ParallelParamObject & _parent
 
MooseApp & _meta_data_app
 
const MooseObject *const _meta_data_object
 
const MooseBase & _si_moose_base
 
const FEProblemBase * _si_problem
 
const PhysicsBase *const _customer_class
 

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 89 of file WCNSFVFlowPhysics.C.

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

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 570 of file WCNSFVFlowPhysicsBase.C.

571{
573 return;
574
575 const auto rz_blocks = getAxisymmetricRZBlocks();
576 if (rz_blocks.empty())
577 return;
578
579 const auto radial_index = getProblem().mesh().getAxisymmetricRadialCoord();
580 addAxisymmetricViscousSourceKernel(rz_blocks, radial_index);
581}
virtual MooseMesh & mesh() override
unsigned int getAxisymmetricRadialCoord() const
virtual FEProblemBase & getProblem()
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...
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.

Referenced by addFVKernels().

◆ addAxisymmetricViscousSourceEnabled()

bool WCNSFVFlowPhysicsBase::addAxisymmetricViscousSourceEnabled ( ) const
inlineinherited

Whether the cylindrical viscous source helper is enabled.

Definition at line 39 of file WCNSFVFlowPhysicsBase.h.

39{ return _add_rz_viscous_source; }

Referenced by WCNSFVTurbulencePhysics::addAxisymmetricTurbulentViscousSource().

◆ 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 501 of file WCNSFVFlowPhysics.C.

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

◆ addCorrectors()

void WCNSFVFlowPhysics::addCorrectors ( )
overrideprivatevirtual

Reimplemented from PhysicsBase.

Definition at line 1081 of file WCNSFVFlowPhysics.C.

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

◆ addFluidPropertiesFunctorMaterial()

void WCNSFVFlowPhysicsBase::addFluidPropertiesFunctorMaterial ( )
protectedinherited

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

Definition at line 354 of file WCNSFVFlowPhysicsBase.C.

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

Referenced by WCNSFVFlowPhysicsBase::addMaterials().

◆ addFVAdvectedInterpolationMethod()

void NavierStokesPhysicsBase::addFVAdvectedInterpolationMethod ( const MooseEnum &  interpolation_method)
protectedinherited

Add the FVInterpolationMethod object for an advected interpolation method if absent.

Definition at line 43 of file NavierStokesPhysicsBase.C.

44{
45 const std::string method_name = interpolation_method;
46 if (getProblem().hasFVInterpolationMethod(method_name))
47 return;
48
49 const auto method_type = NS::fvAdvectedInterpolationMethodType(interpolation_method);
50
51 InputParameters params = getFactory().getValidParams(method_type);
52 getProblem().addFVInterpolationMethod(method_type, method_name, params);
53}
virtual void addFVInterpolationMethod(const std::string &method_type, const std::string &name, InputParameters &parameters)
std::string fvAdvectedInterpolationMethodType(const MooseEnum &interpolation_method)
Gets the FVInterpolationMethod object type for an advected interpolation method.
Definition NSFVUtils.C:67

Referenced by WCNSLinearFVFlowPhysics::addFVInterpolationMethods(), WCNSLinearFVScalarTransportPhysics::addFVInterpolationMethods(), and WCNSLinearFVTurbulencePhysics::addFVInterpolationMethods().

◆ addFVBCs()

void WCNSFVFlowPhysicsBase::addFVBCs ( )
overrideprotectedvirtualinherited

Reimplemented from PhysicsBase.

Definition at line 297 of file WCNSFVFlowPhysicsBase.C.

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

◆ addFVKernels()

void WCNSFVFlowPhysics::addFVKernels ( )
overrideprivatevirtual

Implements WCNSFVFlowPhysicsBase.

Definition at line 267 of file WCNSFVFlowPhysics.C.

268{
270 return;
271
272 // Mass equation: time derivative
273 if (_compressibility == "weakly-compressible" &&
274 shouldCreateTimeDerivative(_pressure_name, _blocks, /*error if already defined*/ false))
276
277 // Mass equation: divergence of momentum
279
280 // Pressure pin
281 if (getParam<bool>("pin_pressure"))
283
284 // Momentum equation: time derivative
285 if (isTransient())
287
288 // Momentum equation: momentum advection
290
291 // Momentum equation: momentum viscous stress
294
295 // Momentum equation: pressure term
297
298 // Momentum equation: gravity source term
300
301 // Momentum equation: friction kernels
302 if (_friction_types.size())
304
305 // Momentum equation: boussinesq approximation
306 if (getParam<bool>("boussinesq_approximation"))
308}
bool shouldCreateTimeDerivative(const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_already_defined) const
bool isTransient() const
std::vector< std::vector< std::string > > _friction_types
The friction correlation types used for each block.
const MooseEnum _compressibility
Compressibility type, can be compressible, incompressible or weakly-compressible.
void addAxisymmetricViscousSource()
Adds the cylindrical source kernel for the radial momentum equation when requested and valid.
void addMomentumBoussinesqKernels() override
void addMassKernels()
Function adding kernels for the incompressible continuity equation.
void addMomentumPressureKernels() override
void addMassTimeKernels()
Function adding kernels for the time derivative term of the weakly compressible continuity equation.
void addMomentumTimeKernels() override
Functions adding kernels for the incompressible momentum equation If the material properties are not ...
void addMomentumGravityKernels() override
void addMomentumViscousDissipationKernels()
void addMomentumFrictionKernels() override
void addPressurePinKernel()
Function adding the pressure constraint.

◆ addInitialConditions()

void WCNSFVFlowPhysicsBase::addInitialConditions ( )
overrideprotectedvirtualinherited

Reimplemented from PhysicsBase.

Definition at line 399 of file WCNSFVFlowPhysicsBase.C.

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

◆ 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 724 of file WCNSFVFlowPhysics.C.

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

◆ addMassKernels()

void WCNSFVFlowPhysics::addMassKernels ( )
private

Function adding kernels for the incompressible continuity equation.

Definition at line 332 of file WCNSFVFlowPhysics.C.

333{
334 std::string kernel_type = "INSFVMassAdvection";
335 std::string kernel_name = prefix() + "ins_mass_advection";
336
338 {
339 kernel_type = "PINSFVMassAdvection";
340 kernel_name = prefix() + "pins_mass_advection";
341 }
342
343 InputParameters params = getFactory().getValidParams(kernel_type);
344 assignBlocks(params, _blocks);
345 params.set<NonlinearVariableName>("variable") = _pressure_name;
346 params.set<MooseFunctorName>(NS::density) = _density_name;
347 params.set<MooseEnum>("velocity_interp_method") = _velocity_interpolation;
348 params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
349 params.set<MooseEnum>("advected_interp_method") =
350 getParam<MooseEnum>("mass_advection_interpolation");
351
352 getProblem().addFVKernel(kernel_type, kernel_name, params);
353}
const MooseEnum _velocity_interpolation
The velocity face interpolation method for advecting other quantities.

Referenced by addFVKernels().

◆ addMassTimeKernels()

void WCNSFVFlowPhysics::addMassTimeKernels ( )
private

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

Definition at line 311 of file WCNSFVFlowPhysics.C.

312{
313 std::string mass_kernel_type = "WCNSFVMassTimeDerivative";
314 std::string kernel_name = prefix() + "wcns_mass_time";
315
317 {
318 mass_kernel_type = "PWCNSFVMassTimeDerivative";
319 kernel_name = prefix() + "pwcns_mass_time";
320 }
321
322 InputParameters params = getFactory().getValidParams(mass_kernel_type);
323 assignBlocks(params, _blocks);
324 params.set<NonlinearVariableName>("variable") = _pressure_name;
325 params.set<MooseFunctorName>(NS::time_deriv(NS::density)) = NS::time_deriv(_density_name);
327 params.set<MooseFunctorName>(NS::porosity) = _flow_porosity_functor_name;
328 getProblem().addFVKernel(mass_kernel_type, kernel_name, params);
329}
std::string time_deriv(const std::string &var)
Definition NS.h:98

Referenced by addFVKernels().

◆ addMaterials()

void WCNSFVFlowPhysicsBase::addMaterials ( )
overrideprotectedvirtualinherited

Reimplemented from PhysicsBase.

Definition at line 306 of file WCNSFVFlowPhysicsBase.C.

307{
310 else
312
315}
void addNonPorousMediumSpeedMaterial()
Add material to define the local speed with no porous medium treatment.
virtual bool hasForchheimerFriction() const =0
Return whether a Forchheimer friction model is in use.
void addFluidPropertiesFunctorMaterial()
Function which adds the general functor fluid properties functor material to define fluid functor mat...
void addPorousMediumSpeedMaterial()
Add material to define the local speed in porous medium flows.

◆ addMomentumAdvectionKernels()

void WCNSFVFlowPhysics::addMomentumAdvectionKernels ( )
private

Definition at line 414 of file WCNSFVFlowPhysics.C.

415{
416 std::string kernel_type = "INSFVMomentumAdvection";
417 std::string kernel_name = prefix() + "ins_momentum_advection_";
418
420 {
421 kernel_type = "PINSFVMomentumAdvection";
422 kernel_name = prefix() + "pins_momentum_advection_";
423 }
424
425 InputParameters params = getFactory().getValidParams(kernel_type);
426 assignBlocks(params, _blocks);
427 params.set<MooseFunctorName>(NS::density) = _density_name;
428 params.set<MooseEnum>("velocity_interp_method") = _velocity_interpolation;
429 params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
430 params.set<MooseEnum>("advected_interp_method") = _momentum_advection_interpolation;
432 params.set<MooseFunctorName>(NS::porosity) = _flow_porosity_functor_name;
434
435 for (const auto d : make_range(dimension()))
436 {
437 params.set<NonlinearVariableName>("variable") = _velocity_names[d];
438 params.set<MooseEnum>("momentum_component") = NS::directions[d];
439
440 getProblem().addFVKernel(kernel_type, kernel_name + NS::directions[d], params);
441 }
442}
static std::vector< std::string > listOfCommonParams()
const MooseEnum _momentum_advection_interpolation
The momentum face interpolation method for being advected.

Referenced by addFVKernels().

◆ addMomentumBoussinesqKernels()

void WCNSFVFlowPhysics::addMomentumBoussinesqKernels ( )
overrideprivatevirtual

Implements WCNSFVFlowPhysicsBase.

Definition at line 583 of file WCNSFVFlowPhysics.C.

584{
585 if (_compressibility == "weakly-compressible")
586 paramError("boussinesq_approximation",
587 "We cannot use boussinesq approximation while running in weakly-compressible mode!");
588
589 std::string kernel_type = "INSFVMomentumBoussinesq";
590 std::string kernel_name = prefix() + "ins_momentum_boussinesq_";
591
593 {
594 kernel_type = "PINSFVMomentumBoussinesq";
595 kernel_name = prefix() + "pins_momentum_boussinesq_";
596 }
597
598 InputParameters params = getFactory().getValidParams(kernel_type);
599 assignBlocks(params, _blocks);
600 params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
601 params.set<MooseFunctorName>(NS::T_fluid) = _fluid_temperature_name;
602 params.set<MooseFunctorName>(NS::density) = _density_gravity_name;
603 params.set<RealVectorValue>("gravity") = getParam<RealVectorValue>("gravity");
604 params.set<Real>("ref_temperature") = getParam<Real>("ref_temperature");
605 params.set<MooseFunctorName>("alpha_name") = getParam<MooseFunctorName>("thermal_expansion");
607 params.set<MooseFunctorName>(NS::porosity) = _flow_porosity_functor_name;
608 // User declared the flow to be incompressible, we have to trust them
609 params.set<bool>("_override_constant_check") = true;
610
611 for (const auto d : make_range(dimension()))
612 {
613 if (getParam<RealVectorValue>("gravity")(d) != 0)
614 {
615 params.set<MooseEnum>("momentum_component") = NS::directions[d];
616 params.set<NonlinearVariableName>("variable") = _velocity_names[d];
617
618 getProblem().addFVKernel(kernel_type, kernel_name + NS::directions[d], params);
619 }
620 }
621}
const MooseFunctorName _density_gravity_name
Name of the density material property used for gravity and Boussinesq terms.
VectorValue< Real > RealVectorValue

Referenced by addFVKernels().

◆ addMomentumFrictionKernels()

void WCNSFVFlowPhysics::addMomentumFrictionKernels ( )
overrideprivatevirtual

Implements WCNSFVFlowPhysicsBase.

Definition at line 624 of file WCNSFVFlowPhysics.C.

625{
626 unsigned int num_friction_blocks = _friction_blocks.size();
627 unsigned int num_used_blocks = num_friction_blocks ? num_friction_blocks : 1;
628
629 const std::string kernel_type = "PINSFVMomentumFriction";
630 InputParameters params = getFactory().getValidParams(kernel_type);
631 params.set<MooseFunctorName>(NS::density) = _density_name;
632 params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
634 params.set<MooseFunctorName>(NS::speed) = NS::speed;
635 params.set<bool>("standard_friction_formulation") =
636 getParam<bool>("standard_friction_formulation");
637 params.set<bool>("is_porous_medium") = _porous_medium_treatment;
638
639 for (const auto block_i : make_range(num_used_blocks))
640 {
641 std::string block_name = "";
642 if (num_friction_blocks)
643 {
644 params.set<std::vector<SubdomainName>>("block") = _friction_blocks[block_i];
645 block_name = Moose::stringify(_friction_blocks[block_i]);
646 }
647 else
648 {
649 assignBlocks(params, _blocks);
650 block_name = std::to_string(block_i);
651 }
652
653 for (const auto d : make_range(dimension()))
654 {
655 params.set<NonlinearVariableName>("variable") = _velocity_names[d];
656 params.set<MooseEnum>("momentum_component") = NS::directions[d];
657 for (unsigned int type_i = 0; type_i < _friction_types[block_i].size(); ++type_i)
658 {
659 const auto upper_name = MooseUtils::toUpper(_friction_types[block_i][type_i]);
660 if (upper_name == "DARCY")
661 {
662 params.set<MooseFunctorName>(NS::mu) = _dynamic_viscosity_name;
663 params.set<MooseFunctorName>("Darcy_name") = _friction_coeffs[block_i][type_i];
664 }
665 else if (upper_name == "FORCHHEIMER")
666 {
667 params.set<MooseFunctorName>(NS::speed) = NS::speed;
668 params.set<MooseFunctorName>("Forchheimer_name") = _friction_coeffs[block_i][type_i];
669 }
670 else
671 paramError("friction_types",
672 "Friction type '",
673 _friction_types[block_i][type_i],
674 "' is not implemented");
675 }
676
677 getProblem().addFVKernel(kernel_type,
678 prefix() + "momentum_friction_" + block_name + "_" +
680 params);
681 }
682
683 if (_porous_medium_treatment && getParam<bool>("use_friction_correction"))
684 {
685 const std::string correction_kernel_type = "PINSFVMomentumFrictionCorrection";
686 InputParameters corr_params = getFactory().getValidParams(correction_kernel_type);
687 if (num_friction_blocks)
688 corr_params.set<std::vector<SubdomainName>>("block") = _friction_blocks[block_i];
689 else
690 assignBlocks(corr_params, _blocks);
691 corr_params.set<MooseFunctorName>(NS::density) = _density_name;
692 corr_params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
693 corr_params.set<Real>("consistent_scaling") = getParam<Real>("consistent_scaling");
694 for (const auto d : make_range(dimension()))
695 {
696 corr_params.set<NonlinearVariableName>("variable") = _velocity_names[d];
697 corr_params.set<MooseEnum>("momentum_component") = NS::directions[d];
698 for (unsigned int type_i = 0; type_i < _friction_types[block_i].size(); ++type_i)
699 {
700 const auto upper_name = MooseUtils::toUpper(_friction_types[block_i][type_i]);
701 if (upper_name == "DARCY")
702 {
703 corr_params.set<MooseFunctorName>(NS::mu) = _dynamic_viscosity_name;
704 corr_params.set<MooseFunctorName>("Darcy_name") = _friction_coeffs[block_i][type_i];
705 }
706 else if (upper_name == "FORCHHEIMER")
707 {
708 corr_params.set<MooseFunctorName>(NS::speed) = NS::speed;
709 corr_params.set<MooseFunctorName>("Forchheimer_name") =
710 _friction_coeffs[block_i][type_i];
711 }
712 }
713
714 getProblem().addFVKernel(correction_kernel_type,
715 prefix() + "pins_momentum_friction_correction_" + block_name +
716 "_" + NS::directions[d],
717 corr_params);
718 }
719 }
720 }
721}
std::vector< std::vector< SubdomainName > > _friction_blocks
Subdomains where we want to have volumetric friction.
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.
std::string toUpper(std::string name)
std::string stringify(const T &t)

Referenced by addFVKernels().

◆ addMomentumGravityKernels()

void WCNSFVFlowPhysics::addMomentumGravityKernels ( )
overrideprivatevirtual

Implements WCNSFVFlowPhysicsBase.

Definition at line 548 of file WCNSFVFlowPhysics.C.

549{
551 {
552 std::string kernel_type = "INSFVMomentumGravity";
553 std::string kernel_name = prefix() + "ins_momentum_gravity_";
554
556 {
557 kernel_type = "PINSFVMomentumGravity";
558 kernel_name = prefix() + "pins_momentum_gravity_";
559 }
560
561 InputParameters params = getFactory().getValidParams(kernel_type);
562 assignBlocks(params, _blocks);
563 params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
564 params.set<MooseFunctorName>(NS::density) = _density_gravity_name;
565 params.set<RealVectorValue>("gravity") = getParam<RealVectorValue>("gravity");
567 params.set<MooseFunctorName>(NS::porosity) = _flow_porosity_functor_name;
568
569 for (const auto d : make_range(dimension()))
570 {
571 if (getParam<RealVectorValue>("gravity")(d) != 0)
572 {
573 params.set<MooseEnum>("momentum_component") = NS::directions[d];
574 params.set<NonlinearVariableName>("variable") = _velocity_names[d];
575
576 getProblem().addFVKernel(kernel_type, kernel_name + NS::directions[d], params);
577 }
578 }
579 }
580}

Referenced by addFVKernels().

◆ addMomentumMixingLengthKernels()

void WCNSFVFlowPhysics::addMomentumMixingLengthKernels ( )
private

◆ addMomentumPressureKernels()

void WCNSFVFlowPhysics::addMomentumPressureKernels ( )
overrideprivatevirtual

Implements WCNSFVFlowPhysicsBase.

Definition at line 519 of file WCNSFVFlowPhysics.C.

520{
521 std::string kernel_type = "INSFVMomentumPressure";
522 std::string kernel_name = prefix() + "ins_momentum_pressure_";
523
525 {
526 kernel_type = "PINSFVMomentumPressure";
527 kernel_name = prefix() + "pins_momentum_pressure_";
528 }
529
530 InputParameters params = getFactory().getValidParams(kernel_type);
531 assignBlocks(params, _blocks);
532 params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
533 params.set<MooseFunctorName>("pressure") = _pressure_name;
534 params.set<bool>("correct_skewness") =
535 getParam<MooseEnum>("pressure_face_interpolation") == "skewness-corrected";
537 params.set<MooseFunctorName>(NS::porosity) = _flow_porosity_functor_name;
538
539 for (const auto d : make_range(dimension()))
540 {
541 params.set<MooseEnum>("momentum_component") = NS::directions[d];
542 params.set<NonlinearVariableName>("variable") = _velocity_names[d];
543 getProblem().addFVKernel(kernel_type, kernel_name + NS::directions[d], params);
544 }
545}

Referenced by addFVKernels().

◆ 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 375 of file WCNSFVFlowPhysics.C.

376{
377 std::string kernel_type = (_compressibility == "weakly-compressible")
378 ? "WCNSFVMomentumTimeDerivative"
379 : "INSFVMomentumTimeDerivative";
380 std::string kernel_name = prefix() +
381 ((_compressibility == "weakly-compressible") ? "wcns_" : "ins_") +
382 "momentum_time_";
383
385 {
386 // Porosity does not appear in the term
387 kernel_type = (_compressibility == "weakly-compressible") ? "WCNSFVMomentumTimeDerivative"
388 : "PINSFVMomentumTimeDerivative";
389 kernel_name = prefix() + ((_compressibility == "weakly-compressible") ? "pwcns_" : "pins_") +
390 "momentum_time_";
391 }
392
393 InputParameters params = getFactory().getValidParams(kernel_type);
394 assignBlocks(params, _blocks);
395 params.set<MooseFunctorName>(NS::density) = _density_name;
396 if (_compressibility == "weakly-compressible")
397 params.set<MooseFunctorName>(NS::time_deriv(NS::density)) = NS::time_deriv(_density_name);
398
399 params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
400 params.set<bool>("contribute_to_rc") =
401 getParam<bool>("time_derivative_contributes_to_RC_coefficients");
402
403 for (const auto d : make_range(dimension()))
404 {
405 params.set<NonlinearVariableName>("variable") = _velocity_names[d];
406 params.set<MooseEnum>("momentum_component") = NS::directions[d];
407
408 if (shouldCreateTimeDerivative(_velocity_names[d], _blocks, /*error if already defined*/ false))
409 getProblem().addFVKernel(kernel_type, kernel_name + _velocity_names[d], params);
410 }
411}

Referenced by addFVKernels().

◆ addMomentumViscousDissipationKernels()

void WCNSFVFlowPhysics::addMomentumViscousDissipationKernels ( )
private

Definition at line 445 of file WCNSFVFlowPhysics.C.

446{
447 std::string kernel_type = "INSFVMomentumDiffusion";
448 std::string kernel_name = prefix() + "ins_momentum_diffusion_";
449
451 {
452 kernel_type = "PINSFVMomentumDiffusion";
453 kernel_name = prefix() + "pins_momentum_diffusion_";
454 }
455
456 InputParameters params = getFactory().getValidParams(kernel_type);
457 assignBlocks(params, _blocks);
458 params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
459 params.set<MooseFunctorName>(NS::mu) = _dynamic_viscosity_name;
460 const bool user_include_iso = includeIsotropicStress();
461 if (user_include_iso && _porous_medium_treatment)
462 paramWarning("include_isotropic_viscous_stress",
463 "Including the isotropic viscous stress is not supported with the porous medium "
464 "treatment. Ignoring the request.");
465 const bool include_isotropic = (!_porous_medium_treatment) && user_include_iso;
466 if (include_isotropic)
467 params.set<bool>("include_isotropic_viscous_stress") = true;
468 params.set<MooseEnum>("mu_interp_method") = getParam<MooseEnum>("mu_interp_method");
469 params.set<MooseEnum>("variable_interp_method") =
470 getParam<MooseEnum>("momentum_face_interpolation");
471 bool include_symmetric = includeSymmetrizedViscousStress();
472 if (include_symmetric && _porous_medium_treatment)
473 {
474 paramWarning("include_symmetrized_viscous_stress",
475 "Including the symmetrized viscous stress is not supported with the porous "
476 "medium treatment. Ignoring the request.");
477 include_symmetric = false;
478 }
479 if (include_symmetric || include_isotropic)
480 {
481 params.set<bool>("complete_expansion") = true;
482 const std::string u_names[3] = {"u", "v", "w"};
483 for (unsigned int i = 0; i < dimension(); ++i)
484 params.set<MooseFunctorName>(u_names[i]) = _velocity_names[i];
485 }
486
488 params.set<MooseFunctorName>(NS::porosity) = _flow_porosity_functor_name;
489 // Currently only Newton method for WCNSFVFlowPhysics
490 params.set<bool>("newton_solve") = true;
491 for (const auto d : make_range(dimension()))
492 {
493 params.set<NonlinearVariableName>("variable") = _velocity_names[d];
494 params.set<MooseEnum>("momentum_component") = NS::directions[d];
495
496 getProblem().addFVKernel(kernel_type, kernel_name + NS::directions[d], params);
497 }
498}
bool includeIsotropicStress() const
Whether to include the isotropic viscous stress contribution.

Referenced by addFVKernels().

◆ 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.

337{
338 // Not very future-proof but it works
339 const bool use_ad = !dynamic_cast<WCNSLinearFVFlowPhysics *>(this);
340 const std::string class_name =
341 use_ad ? "ADVectorMagnitudeFunctorMaterial" : "VectorMagnitudeFunctorMaterial";
342 InputParameters params = getFactory().getValidParams(class_name);
343 assignBlocks(params, _blocks);
344
345 const std::vector<std::string> param_names{"x_functor", "y_functor", "z_functor"};
346 for (unsigned int dim_i = 0; dim_i < dimension(); ++dim_i)
347 params.set<MooseFunctorName>(param_names[dim_i]) = _velocity_names[dim_i];
348 params.set<MooseFunctorName>("vector_magnitude_name") = NS::speed;
349
350 getProblem().addFunctorMaterial(class_name, prefix() + "ins_speed_material", params);
351}

Referenced by WCNSFVFlowPhysicsBase::addMaterials().

◆ addOutletBC()

void WCNSFVFlowPhysics::addOutletBC ( )
overrideprivatevirtual

Implements WCNSFVFlowPhysicsBase.

Definition at line 858 of file WCNSFVFlowPhysics.C.

859{
860 // Check the BCs size
861 unsigned int num_pressure_outlets = 0;
862 for (const auto & [bdy, momentum_outlet_type] : _momentum_outlet_types)
863 if (momentum_outlet_type == "fixed-pressure" ||
864 momentum_outlet_type == "fixed-pressure-zero-gradient")
865 num_pressure_outlets++;
866
867 if (num_pressure_outlets != _pressure_functors.size())
868 paramError("pressure_functors",
869 "Size (" + std::to_string(_pressure_functors.size()) +
870 ") is not the same as the number of pressure outlet boundaries in "
871 "'fixed-pressure/fixed-pressure-zero-gradient' (size " +
872 std::to_string(num_pressure_outlets) + ")");
873
874 const std::string u_names[3] = {"u", "v", "w"};
875 for (const auto & [outlet_bdy, momentum_outlet_type] : _momentum_outlet_types)
876 {
877 if (momentum_outlet_type == "zero-gradient" ||
878 momentum_outlet_type == "fixed-pressure-zero-gradient")
879 {
880 {
881 const std::string bc_type = _porous_medium_treatment ? "PINSFVMomentumAdvectionOutflowBC"
882 : "INSFVMomentumAdvectionOutflowBC";
883 InputParameters params = getFactory().getValidParams(bc_type);
884 params.set<std::vector<BoundaryName>>("boundary") = {outlet_bdy};
886 params.set<MooseFunctorName>(NS::porosity) = _flow_porosity_functor_name;
887 params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
888 params.set<MooseFunctorName>(NS::density) = _density_name;
889
890 for (unsigned int i = 0; i < dimension(); ++i)
891 params.set<MooseFunctorName>(u_names[i]) = _velocity_names[i];
892
893 for (const auto d : make_range(dimension()))
894 {
895 params.set<NonlinearVariableName>("variable") = _velocity_names[d];
896 params.set<MooseEnum>("momentum_component") = NS::directions[d];
897
898 getProblem().addFVBC(bc_type, _velocity_names[d] + "_" + outlet_bdy, params);
899 }
900 }
901 }
902
903 if (momentum_outlet_type == "fixed-pressure" ||
904 momentum_outlet_type == "fixed-pressure-zero-gradient")
905 {
906 const std::string bc_type = "INSFVOutletPressureBC";
907 InputParameters params = getFactory().getValidParams(bc_type);
908 params.set<NonlinearVariableName>("variable") = _pressure_name;
909 params.set<MooseFunctorName>("functor") = libmesh_map_find(_pressure_functors, outlet_bdy);
910 params.set<std::vector<BoundaryName>>("boundary") = {outlet_bdy};
911
912 getProblem().addFVBC(bc_type, _pressure_name + "_" + outlet_bdy, params);
913 }
914 else if (momentum_outlet_type == "zero-gradient")
915 {
916 const std::string bc_type = "INSFVMassAdvectionOutflowBC";
917 InputParameters params = getFactory().getValidParams(bc_type);
918 params.set<NonlinearVariableName>("variable") = _pressure_name;
919 params.set<MooseFunctorName>(NS::density) = _density_name;
920 params.set<std::vector<BoundaryName>>("boundary") = {outlet_bdy};
921
922 for (const auto d : make_range(dimension()))
923 params.set<MooseFunctorName>(u_names[d]) = _velocity_names[d];
924
925 getProblem().addFVBC(bc_type, _pressure_name + "_" + outlet_bdy, params);
926 }
927 }
928}
std::map< BoundaryName, MooseEnum > _momentum_outlet_types
Momentum outlet boundary types.
std::map< BoundaryName, MooseFunctorName > _pressure_functors
Functors describing the outlet pressure on each boundary.

◆ addPorousMediumSpeedMaterial()

void WCNSFVFlowPhysicsBase::addPorousMediumSpeedMaterial ( )
protectedinherited

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

Definition at line 318 of file WCNSFVFlowPhysicsBase.C.

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}
static const std::string superficial_velocity_vector[3]
Definition NS.h:55

Referenced by WCNSFVFlowPhysicsBase::addMaterials().

◆ addPostprocessors()

void WCNSFVFlowPhysicsBase::addPostprocessors ( )
overrideprotectedvirtualinherited

Reimplemented from PhysicsBase.

Definition at line 460 of file WCNSFVFlowPhysicsBase.C.

461{
462 const auto momentum_inlet_types = getParam<MultiMooseEnum>("momentum_inlet_types");
463
464 for (unsigned int bc_ind = 0; bc_ind < momentum_inlet_types.size(); ++bc_ind)
465 if (momentum_inlet_types[bc_ind] == "flux-mass" ||
466 momentum_inlet_types[bc_ind] == "flux-velocity")
467 {
468 const std::string pp_type = "AreaPostprocessor";
469 InputParameters params = getFactory().getValidParams(pp_type);
470 params.set<std::vector<BoundaryName>>("boundary") = {_inlet_boundaries[bc_ind]};
471 params.set<ExecFlagEnum>("execute_on") = EXEC_INITIAL;
472
473 const auto name_pp = "area_pp_" + _inlet_boundaries[bc_ind];
474 if (!getProblem().hasUserObject(name_pp))
475 getProblem().addPostprocessor(pp_type, name_pp, params);
476 }
477}
bool hasUserObject(const std::string &name) const
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 356 of file WCNSFVFlowPhysics.C.

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

Referenced by addFVKernels().

◆ addRhieChowUserObjects()

void WCNSFVFlowPhysics::addRhieChowUserObjects ( )
overrideprivatevirtual

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

Implements WCNSFVFlowPhysicsBase.

Definition at line 1149 of file WCNSFVFlowPhysics.C.

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

Referenced by addUserObjects().

◆ addSeparatorBC()

void WCNSFVFlowPhysics::addSeparatorBC ( )
overrideprivatevirtual

Implements WCNSFVFlowPhysicsBase.

Definition at line 1049 of file WCNSFVFlowPhysics.C.

1050{
1051 if (_hydraulic_separators.size())
1052 {
1053 std::string bc_type = "INSFVVelocityHydraulicSeparatorBC";
1054 InputParameters params = getFactory().getValidParams(bc_type);
1055 params.set<std::vector<BoundaryName>>("boundary") = _hydraulic_separators;
1056 params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
1057
1058 for (const auto d : make_range(dimension()))
1059 {
1060 params.set<NonlinearVariableName>("variable") = _velocity_names[d];
1061 params.set<MooseEnum>("momentum_component") = NS::directions[d];
1062 getProblem().addFVBC(bc_type, prefix() + _velocity_names[d] + "_separators", params);
1063 }
1064
1065 bc_type = "INSFVScalarFieldSeparatorBC";
1066 params = getFactory().getValidParams(bc_type);
1067 params.set<std::vector<BoundaryName>>("boundary") = _hydraulic_separators;
1068 params.set<NonlinearVariableName>("variable") = _pressure_name;
1069 getProblem().addFVBC(bc_type, prefix() + _pressure_name + "_separators", params);
1070 }
1071}
const std::vector< BoundaryName > _hydraulic_separators
Hydraulic separator boundaries.

◆ addSolverVariables()

void WCNSFVFlowPhysics::addSolverVariables ( )
overrideprivatevirtual

Implements WCNSFVFlowPhysicsBase.

Definition at line 141 of file WCNSFVFlowPhysics.C.

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

◆ addUserObjects()

void WCNSFVFlowPhysics::addUserObjects ( )
overrideprivatevirtual

Implements WCNSFVFlowPhysicsBase.

Definition at line 1074 of file WCNSFVFlowPhysics.C.

1075{
1076 // Rhie Chow user object for interpolation velocities
1078}
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 931 of file WCNSFVFlowPhysics.C.

932{
933 const std::string u_names[3] = {"u", "v", "w"};
934
935 // Count the number of fixed velocity wall boundaries (moving walls)
936 unsigned int num_functor_walls = 0;
937 for (const auto & [boundary_name, momentum_wall_type] : _momentum_wall_types)
938 if (momentum_wall_type == "noslip")
939 num_functor_walls++;
940 if (_momentum_wall_functors.size() && num_functor_walls != _momentum_wall_functors.size())
941 paramError("momentum_wall_functors",
942 "If any wall functors are specified, the number of boundaries requiring a momentum "
943 "functor (" +
944 std::to_string(num_functor_walls) + ") and the number of functors specified (" +
945 std::to_string(_momentum_wall_functors.size()) + ") must match");
946 for (const auto & wall_functors : _momentum_wall_functors)
947 if (wall_functors.second.size() != dimension())
948 paramError("momentum_wall_functors",
949 "Number of wall functors (" + std::to_string(wall_functors.second.size()) +
950 ") must match dimension (" + std::to_string(dimension()) +
951 ").\nFunctors currently specified:" + Moose::stringify(wall_functors.second));
952
953 for (const auto & [boundary_name, wall_type] : _momentum_wall_types)
954 {
955 if (wall_type == "noslip")
956 {
957 const std::string bc_type = "INSFVNoSlipWallBC";
958 InputParameters params = getFactory().getValidParams(bc_type);
959 params.set<std::vector<BoundaryName>>("boundary") = {boundary_name};
960
961 for (const auto d : make_range(dimension()))
962 {
963 params.set<NonlinearVariableName>("variable") = _velocity_names[d];
964 if (_momentum_wall_functors.count(boundary_name) == 0)
965 params.set<FunctionName>("function") = "0";
966 else
967 params.set<FunctionName>("function") = _momentum_wall_functors[boundary_name][d];
968
969 getProblem().addFVBC(bc_type, _velocity_names[d] + "_" + boundary_name, params);
970 }
971 }
972 else if (wall_type == "wallfunction")
973 {
974 const std::string bc_type = "INSFVWallFunctionBC";
975 InputParameters params = getFactory().getValidParams(bc_type);
976 params.set<MooseFunctorName>(NS::mu) = _dynamic_viscosity_name;
977 params.set<MooseFunctorName>(NS::density) = _density_name;
978 params.set<std::vector<BoundaryName>>("boundary") = {boundary_name};
979 params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
980
981 for (const auto d : make_range(dimension()))
982 params.set<MooseFunctorName>(u_names[d]) = _velocity_names[d];
983
984 for (const auto d : make_range(dimension()))
985 {
986 params.set<NonlinearVariableName>("variable") = _velocity_names[d];
987 params.set<MooseEnum>("momentum_component") = NS::directions[d];
988
989 getProblem().addFVBC(bc_type, _velocity_names[d] + "_" + boundary_name, params);
990 }
991 }
992 else if (wall_type == "slip")
993 {
994 const std::string bc_type = "INSFVNaturalFreeSlipBC";
995 InputParameters params = getFactory().getValidParams(bc_type);
996 params.set<std::vector<BoundaryName>>("boundary") = {boundary_name};
997 params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
998
999 for (const auto d : make_range(dimension()))
1000 {
1001 params.set<NonlinearVariableName>("variable") = _velocity_names[d];
1002 params.set<MooseEnum>("momentum_component") = NS::directions[d];
1003
1004 getProblem().addFVBC(bc_type, _velocity_names[d] + "_" + boundary_name, params);
1005 }
1006 }
1007 else if (wall_type == "symmetry")
1008 {
1009 {
1010 std::string bc_type;
1012 bc_type = "PINSFVSymmetryVelocityBC";
1013 else
1014 bc_type = "INSFVSymmetryVelocityBC";
1015
1016 InputParameters params = getFactory().getValidParams(bc_type);
1017 params.set<std::vector<BoundaryName>>("boundary") = {boundary_name};
1018
1019 MooseFunctorName viscosity_name = _dynamic_viscosity_name;
1021 viscosity_name = NS::total_viscosity;
1022 params.set<MooseFunctorName>(NS::mu) = viscosity_name;
1023 params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
1024
1025 for (const auto d : make_range(dimension()))
1026 params.set<MooseFunctorName>(u_names[d]) = _velocity_names[d];
1027
1028 for (const auto d : make_range(dimension()))
1029 {
1030 params.set<NonlinearVariableName>("variable") = _velocity_names[d];
1031 params.set<MooseEnum>("momentum_component") = NS::directions[d];
1032
1033 getProblem().addFVBC(bc_type, _velocity_names[d] + "_" + boundary_name, params);
1034 }
1035 }
1036 {
1037 const std::string bc_type = "INSFVSymmetryPressureBC";
1038 InputParameters params = getFactory().getValidParams(bc_type);
1039 params.set<NonlinearVariableName>("variable") = _pressure_name;
1040 params.set<std::vector<BoundaryName>>("boundary") = {boundary_name};
1041
1042 getProblem().addFVBC(bc_type, _pressure_name + "_" + boundary_name, params);
1043 }
1044 }
1045 }
1046}
std::map< BoundaryName, std::vector< MooseFunctorName > > _momentum_wall_functors
Functors describing the momentum for each wall boundary.
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...
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 1222 of file WCNSFVFlowPhysics.C.

1223{
1224 if (!getProblem().hasFunctor("ax", /*thread_id=*/0))
1225 mooseError("Rhie Chow coefficient ax must be provided for advection by auxiliary velocities");
1226 if (dimension() >= 2 && !getProblem().hasFunctor("ay", /*thread_id=*/0))
1227 mooseError("Rhie Chow coefficient ay must be provided for advection by auxiliary velocities");
1228 if (dimension() == 3 && !getProblem().hasFunctor("az", /*thread_id=*/0))
1229 mooseError("Rhie Chow coefficient az must be provided for advection by auxiliary velocities");
1230}
void mooseError(Args &&... args) const

Referenced by addRhieChowUserObjects().

◆ 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; }

◆ 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 56 of file NavierStokesPhysicsBase.C.

57{
58 unsigned short necessary_layers = getParam<unsigned short>("ghost_layers");
59 necessary_layers = std::max(necessary_layers, getNumberAlgebraicGhostingLayersNeeded());
60
61 // Just an object that has a ghost_layers parameter
62 const std::string kernel_type = "INSFVMixingLengthReynoldsStress";
63 InputParameters params = getFactory().getValidParams(kernel_type);
64 params.template set<unsigned short>("ghost_layers") = necessary_layers;
65
66 return params;
67}
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 539 of file WCNSFVFlowPhysicsBase.C.

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

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

◆ getCoupledTurbulencePhysics()

const WCNSFVTurbulencePhysicsBase * WCNSFVFlowPhysicsBase::getCoupledTurbulencePhysics ( ) const
protectedinherited

Find the turbulence physics.

Definition at line 506 of file WCNSFVFlowPhysicsBase.C.

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

Referenced by WCNSFVFlowPhysicsBase::actOnAdditionalTasks().

◆ 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 480 of file WCNSFVFlowPhysicsBase.C.

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

◆ getFluidTemperatureName()

const NonlinearVariableName & WCNSFVFlowPhysicsBase::getFluidTemperatureName ( ) const
inlineinherited

◆ 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.

89{ return _flux_inlet_directions; }

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

◆ 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.

91{ return _flux_inlet_pps; }

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

◆ getHydraulicSeparators()

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

Get the hydraulic separator boundaries.

Definition at line 81 of file WCNSFVFlowPhysicsBase.h.

81{ return _hydraulic_separators; }

Referenced by WCNSFVFluidHeatTransferPhysics::addEnergySeparatorBC().

◆ 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 1233 of file WCNSFVFlowPhysics.C.

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

◆ 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 }

◆ 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.

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

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

◆ getNumberAlgebraicGhostingLayersNeeded()

unsigned short WCNSFVFlowPhysics::getNumberAlgebraicGhostingLayersNeeded ( ) const
overridevirtual

Return the number of algebraic ghosting layers needed.

Implements NavierStokesPhysicsBase.

Definition at line 1135 of file WCNSFVFlowPhysics.C.

1136{
1138 if (_porous_medium_treatment && isParamValid("porosity_smoothing_layers"))
1139 ghost_layers = std::max(getParam<unsigned short>("porosity_smoothing_layers"), ghost_layers);
1141 getParam<MooseEnum>("porosity_interface_pressure_treatment") != "automatic") ||
1142 getParam<MooseEnum>("momentum_face_interpolation") == "skewness-corrected" ||
1143 getParam<MooseEnum>("pressure_face_interpolation") == "skewness-corrected")
1144 ghost_layers = std::max(ghost_layers, (unsigned short)3);
1145 return ghost_layers;
1146}
unsigned short getNumberAlgebraicGhostingLayersNeeded() const override
Return the number of algebraic ghosting layers needed.

◆ getOutletBoundaries()

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

Get the outlet boundaries.

Definition at line 77 of file WCNSFVFlowPhysicsBase.h.

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

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

◆ getPorosityFunctorName()

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

◆ getPressureName()

const NonlinearVariableName & WCNSFVFlowPhysicsBase::getPressureName ( ) const
inlineinherited

◆ getSuppliedUserObjects()

std::vector< UserObjectName > WCNSFVFlowPhysics::getSuppliedUserObjects ( ) const
overridevirtual

Reimplemented from PhysicsBase.

Definition at line 1216 of file WCNSFVFlowPhysics.C.

1217{
1218 return {rhieChowUOName()};
1219}

◆ 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().

◆ 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.

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

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

◆ gravityVector()

RealVectorValue WCNSFVFlowPhysicsBase::gravityVector ( ) const
inlineinherited

Return the gravity vector.

Definition at line 57 of file WCNSFVFlowPhysicsBase.h.

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

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

◆ hasFlowEquations()

bool WCNSFVFlowPhysicsBase::hasFlowEquations ( ) const
inlineinherited

◆ hasForchheimerFriction()

bool WCNSFVFlowPhysics::hasForchheimerFriction ( ) const
overrideprivatevirtual

Return whether a Forchheimer friction model is in use.

Implements WCNSFVFlowPhysicsBase.

Definition at line 1125 of file WCNSFVFlowPhysics.C.

1126{
1127 for (const auto block_i : index_range(_friction_types))
1128 for (const auto type_i : index_range(_friction_types[block_i]))
1129 if (MooseUtils::toUpper(_friction_types[block_i][type_i]) == "FORCHHEIMER")
1130 return true;
1131 return false;
1132}

Referenced by addMomentumFrictionKernels().

◆ 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.

157 {
160 else
161 return false;
162 }
bool hasTurbulenceModel() const
Whether a turbulence model is in use.

Referenced by addWallsBC().

◆ includeIsotropicStress()

bool WCNSFVFlowPhysicsBase::includeIsotropicStress ( ) const
inlineinherited

Whether to include the isotropic viscous stress contribution.

Definition at line 43 of file WCNSFVFlowPhysicsBase.h.

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

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

◆ includeSymmetrizedViscousStress()

bool WCNSFVFlowPhysicsBase::includeSymmetrizedViscousStress ( ) const
inlineinherited

Whether to include the symmetrized contribution in the viscous stress.

Definition at line 41 of file WCNSFVFlowPhysicsBase.h.

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

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

◆ initializePhysicsAdditional()

void WCNSFVFlowPhysicsBase::initializePhysicsAdditional ( )
overrideprotectedvirtualinherited

Reimplemented from PhysicsBase.

Reimplemented in WCNSLinearFVFlowPhysics.

Definition at line 283 of file WCNSFVFlowPhysicsBase.C.

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

Referenced by WCNSLinearFVFlowPhysics::initializePhysicsAdditional().

◆ 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.

84 {
86 static_cast<int>(libmesh_map_find(_momentum_inlet_types, boundary_name)));
87 }
MomentumInletTypes
Definition NS.h:216

Referenced by WCNSFVFluidHeatTransferPhysics::addEnergyInletBC().

◆ porousMediumTreatment()

bool WCNSFVFlowPhysicsBase::porousMediumTreatment ( ) const
inlineinherited

Return whether a porous medium treatment is applied.

Definition at line 55 of file WCNSFVFlowPhysicsBase.h.

◆ rhieChowUOName()

const UserObjectName & WCNSFVFlowPhysicsBase::rhieChowUOName ( ) const
inherited

Return the name of the Rhie Chow user object.

Definition at line 532 of file WCNSFVFlowPhysicsBase.C.

533{
534 mooseAssert(!_rc_uo_name.empty(), "The Rhie-Chow user-object name should be set!");
535 return _rc_uo_name;
536}
UserObjectName _rc_uo_name
name of the Rhie Chow user object

Referenced by WCNSFVTwoPhaseMixturePhysics::addAdvectionSlipTerm(), WCNSFVTurbulencePhysics::addAxisymmetricTurbulentViscousSource(), addAxisymmetricViscousSourceKernel(), WCNSFVFluidHeatTransferPhysics::addEnergyAdvectionKernels(), WCNSLinearFVFluidHeatTransferPhysics::addEnergyAdvectionKernels(), WCNSFVTurbulencePhysics::addFlowTurbulenceKernels(), addInletBC(), WCNSFVTurbulencePhysics::addKEpsilonAdvection(), WCNSLinearFVTurbulencePhysics::addKEpsilonAdvection(), addMassKernels(), addMomentumAdvectionKernels(), addMomentumBoussinesqKernels(), WCNSLinearFVFlowPhysics::addMomentumFluxKernels(), addMomentumFrictionKernels(), addMomentumGravityKernels(), addMomentumPressureKernels(), addMomentumTimeKernels(), addMomentumViscousDissipationKernels(), addOutletBC(), WCNSFVTwoPhaseMixturePhysics::addPhaseDriftFluxTerm(), WCNSLinearFVTwoPhaseMixturePhysics::addPhaseDriftFluxTerm(), WCNSLinearFVFlowPhysics::addRhieChowUserObjects(), WCNSFVScalarTransportPhysics::addScalarAdvectionKernels(), WCNSLinearFVScalarTransportPhysics::addScalarAdvectionKernels(), addSeparatorBC(), addWallsBC(), getSuppliedUserObjects(), and WCNSLinearFVFlowPhysics::getSuppliedUserObjects().

◆ usingNavierStokesFVSyntax()

bool NavierStokesPhysicsBase::usingNavierStokesFVSyntax ( ) const
inlineprotectedinherited

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

Definition at line 33 of file NavierStokesPhysicsBase.h.

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

◆ validParams()

InputParameters WCNSFVFlowPhysics::validParams ( )
static

Definition at line 24 of file WCNSFVFlowPhysics.C.

25{
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");
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");
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");
81 "pressure_face_interpolation mass_advection_interpolation mass_scaling momentum_scaling",
82 "Numerical scheme");
83
84 // TODO Add default preconditioning and move scaling parameters to a preconditioning group
85
86 return params;
87}
static InputParameters validParams()
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
void transferParam(const InputParameters &source_param, const std::string &name, const std::string &new_name="", const std::string &new_description="")
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
Definition NSFVBase.C:378
static InputParameters validParams()

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(), addMomentumBoussinesqKernels(), WCNSLinearFVFlowPhysics::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 addMomentumFrictionKernels(), WCNSLinearFVFlowPhysics::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 addMomentumFrictionKernels(), WCNSLinearFVFlowPhysics::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

The momentum face interpolation method for being advected.

Definition at line 213 of file WCNSFVFlowPhysicsBase.h.

Referenced by addMomentumAdvectionKernels(), and WCNSFVFlowPhysicsBase::getMomentumAdvectionFaceInterpolationMethod().

◆ _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 addInletBC(), WCNSLinearFVFlowPhysics::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 addOutletBC(), WCNSLinearFVFlowPhysics::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 addWallsBC(), WCNSLinearFVFlowPhysics::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 addWallsBC(), WCNSLinearFVFlowPhysics::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 76 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 addOutletBC(), WCNSLinearFVFlowPhysics::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 79 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: