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 MooseEnumcompressibility () 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 MooseEnumgetVelocityFaceInterpolationMethod () const
 Get the face interpolation method for velocity.
 
const MooseEnumgetMomentumAdvectionFaceInterpolationMethod () const
 Get the face interpolation method for momentum in the advection term.
 
const MooseEnumgetMomentumFaceInterpolationMethod () 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 TgetCoupledPhysics (const PhysicsName &phys_name, const bool allow_fail=false) const
 
const std::vector< T * > getCoupledPhysics (const bool allow_fail=false) const
 
unsigned int dimension () const
 
const ActionComponentgetActionComponent (const ComponentName &comp_name) const
 
void checkComponentType (const ActionComponent &component) const
 
virtual void addComponent (const ActionComponent &component)
 
const std::vector< VariableName > & solverVariableNames () const
 
const std::vector< VariableName > & auxVariableNames () const
 
void timedAct ()
 
MooseObjectName uniqueActionName () const
 
const std::string & specificTaskName () const
 
const std::set< std::string > & getAllTasks () const
 
void appendTask (const std::string &task)
 
MooseAppgetMooseApp () const
 
const std::string & type () const
 
const std::string & name () const
 
std::string typeAndName () const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
MooseObjectName uniqueName () const
 
const InputParametersparameters () const
 
const hit::Node * getHitNode () const
 
bool hasBase () const
 
const std::string & getBase () const
 
const TgetParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const TqueryParam (const std::string &name) const
 
const TgetRenamedParam (const std::string &old_name, const std::string &new_name) const
 
T getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &name) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
std::string messagePrefix (const bool hit_prefix=true) const
 
std::string errorPrefix (const std::string &) const
 
void mooseError (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecatedNoTrace (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
void callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &relative_path) const
 
std::string getDataFilePath (const std::string &relative_path) const
 
PerfGraphperfGraph ()
 
void assertParamDefined (const std::string &libmesh_dbg_var(param)) const
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 

Static Public Member Functions

static InputParameters validParams ()
 
static void callMooseError (MooseApp *const app, const InputParameters &params, std::string msg, const bool with_prefix, const hit::Node *node, const bool show_trace=true)
 

Public Attributes

 usingCombinedWarningSolutionWarnings
 
const ConsoleStream _console
 

Static Public Attributes

static const std::string unique_action_name_param
 
static const std::string type_param
 
static const std::string name_param
 
static const std::string unique_name_param
 
static const std::string app_param
 
static const std::string moose_base_param
 
static const std::string kokkos_object_param
 
static constexpr auto SYSTEM
 
static constexpr auto NAME
 

Protected Member Functions

virtual void initializePhysicsAdditional () override
 
virtual void actOnAdditionalTasks () override
 
virtual void addInitialConditions () override
 
virtual void addFVBCs () override
 
virtual void addMaterials () override
 
virtual void addPostprocessors () override
 
void addAxisymmetricViscousSource ()
 Adds the cylindrical source kernel for the radial momentum equation when requested and valid.
 
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 WCNSFVTurbulencePhysicsBasegetCoupledTurbulencePhysics () 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
 
FactorygetFactory ()
 
FactorygetFactory () const
 
virtual FEProblemBasegetProblem ()
 
virtual const FEProblemBasegetProblem () const
 
void prepareCopyVariablesFromMesh () const
 
void copyVariablesFromMesh (const std::vector< VariableName > &variables_to_copy, bool are_nonlinear=true)
 
std::string prefix () const
 
void 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< SubdomainIDgetSubdomainIDs (const std::set< SubdomainName > &blocks) const
 
std::vector< std::string > getSubdomainNamesAndIDs (const std::set< SubdomainID > &blocks) const
 
void addPetscPairsToPetscOptions (const std::vector< std::pair< MooseEnumItem, std::string > > &petsc_pair_options)
 
bool isVariableFV (const VariableName &var_name) const
 
bool isVariableScalar (const VariableName &var_name) const
 
bool shouldCreateVariable (const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_aux)
 
bool shouldCreateIC (const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool ic_is_default_ic, const bool error_if_already_defined) const
 
bool shouldCreateTimeDerivative (const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_already_defined) const
 
void reportPotentiallyMissedParameters (const std::vector< std::string > &param_names, const std::string &object_type, const std::string &object_name="") const
 
virtual void checkIntegrity () const
 
void associateWithParameter (const std::string &param_name, InputParameters &params) const
 
void associateWithParameter (const InputParameters &from_params, const std::string &param_name, InputParameters &params) const
 
const TgetMeshProperty (const std::string &data_name, const std::string &prefix)
 
const TgetMeshProperty (const std::string &data_name)
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name) const
 
