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
WCNSLinearFVTwoPhaseMixturePhysics Class Referencefinal

Creates all the objects needed to solve the mixture model for the weakly-compressible and incompressible two-phase equations. More...

#include <WCNSLinearFVTwoPhaseMixturePhysics.h>

Inheritance diagram for WCNSLinearFVTwoPhaseMixturePhysics:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 

Public Member Functions

 WCNSLinearFVTwoPhaseMixturePhysics (const InputParameters &parameters)
 
const std::vector< NonlinearVariableName > & getAdvectedScalarNames () const
 Get the names of the advected scalar quantity variables.
 
bool hasScalarEquations () const
 Whether the physics is actually creating the scalar advection equations.
 
virtual void act () override final
 
void addBlocks (const std::vector< SubdomainName > &blocks)
 
void addBlocksById (const std::vector< SubdomainID > &block_ids)
 
const std::vector< SubdomainName > & blocks () const
 
bool checkBlockRestrictionIdentical (const std::string &object_name, const std::vector< SubdomainName > &blocks, const bool error_if_not_identical=true) const
 
bool hasBlocks (const std::vector< SubdomainName > &blocks) const
 
const T * getCoupledPhysics (const PhysicsName &phys_name, const bool allow_fail=false) const
 
const std::vector< T * > getCoupledPhysics (const bool allow_fail=false) const
 
unsigned int dimension () const
 
const ActionComponent & getActionComponent (const ComponentName &comp_name) const
 
void checkComponentType (const ActionComponent &component) const
 
virtual void addComponent (const ActionComponent &component)
 
const std::vector< VariableName > & solverVariableNames () const
 
const std::vector< VariableName > & auxVariableNames () const
 
virtual std::vector< UserObjectName > getSuppliedUserObjects () const
 
void timedAct ()
 
MooseObjectName uniqueActionName () const
 
const std::string & specificTaskName () const
 
const std::set< std::string > & getAllTasks () const
 
void appendTask (const std::string &task)
 
MooseApp & getMooseApp () const
 
const std::string & type () const
 
const std::string & name () const
 
std::string typeAndName () const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
MooseObjectName uniqueName () const
 
const InputParameters & parameters () const
 
const hit::Node * getHitNode () const
 
bool hasBase () const
 
const std::string & getBase () const
 
const T & getParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const T * queryParam (const std::string &name) const
 
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 
T getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &name) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
std::string messagePrefix (const bool hit_prefix=true) const
 
std::string errorPrefix (const std::string &) const
 
void mooseError (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecatedNoTrace (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
void callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &relative_path) const
 
std::string getDataFilePath (const std::string &relative_path) const
 
PerfGraph & perfGraph ()
 
void assertParamDefined (const std::string &libmesh_dbg_var(param)) const
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 
const WCNSFVFlowPhysicsBase * getCoupledFlowPhysics () const
 
const WCNSFVTurbulencePhysicsBase * getCoupledTurbulencePhysics () const
 
MooseFunctorName getPorosityFunctorName (bool smoothed) const
 Return the porosity functor name.
 
const MooseFunctorName & densityName () const
 
const MooseFunctorName & dynamicViscosityName () 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

MooseFunctorName fluidFractionScaled (const MooseFunctorName &functor)
 Return the functor scaled by the porosity for porous flow, the functor itself otherwise.
 
virtual void actOnAdditionalTasks () override
 
virtual void addFVBCs () override
 
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.
 
MooseFunctorName addPorosityScaledFunctor (const MooseFunctorName &porosity, const MooseFunctorName &functor)
 Add, if absent, a non-AD functor material defining the product of a porosity and another functor on the blocks of this Physics.
 
void assertParamDefined (const std::string &param) const
 
bool isTransient () const
 
Factory & getFactory ()
 
Factory & getFactory () const
 
virtual FEProblemBase & getProblem ()
 
virtual const FEProblemBase & getProblem () const
 
void prepareCopyVariablesFromMesh () const
 
void copyVariablesFromMesh (const std::vector< VariableName > &variables_to_copy, bool are_nonlinear=true)
 
std::string prefix () const
 
void addUserObject (const std::string &uo_type, const std::string &uo_name, InputParameters &params)
 
void saveSolverVariableName (const VariableName &var_name)
 
void saveAuxVariableName (const VariableName &var_name)
 
void addSharedSolverVariable (const std::string &var_type, const VariableName &var_name, InputParameters params)
 
void addSharedSolverVariable (const VariableName &var_name, const std::string &family, const std::string &order, Real scaling=1.0)
 
void addSharedAuxVariable (const std::string &var_type, const VariableName &var_name, const InputParameters &params)
 
void addSharedAuxVariable (const VariableName &var_name, const std::string &family, const std::string &order)
 
bool variableExists (const VariableName &var_name, bool error_if_aux) const
 
bool solverVariableExists (const VariableName &var_name) const
 
const SolverSystemName & getSolverSystem (unsigned int variable_index) const
 
const SolverSystemName & getSolverSystem (const VariableName &variable_name) const
 
void addRequiredPhysicsTask (const std::string &task)
 
void assignBlocks (InputParameters &params, const std::vector< SubdomainName > &blocks) const
 
bool allMeshBlocks (const std::vector< SubdomainName > &blocks) const
 
bool allMeshBlocks (const std::set< SubdomainName > &blocks) const
 
std::set< SubdomainID > getSubdomainIDs (const std::set< SubdomainName > &blocks) const
 
std::vector< std::string > getSubdomainNamesAndIDs (const std::set< SubdomainID > &blocks) const
 
void addPetscPairsToPetscOptions (const std::vector< std::pair< MooseEnumItem, std::string > > &petsc_pair_options)
 
bool isVariableFV (const VariableName &var_name) const
 
bool isVariableScalar (const VariableName &var_name) const
 
bool shouldCreateVariable (const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_aux)
 
bool shouldCreateIC (const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool ic_is_default_ic, const bool error_if_already_defined) const
 
bool shouldCreateTimeDerivative (const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_already_defined) const
 
void reportPotentiallyMissedParameters (const std::vector< std::string > &param_names, const std::string &object_type, const std::string &object_name="") const
 
void associateWithParameter (const std::string &param_name, InputParameters &params) const
 
void associateWithParameter (const InputParameters &from_params, const std::string &param_name, InputParameters &params) const
 
const T & getMeshProperty (const std::string &data_name, const std::string &prefix)
 
const T & getMeshProperty (const std::string &data_name)
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name) const
 
bool hasMeshProperty (const std::string &data_name) const
 
std::string meshPropertyName (const std::string &data_name) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const
 
std::string timedSectionName (const std::string &section_name) const
 
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 
void checkParamsBothSetOrNotSet (const std::string &param1, const std::string &param2) const
 
void checkAtMostOneParamSetByUser (const std::vector< std::string > &params) const
 
void checkSecondParamSetOnlyIfFirstOneTrue (const std::string &param1, const std::string &param2) const
 
void checkSecondParamSetOnlyIfFirstOneSet (const std::string &param1, const std::string &param2) const
 
void checkSecondParamNotSetIfFirstOneSet (const std::string &param1, const std::string &param2) const
 
void checkVectorParamsSameLength (const std::string &param1, const std::string &param2) const
 
void checkVectorParamAndMultiMooseEnumLength (const std::string &param1, const std::string &param2) const
 
void checkTwoDVectorParamsSameLength (const std::string &param1, const std::string &param2) const
 
void checkVectorParamsNoOverlap (const std::vector< std::string > &param_vecs) const
 
void checkTwoDVectorParamsNoRespectiveOverlap (const std::vector< std::string > &param_vecs) const
 
void checkTwoDVectorParamInnerSameLengthAsOneDVector (const std::string &param1, const std::string &param2) const
 
void checkTwoDVectorParamMultiMooseEnumSameLength (const std::string &param1, const std::string &param2, const bool error_for_param2) const
 
void checkVectorParamNotEmpty (const std::string &param1) const
 
void checkVectorParamsSameLengthIfSet (const std::string &param1, const std::string &param2, const bool ignore_empty_default_param2=false) const
 
void checkVectorParamLengthSameAsCombinedOthers (const std::string &param1, const std::string &param2, const std::string &param3) const
 
void checkBlockwiseConsistency (const std::string &block_param_name, const std::vector< std::string > &parameter_names) const
 
bool parameterConsistent (const InputParameters &other_param, const std::string &param_name) const
 
void warnInconsistent (const InputParameters &parameters, const std::string &param_name) const
 
void errorDependentParameter (const std::string &param1, const std::string &value_not_set, const std::vector< std::string > &dependent_params) const
 
void errorInconsistentDependentParameter (const std::string &param1, const std::string &value_set, const std::vector< std::string > &dependent_params) const
 

Static Protected Member Functions

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

Protected Attributes

std::vector< NonlinearVariableName > _passive_scalar_names
 Names of the passive scalar variables.
 
const bool _has_scalar_equation
 A boolean to help compatibility with the old Modules/NavierStokesFV syntax or to deliberately skip adding the equations (for example for mixtures with a stationary phase)
 
MultiMooseEnum _passive_scalar_inlet_types
 Passive scalar inlet boundary types.
 
std::vector< std::vector< MooseFunctorName > > _passive_scalar_inlet_functors
 Functors describing the inlet boundary values. See passive_scalar_inlet_types for what the functors actually represent.
 
std::vector< MooseFunctorName > _passive_scalar_sources
 Functors for the passive scalar sources. Indexing is scalar variable index.
 
std::vector< std::vector< MooseFunctorName > > _passive_scalar_coupled_sources
 Functors for the passive scalar (coupled) sources. Outer indexing is scalar variable index.
 
std::vector< std::vector< Real > > _passive_scalar_coupled_sources_coef
 Coefficients for multiplying for the passive scalar sources. Outer indexing is scalar variable index.
 