bool hasMeshProperty (const std::string &data_name) const
 
std::string meshPropertyName (const std::string &data_name) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const
 
std::string timedSectionName (const std::string &section_name) const
 
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 
void checkParamsBothSetOrNotSet (const std::string &param1, const std::string &param2) const
 
void checkSecondParamSetOnlyIfFirstOneTrue (const std::string &param1, const std::string &param2) const
 
void checkSecondParamSetOnlyIfFirstOneSet (const std::string &param1, const std::string &param2) const
 
void checkSecondParamNotSetIfFirstOneSet (const std::string &param1, const std::string &param2) const
 
void checkVectorParamsSameLength (const std::string &param1, const std::string &param2) const
 
void checkVectorParamAndMultiMooseEnumLength (const std::string &param1, const std::string &param2) const
 
void checkTwoDVectorParamsSameLength (const std::string &param1, const std::string &param2) const
 
void checkVectorParamsNoOverlap (const std::vector< std::string > &param_vecs) const
 
void checkTwoDVectorParamsNoRespectiveOverlap (const std::vector< std::string > &param_vecs) const
 
void checkTwoDVectorParamInnerSameLengthAsOneDVector (const std::string &param1, const std::string &param2) const
 
void checkTwoDVectorParamMultiMooseEnumSameLength (const std::string &param1, const std::string &param2, const bool error_for_param2) const
 
void checkVectorParamNotEmpty (const std::string &param1) const
 
void checkVectorParamsSameLengthIfSet (const std::string &param1, const std::string &param2, const bool ignore_empty_default_param2=false) const
 
void checkVectorParamLengthSameAsCombinedOthers (const std::string &param1, const std::string &param2, const std::string &param3) const
 
void checkBlockwiseConsistency (const std::string &block_param_name, const std::vector< std::string > &parameter_names) const
 
bool parameterConsistent (const InputParameters &other_param, const std::string &param_name) const
 
void warnInconsistent (const InputParameters &parameters, const std::string &param_name) const
 
void errorDependentParameter (const std::string &param1, const std::string &value_not_set, const std::vector< std::string > &dependent_params) const
 
void errorInconsistentDependentParameter (const std::string &param1, const std::string &value_set, const std::vector< std::string > &dependent_params) const
 

Static Protected Member Functions

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

Protected Attributes

const TagName _pressure_tag = "p_tag"
 Name of the vector to hold pressure momentum equation contributions.
 
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 RestartableDataValuegetMeshPropertyInternal (const std::string &data_name, const std::string &prefix) const
 
void mooseErrorInternal (Args &&... args) const
 
const TforwardGetParam (const std::string &param_name) const
 
const InputParametersforwardParameters () 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 90 of file WCNSFVFlowPhysics.C.

92 _porosity_smoothing_layers(isParamValid("porosity_smoothing_layers")
93 ? getParam<unsigned short>("porosity_smoothing_layers")
94 : 0)
95{
96 _flow_porosity_functor_name = isParamValid("porosity_smoothing_layers") &&
97 getParam<unsigned short>("porosity_smoothing_layers")
100
101 // Most likely to be a mistake
102 if (getParam<bool>("pin_pressure") &&
103 getParam<std::vector<MooseFunctorName>>("pressure_functors").size())
104 paramError("pin_pressure", "Cannot pin the pressure if a pressure boundary exists");
105
106 // Pressure pin checks
107 checkSecondParamSetOnlyIfFirstOneTrue("pin_pressure", "pinned_pressure_type");
108 checkSecondParamSetOnlyIfFirstOneTrue("pin_pressure", "pinned_pressure_value");
109 if (getParam<bool>("pin_pressure"))
110 {
111 if ((std::string(getParam<MooseEnum>("pinned_pressure_type")).find("point") !=
112 std::string::npos) &&
113 !isParamSetByUser("pinned_pressure_point"))
114 paramError("pinned_pressure_point",
115 "This parameter must be set to specify the pinned pressure point");
116 else if ((std::string(getParam<MooseEnum>("pinned_pressure_type")).find("point") ==
117 std::string::npos) &&
118 isParamSetByUser("pinned_pressure_point"))
119 paramError("pinned_pressure_point",
120 "This parameter should not be given by the user with the corresponding "
121 "pinned_pressure_type setting: " +
122 std::string(getParam<MooseEnum>("pinned_pressure_type")) + ".");
123 }
124
125 // Porosity correction checks
126 checkSecondParamSetOnlyIfFirstOneTrue("porous_medium_treatment", "use_friction_correction");
127 checkSecondParamSetOnlyIfFirstOneTrue("use_friction_correction", "consistent_scaling");
128 checkSecondParamSetOnlyIfFirstOneTrue("porous_medium_treatment",
129 "porosity_interface_pressure_treatment");
130 if (getParam<MooseEnum>("porosity_interface_pressure_treatment") != "bernoulli")
131 errorDependentParameter("porosity_interface_pressure_treatment",
132 "bernoulli",
133 {"pressure_allow_expansion_on_bernoulli_faces",
134 "pressure_drop_sidesets",
135 "pressure_drop_form_factors"});
136
137 // Porous media parameters
138 checkSecondParamSetOnlyIfFirstOneTrue("porous_medium_treatment", "porosity_smoothing_layers");
139}
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 502 of file WCNSFVFlowPhysics.C.

504{
505 InputParameters params = getFactory().getValidParams("INSFVMomentumViscousSourceRZ");
506 assignBlocks(params, rz_blocks);
507 params.set<MooseFunctorName>(NS::mu) = _dynamic_viscosity_name;
508 params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
509 params.set<MooseEnum>("momentum_component") = NS::directions[radial_index];
510 params.set<bool>("complete_expansion") = includeSymmetrizedViscousStress();
511 params.set<NonlinearVariableName>("variable") = _velocity_names[radial_index];
512
513 getProblem().addFVKernel("INSFVMomentumViscousSourceRZ",
514 prefix() + "ins_momentum_viscous_source_rz_" +
515 NS::directions[radial_index],
516 params);
517}
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 1082 of file WCNSFVFlowPhysics.C.

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

269{
271 return;
272
273 // Mass equation: time derivative
274 if (_compressibility == "weakly-compressible" &&
275 shouldCreateTimeDerivative(_pressure_name, _blocks, /*error if already defined*/ false))
277
278 // Mass equation: divergence of momentum
280
281 // Pressure pin
282 if (getParam<bool>("pin_pressure"))
284
285 // Momentum equation: time derivative
286 if (isTransient())
288
289 // Momentum equation: momentum advection
291
292 // Momentum equation: momentum viscous stress
295
296 // Momentum equation: pressure term
298
299 // Momentum equation: gravity source term
301
302 // Momentum equation: friction kernels
303 if (_friction_types.size())
305
306 // Momentum equation: boussinesq approximation
307 if (getParam<bool>("boussinesq_approximation"))
309}
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 725 of file WCNSFVFlowPhysics.C.

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

334{
335 std::string kernel_type = "INSFVMassAdvection";
336 std::string kernel_name = prefix() + "ins_mass_advection";
337
339 {
340 kernel_type = "PINSFVMassAdvection";
341 kernel_name = prefix() + "pins_mass_advection";
342 }
343
344 InputParameters params = getFactory().getValidParams(kernel_type);
345 assignBlocks(params, _blocks);
346 params.set<NonlinearVariableName>("variable") = _pressure_name;
347 params.set<MooseFunctorName>(NS::density) = _density_name;
348 params.set<MooseEnum>("velocity_interp_method") = _velocity_interpolation;
349 params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
350 params.set<MooseEnum>("advected_interp_method") =
351 getParam<MooseEnum>("mass_advection_interpolation");
352
353 getProblem().addFVKernel(kernel_type, kernel_name, params);
354}
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 312 of file WCNSFVFlowPhysics.C.