std::vector< std::vector< std::vector< SubdomainName > > > _passive_scalar_coupled_sources_blocks
 Subdomains for the sources. Outer indexing is scalar index, intermediate is source index, inner is subdomains.
 
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
 
const NavierStokesPhysicsBase * _advection_physics
 The Physics class using this helper.
 
const WCNSFVFlowPhysicsBase * _flow_equations_physics
 Flow physics.
 
const WCNSFVTurbulencePhysicsBase * _turbulence_physics
 Turbulence.
 
bool _has_turbulence_model
 Because of the Modules/navierStokesFV syntax, a turbulence physics often exists without a model we save (_turbulence_physics && _turbulence_physics->hasTurbulenceModel()) in this attribute.
 
const MooseEnum _compressibility
 Compressibility type, can be compressible, incompressible or weakly-compressible.
 
const bool _porous_medium_treatment
 Switch to show if porous medium treatment is requested or not.
 
const std::vector< std::string > _velocity_names
 Velocity names.
 
const NonlinearVariableName _pressure_name
 Pressure name.
 
const MooseFunctorName _density_name
 Name of the density material property.
 
const MooseFunctorName _dynamic_viscosity_name
 Name of the dynamic viscosity material property.
 
const MooseEnum _velocity_interpolation
 The velocity / momentum face interpolation method for advecting other quantities.
 

Private Member Functions

virtual void addFVKernels () override
 
virtual void addMaterials () override
 
virtual void checkIntegrity () const override
 
virtual void setSlipVelocityParams (InputParameters &params) const override
 Adds the slip velocity parameters.
 
void addPhaseInterfaceTerm ()
 Functions adding kernels for the other physics.
 
void addPhaseChangeEnergySource ()
 
void addPhaseDriftFluxTerm ()
 
void addAdvectionSlipTerm ()
 
virtual void addSolverVariables () override
 
virtual void addFVInterpolationMethods () override
 
virtual void addScalarTimeKernels () override
 Functions adding kernels for the incompressible / weakly-compressible scalar transport equation If the material properties are not constant, some of these can be used for weakly-compressible simulations as well.
 
virtual void addScalarDiffusionKernels () override
 
virtual void addScalarAdvectionKernels () override
 
virtual void addScalarSourceKernels () override
 Equivalent of NSFVAction addScalarCoupledSourceKernels.
 
virtual void addScalarInletBC () override
 Functions adding boundary conditions for the incompressible simulation.
 
virtual void addScalarWallBC () override
 
virtual void addScalarOutletBC () override
 
virtual unsigned short getNumberAlgebraicGhostingLayersNeeded () const override
 Return the number of ghosting layers needed.
 
virtual void addInitialConditions () override
 
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 initializePhysicsAdditional ()
 
virtual void checkIntegrityEarly () const
 
virtual void addAuxiliaryVariables ()
 
virtual void addFEKernels ()
 
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 addUserObjects ()
 
virtual void addCorrectors ()
 
virtual void addMultiApps ()
 
virtual void addTransfers ()
 
virtual void addPostprocessors ()
 
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)
 
bool suppressInfo () const
 
virtual std::string meshPropertyPrefix (const std::string &data_name) const
 
const RestartableDataValue & getMeshPropertyInternal (const std::string &data_name, const std::string &prefix) const
 
void mooseErrorInternal (Args &&... args) const
 
const T & forwardGetParam (const std::string &param_name) const
 
const InputParameters & forwardParameters () const
 
bool forwardIsParamSetByUser (const std::string &param_name) const
 
bool forwardIsParamValid (const std::string &param_name) const
 
void forwardParamError (Args &&... args) const
 
void forwardMooseError (Args &&... args) const
 
void forwardMooseWarning (Args &&... args) const
 
const std::string & forwardType () const
 
virtual const std::string & forwardName () const
 
const std::vector< SubdomainName > & forwardBlocks () const
 

Static Private Member Functions

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

Private Attributes

const WCNSLinearFVFluidHeatTransferPhysics * _fluid_energy_physics
 Fluid heat transfer physics.
 
const bool _add_phase_equation
 Convenience boolean to keep track of whether the phase transport equation is requested.
 
bool _has_energy_equation
 Convenience boolean to keep track of whether the fluid energy equation is present.
 
const MooseFunctorName _phase_1_fraction_name
 Name of the first phase fraction (usually, liquid)
 
const MooseFunctorName _phase_2_fraction_name
 Name of the second phase fraction (usually, dispersed or advected by the liquid)
 
const MooseFunctorName _phase_1_density
 Name of the density of the first phase.
 
const MooseFunctorName _phase_1_viscosity
 Name of the dynamic viscosity of the first phase.
 
const MooseFunctorName _phase_1_specific_heat
 Name of the specific heat of the first phase.
 
const MooseFunctorName _phase_1_thermal_conductivity
 Name of the thermal conductivity of the first phase.
 
const MooseFunctorName _phase_2_density
 Name of the density of the other phase.
 
const MooseFunctorName _phase_2_viscosity
 Name of the dynamic viscosity of the other phase.
 
const MooseFunctorName _phase_2_specific_heat
 Name of the specific heat of the other phase.
 
const MooseFunctorName _phase_2_thermal_conductivity
 Name of the thermal conductivity of the other phase.
 
const bool _use_external_mixture_properties
 Whether to define the mixture model internally or use fluid properties instead.
 
const bool _use_drift_flux
 Whether to add the drift flux momentum terms to each component momentum equation.
 
const bool _use_advection_slip
 Whether to add the advection slip term to each component of the momentum equation.
 
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 mixture model for the weakly-compressible and incompressible two-phase equations.

Can also add a phase transport equation

Definition at line 21 of file WCNSLinearFVTwoPhaseMixturePhysics.h.

Constructor & Destructor Documentation

◆ WCNSLinearFVTwoPhaseMixturePhysics()

WCNSLinearFVTwoPhaseMixturePhysics::WCNSLinearFVTwoPhaseMixturePhysics ( const InputParameters &  parameters)

Definition at line 49 of file WCNSLinearFVTwoPhaseMixturePhysics.C.

53 _phase_1_fraction_name(getParam<MooseFunctorName>("phase_1_fraction_name")),
55 _phase_1_density(getParam<MooseFunctorName>("phase_1_density_name")),
56 _phase_1_viscosity(getParam<MooseFunctorName>("phase_1_viscosity_name")),
57 _phase_1_specific_heat(getParam<MooseFunctorName>("phase_1_specific_heat_name")),
58 _phase_1_thermal_conductivity(getParam<MooseFunctorName>("phase_1_thermal_conductivity_name")),
59 _phase_2_density(getParam<MooseFunctorName>("phase_2_density_name")),
60 _phase_2_viscosity(getParam<MooseFunctorName>("phase_2_viscosity_name")),
61 _phase_2_specific_heat(getParam<MooseFunctorName>("phase_2_specific_heat_name")),
62 _phase_2_thermal_conductivity(getParam<MooseFunctorName>("phase_2_thermal_conductivity_name")),
63 _use_external_mixture_properties(getParam<bool>("use_external_mixture_properties")),
64 _use_drift_flux(getParam<bool>("add_drift_flux_momentum_terms")),
65 _use_advection_slip(getParam<bool>("add_advection_slip_term"))
66{
69 "porous_medium_treatment",
70 "The porous medium treatment is not implemented for the linear two-phase mixture physics");
71 // Check that only one scalar was passed, as we are using vector parameters
72 if (_passive_scalar_names.size() > 1)
73 paramError("phase_fraction_name", "Only one phase fraction currently supported.");
74 if (_passive_scalar_inlet_functors.size() > 1)
75 paramError("phase_fraction_inlet_functors", "Only one phase fraction currently supported");
76
77 // Retrieve the fluid energy equation if it exists
78 if (isParamValid("fluid_heat_transfer_physics"))
79 {
80 _fluid_energy_physics = getCoupledPhysics<WCNSLinearFVFluidHeatTransferPhysics>(
81 getParam<PhysicsName>("fluid_heat_transfer_physics"), true);
82 // Check for a missing parameter / do not support isolated physics for now
84 !getCoupledPhysics<const WCNSLinearFVFluidHeatTransferPhysics>(true).empty())
86 "fluid_heat_transfer_physics",
87 "We currently do not support creating both a phase transport equation and fluid heat "
88 "transfer physics that are not coupled together");
91 else
93 }
94 else
95 {
97 _fluid_energy_physics = nullptr;
98 }
99
100 // Check that the mixture parameters are correctly in use in the other physics
102 {
103 if (_fluid_energy_physics->densityName() != "rho_mixture")
105 "Density name for Physics '", _fluid_energy_physics->name(), "' should be 'rho_mixture'");
106 if (_fluid_energy_physics->getSpecificHeatName() != "cp_mixture")
107 mooseError("Specific heat name for Physics '",
109 "' should be 'cp_mixture'");
110 }
112 if (_flow_equations_physics->densityName() != "rho_mixture")
113 mooseError("Density name for Physics ,",
115 "' should be 'rho_mixture'");
116
117 if (_verbose)
118 {
120 mooseInfoRepeated("Coupled to fluid flow physics " + _flow_equations_physics->name());
122 mooseInfoRepeated("Coupled to fluid heat transfer physics " + _fluid_energy_physics->name());
123 }
124
125 // Parameter checking
126 // The two models are not consistent
127 if (isParamSetByUser("alpha_exchange") && getParam<bool>("add_phase_change_energy_term"))
128 paramError("alpha_exchange",
129 "A phase exchange coefficient cannot be specified if the phase change is handled "
130 "with a phase change heat loss model");
132 paramError("phase_1_fraction_name",
133 "First phase fraction name should be different from second phase fraction name");
135 paramError("add_drift_flux_momentum_terms",
136 "Drift flux model cannot be used at the same time as the advection slip model");
137 if (!getParam<bool>("add_drift_flux_momentum_terms"))
138 errorDependentParameter("add_drift_flux_momentum_terms", "true", {"density_interp_method"});
139 if (!getParam<bool>("use_dispersed_phase_drag_model"))
140 errorDependentParameter("use_dispersed_phase_drag_model", "true", {"particle_diameter"});
141}
void mooseInfoRepeated(Args &&... args)
void errorDependentParameter(const std::string &param1, const std::string &value_not_set, const std::vector< std::string > &dependent_params) const
const InputParameters & parameters() const
const std::string & name() const
void paramError(const std::string &param, Args... args) const
bool isParamSetByUser(const std::string &name) const
void mooseError(Args &&... args) const
bool isParamValid(const std::string &name) const
const bool _verbose
const WCNSFVFlowPhysicsBase * _flow_equations_physics
Flow physics.
const bool _porous_medium_treatment
Switch to show if porous medium treatment is requested or not.
const MooseFunctorName & densityName() const
Return the name of the density functor.
const MooseFunctorName & getSpecificHeatName() const
Get the name of the specific heat material property.
bool hasEnergyEquation() const
Whether the physics is actually creating the heat equation.
const bool _has_scalar_equation
A boolean to help compatibility with the old Modules/NavierStokesFV syntax or to deliberately skip ad...
std::vector< NonlinearVariableName > _passive_scalar_names
Names of the passive scalar variables.
std::vector< std::vector< MooseFunctorName > > _passive_scalar_inlet_functors
Functors describing the inlet boundary values. See passive_scalar_inlet_types for what the functors a...
Creates all the objects needed to solve the Navier Stokes scalar transport equations using the linear...
const MooseFunctorName _phase_2_specific_heat
Name of the specific heat of the other phase.
const MooseFunctorName _phase_2_viscosity
Name of the dynamic viscosity of the other phase.
const MooseFunctorName _phase_2_fraction_name
Name of the second phase fraction (usually, dispersed or advected by the liquid)
const bool _use_advection_slip
Whether to add the advection slip term to each component of the momentum equation.
const MooseFunctorName _phase_1_thermal_conductivity
Name of the thermal conductivity of the first phase.
const MooseFunctorName _phase_1_fraction_name
Name of the first phase fraction (usually, liquid)
const MooseFunctorName _phase_2_density
Name of the density of the other phase.
const MooseFunctorName _phase_1_density
Name of the density of the first phase.
const bool _use_external_mixture_properties
Whether to define the mixture model internally or use fluid properties instead.
const bool _add_phase_equation
Convenience boolean to keep track of whether the phase transport equation is requested.
bool _has_energy_equation
Convenience boolean to keep track of whether the fluid energy equation is present.
const MooseFunctorName _phase_1_specific_heat
Name of the specific heat of the first phase.
const MooseFunctorName _phase_2_thermal_conductivity
Name of the thermal conductivity of the other phase.
const MooseFunctorName _phase_1_viscosity
Name of the dynamic viscosity of the first phase.
const bool _use_drift_flux
Whether to add the drift flux momentum terms to each component momentum equation.
const WCNSLinearFVFluidHeatTransferPhysics * _fluid_energy_physics
Fluid heat transfer physics.

Member Function Documentation

◆ actOnAdditionalTasks()

void WCNSFVScalarTransportPhysicsBase::actOnAdditionalTasks ( )
overrideprotectedvirtualinherited

Reimplemented from PhysicsBase.

Definition at line 122 of file WCNSFVScalarTransportPhysicsBase.C.

123{
124 // Turbulence physics would not be initialized before this task
125 if (_current_task == "get_turbulence_physics")
126 {
129 }
130}
const std::string & _current_task
const WCNSFVTurbulencePhysicsBase * _turbulence_physics
Turbulence.
const WCNSFVTurbulencePhysicsBase * getCoupledTurbulencePhysics() const
bool _has_turbulence_model
Because of the Modules/navierStokesFV syntax, a turbulence physics often exists without a model we sa...
bool hasTurbulenceModel() const
Whether a turbulence model is in use.

◆ addAdvectionSlipTerm()

void WCNSLinearFVTwoPhaseMixturePhysics::addAdvectionSlipTerm ( )
private

Definition at line 244 of file WCNSLinearFVTwoPhaseMixturePhysics.C.

245{
246 mooseError("Phase advection slip not implemented at this time for linear finite volume");
247}

Referenced by addFVKernels().

◆ 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)
InputParameters getValidParams(const std::string &name) const
virtual FEProblemBase & getProblem()
Factory & getFactory()
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 WCNSFVScalarTransportPhysicsBase::addFVBCs ( )
overrideprotectedvirtualinherited

Reimplemented from PhysicsBase.

Definition at line 149 of file WCNSFVScalarTransportPhysicsBase.C.

150{
151 // For compatibility with Modules/NavierStokesFV syntax
153 return;
154
156 // There is typically no wall flux of passive scalars, similarly we rarely know
157 // their concentrations at the outlet at the beginning of the simulation
158 // TODO: we will know the outlet values in case of flow reversal. Implement scalar outlet
161}
virtual void addScalarInletBC()=0
Functions adding boundary conditions for the scalar conservation equations.
virtual void addScalarOutletBC()=0

◆ addFVInterpolationMethods()

void WCNSLinearFVScalarTransportPhysics::addFVInterpolationMethods ( )
overrideprivatevirtualinherited

Reimplemented from PhysicsBase.

Definition at line 66 of file WCNSLinearFVScalarTransportPhysics.C.

67{
68 if (!_has_scalar_equation || isParamValid("passive_scalar_advection_interpolation_method_name"))
69 return;
70
71 addFVAdvectedInterpolationMethod(getParam<MooseEnum>("passive_scalar_advection_interpolation"));
72}
void addFVAdvectedInterpolationMethod(const MooseEnum &interpolation_method)
Add the FVInterpolationMethod object for an advected interpolation method if absent.

◆ addFVKernels()

void WCNSLinearFVTwoPhaseMixturePhysics::addFVKernels ( )
overrideprivatevirtual

Reimplemented from WCNSFVScalarTransportPhysicsBase.

Definition at line 168 of file WCNSLinearFVTwoPhaseMixturePhysics.C.

◆ addInitialConditions()

void WCNSFVScalarTransportPhysicsBase::addInitialConditions ( )
overrideprivatevirtualinherited

Reimplemented from PhysicsBase.

Definition at line 164 of file WCNSFVScalarTransportPhysicsBase.C.

165{
166 // For compatibility with Modules/NavierStokesFV syntax
168 return;
169 if (!_define_variables && parameters().isParamSetByUser("initial_scalar_variables"))
170 paramError("initial_scalar_variables",
171 "Scalar variables are defined externally of NavierStokesFV, so should their inital "
172 "conditions");
173 // do not set initial conditions if we load from file
174 if (getParam<bool>("initialize_variables_from_mesh_file"))
175 return;
176 // do not set initial conditions if we are not defining variables
178 return;
179
180 InputParameters params = getFactory().getValidParams("FunctionIC");
181 assignBlocks(params, _blocks);
182
183 // There are no default initial conditions for passive scalar variables, we however
184 // must obey the user-defined initial conditions, even if we are restarting
185 if (parameters().isParamSetByUser("initial_scalar_variables"))
186 {
187 for (unsigned int name_i = 0; name_i < _passive_scalar_names.size(); ++name_i)
188 {
189 params.set<VariableName>("variable") = _passive_scalar_names[name_i];
190 params.set<FunctionName>("function") =
191 getParam<std::vector<FunctionName>>("initial_scalar_variables")[name_i];
192
193 getProblem().addInitialCondition("FunctionIC", _passive_scalar_names[name_i] + "_ic", params);
194 }
195 }
196}
virtual void addInitialCondition(const std::string &ic_name, const std::string &name, InputParameters &parameters)
T & set(const std::string &name, bool quiet_mode=false)
const T & getParam(const std::string &name) const
bool _define_variables
Whether to define variables if they do not exist.
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
std::vector< SubdomainName > _blocks

◆ addMaterials()

void WCNSLinearFVTwoPhaseMixturePhysics::addMaterials ( )
overrideprivatevirtual

Reimplemented from PhysicsBase.

Definition at line 250 of file WCNSLinearFVTwoPhaseMixturePhysics.C.

251{
252 // Add the phase fraction variable, for output purposes mostly
253 if (!getProblem().hasFunctor(_phase_1_fraction_name, /*thread_id=*/0))
254 {
255 auto params = getFactory().getValidParams("ParsedFunctorMaterial");
256 assignBlocks(params, _blocks);
257 params.set<std::string>("expression") = "1 - " + _phase_2_fraction_name;
258 params.set<std::vector<std::string>>("functor_names") = {_phase_2_fraction_name};
259 params.set<std::string>("property_name") = _phase_1_fraction_name;
260 params.set<std::vector<std::string>>("output_properties") = {_phase_1_fraction_name};
261 params.set<std::vector<OutputName>>("outputs") = {"all"};
262 getProblem().addMaterial("ParsedFunctorMaterial", prefix() + "phase_1_fraction", params);
263
264 // One of the phase fraction should exist though (either as a variable or set by a
265 // NSLiquidFractionAux)
266 if (!getProblem().hasFunctor(_phase_2_fraction_name, /*thread_id=*/0))
267 paramError("Phase 2 fraction should be defined as a variable or auxiliary variable");
268 }
269 if (!getProblem().hasFunctor(_phase_2_fraction_name, /*thread_id=*/0))
270 {
271 auto params = getFactory().getValidParams("ParsedFunctorMaterial");
272 assignBlocks(params, _blocks);
273 params.set<std::string>("expression") = "1 - " + _phase_1_fraction_name;
274 params.set<std::vector<std::string>>("functor_names") = {_phase_1_fraction_name};
275 params.set<std::string>("property_name") = _phase_2_fraction_name;
276 params.set<std::vector<std::string>>("output_properties") = {_phase_2_fraction_name};
277 params.set<std::vector<OutputName>>("outputs") = {"all"};
278 getProblem().addMaterial("ParsedFunctorMaterial", prefix() + "phase_2_fraction", params);
279 }
280
281 // Compute mixture properties
283 {
284 auto params = getFactory().getValidParams("WCNSLinearFVMixtureFunctorMaterial");
285 assignBlocks(params, _blocks);
286 params.set<std::vector<MooseFunctorName>>("prop_names") = {
287 "rho_mixture", "mu_mixture", "cp_mixture", "k_mixture"};
288 // The phase_1 and phase_2 assignments are only local to this object.
289 // We use the phase 2 variable to save a functor evaluation as we expect
290 // the phase 2 variable to be a nonlinear variable in the phase transport equation
291 params.set<std::vector<MooseFunctorName>>("phase_2_names") = {_phase_1_density,
295 params.set<std::vector<MooseFunctorName>>("phase_1_names") = {_phase_2_density,
299 params.set<MooseFunctorName>("phase_1_fraction") = _phase_2_fraction_name;
300 if (getParam<bool>("output_all_properties"))
301 params.set<std::vector<OutputName>>("outputs") = {"all"};
302 params.set<bool>("limit_phase_fraction") = true;
304 "WCNSLinearFVMixtureFunctorMaterial", prefix() + "mixture_material", params);
305 }
306
307 // Compute slip terms as functors, used by the drift flux kernels
309 {
310 mooseAssert(_flow_equations_physics, "We must have coupled to this");
311 const std::vector<std::string> vel_components = {"u", "v", "w"};
312 const std::vector<std::string> components = {"x", "y", "z"};
313 for (const auto dim : make_range(dimension()))
314 {
315 auto params = getFactory().getValidParams("WCNSFV2PSlipVelocityFunctorMaterial");
316 assignBlocks(params, _blocks);
317 params.set<MooseFunctorName>("slip_velocity_name") = "vel_slip_" + components[dim];
318 params.set<MooseEnum>("momentum_component") = components[dim];
319 for (const auto j : make_range(dimension()))
320 params.set<std::vector<VariableName>>(vel_components[j]) = {
322 params.set<MooseFunctorName>(NS::density) = _phase_1_density;
323 params.set<MooseFunctorName>(NS::mu) = "mu_mixture";
324 params.set<MooseFunctorName>("rho_d") = _phase_2_density;
325 if (getParam<bool>("add_gravity_term_in_slip_velocity"))
326 params.set<RealVectorValue>("gravity") = _flow_equations_physics->gravityVector();
327 if (isParamValid("slip_linear_friction_name"))
328 params.set<MooseFunctorName>("linear_coef_name") =
329 getParam<MooseFunctorName>("slip_linear_friction_name");
330 else if (getParam<bool>("use_dispersed_phase_drag_model"))
331 params.set<MooseFunctorName>("linear_coef_name") = "Darcy_coefficient";
333 {
335 params.set<MooseFunctorName>("linear_coef_name") =
337 else
338 params.set<MooseFunctorName>("linear_coef_name") = "0";
339 }
340 else
341 paramError("slip_linear_friction_name",
342 "WCNSFV2PSlipVelocityFunctorMaterial created by this Physics required a scalar "
343 "field linear friction factor.");
344 params.set<MooseFunctorName>("particle_diameter") =
345 getParam<MooseFunctorName>("particle_diameter");
346 if (getParam<bool>("output_all_properties"))
347 {
348 if (!isTransient())
349 params.set<std::vector<OutputName>>("outputs") = {"all"};
350 else
351 paramInfo("output_all_properties",
352 "Slip velocity functor material output currently unsupported in Physics "
353 "in transient conditions.");
354 }
356 "WCNSFV2PSlipVelocityFunctorMaterial", prefix() + "slip_" + components[dim], params);
357 }
358 }
359
360 // Add a default drag model for a dispersed phase
361 if (getParam<bool>("use_dispersed_phase_drag_model"))
362 {
363 const std::vector<std::string> vel_components = {"u", "v", "w"};
364
365 auto params = getFactory().getValidParams("NSFVDispersePhaseDragFunctorMaterial");
366 assignBlocks(params, _blocks);
367 params.set<MooseFunctorName>("drag_coef_name") = "Darcy_coefficient";
368 for (const auto j : make_range(dimension()))
369 params.set<MooseFunctorName>(vel_components[j]) = {
371 params.set<MooseFunctorName>(NS::density) = "rho_mixture";
372 params.set<MooseFunctorName>(NS::mu) = "mu_mixture";
373 params.set<MooseFunctorName>("particle_diameter") =
374 getParam<MooseFunctorName>("particle_diameter");
375 if (getParam<bool>("output_all_properties"))
376 params.set<std::vector<OutputName>>("outputs") = {"all"};
378 "NSFVDispersePhaseDragFunctorMaterial", prefix() + "dispersed_drag", params);
379 }
380}
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters &parameters)
void paramInfo(const std::string &param, Args... args) const
unsigned int dimension() const
std::string prefix() const
bool isTransient() const
virtual MooseFunctorName getLinearFrictionCoefName() const =0
Get the name of the linear friction coefficient. Returns an empty string if no friction.
const std::vector< std::string > & getVelocityNames() const
To interface with other Physics.
RealVectorValue gravityVector() const
Return the gravity vector.
static const std::string density
Definition NS.h:34
static const std::string mu
Definition NS.h:127
IntRange< T > make_range(T beg, T end)

◆ addPhaseChangeEnergySource()

void WCNSLinearFVTwoPhaseMixturePhysics::addPhaseChangeEnergySource ( )
private

Definition at line 218 of file WCNSLinearFVTwoPhaseMixturePhysics.C.

219{
220 mooseError("Phase change energy source not implemented at this time for linear finite volume");
221}

Referenced by addFVKernels().

◆ addPhaseDriftFluxTerm()

void WCNSLinearFVTwoPhaseMixturePhysics::addPhaseDriftFluxTerm ( )
private

Definition at line 224 of file WCNSLinearFVTwoPhaseMixturePhysics.C.

225{
226 const std::vector<std::string> components = {"x", "y", "z"};
227 for (const auto dim : make_range(dimension()))
228 {
229 const auto object_type = "LinearWCNSFV2PMomentumDriftFlux";
230 auto params = getFactory().getValidParams(object_type);
231 assignBlocks(params, _blocks);
232 params.set<LinearVariableName>("variable") = _flow_equations_physics->getVelocityNames()[dim];
233 setSlipVelocityParams(params);
234 params.set<MooseFunctorName>("rho_d") = _phase_2_density;
235 params.set<MooseFunctorName>("fraction_dispersed") = _phase_2_fraction_name;
236 params.set<MooseEnum>("momentum_component") = components[dim];
237 params.set<MooseEnum>("density_interp_method") = getParam<MooseEnum>("density_interp_method");
238 params.set<UserObjectName>("rhie_chow_user_object") = _flow_equations_physics->rhieChowUOName();
239 getProblem().addLinearFVKernel(object_type, prefix() + "drift_flux_" + components[dim], params);
240 }
241}
unsigned int dim
virtual void addLinearFVKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
const UserObjectName & rhieChowUOName() const
Return the name of the Rhie Chow user object.
virtual void setSlipVelocityParams(InputParameters &params) const override
Adds the slip velocity parameters.

Referenced by addFVKernels().

◆ addPhaseInterfaceTerm()

void WCNSLinearFVTwoPhaseMixturePhysics::addPhaseInterfaceTerm ( )
private

Functions adding kernels for the other physics.

Definition at line 196 of file WCNSLinearFVTwoPhaseMixturePhysics.C.

197{
198 // Recreate the phase interface term from existing kernels
199 {
200 auto params = getFactory().getValidParams("LinearFVReaction");
201 assignBlocks(params, _blocks);
202 params.set<LinearVariableName>("variable") = _phase_2_fraction_name;
203 params.set<MooseFunctorName>("coeff") = getParam<MooseFunctorName>(NS::alpha_exchange);
205 "LinearFVReaction", prefix() + "phase_interface_reaction", params);
206 }
207 {
208 auto params = getFactory().getValidParams("LinearFVSource");
209 assignBlocks(params, _blocks);
210 params.set<LinearVariableName>("variable") = _phase_2_fraction_name;
211 params.set<MooseFunctorName>("source_density") = _phase_1_fraction_name;
212 params.set<MooseFunctorName>("scaling_factor") = getParam<MooseFunctorName>(NS::alpha_exchange);
213 getProblem().addLinearFVKernel("LinearFVSource", prefix() + "phase_interface_source", params);
214 }
215}
static const std::string alpha_exchange
Definition NS.h:155

Referenced by addFVKernels().

◆ addPorosityScaledFunctor()

MooseFunctorName NavierStokesPhysicsBase::addPorosityScaledFunctor ( const MooseFunctorName &  porosity,
const MooseFunctorName &  functor 
)
protectedinherited

Add, if absent, a non-AD functor material defining the product of a porosity and another functor on the blocks of this Physics.

Parameters
porositythe porosity functor or number
functorthe functor or number multiplied by the porosity
Returns
the name of the product functor

Definition at line 56 of file NavierStokesPhysicsBase.C.

58{
59 const MooseFunctorName product_name = prefix() + porosity + "_times_" + functor;
60 if (getProblem().hasFunctor(product_name, /*thread_id=*/0))
61 return product_name;
62
63 // Numbers go directly in the expression. Functors get symbols because their names, such as
64 // the turbulent diffusivity 'mu_t/Sc_t', need not be valid parser identifiers.
65 std::vector<std::string> functor_names;
66 std::vector<std::string> functor_symbols;
67 std::vector<std::string> factors;
68 for (const auto & name : {porosity, functor})
70 factors.push_back(name);
71 else
72 {
73 functor_names.push_back(name);
74 functor_symbols.push_back("f" + std::to_string(functor_symbols.size()));
75 factors.push_back(functor_symbols.back());
76 }
77
78 const std::string object_type = "ParsedFunctorMaterial";
79 InputParameters params = getFactory().getValidParams(object_type);
80 assignBlocks(params, _blocks);
81 params.set<std::string>("expression") = factors[0] + " * " + factors[1];
82 params.set<std::vector<std::string>>("functor_names") = functor_names;
83 params.set<std::vector<std::string>>("functor_symbols") = functor_symbols;
84 params.set<std::string>("property_name") = product_name;
85 getProblem().addMaterial(object_type, product_name + "_material", params);
86
87 return product_name;
88}
bool parsesToReal(const std::string &input, Real *parsed_real)

Referenced by WCNSLinearFVFluidHeatTransferPhysics::addEnergyHeatConductionKernels(), WCNSLinearFVFluidHeatTransferPhysics::addEnergyTimeKernels(), and WCNSLinearFVScalarTransportPhysics::fluidFractionScaled().

◆ addScalarAdvectionKernels()

void WCNSLinearFVScalarTransportPhysics::addScalarAdvectionKernels ( )
overrideprivatevirtualinherited

Implements WCNSFVScalarTransportPhysicsBase.

Definition at line 119 of file WCNSLinearFVScalarTransportPhysics.C.

120{
121 const auto method_name =
122 isParamValid("passive_scalar_advection_interpolation_method_name")
123 ? getParam<InterpolationMethodName>("passive_scalar_advection_interpolation_method_name")
124 : InterpolationMethodName(
125 std::string(getParam<MooseEnum>("passive_scalar_advection_interpolation")));
126
127 const std::string kernel_type = "LinearFVScalarAdvection";
128 InputParameters params = getFactory().getValidParams(kernel_type);
129
130 assignBlocks(params, _blocks);
131 params.set<UserObjectName>("rhie_chow_user_object") = _flow_equations_physics->rhieChowUOName();
132 params.set<InterpolationMethodName>("advected_interp_method_name") = method_name;
133 setSlipVelocityParams(params);
134
135 for (const auto & vname : _passive_scalar_names)
136 {
137 params.set<LinearVariableName>("variable") = vname;
138 getProblem().addLinearFVKernel(kernel_type, prefix() + "ins_" + vname + "_advection", params);
139 }
140}
virtual void setSlipVelocityParams(InputParameters &) const

◆ addScalarDiffusionKernels()

void WCNSLinearFVScalarTransportPhysics::addScalarDiffusionKernels ( )
overrideprivatevirtualinherited

Implements WCNSFVScalarTransportPhysicsBase.

Definition at line 143 of file WCNSLinearFVScalarTransportPhysics.C.

144{
145 // Direct specification of diffusion term
146 const auto passive_scalar_diffusivities =
147 getParam<std::vector<MooseFunctorName>>("passive_scalar_diffusivity");
148
149 if (passive_scalar_diffusivities.size())
150 {
151 const std::string kernel_type = "LinearFVDiffusion";
152 InputParameters params = getFactory().getValidParams(kernel_type);
153 assignBlocks(params, _blocks);
154 params.set<bool>("use_nonorthogonal_correction") =
155 getParam<bool>("use_nonorthogonal_correction");
156 for (const auto name_i : index_range(_passive_scalar_names))
157 {
158 params.set<LinearVariableName>("variable") = _passive_scalar_names[name_i];
159 params.set<MooseFunctorName>("diffusion_coeff") = fluidFractionScaled(
160 passive_scalar_diffusivities[name_i] + (_has_turbulence_model ? "_plus_mut/Sc_t" : ""));
162 kernel_type, prefix() + "ins_" + _passive_scalar_names[name_i] + "_diffusion", params);
163 }
164 }
165}
MooseFunctorName fluidFractionScaled(const MooseFunctorName &functor)
Return the functor scaled by the porosity for porous flow, the functor itself otherwise.
auto index_range(const T &sizable)

◆ addScalarInletBC()

void WCNSLinearFVScalarTransportPhysics::addScalarInletBC ( )
overrideprivatevirtualinherited

Functions adding boundary conditions for the incompressible simulation.

These are used for weakly-compressible simulations as well.

Implements WCNSFVScalarTransportPhysicsBase.

Definition at line 211 of file WCNSLinearFVScalarTransportPhysics.C.

212{
213 const auto & inlet_boundaries = _flow_equations_physics->getInletBoundaries();
214 if (inlet_boundaries.empty())
215 return;
216
217 // Boundary checks
218 // TODO: once we have vectors of MooseEnum, we could use the same templated check for types and
219 // functors
220 if (inlet_boundaries.size() * _passive_scalar_names.size() != _passive_scalar_inlet_types.size())
222 "passive_scalar_inlet_types",
223 "The number of scalar inlet types (" + std::to_string(_passive_scalar_inlet_types.size()) +
224 ") is not equal to the number of inlet boundaries (" +
225 std::to_string(inlet_boundaries.size()) + ") times the number of passive scalars (" +
226 std::to_string(_passive_scalar_names.size()) + ")");
228 paramError("passive_scalar_inlet_functors",
229 "The number of groups of inlet functors (" +
230 std::to_string(_passive_scalar_inlet_functors.size()) +
231 ") is not equal to the number of passive scalars (" +
232 std::to_string(_passive_scalar_names.size()) + ")");
233
234 for (const auto name_i : index_range(_passive_scalar_names))
235 {
236 if (inlet_boundaries.size() != _passive_scalar_inlet_functors[name_i].size())
237 paramError("passive_scalar_inlet_functors",
238 "The number of inlet boundary functors for scalar '" +
239 _passive_scalar_names[name_i] +
240 "' does not match the number of inlet boundaries (" +
241 std::to_string(_passive_scalar_inlet_functors[name_i].size()) + ")");
242
243 unsigned int num_inlets = inlet_boundaries.size();
244 for (unsigned int bc_ind = 0; bc_ind < num_inlets; ++bc_ind)
245 {
246 if (_passive_scalar_inlet_types[name_i * num_inlets + bc_ind] == "fixed-value")
247 {
248 const std::string bc_type = "LinearFVAdvectionDiffusionFunctorDirichletBC";
249 InputParameters params = getFactory().getValidParams(bc_type);
250 params.set<LinearVariableName>("variable") = _passive_scalar_names[name_i];
251 params.set<MooseFunctorName>("functor") = _passive_scalar_inlet_functors[name_i][bc_ind];
252 params.set<std::vector<BoundaryName>>("boundary") = {inlet_boundaries[bc_ind]};
253
255 bc_type, _passive_scalar_names[name_i] + "_" + inlet_boundaries[bc_ind], params);
256 }
257 else if (_passive_scalar_inlet_types[name_i * num_inlets + bc_ind] == "flux-mass" ||
258 _passive_scalar_inlet_types[name_i * num_inlets + bc_ind] == "flux-velocity")
259 {
260 mooseError("Flux boundary conditions not supported at this time using the linear finite "
261 "volume discretization");
262 }
263 }
264 }
265}
virtual void addLinearFVBC(const std::string &fv_bc_name, const std::string &name, InputParameters &parameters)
unsigned int size() const
const std::vector< BoundaryName > & getInletBoundaries() const
Get the inlet boundaries.
MultiMooseEnum _passive_scalar_inlet_types
Passive scalar inlet boundary types.

◆ addScalarOutletBC()

void WCNSLinearFVScalarTransportPhysics::addScalarOutletBC ( )
overrideprivatevirtualinherited

Implements WCNSFVScalarTransportPhysicsBase.

Definition at line 274 of file WCNSLinearFVScalarTransportPhysics.C.

275{
276 const auto & outlet_boundaries = _flow_equations_physics->getOutletBoundaries();
277 if (outlet_boundaries.empty())
278 return;
279
280 for (const auto & outlet_bdy : outlet_boundaries)
281 {
282 const std::string bc_type = "LinearFVAdvectionDiffusionOutflowBC";
283 InputParameters params = getFactory().getValidParams(bc_type);
284 params.set<std::vector<BoundaryName>>("boundary") = {outlet_bdy};
285 params.set<bool>("use_two_term_expansion") =
286 getParam<bool>("passive_scalar_two_term_bc_expansion");
287
288 for (const auto name_i : index_range(_passive_scalar_names))
289 {
290 params.set<LinearVariableName>("variable") = _passive_scalar_names[name_i];
291 getProblem().addLinearFVBC(bc_type, _passive_scalar_names[name_i] + "_" + outlet_bdy, params);
292 }
293 }
294}
const std::vector< BoundaryName > & getOutletBoundaries() const
Get the outlet boundaries.

◆ addScalarSourceKernels()

void WCNSLinearFVScalarTransportPhysics::addScalarSourceKernels ( )
overrideprivatevirtualinherited

Equivalent of NSFVAction addScalarCoupledSourceKernels.

Implements WCNSFVScalarTransportPhysicsBase.

Definition at line 168 of file WCNSLinearFVScalarTransportPhysics.C.

169{
170 const std::string kernel_type = "LinearFVSource";
171 InputParameters params = getFactory().getValidParams(kernel_type);
172 assignBlocks(params, _blocks);
173 const auto source_scaling = fluidFractionScaled("1");
174
175 for (const auto scalar_i : index_range(_passive_scalar_names))
176 {
177 params.set<LinearVariableName>("variable") = _passive_scalar_names[scalar_i];
178
179 if (_passive_scalar_sources.size())
180 {
181 // Added for backward compatibility with former Modules/NavierStokesFV syntax
182 params.set<MooseFunctorName>("source_density") = _passive_scalar_sources[scalar_i];
183 params.set<MooseFunctorName>("scaling_factor") = source_scaling;
185 kernel_type, prefix() + "ins_" + _passive_scalar_names[scalar_i] + "_source", params);
186 }
187
189 for (const auto i : index_range(_passive_scalar_coupled_sources[scalar_i]))
190 {
191 params.set<MooseFunctorName>("source_density") =
193 params.set<MooseFunctorName>("scaling_factor") =
197 : source_scaling;
199 params.set<std::vector<SubdomainName>>("block") =
201
202 getProblem().addLinearFVKernel(kernel_type,
203 prefix() + "ins_" + _passive_scalar_names[scalar_i] +
204 "_coupled_source_" + std::to_string(i),
205 params);
206 }
207 }
208}
std::vector< MooseFunctorName > _passive_scalar_sources
Functors for the passive scalar sources. Indexing is scalar variable index.
std::vector< std::vector< MooseFunctorName > > _passive_scalar_coupled_sources
Functors for the passive scalar (coupled) sources. Outer indexing is scalar variable index.
std::vector< std::vector< std::vector< SubdomainName > > > _passive_scalar_coupled_sources_blocks
Subdomains for the sources. Outer indexing is scalar index, intermediate is source index,...
std::vector< std::vector< Real > > _passive_scalar_coupled_sources_coef
Coefficients for multiplying for the passive scalar sources. Outer indexing is scalar variable index.
std::string stringify(const T &t)

◆ addScalarTimeKernels()

void WCNSLinearFVScalarTransportPhysics::addScalarTimeKernels ( )
overrideprivatevirtualinherited

Functions adding kernels for the incompressible / weakly-compressible scalar transport equation If the material properties are not constant, some of these can be used for weakly-compressible simulations as well.

Implements WCNSFVScalarTransportPhysicsBase.

Definition at line 102 of file WCNSLinearFVScalarTransportPhysics.C.

103{
104 std::string kernel_type = "LinearFVTimeDerivative";
105 InputParameters params = getFactory().getValidParams(kernel_type);
106 assignBlocks(params, _blocks);
108 params.set<MooseFunctorName>("factor") = fluidFractionScaled("1");
109
110 for (const auto & vname : _passive_scalar_names)
111 {
112 params.set<LinearVariableName>("variable") = vname;
113 if (shouldCreateTimeDerivative(vname, _blocks, /*error if already defined */ false))
114 getProblem().addLinearFVKernel(kernel_type, prefix() + "ins_" + vname + "_time", params);
115 }
116}
bool shouldCreateTimeDerivative(const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_already_defined) const

◆ addScalarWallBC()

virtual void WCNSLinearFVScalarTransportPhysics::addScalarWallBC ( )
inlineoverrideprivatevirtualinherited

Implements WCNSFVScalarTransportPhysicsBase.

Definition at line 50 of file WCNSLinearFVScalarTransportPhysics.h.

50{};

◆ addSolverVariables()

void WCNSLinearFVScalarTransportPhysics::addSolverVariables ( )
overrideprivatevirtualinherited

Reimplemented from PhysicsBase.

Definition at line 75 of file WCNSLinearFVScalarTransportPhysics.C.

76{
77 // For compatibility with Modules/NavierStokesFV syntax
79 return;
80
81 auto params = getFactory().getValidParams("MooseLinearVariableFVReal");
82
83 for (const auto name_i : index_range(_passive_scalar_names))
84 {
85 // Dont add if the user already defined the variable
86 if (!shouldCreateVariable(_passive_scalar_names[name_i], _blocks, /*error if aux*/ true))
87 {
88 reportPotentiallyMissedParameters({"system_names", "passive_scalar_scaling"},
89 "MooseLinearVariableFVReal");
90 continue;
91 }
92
93 if (isParamValid("passive_scalar_scaling"))
94 params.set<std::vector<Real>>("scaling") = {
95 getParam<std::vector<Real>>("passive_scalar_scaling")[name_i]};
96
97 addSharedSolverVariable("MooseLinearVariableFVReal", _passive_scalar_names[name_i], params);
98 }
99}
void reportPotentiallyMissedParameters(const std::vector< std::string > &param_names, const std::string &object_type, const std::string &object_name="") const
void addSharedSolverVariable(const std::string &var_type, const VariableName &var_name, InputParameters params)
bool shouldCreateVariable(const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_aux)

◆ checkIntegrity()

void WCNSLinearFVTwoPhaseMixturePhysics::checkIntegrity ( ) const
overrideprivatevirtual

Reimplemented from PhysicsBase.

Definition at line 144 of file WCNSLinearFVTwoPhaseMixturePhysics.C.

145{
147 mooseError("Expected a flow physics");
148
149 // Check the mesh for unsupported sknewness + buoyancy
150 if (_flow_equations_physics->gravityVector().norm() > 0)
151 {
152 const auto tol = 1e-2;
153 if (_problem->mesh().allFaceInfo().empty())
154 _problem->mesh().setupFiniteVolumeMeshData();
155 for (const auto & fi : _problem->mesh().allFaceInfo())
156 {
157 if (fi.skewnessCorrectionVector().norm() > tol * fi.dCNMag())
158 mooseError("Face with centroid ",
159 fi.faceCentroid(),
160 " requires skewness correction. We currently do not support mixture flow with "
161 "buoyancy and mesh skewness. Please contact a MOOSE or Navier Stokes module "
162 "developer if you require this.");
163 }
164 }
165}
const double tol
std::shared_ptr< FEProblemBase > & _problem
MeshBase & mesh

◆ densityName()

const MooseFunctorName & WCNSFVCoupledAdvectionPhysicsHelper::densityName ( ) const
inlineinherited

◆ dynamicViscosityName()

const MooseFunctorName & WCNSFVCoupledAdvectionPhysicsHelper::dynamicViscosityName ( ) const
inlineinherited

Definition at line 37 of file WCNSFVCoupledAdvectionPhysicsHelper.h.

const MooseFunctorName _dynamic_viscosity_name
Name of the dynamic viscosity material property.

◆ fluidFractionScaled()

MooseFunctorName WCNSLinearFVScalarTransportPhysics::fluidFractionScaled ( const MooseFunctorName &  functor)
protectedinherited

Return the functor scaled by the porosity for porous flow, the functor itself otherwise.

Parameters
functorfunctor or number to scale

Definition at line 55 of file WCNSLinearFVScalarTransportPhysics.C.

56{
57 // The scalars are concentrations per unit fluid volume, so storage, diffusion and sources act on
58 // the fluid fraction of the volume. Advection uses the superficial face flux unscaled.
61 _flow_equations_physics->getPorosityFunctorName(/*smoothed=*/false), functor)
62 : functor;
63}
MooseFunctorName addPorosityScaledFunctor(const MooseFunctorName &porosity, const MooseFunctorName &functor)
Add, if absent, a non-AD functor material defining the product of a porosity and another functor on t...
MooseFunctorName getPorosityFunctorName(const bool smoothed) const

Referenced by WCNSLinearFVScalarTransportPhysics::addScalarDiffusionKernels(), WCNSLinearFVScalarTransportPhysics::addScalarSourceKernels(), and WCNSLinearFVScalarTransportPhysics::addScalarTimeKernels().

◆ getAdditionalRMParams()

InputParameters NavierStokesPhysicsBase::getAdditionalRMParams ( ) const
overrideprotectedvirtualinherited

Parameters to change or add relationship managers.

Reimplemented from PhysicsBase.

Definition at line 91 of file NavierStokesPhysicsBase.C.

92{
93 unsigned short necessary_layers = getParam<unsigned short>("ghost_layers");
94 necessary_layers = std::max(necessary_layers, getNumberAlgebraicGhostingLayersNeeded());
95
96 // Just an object that has a ghost_layers parameter
97 const std::string kernel_type = "INSFVMixingLengthReynoldsStress";
98 InputParameters params = getFactory().getValidParams(kernel_type);
99 params.template set<unsigned short>("ghost_layers") = necessary_layers;
100
101 return params;
102}
virtual unsigned short getNumberAlgebraicGhostingLayersNeeded() const =0
Return the number of ghosting layers needed.

◆ getAdvectedScalarNames()

const std::vector< NonlinearVariableName > & WCNSFVScalarTransportPhysicsBase::getAdvectedScalarNames ( ) const
inlineinherited

Get the names of the advected scalar quantity variables.

Definition at line 34 of file WCNSFVScalarTransportPhysicsBase.h.

35 {
37 }

Referenced by WCNSFVTurbulencePhysics::addScalarAdvectionTurbulenceKernels().

◆ getCoupledFlowPhysics()

const WCNSFVFlowPhysicsBase * WCNSFVCoupledAdvectionPhysicsHelper::getCoupledFlowPhysics ( ) const
inherited

Definition at line 53 of file WCNSFVCoupledAdvectionPhysicsHelper.C.

54{
55 // User passed it, just use that
56 if (_advection_physics->isParamValid("coupled_flow_physics"))
58 _advection_physics->getParam<PhysicsName>("coupled_flow_physics"));
59 // Look for any physics of the right type, and check the block restriction
60 else
61 {
62 const auto all_flow_physics =
64 for (const auto physics : all_flow_physics)
65 if (_advection_physics->checkBlockRestrictionIdentical(
66 physics->name(), physics->blocks(), /*error_if_not_identical=*/false))
67 {
68 return physics;
69 }
70 }
71 mooseError("No coupled flow Physics found of type derived from 'WCNSFVFlowPhysicsBase'. Use the "
72 "'coupled_flow_physics' parameter to give the name of the desired "
73 "WCNSFVFlowPhysicsBase-derived Physics to couple with");
74}
void mooseError(Args &&... args)
char ** blocks
const std::string name
Definition Setup.h:21
const T * getCoupledPhysics(const PhysicsName &phys_name, const bool allow_fail=false) const
const NavierStokesPhysicsBase * _advection_physics
The Physics class using this helper.
Base class for Physics which create the Navier Stokes flow equations.
if(subdm)

◆ getCoupledTurbulencePhysics()

const WCNSFVTurbulencePhysicsBase * WCNSFVCoupledAdvectionPhysicsHelper::getCoupledTurbulencePhysics ( ) const
inherited

Definition at line 77 of file WCNSFVCoupledAdvectionPhysicsHelper.C.

78{
79 // User passed it, just use that
80 if (_advection_physics->isParamValid("coupled_turbulence_physics"))
82 _advection_physics->getParam<PhysicsName>("coupled_turbulence_physics"));
83 // Look for any physics of the right type, and check the block restriction
84 else
85 {
86 const auto all_turbulence_physics =
88 for (const auto physics : all_turbulence_physics)
89 if (_advection_physics->checkBlockRestrictionIdentical(
90 physics->name(), physics->blocks(), /*error_if_not_identical=*/false))
91 return physics;
92 }
93 // Did not find one
94 return nullptr;
95}
Base class for a Physics that creates all the objects needed to add a turbulence model to an incompre...

Referenced by WCNSFVFluidHeatTransferPhysicsBase::actOnAdditionalTasks(), and WCNSFVScalarTransportPhysicsBase::actOnAdditionalTasks().

◆ getNumberAlgebraicGhostingLayersNeeded()

unsigned short WCNSLinearFVScalarTransportPhysics::getNumberAlgebraicGhostingLayersNeeded ( ) const
overrideprivatevirtualinherited

Return the number of ghosting layers needed.

Reimplemented from WCNSFVScalarTransportPhysicsBase.

Definition at line 268 of file WCNSLinearFVScalarTransportPhysics.C.

269{
270 return 1;
271}

◆ getPorosityFunctorName()

MooseFunctorName WCNSFVCoupledAdvectionPhysicsHelper::getPorosityFunctorName ( bool  smoothed) const
inherited

Return the porosity functor name.

It is important to forward to the Physics so we do not get the smoothing status wrong

Definition at line 47 of file WCNSFVCoupledAdvectionPhysicsHelper.C.

48{
50}

◆ hasScalarEquations()

bool WCNSFVScalarTransportPhysicsBase::hasScalarEquations ( ) const
inlineinherited

Whether the physics is actually creating the scalar advection equations.

Definition at line 40 of file WCNSFVScalarTransportPhysicsBase.h.

40{ return _has_scalar_equation; }

Referenced by WCNSFVTurbulencePhysicsBase::retrieveCoupledPhysics().

◆ setSlipVelocityParams()

void WCNSLinearFVTwoPhaseMixturePhysics::setSlipVelocityParams ( InputParameters &  params) const
overrideprivatevirtual

Adds the slip velocity parameters.

Reimplemented from WCNSFVScalarTransportPhysicsBase.

Definition at line 186 of file WCNSLinearFVTwoPhaseMixturePhysics.C.

187{
188 params.set<MooseFunctorName>("u_slip") = "vel_slip_x";
189 if (dimension() >= 2)
190 params.set<MooseFunctorName>("v_slip") = "vel_slip_y";
191 if (dimension() >= 3)
192 params.set<MooseFunctorName>("w_slip") = "vel_slip_z";
193}

Referenced by addPhaseDriftFluxTerm().

◆ 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 WCNSLinearFVTwoPhaseMixturePhysics::validParams ( )
static

Definition at line 25 of file WCNSLinearFVTwoPhaseMixturePhysics.C.

26{
27 // The parameters are mostly the same being the linear and nonlinear version
30 // The flow physics is obtained from the scalar transport base class
31 // The fluid heat transfer physics is retrieved even if unspecified
32 params.addParam<PhysicsName>(
33 "fluid_heat_transfer_physics",
34 "NavierStokesFV",
35 "WCNSLinearFVFluidHeatTransferPhysics generating the fluid energy equation");
37 params.addParamNamesToGroup("fluid_heat_transfer_physics", "Phase change");
38 params.addClassDescription("Define the additional terms for a mixture model for the two phase "
39 "weakly-compressible Navier Stokes equations using the linearized "
40 "segregated finite volume discretization");
41
42 // This is added to match a nonlinear test result. If the underlying issue is fixed, remove it
43 params.addParam<bool>("add_gravity_term_in_slip_velocity",
44 true,
45 "Whether to add the gravity term in the slip velocity vector computation");
46 return params;
47}
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
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 commonMixtureParams()
static void renamePassiveScalarToMixtureParams(InputParameters &params)

Member Data Documentation

◆ _add_phase_equation

const bool WCNSLinearFVTwoPhaseMixturePhysics::_add_phase_equation
private

Convenience boolean to keep track of whether the phase transport equation is requested.

Definition at line 48 of file WCNSLinearFVTwoPhaseMixturePhysics.h.

Referenced by addFVKernels(), and addMaterials().

◆ _advection_physics

const NavierStokesPhysicsBase* WCNSFVCoupledAdvectionPhysicsHelper::_advection_physics
protectedinherited

◆ _compressibility

const MooseEnum WCNSFVCoupledAdvectionPhysicsHelper::_compressibility
protectedinherited

Compressibility type, can be compressible, incompressible or weakly-compressible.

Definition at line 51 of file WCNSFVCoupledAdvectionPhysicsHelper.h.

Referenced by WCNSFVFluidHeatTransferPhysics::addEnergyTimeKernels().

◆ _define_variables

bool NavierStokesPhysicsBase::_define_variables
protectedinherited

◆ _density_name

const MooseFunctorName WCNSFVCoupledAdvectionPhysicsHelper::_density_name
protectedinherited

◆ _dynamic_viscosity_name

const MooseFunctorName WCNSFVCoupledAdvectionPhysicsHelper::_dynamic_viscosity_name
protectedinherited

◆ _flow_equations_physics

const WCNSFVFlowPhysicsBase* WCNSFVCoupledAdvectionPhysicsHelper::_flow_equations_physics
protectedinherited

Flow physics.

Definition at line 43 of file WCNSFVCoupledAdvectionPhysicsHelper.h.

Referenced by WCNSFVTwoPhaseMixturePhysics::addAdvectionSlipTerm(), WCNSFVTurbulencePhysicsBase::addAuxiliaryKernels(), WCNSFVTurbulencePhysics::addAxisymmetricTurbulentViscousSource(), WCNSFVFluidHeatTransferPhysics::addEnergyAdvectionKernels(), WCNSLinearFVFluidHeatTransferPhysics::addEnergyAdvectionKernels(), WCNSFVFluidHeatTransferPhysics::addEnergyHeatConductionKernels(), WCNSLinearFVFluidHeatTransferPhysics::addEnergyHeatConductionKernels(), WCNSFVFluidHeatTransferPhysics::addEnergyInletBC(), WCNSLinearFVFluidHeatTransferPhysics::addEnergyInletBC(), WCNSLinearFVFluidHeatTransferPhysics::addEnergyOutletBC(), WCNSFVFluidHeatTransferPhysics::addEnergySeparatorBC(), WCNSFVFluidHeatTransferPhysics::addEnergyTimeKernels(), WCNSLinearFVFluidHeatTransferPhysics::addEnergyTimeKernels(), WCNSFVFluidHeatTransferPhysics::addEnergyWallBC(), WCNSLinearFVFluidHeatTransferPhysics::addEnergyWallBC(), WCNSFVTurbulencePhysics::addFlowTurbulenceKernels(), WCNSFVTurbulencePhysics::addFluidEnergyTurbulenceKernels(), WCNSFVTwoPhaseMixturePhysics::addFunctorMaterials(), WCNSLinearFVTurbulencePhysics::addFunctorMaterials(), WCNSFVTurbulencePhysics::addFVBCs(), WCNSLinearFVTurbulencePhysics::addFVBCs(), WCNSFVTwoPhaseMixturePhysics::addFVKernels(), addFVKernels(), WCNSFVFluidHeatTransferPhysicsBase::addInitialConditions(), WCNSFVTurbulencePhysicsBase::addInitialConditions(), WCNSFVTurbulencePhysics::addKEpsilonAdvection(), WCNSLinearFVTurbulencePhysics::addKEpsilonAdvection(), WCNSFVTurbulencePhysics::addKEpsilonDiffusion(), WCNSFVTurbulencePhysics::addKEpsilonSink(), WCNSLinearFVTurbulencePhysics::addKEpsilonSink(), WCNSLinearFVTurbulencePhysics::addKEpsilonTimeDerivatives(), WCNSFVFluidHeatTransferPhysics::addMaterials(), WCNSFVTurbulencePhysicsBase::addMaterials(), WCNSLinearFVFluidHeatTransferPhysics::addMaterials(), addMaterials(), WCNSFVTwoPhaseMixturePhysics::addPhaseDriftFluxTerm(), addPhaseDriftFluxTerm(), WCNSFVScalarTransportPhysics::addScalarAdvectionKernels(), WCNSLinearFVScalarTransportPhysics::addScalarAdvectionKernels(), WCNSFVScalarTransportPhysics::addScalarInletBC(), WCNSLinearFVScalarTransportPhysics::addScalarInletBC(), WCNSLinearFVScalarTransportPhysics::addScalarOutletBC(), WCNSLinearFVTurbulencePhysics::checkIntegrity(), checkIntegrity(), WCNSLinearFVScalarTransportPhysics::fluidFractionScaled(), WCNSFVFluidHeatTransferPhysicsBase::getNumberAlgebraicGhostingLayersNeeded(), WCNSFVScalarTransportPhysicsBase::getNumberAlgebraicGhostingLayersNeeded(), WCNSFVTurbulencePhysics::getNumberAlgebraicGhostingLayersNeeded(), WCNSLinearFVTurbulencePhysics::getNumberAlgebraicGhostingLayersNeeded(), WCNSFVCoupledAdvectionPhysicsHelper::getPorosityFunctorName(), WCNSFVTurbulencePhysicsBase::retrieveCoupledPhysics(), WCNSFVFluidHeatTransferPhysicsBase::WCNSFVFluidHeatTransferPhysicsBase(), WCNSFVTwoPhaseMixturePhysics::WCNSFVTwoPhaseMixturePhysics(), WCNSLinearFVTurbulencePhysics::WCNSLinearFVTurbulencePhysics(), and WCNSLinearFVTwoPhaseMixturePhysics().

◆ _fluid_energy_physics

const WCNSLinearFVFluidHeatTransferPhysics* WCNSLinearFVTwoPhaseMixturePhysics::_fluid_energy_physics
private

Fluid heat transfer physics.

Definition at line 45 of file WCNSLinearFVTwoPhaseMixturePhysics.h.

Referenced by addFVKernels(), and WCNSLinearFVTwoPhaseMixturePhysics().

◆ _has_energy_equation

bool WCNSLinearFVTwoPhaseMixturePhysics::_has_energy_equation
private

Convenience boolean to keep track of whether the fluid energy equation is present.

Definition at line 50 of file WCNSLinearFVTwoPhaseMixturePhysics.h.

Referenced by WCNSLinearFVTwoPhaseMixturePhysics().

◆ _has_scalar_equation

const bool WCNSFVScalarTransportPhysicsBase::_has_scalar_equation
protectedinherited

◆ _has_turbulence_model

bool WCNSFVCoupledAdvectionPhysicsHelper::_has_turbulence_model
protectedinherited

◆ _passive_scalar_coupled_sources

std::vector<std::vector<MooseFunctorName> > WCNSFVScalarTransportPhysicsBase::_passive_scalar_coupled_sources
protectedinherited

Functors for the passive scalar (coupled) sources. Outer indexing is scalar variable index.

Definition at line 62 of file WCNSFVScalarTransportPhysicsBase.h.

Referenced by WCNSFVScalarTransportPhysicsBase::addFVKernels(), WCNSFVScalarTransportPhysics::addScalarSourceKernels(), and WCNSLinearFVScalarTransportPhysics::addScalarSourceKernels().

◆ _passive_scalar_coupled_sources_blocks

std::vector<std::vector<std::vector<SubdomainName> > > WCNSFVScalarTransportPhysicsBase::_passive_scalar_coupled_sources_blocks
protectedinherited

Subdomains for the sources. Outer indexing is scalar index, intermediate is source index, inner is subdomains.

Definition at line 66 of file WCNSFVScalarTransportPhysicsBase.h.

Referenced by WCNSFVScalarTransportPhysics::addScalarSourceKernels(), WCNSLinearFVScalarTransportPhysics::addScalarSourceKernels(), and WCNSFVScalarTransportPhysicsBase::WCNSFVScalarTransportPhysicsBase().

◆ _passive_scalar_coupled_sources_coef

std::vector<std::vector<Real> > WCNSFVScalarTransportPhysicsBase::_passive_scalar_coupled_sources_coef
protectedinherited

Coefficients for multiplying for the passive scalar sources. Outer indexing is scalar variable index.

Definition at line 64 of file WCNSFVScalarTransportPhysicsBase.h.

Referenced by WCNSFVScalarTransportPhysics::addScalarSourceKernels(), WCNSLinearFVScalarTransportPhysics::addScalarSourceKernels(), and WCNSFVScalarTransportPhysicsBase::WCNSFVScalarTransportPhysicsBase().

◆ _passive_scalar_inlet_functors

std::vector<std::vector<MooseFunctorName> > WCNSFVScalarTransportPhysicsBase::_passive_scalar_inlet_functors
protectedinherited

◆ _passive_scalar_inlet_types

MultiMooseEnum WCNSFVScalarTransportPhysicsBase::_passive_scalar_inlet_types
protectedinherited

◆ _passive_scalar_names

std::vector<NonlinearVariableName> WCNSFVScalarTransportPhysicsBase::_passive_scalar_names
protectedinherited

◆ _passive_scalar_sources

std::vector<MooseFunctorName> WCNSFVScalarTransportPhysicsBase::_passive_scalar_sources
protectedinherited

◆ _phase_1_density

const MooseFunctorName WCNSLinearFVTwoPhaseMixturePhysics::_phase_1_density
private

Name of the density of the first phase.

Definition at line 58 of file WCNSLinearFVTwoPhaseMixturePhysics.h.

Referenced by addMaterials().

◆ _phase_1_fraction_name

const MooseFunctorName WCNSLinearFVTwoPhaseMixturePhysics::_phase_1_fraction_name
private

Name of the first phase fraction (usually, liquid)

Definition at line 53 of file WCNSLinearFVTwoPhaseMixturePhysics.h.

Referenced by addMaterials(), addPhaseInterfaceTerm(), and WCNSLinearFVTwoPhaseMixturePhysics().

◆ _phase_1_specific_heat

const MooseFunctorName WCNSLinearFVTwoPhaseMixturePhysics::_phase_1_specific_heat
private

Name of the specific heat of the first phase.

Definition at line 62 of file WCNSLinearFVTwoPhaseMixturePhysics.h.

Referenced by addMaterials().

◆ _phase_1_thermal_conductivity

const MooseFunctorName WCNSLinearFVTwoPhaseMixturePhysics::_phase_1_thermal_conductivity
private

Name of the thermal conductivity of the first phase.

Definition at line 64 of file WCNSLinearFVTwoPhaseMixturePhysics.h.

Referenced by addMaterials().

◆ _phase_1_viscosity

const MooseFunctorName WCNSLinearFVTwoPhaseMixturePhysics::_phase_1_viscosity
private

Name of the dynamic viscosity of the first phase.

Definition at line 60 of file WCNSLinearFVTwoPhaseMixturePhysics.h.

Referenced by addMaterials().

◆ _phase_2_density

const MooseFunctorName WCNSLinearFVTwoPhaseMixturePhysics::_phase_2_density
private

Name of the density of the other phase.

Definition at line 67 of file WCNSLinearFVTwoPhaseMixturePhysics.h.

Referenced by addMaterials(), and addPhaseDriftFluxTerm().

◆ _phase_2_fraction_name

const MooseFunctorName WCNSLinearFVTwoPhaseMixturePhysics::_phase_2_fraction_name
private

Name of the second phase fraction (usually, dispersed or advected by the liquid)

Definition at line 55 of file WCNSLinearFVTwoPhaseMixturePhysics.h.

Referenced by addMaterials(), addPhaseDriftFluxTerm(), addPhaseInterfaceTerm(), and WCNSLinearFVTwoPhaseMixturePhysics().

◆ _phase_2_specific_heat

const MooseFunctorName WCNSLinearFVTwoPhaseMixturePhysics::_phase_2_specific_heat
private

Name of the specific heat of the other phase.

Definition at line 71 of file WCNSLinearFVTwoPhaseMixturePhysics.h.

Referenced by addMaterials().

◆ _phase_2_thermal_conductivity

const MooseFunctorName WCNSLinearFVTwoPhaseMixturePhysics::_phase_2_thermal_conductivity
private

Name of the thermal conductivity of the other phase.

Definition at line 73 of file WCNSLinearFVTwoPhaseMixturePhysics.h.

Referenced by addMaterials().

◆ _phase_2_viscosity

const MooseFunctorName WCNSLinearFVTwoPhaseMixturePhysics::_phase_2_viscosity
private

Name of the dynamic viscosity of the other phase.

Definition at line 69 of file WCNSLinearFVTwoPhaseMixturePhysics.h.

Referenced by addMaterials().

◆ _porous_medium_treatment

const bool WCNSFVCoupledAdvectionPhysicsHelper::_porous_medium_treatment
protectedinherited

◆ _pressure_name

const NonlinearVariableName WCNSFVCoupledAdvectionPhysicsHelper::_pressure_name
protectedinherited

Pressure name.

Definition at line 59 of file WCNSFVCoupledAdvectionPhysicsHelper.h.

◆ _turbulence_physics

const WCNSFVTurbulencePhysicsBase* WCNSFVCoupledAdvectionPhysicsHelper::_turbulence_physics
protectedinherited

◆ _use_advection_slip

const bool WCNSLinearFVTwoPhaseMixturePhysics::_use_advection_slip
private

Whether to add the advection slip term to each component of the momentum equation.

Definition at line 81 of file WCNSLinearFVTwoPhaseMixturePhysics.h.

Referenced by addFVKernels(), addMaterials(), and WCNSLinearFVTwoPhaseMixturePhysics().

◆ _use_drift_flux

const bool WCNSLinearFVTwoPhaseMixturePhysics::_use_drift_flux
private

Whether to add the drift flux momentum terms to each component momentum equation.

Definition at line 79 of file WCNSLinearFVTwoPhaseMixturePhysics.h.

Referenced by addFVKernels(), addMaterials(), and WCNSLinearFVTwoPhaseMixturePhysics().

◆ _use_external_mixture_properties

const bool WCNSLinearFVTwoPhaseMixturePhysics::_use_external_mixture_properties
private

Whether to define the mixture model internally or use fluid properties instead.

Definition at line 76 of file WCNSLinearFVTwoPhaseMixturePhysics.h.

Referenced by addMaterials().

◆ _velocity_interpolation

const MooseEnum WCNSFVCoupledAdvectionPhysicsHelper::_velocity_interpolation
protectedinherited

The velocity / momentum face interpolation method for advecting other quantities.

Definition at line 67 of file WCNSFVCoupledAdvectionPhysicsHelper.h.

Referenced by WCNSFVFluidHeatTransferPhysics::addEnergyAdvectionKernels(), WCNSFVTurbulencePhysics::addKEpsilonAdvection(), and WCNSFVScalarTransportPhysics::addScalarAdvectionKernels().

◆ _velocity_names

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

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