313{
314 std::string mass_kernel_type = "WCNSFVMassTimeDerivative";
315 std::string kernel_name = prefix() + "wcns_mass_time";
316
318 {
319 mass_kernel_type = "PWCNSFVMassTimeDerivative";
320 kernel_name = prefix() + "pwcns_mass_time";
321 }
322
323 InputParameters params = getFactory().getValidParams(mass_kernel_type);
324 assignBlocks(params, _blocks);
325 params.set<NonlinearVariableName>("variable") = _pressure_name;
326 params.set<MooseFunctorName>(NS::time_deriv(NS::density)) = NS::time_deriv(_density_name);
328 params.set<MooseFunctorName>(NS::porosity) = _flow_porosity_functor_name;
329 getProblem().addFVKernel(mass_kernel_type, kernel_name, params);
330}
std::string 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 415 of file WCNSFVFlowPhysics.C.

416{
417 std::string kernel_type = "INSFVMomentumAdvection";
418 std::string kernel_name = prefix() + "ins_momentum_advection_";
419
421 {
422 kernel_type = "PINSFVMomentumAdvection";
423 kernel_name = prefix() + "pins_momentum_advection_";
424 }
425
426 InputParameters params = getFactory().getValidParams(kernel_type);
427 assignBlocks(params, _blocks);
428 params.set<MooseFunctorName>(NS::density) = _density_name;
429 params.set<MooseEnum>("velocity_interp_method") = _velocity_interpolation;
430 params.set<UserObjectName>("rhie_chow_user_object") = rhieChowUOName();
431 params.set<MooseEnum>("advected_interp_method") = _momentum_advection_interpolation;
433 params.set<MooseFunctorName>(NS::porosity) = _flow_porosity_functor_name;
435
436 for (const auto d : make_range(dimension()))
437 {
438 params.set<NonlinearVariableName>("variable") = _velocity_names[d];
439 params.set<MooseEnum>("momentum_component") = NS::directions[d];
440
441 getProblem().addFVKernel(kernel_type, kernel_name + NS::directions[d], params);
442 }
443}
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 584 of file WCNSFVFlowPhysics.C.

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

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

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

Referenced by addFVKernels().

◆ addMomentumMixingLengthKernels()

void WCNSFVFlowPhysics::addMomentumMixingLengthKernels ( )
private

◆ addMomentumPressureKernels()

void WCNSFVFlowPhysics::addMomentumPressureKernels ( )
overrideprivatevirtual

Implements WCNSFVFlowPhysicsBase.

Definition at line 520 of file WCNSFVFlowPhysics.C.

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

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

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

Referenced by addFVKernels().

◆ addMomentumViscousDissipationKernels()

void WCNSFVFlowPhysics::addMomentumViscousDissipationKernels ( )
private

Definition at line 446 of file WCNSFVFlowPhysics.C.

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

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

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

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

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

◆ addSolverVariables()

void WCNSFVFlowPhysics::addSolverVariables ( )
overrideprivatevirtual

Implements WCNSFVFlowPhysicsBase.

Definition at line 142 of file WCNSFVFlowPhysics.C.

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

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

◆ addWallsBC()

void WCNSFVFlowPhysics::addWallsBC ( )
overrideprivatevirtual

Implements WCNSFVFlowPhysicsBase.

Definition at line 932 of file WCNSFVFlowPhysics.C.

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

1224{
1225 if (!getProblem().hasFunctor("ax", /*thread_id=*/0))
1226 mooseError("Rhie Chow coefficient ax must be provided for advection by auxiliary velocities");
1227 if (dimension() >= 2 && !getProblem().hasFunctor("ay", /*thread_id=*/0))
1228 mooseError("Rhie Chow coefficient ay must be provided for advection by auxiliary velocities");
1229 if (dimension() == 3 && !getProblem().hasFunctor("az", /*thread_id=*/0))
1230 mooseError("Rhie Chow coefficient az must be provided for advection by auxiliary velocities");
1231}
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 1234 of file WCNSFVFlowPhysics.C.

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

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

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

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

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

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

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");
80 params.addParamNamesToGroup("pressure_face_interpolation "
81 "mass_advection_interpolation momentum_advection_interpolation "
82 "mass_scaling momentum_scaling characteristic_speed",
83 "Numerical scheme");
84
85 // TODO Add default preconditioning and move scaling parameters to a preconditioning group
86
87 return params;
88}
static InputParameters validParams()
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:371
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: