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

Creates all the objects needed to add a turbulence model to an incompressible / weakly-compressible Navier Stokes finite volume flow simulation. More...

#include <WCNSFVTurbulencePhysics.h>

Inheritance diagram for WCNSFVTurbulencePhysics:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 

Public Member Functions

 WCNSFVTurbulencePhysics (const InputParameters &parameters)
 
bool hasTurbulenceModel () const
 Whether a turbulence model is in use. More...
 
std::vector< BoundaryName > turbulenceWalls () const
 The names of the boundaries with turbulence wall functions. More...
 
MooseEnum turbulenceEpsilonWallTreatment () const
 The turbulence epsilon wall treatment (same for all turbulence walls currently) More...
 
MooseEnum turbulenceTemperatureWallTreatment () const
 The turbulence temperature wall treatment (same for all turbulence walls currently) More...
 
MooseFunctorName tkeName () const
 The name of the turbulent kinetic energy variable. More...
 
virtual void act () override final
 
void addBlocks (const std::vector< SubdomainName > &blocks)
 
void addBlocksById (const std::vector< SubdomainID > &block_ids)
 
const std::vector< SubdomainName > & blocks () const
 
bool checkBlockRestrictionIdentical (const std::string &object_name, const std::vector< SubdomainName > &blocks, const bool error_if_not_identical=true) const
 
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 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
 
virtual const std::string & name () const
 
std::string typeAndName () const
 
std::string errorPrefix (const std::string &error_type) const
 
void callMooseError (std::string msg, const bool with_prefix) const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
const InputParametersparameters () const
 
MooseObjectName uniqueName () 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
 
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &nm) const
 
void paramError (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
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void mooseError (Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseInfo (Args &&... args) 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
 
const WCNSFVFlowPhysicsBasegetCoupledFlowPhysics () const
 
const WCNSFVTurbulencePhysicsgetCoupledTurbulencePhysics () const
 
MooseFunctorName getPorosityFunctorName (bool smoothed) const
 Return the porosity functor name. More...
 
const MooseFunctorName & densityName () const
 
const MooseFunctorName & dynamicViscosityName () const
 

Static Public Member Functions

static InputParameters validParams ()
 

Public Attributes

const ConsoleStream _console
 

Static Public Attributes

static constexpr auto SYSTEM
 
static constexpr auto NAME
 

Protected Member Functions

unsigned short getNumberAlgebraicGhostingLayersNeeded () const override
 Return the number of ghosting layers needed. More...
 
bool usingNavierStokesFVSyntax () const
 Detects if we are using the new Physics syntax or the old NavierStokesFV action. More...
 
InputParameters getAdditionalRMParams () const override
 Parameters to change or add relationship managers. More...
 
void assertParamDefined (const std::string &param) const
 
bool isTransient () const
 
FactorygetFactory ()
 
FactorygetFactory () const
 
virtual FEProblemBasegetProblem ()
 
virtual const FEProblemBasegetProblem () const
 
void prepareCopyVariablesFromMesh () const
 
void copyVariablesFromMesh (const std::vector< VariableName > &variables_to_copy, bool are_nonlinear=true)
 
std::string prefix () const
 
void saveSolverVariableName (const VariableName &var_name)
 
void saveAuxVariableName (const VariableName &var_name)
 
bool variableExists (const VariableName &var_name, bool error_if_aux) const
 
bool solverVariableExists (const VariableName &var_name) const
 
const SolverSystemName & getSolverSystem (unsigned int variable_index) const
 
const SolverSystemName & getSolverSystem (const VariableName &variable_name) const
 
void addRequiredPhysicsTask (const std::string &task)
 
void assignBlocks (InputParameters &params, const std::vector< SubdomainName > &blocks) const
 
bool allMeshBlocks (const std::vector< SubdomainName > &blocks) const
 
bool allMeshBlocks (const std::set< SubdomainName > &blocks) const
 
std::set< SubdomainIDgetSubdomainIDs (const std::set< SubdomainName > &blocks) const
 
std::vector< std::string > getSubdomainNamesAndIDs (const std::set< SubdomainID > &blocks) const
 
void addPetscPairsToPetscOptions (const std::vector< std::pair< MooseEnumItem, std::string >> &petsc_pair_options)
 
bool isVariableFV (const VariableName &var_name) const
 
bool isVariableScalar (const VariableName &var_name) const
 
bool shouldCreateVariable (const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_aux)
 
bool shouldCreateIC (const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool ic_is_default_ic, const bool error_if_already_defined) const
 
bool shouldCreateTimeDerivative (const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_already_defined) const
 
void reportPotentiallyMissedParameters (const std::vector< std::string > &param_names, const std::string &object_type) const
 
bool addRelationshipManagers (Moose::RelationshipManagerType when_type, const InputParameters &moose_object_pars)
 
void associateWithParameter (const std::string &param_name, InputParameters &params) const
 
void associateWithParameter (const InputParameters &from_params, const std::string &param_name, InputParameters &params) const
 
const 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 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

bool _define_variables
 Whether to define variables if they do not exist. More...
 
std::vector< SolverSystemName > _system_names
 
std::vector< unsigned int_system_numbers
 
const bool _verbose
 
const MooseEnum_preconditioning
 
std::vector< SubdomainName > _blocks
 
std::string _registered_identifier
 
std::string _specific_task_name
 
std::set< std::string > _all_tasks
 
ActionWarehouse_awh
 
const std::string & _current_task
 
std::shared_ptr< MooseMesh > & _mesh
 
std::shared_ptr< MooseMesh > & _displaced_mesh
 
std::shared_ptr< FEProblemBase > & _problem
 
PerfID _act_timer
 
MooseApp_app
 
const std::string _type
 
const std::string _name
 
const InputParameters_pars
 
Factory_factory
 
ActionFactory_action_factory
 
MooseApp_pg_moose_app
 
const std::string _prefix
 
const Parallel::Communicator & _communicator
 
const NavierStokesPhysicsBase_advection_physics
 The Physics class using this helper. More...
 
const WCNSFVFlowPhysicsBase_flow_equations_physics
 Flow physics. More...
 
const WCNSFVTurbulencePhysics_turbulence_physics
 Turbulence. More...
 
const MooseEnum _compressibility
 Compressibility type, can be compressible, incompressible or weakly-compressible. More...
 
const bool _porous_medium_treatment
 Switch to show if porous medium treatment is requested or not. More...
 
const std::vector< std::string > _velocity_names
 Velocity names. More...
 
const NonlinearVariableName _pressure_name
 Pressure name. More...
 
const MooseFunctorName _density_name
 Name of the density material property. More...
 
const MooseFunctorName _dynamic_viscosity_name
 Name of the dynamic viscosity material property. More...
 
const MooseEnum _velocity_interpolation
 The velocity / momentum face interpolation method for advecting other quantities. More...
 

Private Member Functions

virtual void initializePhysicsAdditional () override
 
virtual void actOnAdditionalTasks () override
 
void retrieveCoupledPhysics ()
 Retrieve the other WCNSFVPhysics at play in the simulation to be able to add the relevant terms (turbulent diffusion notably) More...
 
virtual void addSolverVariables () override
 
virtual void addAuxiliaryVariables () override
 
virtual void addFVKernels () override
 
virtual void addFVBCs () override
 
virtual void addInitialConditions () override
 
virtual void addAuxiliaryKernels () override
 
virtual void addMaterials () override
 
void addFlowTurbulenceKernels ()
 Functions adding kernels for turbulence in the other equation(s) More...
 
void addFluidEnergyTurbulenceKernels ()
 
void addScalarAdvectionTurbulenceKernels ()
 
void addKEpsilonTimeDerivatives ()
 Functions adding kernels for the k-epsilon to the k-epsilon equations. More...
 
void addKEpsilonAdvection ()
 
void addKEpsilonDiffusion ()
 
void addKEpsilonSink ()
 

Private Attributes

const MooseEnum _turbulence_model
 Turbulence model to create the equation(s) for. More...
 
bool _has_flow_equations
 
bool _has_energy_equation
 
bool _has_scalar_equations
 
const WCNSFVFluidHeatTransferPhysics_fluid_energy_physics
 The heat advection physics to add turbulent mixing for. More...
 
const WCNSFVScalarTransportPhysics_scalar_transport_physics
 The scalar advection physics to add turbulent mixing for. More...
 
const VariableName _mixing_length_name
 Name of the mixing length auxiliary variable. More...
 
std::vector< BoundaryName > _turbulence_walls
 List of boundaries to act as walls for turbulence models. More...
 
MooseEnum _wall_treatment_eps
 Turbulence wall treatment for epsilon (same for all walls currently) More...
 
MooseEnum _wall_treatment_temp
 Turbulence wall treatment for temperature (same for all walls currently) More...
 
const VariableName _tke_name
 Name of the turbulent kinetic energy. More...
 
const VariableName _tked_name
 Name of the turbulent kinetic energy dissipation. More...
 
const VariableName _turbulent_viscosity_name = NS::mu_t
 Name of the turbulence viscosity auxiliary variable (or property) More...
 

Detailed Description

Creates all the objects needed to add a turbulence model to an incompressible / weakly-compressible Navier Stokes finite volume flow simulation.

Definition at line 23 of file WCNSFVTurbulencePhysics.h.

Constructor & Destructor Documentation

◆ WCNSFVTurbulencePhysics()

WCNSFVTurbulencePhysics::WCNSFVTurbulencePhysics ( const InputParameters parameters)

Definition at line 187 of file WCNSFVTurbulencePhysics.C.

190  _turbulence_model(getParam<MooseEnum>("turbulence_handling")),
191  _mixing_length_name(getParam<AuxVariableName>("mixing_length_name")),
192  _turbulence_walls(getParam<std::vector<BoundaryName>>("turbulence_walls")),
193  _wall_treatment_eps(getParam<MooseEnum>("wall_treatment_eps")),
194  _wall_treatment_temp(getParam<MooseEnum>("wall_treatment_T")),
195  _tke_name(getParam<MooseFunctorName>("tke_name")),
196  _tked_name(getParam<MooseFunctorName>("tked_name"))
197 {
198  if (_verbose && _turbulence_model != "none")
199  _console << "Creating a " << std::string(_turbulence_model) << " turbulence model."
200  << std::endl;
201 
202  // Keep track of the variable names, for loading variables from files notably
203  if (_turbulence_model == "mixing-length")
205  else if (_turbulence_model == "k-epsilon")
206  {
209  if (getParam<bool>("mu_t_as_aux_variable"))
211  if (getParam<bool>("k_t_as_aux_variable"))
213  }
214 
215  // Parameter checks
216  if (_turbulence_model == "none")
217  errorInconsistentDependentParameter("turbulence_handling", "none", {"turbulence_walls"});
218  if (_turbulence_model != "mixing-length")
219  errorDependentParameter("turbulence_handling",
220  "mixing-length",
221  {"mixing_length_delta",
222  "mixing_length_aux_execute_on",
223  "von_karman_const",
224  "von_karman_const_0",
225  "mixing_length_two_term_bc_expansion"});
226  if (_turbulence_model != "k-epsilon")
227  {
228  errorDependentParameter("turbulence_handling",
229  "k-epsilon",
230  {"C_mu",
231  "C1_eps",
232  "C2_eps",
233  "bulk_wall_treatment",
234  "tke_scaling",
235  "tke_face_interpolation",
236  "tke_two_term_bc_expansion",
237  "tked_scaling",
238  "tked_face_interpolation",
239  "tked_two_term_bc_expansion",
240  "turbulent_viscosity_two_term_bc_expansion"});
241  checkSecondParamSetOnlyIfFirstOneTrue("mu_t_as_aux_variable", "initial_mu_t");
242  }
243 }
const VariableName _tke_name
Name of the turbulent kinetic energy.
WCNSFVCoupledAdvectionPhysicsHelper(const NavierStokesPhysicsBase *derived_physics)
const bool _verbose
MooseEnum _wall_treatment_eps
Turbulence wall treatment for epsilon (same for all walls currently)
void errorDependentParameter(const std::string &param1, const std::string &value_not_set, const std::vector< std::string > &dependent_params) const
void saveAuxVariableName(const VariableName &var_name)
const T & getParam(const std::string &name) const
NavierStokesPhysicsBase(const InputParameters &parameters)
const MooseEnum _turbulence_model
Turbulence model to create the equation(s) for.
const VariableName _tked_name
Name of the turbulent kinetic energy dissipation.
void errorInconsistentDependentParameter(const std::string &param1, const std::string &value_set, const std::vector< std::string > &dependent_params) const
const VariableName _mixing_length_name
Name of the mixing length auxiliary variable.
const VariableName _turbulent_viscosity_name
Name of the turbulence viscosity auxiliary variable (or property)
MooseEnum _wall_treatment_temp
Turbulence wall treatment for temperature (same for all walls currently)
const InputParameters & parameters() const
const ConsoleStream _console
void checkSecondParamSetOnlyIfFirstOneTrue(const std::string &param1, const std::string &param2) const
static const std::string k_t
Definition: NS.h:132
std::vector< BoundaryName > _turbulence_walls
List of boundaries to act as walls for turbulence models.
void saveSolverVariableName(const VariableName &var_name)

Member Function Documentation

◆ actOnAdditionalTasks()

void WCNSFVTurbulencePhysics::actOnAdditionalTasks ( )
overrideprivatevirtual

Reimplemented from PhysicsBase.

Definition at line 253 of file WCNSFVTurbulencePhysics.C.

254 {
255  // Other Physics may not exist or be initialized at construction time, so
256  // we retrieve them now, on this task which occurs after 'init_physics'
257  if (_current_task == "get_turbulence_physics")
259 }
void retrieveCoupledPhysics()
Retrieve the other WCNSFVPhysics at play in the simulation to be able to add the relevant terms (turb...
const std::string & _current_task

◆ addAuxiliaryKernels()

void WCNSFVTurbulencePhysics::addAuxiliaryKernels ( )
overrideprivatevirtual

Reimplemented from PhysicsBase.

Definition at line 730 of file WCNSFVTurbulencePhysics.C.

731 {
732  // Note that if we are restarting this will overwrite the restarted mixing-length
733  if (_turbulence_model == "mixing-length")
734  {
735  const std::string ml_kernel_type = "WallDistanceMixingLengthAux";
736  InputParameters ml_params = getFactory().getValidParams(ml_kernel_type);
737  assignBlocks(ml_params, _blocks);
738  ml_params.set<AuxVariableName>("variable") = _mixing_length_name;
739  ml_params.set<std::vector<BoundaryName>>("walls") = _turbulence_walls;
740  if (parameters().isParamValid("mixing_length_aux_execute_on"))
741  ml_params.set<ExecFlagEnum>("execute_on") =
742  getParam<ExecFlagEnum>("mixing_length_aux_execute_on");
743  else
744  ml_params.set<ExecFlagEnum>("execute_on") = {EXEC_INITIAL, EXEC_TIMESTEP_END};
745  ml_params.set<MooseFunctorName>("von_karman_const") =
746  getParam<MooseFunctorName>("von_karman_const");
747  ml_params.set<MooseFunctorName>("von_karman_const_0") =
748  getParam<MooseFunctorName>("von_karman_const_0");
749  ml_params.set<MooseFunctorName>("delta") = getParam<MooseFunctorName>("mixing_length_delta");
750 
751  getProblem().addAuxKernel(ml_kernel_type, prefix() + "mixing_length_aux ", ml_params);
752  }
753 
754  if (_turbulence_model == "k-epsilon" && getParam<bool>("mu_t_as_aux_variable"))
755  {
756  const std::string u_names[3] = {"u", "v", "w"};
757  const std::string mut_kernel_type = "kEpsilonViscosityAux";
758  InputParameters params = getFactory().getValidParams(mut_kernel_type);
759  assignBlocks(params, _blocks);
760  params.set<AuxVariableName>("variable") = _turbulent_viscosity_name;
761  for (const auto d : make_range(dimension()))
762  params.set<MooseFunctorName>(u_names[d]) = _velocity_names[d];
763  params.set<MooseFunctorName>(NS::TKE) = _tke_name;
764  params.set<MooseFunctorName>(NS::TKED) = _tked_name;
765  params.set<MooseFunctorName>(NS::density) = _flow_equations_physics->densityName();
766  params.set<MooseFunctorName>(NS::mu) = _flow_equations_physics->dynamicViscosityName();
767  params.set<Real>("C_mu") = getParam<Real>("C_mu");
768  params.set<MooseEnum>("wall_treatment") = _wall_treatment_eps;
769  params.set<bool>("bulk_wall_treatment") = getParam<bool>("bulk_wall_treatment");
770  params.set<std::vector<BoundaryName>>("walls") = _turbulence_walls;
771  params.set<ExecFlagEnum>("execute_on") = {EXEC_NONLINEAR};
772  params.set<bool>("newton_solve") = true;
773  getProblem().addAuxKernel(mut_kernel_type, prefix() + "mixing_length_aux ", params);
774  }
775  if (_turbulence_model == "k-epsilon" && getParam<bool>("k_t_as_aux_variable") &&
777  {
778  const std::string kt_kernel_type = "TurbulentConductivityAux";
779  InputParameters params = getFactory().getValidParams(kt_kernel_type);
780  assignBlocks(params, _blocks);
781  params.set<AuxVariableName>("variable") = NS::k_t;
782  params.set<MooseFunctorName>(NS::cp) = _fluid_energy_physics->getSpecificHeatName();
783  params.set<MooseFunctorName>(NS::mu_t) = _turbulent_viscosity_name;
784  params.set<MooseFunctorName>(NS::turbulent_Prandtl) = getParam<MooseFunctorName>("Pr_t");
785  params.set<ExecFlagEnum>("execute_on") = {EXEC_INITIAL, EXEC_NONLINEAR};
786  getProblem().addAuxKernel(kt_kernel_type, prefix() + "turbulent_conductivity_aux ", params);
787  }
788 }
std::string prefix() const
static const std::string mu_t
Definition: NS.h:125
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
const MooseFunctorName & dynamicViscosityName() const
Return the name of the dynamic viscosity functor.
static const std::string turbulent_Prandtl
Definition: NS.h:138
Factory & getFactory()
const VariableName _tke_name
Name of the turbulent kinetic energy.
T & set(const std::string &name, bool quiet_mode=false)
static const std::string density
Definition: NS.h:33
InputParameters getValidParams(const std::string &name) const
static const std::string TKE
Definition: NS.h:176
const WCNSFVFluidHeatTransferPhysics * _fluid_energy_physics
The heat advection physics to add turbulent mixing for.
const ExecFlagType EXEC_TIMESTEP_END
virtual void addAuxKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
std::vector< SubdomainName > _blocks
unsigned int dimension() const
MooseEnum _wall_treatment_eps
Turbulence wall treatment for epsilon (same for all walls currently)
const MooseFunctorName & densityName() const
Return the name of the density functor.
virtual FEProblemBase & getProblem()
static const std::string cp
Definition: NS.h:121
const MooseFunctorName & getSpecificHeatName() const
Get the name of the specific heat material property.
static const std::string mu
Definition: NS.h:123
const MooseEnum _turbulence_model
Turbulence model to create the equation(s) for.
const VariableName _tked_name
Name of the turbulent kinetic energy dissipation.
const std::vector< std::string > _velocity_names
Velocity names.
const ExecFlagType EXEC_NONLINEAR
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableName _mixing_length_name
Name of the mixing length auxiliary variable.
const VariableName _turbulent_viscosity_name
Name of the turbulence viscosity auxiliary variable (or property)
IntRange< T > make_range(T beg, T end)
static const std::string TKED
Definition: NS.h:177
const InputParameters & parameters() const
static const std::string k_t
Definition: NS.h:132
std::vector< BoundaryName > _turbulence_walls
List of boundaries to act as walls for turbulence models.
const WCNSFVFlowPhysicsBase * _flow_equations_physics
Flow physics.
bool isParamValid(const std::string &name) const
const ExecFlagType EXEC_INITIAL

◆ addAuxiliaryVariables()

void WCNSFVTurbulencePhysics::addAuxiliaryVariables ( )
overrideprivatevirtual

Reimplemented from PhysicsBase.

Definition at line 385 of file WCNSFVTurbulencePhysics.C.

386 {
387  if (_turbulence_model == "mixing-length" && _define_variables)
388  {
389  auto params = getFactory().getValidParams("MooseVariableFVReal");
390  assignBlocks(params, _blocks);
391  if (isParamValid("mixing_length_two_term_bc_expansion"))
392  params.set<bool>("two_term_boundary_expansion") =
393  getParam<bool>("mixing_length_two_term_bc_expansion");
394  if (!shouldCreateVariable(_tke_name, _blocks, /*error if aux*/ false))
395  reportPotentiallyMissedParameters({"mixing_length_two_term_bc_expansion"},
396  "MooseVariableFVReal");
397  else
398  getProblem().addAuxVariable("MooseVariableFVReal", _mixing_length_name, params);
399  }
400  if (_turbulence_model == "k-epsilon" && getParam<bool>("mu_t_as_aux_variable"))
401  {
402  auto params = getFactory().getValidParams("MooseVariableFVReal");
403  assignBlocks(params, _blocks);
404  if (isParamValid("turbulent_viscosity_two_term_bc_expansion"))
405  params.set<bool>("two_term_boundary_expansion") =
406  getParam<bool>("turbulent_viscosity_two_term_bc_expansion");
407  if (!shouldCreateVariable(_turbulent_viscosity_name, _blocks, /*error if aux*/ false))
408  reportPotentiallyMissedParameters({"turbulent_viscosity_two_term_bc_expansion"},
409  "MooseVariableFVReal");
410  else
411  getProblem().addAuxVariable("MooseVariableFVReal", _turbulent_viscosity_name, params);
412  }
413  if (_turbulence_model == "k-epsilon" && getParam<bool>("k_t_as_aux_variable"))
414  {
415  auto params = getFactory().getValidParams("MooseVariableFVReal");
416  assignBlocks(params, _blocks);
417  if (shouldCreateVariable(NS::k_t, _blocks, /*error if aux*/ false))
418  getProblem().addAuxVariable("MooseVariableFVReal", NS::k_t, params);
419  }
420 }
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
bool shouldCreateVariable(const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_aux)
Factory & getFactory()
const VariableName _tke_name
Name of the turbulent kinetic energy.
InputParameters getValidParams(const std::string &name) const
virtual void addAuxVariable(const std::string &var_type, const std::string &var_name, InputParameters &params)
std::vector< SubdomainName > _blocks
bool isParamValid(const std::string &name) const
virtual FEProblemBase & getProblem()
const MooseEnum _turbulence_model
Turbulence model to create the equation(s) for.
bool _define_variables
Whether to define variables if they do not exist.
const VariableName _mixing_length_name
Name of the mixing length auxiliary variable.
const VariableName _turbulent_viscosity_name
Name of the turbulence viscosity auxiliary variable (or property)
void reportPotentiallyMissedParameters(const std::vector< std::string > &param_names, const std::string &object_type) const
static const std::string k_t
Definition: NS.h:132

◆ addFlowTurbulenceKernels()

void WCNSFVTurbulencePhysics::addFlowTurbulenceKernels ( )
private

Functions adding kernels for turbulence in the other equation(s)

Definition at line 448 of file WCNSFVTurbulencePhysics.C.

Referenced by addFVKernels().

449 {
450  if (_turbulence_model == "mixing-length")
451  {
452  const std::string u_names[3] = {"u", "v", "w"};
453  const std::string kernel_type = "INSFVMixingLengthReynoldsStress";
454  InputParameters params = getFactory().getValidParams(kernel_type);
455  assignBlocks(params, _blocks);
456  params.set<MooseFunctorName>(NS::density) = _density_name;
457  params.set<MooseFunctorName>(NS::mixing_length) = _mixing_length_name;
458 
459  std::string kernel_name = prefix() + "ins_momentum_mixing_length_reynolds_stress_";
461  kernel_name = prefix() + "pins_momentum_mixing_length_reynolds_stress_";
462 
463  params.set<UserObjectName>("rhie_chow_user_object") = _flow_equations_physics->rhieChowUOName();
464  for (const auto dim_i : make_range(dimension()))
465  params.set<MooseFunctorName>(u_names[dim_i]) = _velocity_names[dim_i];
466 
467  for (const auto d : make_range(dimension()))
468  {
469  params.set<NonlinearVariableName>("variable") = _velocity_names[d];
470  params.set<MooseEnum>("momentum_component") = NS::directions[d];
471 
472  getProblem().addFVKernel(kernel_type, kernel_name + NS::directions[d], params);
473  }
474  }
475  else if (_turbulence_model == "k-epsilon")
476  {
477  // We rely on using the turbulent viscosity in the flow equation
478  // This check is rudimentary, we should think of a better way
479  // We could also check for the use of 'mu_t' with the right parameters already
482  mooseError(
483  "Regular fluid viscosity 'mu' should be used for the momentum diffusion term. You are "
484  "currently using: " +
486 
487  const std::string u_names[3] = {"u", "v", "w"};
488  const std::string kernel_type = "INSFVMomentumDiffusion";
489  InputParameters params = getFactory().getValidParams(kernel_type);
490  assignBlocks(params, _blocks);
491  params.set<MooseFunctorName>("mu") = _turbulent_viscosity_name;
492  params.set<MooseEnum>("mu_interp_method") =
493  getParam<MooseEnum>("turbulent_viscosity_interp_method");
494  params.set<MooseEnum>("variable_interp_method") =
496  params.set<bool>("complete_expansion") = true;
497 
498  std::string kernel_name = prefix() + "ins_momentum_k_epsilon_reynolds_stress_";
500  kernel_name = prefix() + "pins_momentum_k_epsilon_reynolds_stress_";
501 
502  params.set<UserObjectName>("rhie_chow_user_object") = _flow_equations_physics->rhieChowUOName();
503  for (const auto dim_i : make_range(dimension()))
504  params.set<MooseFunctorName>(u_names[dim_i]) = _velocity_names[dim_i];
505 
506  for (const auto d : make_range(dimension()))
507  {
508  params.set<NonlinearVariableName>("variable") = _velocity_names[d];
509  params.set<MooseEnum>("momentum_component") = NS::directions[d];
510 
511  getProblem().addFVKernel(kernel_type, kernel_name + NS::directions[d], params);
512  }
513  }
514 }
std::string prefix() const
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
const MooseFunctorName & dynamicViscosityName() const
Return the name of the dynamic viscosity functor.
const MooseFunctorName _density_name
Name of the density material property.
Factory & getFactory()
static const std::string mixing_length
Definition: NS.h:74
T & set(const std::string &name, bool quiet_mode=false)
static const std::string density
Definition: NS.h:33
InputParameters getValidParams(const std::string &name) const
bool isFloat(const std::string &str)
std::vector< SubdomainName > _blocks
unsigned int dimension() const
static const std::string directions[3]
Definition: NS.h:22
virtual FEProblemBase & getProblem()
virtual UserObjectName rhieChowUOName() const =0
Return the name of the Rhie Chow user object.
const bool _porous_medium_treatment
Switch to show if porous medium treatment is requested or not.
const MooseEnum & getMomentumFaceInterpolationMethod() const
Get the face interpolation method for momentum (mostly used in the stress terms)
const MooseEnum _turbulence_model
Turbulence model to create the equation(s) for.
const std::vector< std::string > _velocity_names
Velocity names.
const VariableName _mixing_length_name
Name of the mixing length auxiliary variable.
const VariableName _turbulent_viscosity_name
Name of the turbulence viscosity auxiliary variable (or property)
IntRange< T > make_range(T beg, T end)
void mooseError(Args &&... args) const
virtual void addFVKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
const WCNSFVFlowPhysicsBase * _flow_equations_physics
Flow physics.

◆ addFluidEnergyTurbulenceKernels()

void WCNSFVTurbulencePhysics::addFluidEnergyTurbulenceKernels ( )
private

Definition at line 517 of file WCNSFVTurbulencePhysics.C.

Referenced by addFVKernels().

518 {
519  if (_turbulence_model == "mixing-length")
520  {
521  const std::string u_names[3] = {"u", "v", "w"};
522  const std::string kernel_type = "WCNSFVMixingLengthEnergyDiffusion";
523  InputParameters params = getFactory().getValidParams(kernel_type);
524  assignBlocks(params, _blocks);
525  params.set<MooseFunctorName>(NS::density) = _density_name;
526  params.set<MooseFunctorName>(NS::cp) = _fluid_energy_physics->getSpecificHeatName();
527  params.set<MooseFunctorName>(NS::mixing_length) = _mixing_length_name;
528  params.set<Real>("schmidt_number") = getParam<Real>("turbulent_prandtl");
529  params.set<NonlinearVariableName>("variable") =
531 
532  for (const auto dim_i : make_range(dimension()))
533  params.set<MooseFunctorName>(u_names[dim_i]) = _velocity_names[dim_i];
534 
537  kernel_type, prefix() + "pins_energy_mixing_length_diffusion", params);
538  else
540  kernel_type, prefix() + "ins_energy_mixing_length_diffusion", params);
541  }
542  else if (_turbulence_model == "k-epsilon")
543  {
544  const std::string kernel_type = "FVDiffusion";
545  const auto T_fluid_name = _flow_equations_physics->getFluidTemperatureName();
546  InputParameters params = getFactory().getValidParams(kernel_type);
547  assignBlocks(params, _blocks);
548  params.set<NonlinearVariableName>("variable") = T_fluid_name;
549  params.set<MooseFunctorName>("coeff") = NS::k_t;
550  getProblem().addFVKernel(kernel_type, prefix() + T_fluid_name + "_turbulent_diffusion", params);
551  }
552 }
std::string prefix() const
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
const MooseFunctorName _density_name
Name of the density material property.
Factory & getFactory()
static const std::string mixing_length
Definition: NS.h:74
T & set(const std::string &name, bool quiet_mode=false)
static const std::string density
Definition: NS.h:33
InputParameters getValidParams(const std::string &name) const
const WCNSFVFluidHeatTransferPhysics * _fluid_energy_physics
The heat advection physics to add turbulent mixing for.
std::vector< SubdomainName > _blocks
unsigned int dimension() const
virtual FEProblemBase & getProblem()
static const std::string cp
Definition: NS.h:121
const MooseFunctorName & getSpecificHeatName() const
Get the name of the specific heat material property.
const NonlinearVariableName & getFluidTemperatureName() const
const bool _porous_medium_treatment
Switch to show if porous medium treatment is requested or not.
const MooseEnum _turbulence_model
Turbulence model to create the equation(s) for.
const std::vector< std::string > _velocity_names
Velocity names.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableName _mixing_length_name
Name of the mixing length auxiliary variable.
IntRange< T > make_range(T beg, T end)
static const std::string k_t
Definition: NS.h:132
virtual void addFVKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
const WCNSFVFlowPhysicsBase * _flow_equations_physics
Flow physics.

◆ addFVBCs()

void WCNSFVTurbulencePhysics::addFVBCs ( )
overrideprivatevirtual

Reimplemented from PhysicsBase.

Definition at line 791 of file WCNSFVTurbulencePhysics.C.

792 {
793  const std::string u_names[3] = {"u", "v", "w"};
794 
795  if (_turbulence_model == "k-epsilon" && getParam<bool>("mu_t_as_aux_variable"))
796  {
797  mooseAssert(_flow_equations_physics, "Should have a flow equation physics");
798  const std::string bc_type = "INSFVTurbulentViscosityWallFunction";
799  InputParameters params = getFactory().getValidParams(bc_type);
800  params.set<std::vector<BoundaryName>>("boundary") = _turbulence_walls;
801  params.set<NonlinearVariableName>("variable") = _turbulent_viscosity_name;
802  params.set<MooseFunctorName>(NS::density) = _flow_equations_physics->densityName();
803  params.set<MooseFunctorName>(NS::mu) = _flow_equations_physics->dynamicViscosityName();
804  params.set<MooseFunctorName>(NS::mu_t) = _turbulent_viscosity_name;
805  params.set<MooseFunctorName>(NS::TKE) = _tke_name;
806  params.set<MooseEnum>("wall_treatment") = _wall_treatment_eps;
807  for (const auto d : make_range(dimension()))
808  params.set<MooseFunctorName>(u_names[d]) = _velocity_names[d];
809 
810  getProblem().addFVBC(bc_type, prefix() + "turbulence_walls", params);
811  // Energy wall function boundary conditions are added in the WCNSFVFluidEnergyPhysics
812  // because it facilitates counting the number of walls, specifying energy wall functors
813  // the same way as for boundary conditions
814  }
815 }
std::string prefix() const
static const std::string mu_t
Definition: NS.h:125
const MooseFunctorName & dynamicViscosityName() const
Return the name of the dynamic viscosity functor.
Factory & getFactory()
const VariableName _tke_name
Name of the turbulent kinetic energy.
T & set(const std::string &name, bool quiet_mode=false)
static const std::string density
Definition: NS.h:33
InputParameters getValidParams(const std::string &name) const
static const std::string TKE
Definition: NS.h:176
unsigned int dimension() const
MooseEnum _wall_treatment_eps
Turbulence wall treatment for epsilon (same for all walls currently)
const MooseFunctorName & densityName() const
Return the name of the density functor.
virtual FEProblemBase & getProblem()
static const std::string mu
Definition: NS.h:123
const MooseEnum _turbulence_model
Turbulence model to create the equation(s) for.
const std::vector< std::string > _velocity_names
Velocity names.
const VariableName _turbulent_viscosity_name
Name of the turbulence viscosity auxiliary variable (or property)
IntRange< T > make_range(T beg, T end)
std::vector< BoundaryName > _turbulence_walls
List of boundaries to act as walls for turbulence models.
virtual void addFVBC(const std::string &fv_bc_name, const std::string &name, InputParameters &parameters)
const WCNSFVFlowPhysicsBase * _flow_equations_physics
Flow physics.

◆ addFVKernels()

void WCNSFVTurbulencePhysics::addFVKernels ( )
overrideprivatevirtual

Reimplemented from PhysicsBase.

Definition at line 423 of file WCNSFVTurbulencePhysics.C.

424 {
425  if (_turbulence_model == "none")
426  return;
427 
428  // Turbulence terms in other equations
435 
436  // Turbulence models with their own set of equations
437  if (_turbulence_model == "k-epsilon")
438  {
439  if (isTransient())
443  addKEpsilonSink();
444  }
445 }
void addFlowTurbulenceKernels()
Functions adding kernels for turbulence in the other equation(s)
void addKEpsilonTimeDerivatives()
Functions adding kernels for the k-epsilon to the k-epsilon equations.
const MooseEnum _turbulence_model
Turbulence model to create the equation(s) for.
bool isTransient() const

◆ addInitialConditions()

void WCNSFVTurbulencePhysics::addInitialConditions ( )
overrideprivatevirtual

Reimplemented from PhysicsBase.

Definition at line 818 of file WCNSFVTurbulencePhysics.C.

819 {
820  if (_turbulence_model == "mixing-length" || _turbulence_model == "none")
821  return;
822  const std::string ic_type = "FunctionIC";
823  InputParameters params = getFactory().getValidParams(ic_type);
824 
825  // Parameter checking: error if initial conditions are provided but not going to be used
826  if ((getParam<bool>("initialize_variables_from_mesh_file") || !_define_variables) &&
827  ((getParam<bool>("mu_t_as_aux_variable") && isParamValid("initial_mu_t")) ||
828  isParamSetByUser("initial_tke") || isParamSetByUser("initial_tked")))
829  mooseError("inital_mu_t/tke/tked should not be provided if we are restarting from a mesh file "
830  "or not defining variables in the Physics");
831 
832  // do not set initial conditions if we are not defining variables
833  if (!_define_variables)
834  return;
835  // on regular restarts (from checkpoint), we obey the user specification of initial conditions
836 
837  if (getParam<bool>("mu_t_as_aux_variable"))
838  {
839  const auto rho_name = _flow_equations_physics->densityName();
840  // If the user provided an initial value, we use that
841  if (isParamValid("initial_mu_t"))
842  params.set<FunctionName>("function") = getParam<FunctionName>("initial_mu_t");
843  // If we can compute the initialization value from the user parameters, we do that
844  else if (MooseUtils::isFloat(rho_name) &&
845  MooseUtils::isFloat(getParam<FunctionName>("initial_tke")) &&
846  MooseUtils::isFloat(getParam<FunctionName>("initial_tked")))
847  params.set<FunctionName>("function") =
848  std::to_string(std::atof(rho_name.c_str()) * getParam<Real>("C_mu") *
849  std::pow(std::atof(getParam<FunctionName>("initial_tke").c_str()), 2) /
850  std::atof(getParam<FunctionName>("initial_tked").c_str()));
851  else
852  paramError("initial_mu_t",
853  "Initial turbulent viscosity should be provided. A sensible value is "
854  "rho * C_mu TKE_initial^2 / TKED_initial");
855 
856  params.set<VariableName>("variable") = _turbulent_viscosity_name;
857  // Always obey the user specification of an initial condition
859  _blocks,
860  /*whether IC is a default*/ !isParamSetByUser("initial_mu_t"),
861  /*error if already an IC*/ isParamSetByUser("initial_mu_t")))
862  getProblem().addInitialCondition(ic_type, prefix() + "initial_mu_turb", params);
863  }
864  else if (isParamSetByUser("initial_mu_t"))
865  paramError("initial_mu_t",
866  "This parameter can only be specified if 'mu_t_as_aux_variable=true'");
867 
868  params.set<VariableName>("variable") = _tke_name;
869  params.set<FunctionName>("function") = getParam<FunctionName>("initial_tke");
871  _blocks,
872  /*whether IC is a default*/ !isParamSetByUser("initial_tke"),
873  /*error if already an IC*/ isParamSetByUser("initial_tke")))
874  getProblem().addInitialCondition(ic_type, prefix() + "initial_tke", params);
875  params.set<VariableName>("variable") = _tked_name;
876  params.set<FunctionName>("function") = getParam<FunctionName>("initial_tked");
878  _blocks,
879  /*whether IC is a default*/ !isParamSetByUser("initial_tked"),
880  /*error if already an IC*/ isParamSetByUser("initial_tked")))
881  getProblem().addInitialCondition(ic_type, prefix() + "initial_tked", params);
882 }
std::string prefix() const
Factory & getFactory()
const VariableName _tke_name
Name of the turbulent kinetic energy.
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
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 isFloat(const std::string &str)
std::vector< SubdomainName > _blocks
const MooseFunctorName & densityName() const
Return the name of the density functor.
bool isParamValid(const std::string &name) const
virtual void addInitialCondition(const std::string &ic_name, const std::string &name, InputParameters &parameters)
virtual FEProblemBase & getProblem()
void paramError(const std::string &param, Args... args) const
const MooseEnum _turbulence_model
Turbulence model to create the equation(s) for.
const VariableName _tked_name
Name of the turbulent kinetic energy dissipation.
bool _define_variables
Whether to define variables if they do not exist.
bool isParamSetByUser(const std::string &nm) const
const VariableName _turbulent_viscosity_name
Name of the turbulence viscosity auxiliary variable (or property)
void mooseError(Args &&... args) const
MooseUnits pow(const MooseUnits &, int)
const WCNSFVFlowPhysicsBase * _flow_equations_physics
Flow physics.

◆ addKEpsilonAdvection()

void WCNSFVTurbulencePhysics::addKEpsilonAdvection ( )
private

Definition at line 622 of file WCNSFVTurbulencePhysics.C.

Referenced by addFVKernels().

623 {
624  const std::string kernel_type = "INSFVTurbulentAdvection";
625  InputParameters params = getFactory().getValidParams(kernel_type);
626 
627  assignBlocks(params, _blocks);
628 
629  params.set<MooseEnum>("velocity_interp_method") = _velocity_interpolation;
630  params.set<UserObjectName>("rhie_chow_user_object") = _flow_equations_physics->rhieChowUOName();
631  params.set<MooseFunctorName>(NS::density) = _flow_equations_physics->densityName();
632  params.set<bool>("neglect_advection_derivatives") =
633  getParam<bool>("neglect_advection_derivatives");
634 
635  params.set<MooseEnum>("advected_interp_method") =
636  getParam<MooseEnum>("tke_advection_interpolation");
637  params.set<NonlinearVariableName>("variable") = _tke_name;
638  getProblem().addFVKernel(kernel_type, prefix() + "tke_advection", params);
639  params.set<NonlinearVariableName>("variable") = _tked_name;
640  params.set<std::vector<BoundaryName>>("walls") = _turbulence_walls;
641  params.set<MooseEnum>("advected_interp_method") =
642  getParam<MooseEnum>("tked_advection_interpolation");
643  getProblem().addFVKernel(kernel_type, prefix() + "tked_advection", params);
644 }
std::string prefix() const
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
Factory & getFactory()
const VariableName _tke_name
Name of the turbulent kinetic energy.
T & set(const std::string &name, bool quiet_mode=false)
static const std::string density
Definition: NS.h:33
InputParameters getValidParams(const std::string &name) const
std::vector< SubdomainName > _blocks
const MooseFunctorName & densityName() const
Return the name of the density functor.
virtual FEProblemBase & getProblem()
virtual UserObjectName rhieChowUOName() const =0
Return the name of the Rhie Chow user object.
const VariableName _tked_name
Name of the turbulent kinetic energy dissipation.
std::vector< BoundaryName > _turbulence_walls
List of boundaries to act as walls for turbulence models.
virtual void addFVKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
const WCNSFVFlowPhysicsBase * _flow_equations_physics
Flow physics.
const MooseEnum _velocity_interpolation
The velocity / momentum face interpolation method for advecting other quantities. ...

◆ addKEpsilonDiffusion()

void WCNSFVTurbulencePhysics::addKEpsilonDiffusion ( )
private

Definition at line 647 of file WCNSFVTurbulencePhysics.C.

Referenced by addFVKernels().

648 {
649  {
650  const std::string kernel_type = "INSFVTurbulentDiffusion";
651  InputParameters params = getFactory().getValidParams(kernel_type);
652  assignBlocks(params, _blocks);
653 
654  params.set<NonlinearVariableName>("variable") = _tke_name;
655  params.set<MooseFunctorName>("coeff") = _flow_equations_physics->dynamicViscosityName();
656  getProblem().addFVKernel(kernel_type, prefix() + "tke_diffusion_mu", params);
657 
658  params.set<std::vector<BoundaryName>>("walls") = _turbulence_walls;
659  params.set<NonlinearVariableName>("variable") = _tked_name;
660  getProblem().addFVKernel(kernel_type, prefix() + "tked_diffusion_mu", params);
661  }
662 
663  {
664  const std::string kernel_type = "INSFVTurbulentDiffusion";
665  InputParameters params = getFactory().getValidParams(kernel_type);
666  assignBlocks(params, _blocks);
667 
668  params.set<NonlinearVariableName>("variable") = _tke_name;
669  params.set<MooseFunctorName>("coeff") = _turbulent_viscosity_name;
670  params.set<MooseFunctorName>("scaling_coef") = getParam<MooseFunctorName>("sigma_k");
671  params.set<MooseEnum>("coeff_interp_method") =
672  getParam<MooseEnum>("turbulent_viscosity_interp_method");
673  getProblem().addFVKernel(kernel_type, prefix() + "tke_diffusion_mu_turb", params);
674 
675  params.set<std::vector<BoundaryName>>("walls") = _turbulence_walls;
676  params.set<NonlinearVariableName>("variable") = _tked_name;
677  params.set<MooseFunctorName>("scaling_coef") = getParam<MooseFunctorName>("sigma_eps");
678  getProblem().addFVKernel(kernel_type, prefix() + "tked_diffusion_mu_turb", params);
679  }
680 }
std::string prefix() const
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
const MooseFunctorName & dynamicViscosityName() const
Return the name of the dynamic viscosity functor.
Factory & getFactory()
const VariableName _tke_name
Name of the turbulent kinetic energy.
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
std::vector< SubdomainName > _blocks
virtual FEProblemBase & getProblem()
const VariableName _tked_name
Name of the turbulent kinetic energy dissipation.
const VariableName _turbulent_viscosity_name
Name of the turbulence viscosity auxiliary variable (or property)
std::vector< BoundaryName > _turbulence_walls
List of boundaries to act as walls for turbulence models.
virtual void addFVKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
const WCNSFVFlowPhysicsBase * _flow_equations_physics
Flow physics.

◆ addKEpsilonSink()

void WCNSFVTurbulencePhysics::addKEpsilonSink ( )
private

Definition at line 683 of file WCNSFVTurbulencePhysics.C.

Referenced by addFVKernels().

684 {
685  const std::string u_names[3] = {"u", "v", "w"};
686  {
687  const std::string kernel_type = "INSFVTKESourceSink";
688  InputParameters params = getFactory().getValidParams(kernel_type);
689  assignBlocks(params, _blocks);
690  params.set<NonlinearVariableName>("variable") = _tke_name;
691  params.set<MooseFunctorName>(NS::TKED) = _tked_name;
692  params.set<MooseFunctorName>(NS::density) = _flow_equations_physics->densityName();
693  params.set<MooseFunctorName>(NS::mu) = _flow_equations_physics->dynamicViscosityName();
694  params.set<MooseFunctorName>(NS::mu_t) = _turbulent_viscosity_name;
695  params.set<Real>("C_pl") = getParam<Real>("C_pl");
696  params.set<bool>("linearized_model") = getParam<bool>("linearize_sink_sources");
697  params.set<std::vector<BoundaryName>>("walls") = _turbulence_walls;
698  params.set<MooseEnum>("wall_treatment") = _wall_treatment_eps;
699  // Currently only Newton method for WCNSFVTurbulencePhysics
700  params.set<bool>("newton_solve") = true;
701  for (const auto d : make_range(dimension()))
702  params.set<MooseFunctorName>(u_names[d]) = _velocity_names[d];
703  getProblem().addFVKernel(kernel_type, prefix() + "tke_source_sink", params);
704  }
705 
706  {
707  const std::string kernel_type = "INSFVTKEDSourceSink";
708  InputParameters params = getFactory().getValidParams(kernel_type);
709  assignBlocks(params, _blocks);
710  params.set<NonlinearVariableName>("variable") = _tked_name;
711  params.set<MooseFunctorName>(NS::TKE) = _tke_name;
712  params.set<MooseFunctorName>(NS::density) = _flow_equations_physics->densityName();
713  params.set<MooseFunctorName>(NS::mu) = _flow_equations_physics->dynamicViscosityName();
714  params.set<MooseFunctorName>(NS::mu_t) = _turbulent_viscosity_name;
715  params.set<Real>("C_pl") = getParam<Real>("C_pl");
716  params.set<bool>("linearized_model") = getParam<bool>("linearize_sink_sources");
717  params.set<std::vector<BoundaryName>>("walls") = _turbulence_walls;
718  params.set<MooseEnum>("wall_treatment") = _wall_treatment_eps;
719  params.set<Real>("C1_eps") = getParam<Real>("C1_eps");
720  params.set<Real>("C2_eps") = getParam<Real>("C2_eps");
721  // Currently only Newton method for WCNSFVTurbulencePhysics
722  params.set<bool>("newton_solve") = true;
723  for (const auto d : make_range(dimension()))
724  params.set<MooseFunctorName>(u_names[d]) = _velocity_names[d];
725  getProblem().addFVKernel(kernel_type, prefix() + "tked_source_sink", params);
726  }
727 }
std::string prefix() const
static const std::string mu_t
Definition: NS.h:125
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
const MooseFunctorName & dynamicViscosityName() const
Return the name of the dynamic viscosity functor.
Factory & getFactory()
const VariableName _tke_name
Name of the turbulent kinetic energy.
T & set(const std::string &name, bool quiet_mode=false)
static const std::string density
Definition: NS.h:33
InputParameters getValidParams(const std::string &name) const
static const std::string TKE
Definition: NS.h:176
std::vector< SubdomainName > _blocks
unsigned int dimension() const
MooseEnum _wall_treatment_eps
Turbulence wall treatment for epsilon (same for all walls currently)
const MooseFunctorName & densityName() const
Return the name of the density functor.
virtual FEProblemBase & getProblem()
static const std::string mu
Definition: NS.h:123
const VariableName _tked_name
Name of the turbulent kinetic energy dissipation.
const std::vector< std::string > _velocity_names
Velocity names.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableName _turbulent_viscosity_name
Name of the turbulence viscosity auxiliary variable (or property)
IntRange< T > make_range(T beg, T end)
static const std::string TKED
Definition: NS.h:177
std::vector< BoundaryName > _turbulence_walls
List of boundaries to act as walls for turbulence models.
virtual void addFVKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
const WCNSFVFlowPhysicsBase * _flow_equations_physics
Flow physics.

◆ addKEpsilonTimeDerivatives()

void WCNSFVTurbulencePhysics::addKEpsilonTimeDerivatives ( )
private

Functions adding kernels for the k-epsilon to the k-epsilon equations.

Definition at line 607 of file WCNSFVTurbulencePhysics.C.

Referenced by addFVKernels().

608 {
609  const std::string kernel_type = "FVFunctorTimeKernel";
610  InputParameters params = getFactory().getValidParams(kernel_type);
611  assignBlocks(params, _blocks);
612 
613  params.set<NonlinearVariableName>("variable") = _tke_name;
614  if (shouldCreateTimeDerivative(_tke_name, _blocks, /*error if already defined*/ false))
615  getProblem().addFVKernel(kernel_type, prefix() + "tke_time", params);
616  params.set<NonlinearVariableName>("variable") = _tked_name;
617  if (shouldCreateTimeDerivative(_tked_name, _blocks, /*error if already defined*/ false))
618  getProblem().addFVKernel(kernel_type, prefix() + "tked_time", params);
619 }
std::string prefix() const
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
Factory & getFactory()
const VariableName _tke_name
Name of the turbulent kinetic energy.
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
bool shouldCreateTimeDerivative(const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_already_defined) const
std::vector< SubdomainName > _blocks
virtual FEProblemBase & getProblem()
const VariableName _tked_name
Name of the turbulent kinetic energy dissipation.
virtual void addFVKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)

◆ addMaterials()

void WCNSFVTurbulencePhysics::addMaterials ( )
overrideprivatevirtual

Reimplemented from PhysicsBase.

Definition at line 885 of file WCNSFVTurbulencePhysics.C.

886 {
887  if (_turbulence_model == "mixing-length")
888  {
889  const std::string u_names[3] = {"u", "v", "w"};
890  InputParameters params =
891  getFactory().getValidParams("MixingLengthTurbulentViscosityFunctorMaterial");
892  assignBlocks(params, _blocks);
893 
894  for (const auto d : make_range(dimension()))
895  params.set<MooseFunctorName>(u_names[d]) = _velocity_names[d];
896 
897  params.set<MooseFunctorName>(NS::mixing_length) = _mixing_length_name;
898  params.set<MooseFunctorName>(NS::density) = _density_name;
899  params.set<MooseFunctorName>(NS::mu) = _dynamic_viscosity_name;
900 
901  getProblem().addMaterial("MixingLengthTurbulentViscosityFunctorMaterial",
902  prefix() + "mixing_length_material",
903  params);
904  }
905  else if (_turbulence_model == "k-epsilon")
906  {
907  if (!getProblem().hasFunctor(NS::mu_eff, /*thread_id=*/0))
908  {
909  InputParameters params = getFactory().getValidParams("ADParsedFunctorMaterial");
910  assignBlocks(params, _blocks);
911  const auto mu_name = _flow_equations_physics->dynamicViscosityName();
912 
913  // Avoid defining floats as functors in the parsed expression
915  params.set<std::vector<std::string>>("functor_names") = {_turbulent_viscosity_name,
916  mu_name};
918  params.set<std::vector<std::string>>("functor_names") = {mu_name};
920  params.set<std::vector<std::string>>("functor_names") = {_turbulent_viscosity_name};
921 
922  params.set<std::string>("expression") =
924  params.set<std::string>("property_name") = NS::mu_eff;
925  getProblem().addMaterial("ADParsedFunctorMaterial", prefix() + "effective_viscosity", params);
926  }
927  if (!getParam<bool>("mu_t_as_aux_variable"))
928  {
929  InputParameters params = getFactory().getValidParams("INSFVkEpsilonViscosityFunctorMaterial");
930  params.set<MooseFunctorName>(NS::TKE) = _tke_name;
931  params.set<MooseFunctorName>(NS::TKED) = _tked_name;
932  params.set<MooseFunctorName>(NS::density) = _density_name;
933  params.set<ExecFlagEnum>("execute_on") = {EXEC_NONLINEAR};
934  if (getParam<bool>("output_mu_t"))
935  params.set<std::vector<OutputName>>("outputs") = {"all"};
937  "INSFVkEpsilonViscosityFunctorMaterial", prefix() + "compute_mu_t", params);
938  }
939 
940  if (_has_energy_equation && !getProblem().hasFunctor(NS::k_t, /*thread_id=*/0))
941  {
942  mooseAssert(!getParam<bool>("k_t_as_aux_variable"), "k_t should exist");
943  InputParameters params = getFactory().getValidParams("ADParsedFunctorMaterial");
944  assignBlocks(params, _blocks);
945  const auto mu_t_name = NS::mu_t;
946  const auto cp_name = _fluid_energy_physics->getSpecificHeatName();
947  const auto Pr_t_name = getParam<MooseFunctorName>("Pr_t");
948 
949  // Avoid defining floats as functors in the parsed expression
950  if (!MooseUtils::isFloat(cp_name) && !MooseUtils::isFloat(Pr_t_name))
951  params.set<std::vector<std::string>>("functor_names") = {cp_name, Pr_t_name, mu_t_name};
952  else if (MooseUtils::isFloat(cp_name) && !MooseUtils::isFloat(Pr_t_name))
953  params.set<std::vector<std::string>>("functor_names") = {Pr_t_name, mu_t_name};
954  else if (!MooseUtils::isFloat(cp_name) && MooseUtils::isFloat(Pr_t_name))
955  params.set<std::vector<std::string>>("functor_names") = {cp_name, mu_t_name};
956  else
957  params.set<std::vector<std::string>>("functor_names") = {mu_t_name};
958 
959  params.set<std::string>("expression") = mu_t_name + "*" + cp_name + "/" + Pr_t_name;
960  params.set<std::string>("property_name") = NS::k_t;
961  params.set<ExecFlagEnum>("execute_on") = {EXEC_NONLINEAR};
962  params.set<std::vector<OutputName>>("outputs") = {"all"};
964  "ADParsedFunctorMaterial", prefix() + "turbulent_heat_eff_conductivity", params);
965  }
966 
967  if (_has_scalar_equations && !getProblem().hasFunctor(NS::mu_t_passive_scalar, /*thread_id=*/0))
968  {
969  InputParameters params = getFactory().getValidParams("ADParsedFunctorMaterial");
970  assignBlocks(params, _blocks);
971  const auto & rho_name = _flow_equations_physics->densityName();
972 
973  // Avoid defining floats as functors in the parsed expression
975  params.set<std::vector<std::string>>("functor_names") = {_turbulent_viscosity_name,
976  rho_name};
978  params.set<std::vector<std::string>>("functor_names") = {rho_name};
980  params.set<std::vector<std::string>>("functor_names") = {_turbulent_viscosity_name};
981 
982  const auto turbulent_schmidt_number = getParam<std::vector<Real>>("Sc_t");
983  if (turbulent_schmidt_number.size() != 1)
984  paramError(
985  "passive_scalar_schmidt_number",
986  "Only one passive scalar turbulent Schmidt number can be specified with k-epsilon");
987  params.set<std::string>("expression") = _turbulent_viscosity_name + "/" + rho_name + " / " +
988  std::to_string(turbulent_schmidt_number[0]);
989  params.set<std::string>("property_name") = NS::mu_t_passive_scalar;
991  "ADParsedFunctorMaterial", prefix() + "scalar_turbulent_diffusivity", params);
992  }
993  }
994 }
std::string prefix() const
static const std::string mu_t
Definition: NS.h:125
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
const MooseFunctorName & dynamicViscosityName() const
Return the name of the dynamic viscosity functor.
const MooseFunctorName _density_name
Name of the density material property.
Factory & getFactory()
const VariableName _tke_name
Name of the turbulent kinetic energy.
static const std::string mixing_length
Definition: NS.h:74
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters &parameters)
T & set(const std::string &name, bool quiet_mode=false)
static const std::string density
Definition: NS.h:33
InputParameters getValidParams(const std::string &name) const
static const std::string TKE
Definition: NS.h:176
const WCNSFVFluidHeatTransferPhysics * _fluid_energy_physics
The heat advection physics to add turbulent mixing for.
bool isFloat(const std::string &str)
const MooseFunctorName _dynamic_viscosity_name
Name of the dynamic viscosity material property.
std::vector< SubdomainName > _blocks
unsigned int dimension() const
const MooseFunctorName & densityName() const
Return the name of the density functor.
virtual FEProblemBase & getProblem()
const MooseFunctorName & getSpecificHeatName() const
Get the name of the specific heat material property.
static const std::string mu
Definition: NS.h:123
void paramError(const std::string &param, Args... args) const
const MooseEnum _turbulence_model
Turbulence model to create the equation(s) for.
const VariableName _tked_name
Name of the turbulent kinetic energy dissipation.
static const std::string mu_eff
Definition: NS.h:129
const std::vector< std::string > _velocity_names
Velocity names.
const ExecFlagType EXEC_NONLINEAR
const VariableName _mixing_length_name
Name of the mixing length auxiliary variable.
const VariableName _turbulent_viscosity_name
Name of the turbulence viscosity auxiliary variable (or property)
IntRange< T > make_range(T beg, T end)
static const std::string TKED
Definition: NS.h:177
static const std::string mu_t_passive_scalar
Definition: NS.h:127
static const std::string k_t
Definition: NS.h:132
const WCNSFVFlowPhysicsBase * _flow_equations_physics
Flow physics.

◆ addScalarAdvectionTurbulenceKernels()

void WCNSFVTurbulencePhysics::addScalarAdvectionTurbulenceKernels ( )
private

Definition at line 555 of file WCNSFVTurbulencePhysics.C.

Referenced by addFVKernels().

556 {
557  const auto & passive_scalar_names = _scalar_transport_physics->getAdvectedScalarNames();
558  const auto & passive_scalar_schmidt_number = getParam<std::vector<Real>>("Sc_t");
559  if (passive_scalar_schmidt_number.size() != passive_scalar_names.size() &&
560  passive_scalar_schmidt_number.size() != 1)
561  paramError(
562  "Sc_t",
563  "The number of turbulent Schmidt numbers defined is not equal to the number of passive "
564  "scalar fields!");
565 
566  if (_turbulence_model == "mixing-length")
567  {
568  const std::string u_names[3] = {"u", "v", "w"};
569  const std::string kernel_type = "INSFVMixingLengthScalarDiffusion";
570  InputParameters params = getFactory().getValidParams(kernel_type);
571  assignBlocks(params, _blocks);
572  params.set<MooseFunctorName>(NS::mixing_length) = _mixing_length_name;
573  for (const auto dim_i : make_range(dimension()))
574  params.set<MooseFunctorName>(u_names[dim_i]) = _velocity_names[dim_i];
575 
576  for (const auto & name_i : index_range(passive_scalar_names))
577  {
578  params.set<NonlinearVariableName>("variable") = passive_scalar_names[name_i];
579  if (passive_scalar_schmidt_number.size() > 1)
580  params.set<Real>("schmidt_number") = passive_scalar_schmidt_number[name_i];
581  else if (passive_scalar_schmidt_number.size() == 1)
582  params.set<Real>("schmidt_number") = passive_scalar_schmidt_number[0];
583  else
584  params.set<Real>("schmidt_number") = 1.0;
585 
587  kernel_type, prefix() + passive_scalar_names[name_i] + "_mixing_length", params);
588  }
589  }
590  else if (_turbulence_model == "k-epsilon")
591  {
592  const std::string kernel_type = "FVDiffusion";
593  InputParameters params = getFactory().getValidParams(kernel_type);
594  assignBlocks(params, _blocks);
595 
596  for (const auto & name_i : index_range(passive_scalar_names))
597  {
598  params.set<NonlinearVariableName>("variable") = passive_scalar_names[name_i];
599  params.set<MooseFunctorName>("coeff") = NS::mu_t_passive_scalar;
601  kernel_type, prefix() + passive_scalar_names[name_i] + "_turbulent_diffusion", params);
602  }
603  }
604 }
std::string prefix() const
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
Factory & getFactory()
static const std::string mixing_length
Definition: NS.h:74
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
std::vector< SubdomainName > _blocks
unsigned int dimension() const
virtual FEProblemBase & getProblem()
void paramError(const std::string &param, Args... args) const
const MooseEnum _turbulence_model
Turbulence model to create the equation(s) for.
const WCNSFVScalarTransportPhysics * _scalar_transport_physics
The scalar advection physics to add turbulent mixing for.
const std::vector< std::string > _velocity_names
Velocity names.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableName _mixing_length_name
Name of the mixing length auxiliary variable.
IntRange< T > make_range(T beg, T end)
const std::vector< NonlinearVariableName > & getAdvectedScalarNames() const
Get the names of the advected scalar quantity variables.
static const std::string mu_t_passive_scalar
Definition: NS.h:127
virtual void addFVKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
auto index_range(const T &sizable)

◆ addSolverVariables()

void WCNSFVTurbulencePhysics::addSolverVariables ( )
overrideprivatevirtual

Reimplemented from PhysicsBase.

Definition at line 333 of file WCNSFVTurbulencePhysics.C.

334 {
335  if (_turbulence_model == "mixing-length" || _turbulence_model == "none")
336  return;
337  else if (_turbulence_model == "k-epsilon")
338  {
339  // Dont add if the user already defined the variable
340  // Add turbulent kinetic energy variable
341  if (!shouldCreateVariable(_tke_name, _blocks, /*error if aux*/ true))
343  {"system_names", "tke_scaling", "tke_face_interpolation", "tke_two_term_bc_expansion"},
344  "INSFVEnergyVariable");
345  else if (_define_variables)
346  {
347  auto params = getFactory().getValidParams("INSFVEnergyVariable");
348  assignBlocks(params, _blocks);
349  params.set<std::vector<Real>>("scaling") = {getParam<Real>("tke_scaling")};
350  params.set<MooseEnum>("face_interp_method") = getParam<MooseEnum>("tke_face_interpolation");
351  params.set<bool>("two_term_boundary_expansion") = getParam<bool>("tke_two_term_bc_expansion");
352  params.set<SolverSystemName>("solver_sys") = getSolverSystem(_tke_name);
353 
354  getProblem().addVariable("INSFVEnergyVariable", _tke_name, params);
355  }
356  else
357  paramError("turbulence_kinetic_energy_variable",
358  "Variable (" + _tke_name +
359  ") supplied to the WCNSFVTurbulencePhysics does not exist!");
360 
361  // Add turbulent kinetic energy dissipation variable
362  if (!shouldCreateVariable(_tked_name, _blocks, /*error if aux*/ true))
364  {"system_names", "tked_scaling", "tked_face_interpolation", "tked_two_term_bc_expansion"},
365  "INSFVEnergyVariable");
366  else if (_define_variables)
367  {
368  auto params = getFactory().getValidParams("INSFVEnergyVariable");
369  assignBlocks(params, _blocks);
370  params.set<std::vector<Real>>("scaling") = {getParam<Real>("tked_scaling")};
371  params.set<MooseEnum>("face_interp_method") = getParam<MooseEnum>("tked_face_interpolation");
372  params.set<bool>("two_term_boundary_expansion") =
373  getParam<bool>("tked_two_term_bc_expansion");
374  params.set<SolverSystemName>("solver_sys") = getSolverSystem(_tked_name);
375  getProblem().addVariable("INSFVEnergyVariable", _tked_name, params);
376  }
377  else
378  paramError("turbulence_kinetic_energy_dissipation_variable",
379  "Variable (" + _tked_name +
380  ") supplied to the WCNSFVTurbulencePhysics does not exist!");
381  }
382 }
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
bool shouldCreateVariable(const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_aux)
Factory & getFactory()
const VariableName _tke_name
Name of the turbulent kinetic energy.
InputParameters getValidParams(const std::string &name) const
std::vector< SubdomainName > _blocks
virtual FEProblemBase & getProblem()
const SolverSystemName & getSolverSystem(unsigned int variable_index) const
void paramError(const std::string &param, Args... args) const
const MooseEnum _turbulence_model
Turbulence model to create the equation(s) for.
const VariableName _tked_name
Name of the turbulent kinetic energy dissipation.
virtual void addVariable(const std::string &var_type, const std::string &var_name, InputParameters &params)
bool _define_variables
Whether to define variables if they do not exist.
void reportPotentiallyMissedParameters(const std::vector< std::string > &param_names, const std::string &object_type) const

◆ densityName()

const MooseFunctorName& WCNSFVCoupledAdvectionPhysicsHelper::densityName ( ) const
inlineinherited

◆ dynamicViscosityName()

const MooseFunctorName& WCNSFVCoupledAdvectionPhysicsHelper::dynamicViscosityName ( ) const
inlineinherited

Definition at line 37 of file WCNSFVCoupledAdvectionPhysicsHelper.h.

37 { return _dynamic_viscosity_name; }
const MooseFunctorName _dynamic_viscosity_name
Name of the dynamic viscosity material property.

◆ getAdditionalRMParams()

InputParameters NavierStokesPhysicsBase::getAdditionalRMParams ( ) const
overrideprotectedvirtualinherited

Parameters to change or add relationship managers.

Reimplemented from PhysicsBase.

Definition at line 42 of file NavierStokesPhysicsBase.C.

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

◆ 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)
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)
const T * getCoupledPhysics(const PhysicsName &phys_name, const bool allow_fail=false) const
bool isParamValid(const std::string &name) const
Base class for Physics which create the Navier Stokes flow equations.
const T & getParam(const std::string &name) const
bool checkBlockRestrictionIdentical(const std::string &object_name, const std::vector< SubdomainName > &blocks, const bool error_if_not_identical=true) const
const NavierStokesPhysicsBase * _advection_physics
The Physics class using this helper.

◆ getCoupledTurbulencePhysics()

const WCNSFVTurbulencePhysics * WCNSFVCoupledAdvectionPhysicsHelper::getCoupledTurbulencePhysics ( ) const
inherited

Definition at line 77 of file WCNSFVCoupledAdvectionPhysicsHelper.C.

Referenced by WCNSFVFluidHeatTransferPhysicsBase::actOnAdditionalTasks().

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)
90  physics->name(), physics->blocks(), /*error_if_not_identical=*/false))
91  return physics;
92  }
93  // Did not find one
94  return nullptr;
95 }
Creates all the objects needed to add a turbulence model to an incompressible / weakly-compressible N...
const T * getCoupledPhysics(const PhysicsName &phys_name, const bool allow_fail=false) const
bool isParamValid(const std::string &name) const
const T & getParam(const std::string &name) const
bool checkBlockRestrictionIdentical(const std::string &object_name, const std::vector< SubdomainName > &blocks, const bool error_if_not_identical=true) const
const NavierStokesPhysicsBase * _advection_physics
The Physics class using this helper.

◆ getNumberAlgebraicGhostingLayersNeeded()

unsigned short WCNSFVTurbulencePhysics::getNumberAlgebraicGhostingLayersNeeded ( ) const
overrideprotectedvirtual

Return the number of ghosting layers needed.

Implements NavierStokesPhysicsBase.

Definition at line 997 of file WCNSFVTurbulencePhysics.C.

998 {
999  unsigned short ghost_layers = _flow_equations_physics->getNumberAlgebraicGhostingLayersNeeded();
1000  // due to the computation of the eddy-diffusivity from the strain tensor
1001  if (_turbulence_model == "mixing-length")
1002  ghost_layers = std::max(ghost_layers, (unsigned short)3);
1003  return ghost_layers;
1004 }
unsigned short getNumberAlgebraicGhostingLayersNeeded() const override
Return the number of algebraic ghosting layers needed.
const MooseEnum _turbulence_model
Turbulence model to create the equation(s) for.
const WCNSFVFlowPhysicsBase * _flow_equations_physics
Flow physics.

◆ 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 }
MooseFunctorName getPorosityFunctorName(const bool smoothed) const
const WCNSFVFlowPhysicsBase * _flow_equations_physics
Flow physics.

◆ hasTurbulenceModel()

bool WCNSFVTurbulencePhysics::hasTurbulenceModel ( ) const
inline

Whether a turbulence model is in use.

Definition at line 32 of file WCNSFVTurbulencePhysics.h.

Referenced by WCNSFVFlowPhysicsBase::hasTurbulencePhysics().

32 { return _turbulence_model != "none"; }
const MooseEnum _turbulence_model
Turbulence model to create the equation(s) for.

◆ initializePhysicsAdditional()

void WCNSFVTurbulencePhysics::initializePhysicsAdditional ( )
overrideprivatevirtual

Reimplemented from PhysicsBase.

Definition at line 246 of file WCNSFVTurbulencePhysics.C.

247 {
248  if (_turbulence_model == "k-epsilon")
250 }
virtual FEProblemBase & getProblem()
void needSolutionState(unsigned int oldest_needed, Moose::SolutionIterationType iteration_type)
const MooseEnum _turbulence_model
Turbulence model to create the equation(s) for.

◆ retrieveCoupledPhysics()

void WCNSFVTurbulencePhysics::retrieveCoupledPhysics ( )
private

Retrieve the other WCNSFVPhysics at play in the simulation to be able to add the relevant terms (turbulent diffusion notably)

Definition at line 262 of file WCNSFVTurbulencePhysics.C.

Referenced by actOnAdditionalTasks().

263 {
264  // _flow_equations_physics is initialized by 'WCNSFVCoupledAdvectionPhysicsHelper'
266  _has_flow_equations = true;
267  else
268  _has_flow_equations = false;
269 
270  // Sanity check for interaction for fluid heat transfer physics
271  if (isParamValid("fluid_heat_transfer_physics") && _turbulence_model != "none")
272  {
273  _fluid_energy_physics = getCoupledPhysics<WCNSFVFluidHeatTransferPhysics>(
274  getParam<PhysicsName>("fluid_heat_transfer_physics"), true);
275  // Check for a missing parameter / do not support isolated physics for now
276  if (!_fluid_energy_physics &&
277  !getCoupledPhysics<const WCNSFVFluidHeatTransferPhysics>(true).empty())
278  paramError("fluid_heat_transfer_physics",
279  "We currently do not support creating both turbulence physics and fluid heat "
280  "transfer physics that are not coupled together. Use "
281  "'fluid_heat_transfer_physics' to explicitly specify the coupling");
283  _has_energy_equation = true;
284  else
285  _has_energy_equation = false;
286  }
287  else
288  {
289  _has_energy_equation = false;
290  _fluid_energy_physics = nullptr;
291  }
292 
293  // Sanity check for interaction with scalar transport physics
294  if (isParamValid("scalar_transport_physics") && _turbulence_model != "none")
295  {
296  _scalar_transport_physics = getCoupledPhysics<WCNSFVScalarTransportPhysics>(
297  getParam<PhysicsName>("scalar_transport_physics"), true);
299  !getCoupledPhysics<const WCNSFVScalarTransportPhysics>(true).empty())
300  paramError(
301  "scalar_transport_physics",
302  "We currently do not support creating both turbulence physics and scalar transport "
303  "physics that are not coupled together");
305  _has_scalar_equations = true;
306  else
307  _has_scalar_equations = false;
308  }
309  else
310  {
311  _has_scalar_equations = false;
312  _scalar_transport_physics = nullptr;
313  }
314 
315  // To help remediate the danger of the parameter setup
316  if (_verbose)
317  {
319  mooseInfoRepeated("Coupling turbulence physics with fluid heat transfer physics " +
321  else
322  mooseInfoRepeated("No fluid heat transfer equation considered by this turbulence "
323  "physics.");
325  mooseInfoRepeated("Coupling turbulence physics with scalar transport physics " +
327  else
328  mooseInfoRepeated("No scalar transport equations considered by this turbulence physics.");
329  }
330 }
bool hasFlowEquations() const
Whether the physics is actually creating the flow equations.
const WCNSFVFluidHeatTransferPhysics * _fluid_energy_physics
The heat advection physics to add turbulent mixing for.
void mooseInfoRepeated(Args &&... args)
const bool _verbose
virtual const std::string & name() const
bool hasScalarEquations() const
Whether the physics is actually creating the scalar advection equations.
bool isParamValid(const std::string &name) const
bool hasEnergyEquation() const
Whether the physics is actually creating the heat equation.
void paramError(const std::string &param, Args... args) const
const MooseEnum _turbulence_model
Turbulence model to create the equation(s) for.
const WCNSFVScalarTransportPhysics * _scalar_transport_physics
The scalar advection physics to add turbulent mixing for.
const WCNSFVFlowPhysicsBase * _flow_equations_physics
Flow physics.

◆ tkeName()

MooseFunctorName WCNSFVTurbulencePhysics::tkeName ( ) const
inline

The name of the turbulent kinetic energy variable.

Definition at line 40 of file WCNSFVTurbulencePhysics.h.

Referenced by WCNSFVFluidHeatTransferPhysics::addEnergyWallBC().

40 { return _tke_name; }
const VariableName _tke_name
Name of the turbulent kinetic energy.

◆ turbulenceEpsilonWallTreatment()

MooseEnum WCNSFVTurbulencePhysics::turbulenceEpsilonWallTreatment ( ) const
inline

The turbulence epsilon wall treatment (same for all turbulence walls currently)

Definition at line 36 of file WCNSFVTurbulencePhysics.h.

36 { return _wall_treatment_eps; }
MooseEnum _wall_treatment_eps
Turbulence wall treatment for epsilon (same for all walls currently)

◆ turbulenceTemperatureWallTreatment()

MooseEnum WCNSFVTurbulencePhysics::turbulenceTemperatureWallTreatment ( ) const
inline

The turbulence temperature wall treatment (same for all turbulence walls currently)

Definition at line 38 of file WCNSFVTurbulencePhysics.h.

Referenced by WCNSFVFluidHeatTransferPhysics::addEnergyWallBC().

38 { return _wall_treatment_temp; }
MooseEnum _wall_treatment_temp
Turbulence wall treatment for temperature (same for all walls currently)

◆ turbulenceWalls()

std::vector<BoundaryName> WCNSFVTurbulencePhysics::turbulenceWalls ( ) const
inline

The names of the boundaries with turbulence wall functions.

Definition at line 34 of file WCNSFVTurbulencePhysics.h.

Referenced by WCNSFVFluidHeatTransferPhysics::addEnergyWallBC().

34 { return _turbulence_walls; }
std::vector< BoundaryName > _turbulence_walls
List of boundaries to act as walls for turbulence models.

◆ usingNavierStokesFVSyntax()

bool NavierStokesPhysicsBase::usingNavierStokesFVSyntax ( ) const
inlineprotectedinherited

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

Definition at line 32 of file NavierStokesPhysicsBase.h.

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

◆ validParams()

InputParameters WCNSFVTurbulencePhysics::validParams ( )
static

Definition at line 30 of file WCNSFVTurbulencePhysics.C.

31 {
34  params.addClassDescription(
35  "Define a turbulence model for a incompressible or weakly-compressible Navier Stokes "
36  "flow with a finite volume discretization");
37 
38  MooseEnum turbulence_type("mixing-length k-epsilon none", "none");
39  params.addParam<MooseEnum>(
40  "turbulence_handling",
41  turbulence_type,
42  "The way turbulent diffusivities are determined in the turbulent regime.");
44  params.transferParam<bool>(NSFVBase::validParams(), "mixing_length_two_term_bc_expansion");
45 
46  // TODO Added to facilitate transition, remove default once NavierStokesFV action is removed
47  params.addParam<AuxVariableName>(
48  "mixing_length_name", "mixing_length", "Name of the mixing length auxiliary variable");
49  params.deprecateParam("mixing_length_walls", "turbulence_walls", "");
50 
51  // Not implemented, re-enable with k-epsilon
52  params.suppressParameter<MooseEnum>("preconditioning");
53 
54  // K-Epsilon parameters
55  params.addParam<MooseFunctorName>(
56  "tke_name", NS::TKE, "Name of the turbulent kinetic energy variable");
57  params.addParam<MooseFunctorName>(
58  "tked_name", NS::TKED, "Name of the turbulent kinetic energy dissipation variable");
59  params.addParam<FunctionName>(
60  "initial_tke", "0", "Initial value for the turbulence kinetic energy");
61  params.addParam<FunctionName>(
62  "initial_tked", "0", "Initial value for the turbulence kinetic energy dissipation");
63  params.addParam<FunctionName>("initial_mu_t", "Initial value for the turbulence viscosity");
64 
65  params.addParam<Real>("C1_eps",
66  "C1 coefficient for the turbulent kinetic energy dissipation equation");
67  params.addParam<Real>("C2_eps",
68  "C2 coefficient for the turbulent kinetic energy dissipation equation");
69  params.addParam<MooseFunctorName>(
70  "sigma_k", "Scaling coefficient for the turbulent kinetic energy diffusion term");
71  params.addParam<MooseFunctorName>(
72  "sigma_eps",
73  "Scaling coefficient for the turbulent kinetic energy dissipation diffusion term");
74  params.addParam<MooseFunctorName>(
75  NS::turbulent_Prandtl, NS::turbulent_Prandtl, "Turbulent Prandtl number");
76  params.transferParam<Real>(INSFVTKESourceSink::validParams(), "C_pl");
77 
78  // Boundary parameters
79  params.addParam<bool>("bulk_wall_treatment", true, "Whether to treat the wall cell as bulk");
80  MooseEnum wall_treatment("eq_newton eq_incremental eq_linearized neq", "neq");
81  params.addParam<MooseEnum>("wall_treatment_eps",
82  wall_treatment,
83  "The method used for computing the epsilon wall functions");
84  params.addParam<MooseEnum>("wall_treatment_T",
85  wall_treatment,
86  "The method used for computing the temperature wall functions");
87  params.transferParam<Real>(INSFVTurbulentViscosityWallFunction::validParams(), "C_mu");
88 
89  // K-Epsilon numerical scheme parameters
90  MooseEnum face_interpol_types("average skewness-corrected", "average");
91  MooseEnum adv_interpol_types("average upwind", "upwind");
92  params.addRangeCheckedParam<Real>(
93  "tke_scaling",
94  1.0,
95  "tke_scaling > 0.0",
96  "The scaling factor for the turbulent kinetic energy equation.");
97  params.addParam<MooseEnum>("tke_face_interpolation",
98  face_interpol_types,
99  "The numerical scheme to interpolate the TKE to the "
100  "face (separate from the advected quantity interpolation).");
101  params.addParam<MooseEnum>("tke_advection_interpolation",
102  adv_interpol_types,
103  "The numerical scheme to interpolate the TKE to the "
104  "face when in the advection kernel.");
105  // Better Jacobian if not linearizing sink and sources
106  params.addParam<bool>("linearize_sink_sources", false, "Whether to linearize the source term");
107  // Better convergence on some cases when neglecting advection derivatives
108  params.addParam<bool>(
109  "neglect_advection_derivatives",
110  false,
111  "Whether to remove the off-diagonal velocity term in the TKE and TKED advection term");
112  params.addParam<bool>(
113  "tke_two_term_bc_expansion",
114  true,
115  "If a two-term Taylor expansion is needed for the determination of the boundary values"
116  "of the turbulent kinetic energy.");
117  params.addRangeCheckedParam<Real>(
118  "tked_scaling",
119  1.0,
120  "tked_scaling > 0.0",
121  "The scaling factor for the turbulent kinetic energy dissipation equation.");
122  params.addParam<MooseEnum>("tked_face_interpolation",
123  face_interpol_types,
124  "The numerical scheme to interpolate the TKED to the "
125  "face (separate from the advected quantity interpolation).");
126  params.addParam<MooseEnum>("tked_advection_interpolation",
127  adv_interpol_types,
128  "The numerical scheme to interpolate the TKED to the "
129  "face when in the advection kernel.");
130  params.addParam<bool>(
131  "tked_two_term_bc_expansion",
132  true,
133  "If a two-term Taylor expansion is needed for the determination of the boundary values"
134  "of the turbulent kinetic energy dissipation.");
135  params.addParam<bool>(
136  "turbulent_viscosity_two_term_bc_expansion",
137  true,
138  "If a two-term Taylor expansion is needed for the determination of the boundary values"
139  "of the turbulent viscosity.");
140  MooseEnum coeff_interp_method("average harmonic", "harmonic");
141  params.addParam<MooseEnum>("turbulent_viscosity_interp_method",
142  coeff_interp_method,
143  "Face interpolation method for the turbulent viscosity");
144  params.addParam<bool>("mu_t_as_aux_variable",
145  false,
146  "Whether to use an auxiliary variable instead of a functor material "
147  "property for the turbulent viscosity");
148  params.addParam<bool>("output_mu_t", true, "Whether to add mu_t to the field outputs");
149  params.addParam<bool>("k_t_as_aux_variable",
150  false,
151  "Whether to use an auxiliary variable for the turbulent conductivity");
152 
153  // Add the coupled physics
154  // TODO Remove the defaults once NavierStokesFV action is removed
155  // It is a little risky right now because the user could forget to pass the parameter and
156  // be missing the influence of turbulence on either of these physics. There is a check in the
157  // constructor to present this from happening
158  params.addParam<PhysicsName>(
159  "fluid_heat_transfer_physics",
160  "NavierStokesFV",
161  "WCNSFVFluidHeatTransferPhysics generating the heat advection equations");
162  params.addParam<PhysicsName>(
163  "scalar_transport_physics",
164  "NavierStokesFV",
165  "WCNSFVScalarTransportPhysics generating the scalar advection equations");
166 
167  // Parameter groups
168  params.addParamNamesToGroup("mixing_length_name mixing_length_two_term_bc_expansion",
169  "Mixing length model");
170  params.addParamNamesToGroup("fluid_heat_transfer_physics turbulent_prandtl "
171  "scalar_transport_physics Sc_t",
172  "Coupled Physics");
173  params.addParamNamesToGroup("initial_tke initial_tked C1_eps C2_eps sigma_k sigma_eps",
174  "K-Epsilon model");
175  params.addParamNamesToGroup("C_mu bulk_wall_treatment wall_treatment_eps wall_treatment_T",
176  "K-Epsilon wall function");
177  params.addParamNamesToGroup(
178  "tke_scaling tke_face_interpolation tke_two_term_bc_expansion tked_scaling "
179  "tked_face_interpolation tked_two_term_bc_expansion "
180  "turbulent_viscosity_two_term_bc_expansion turbulent_viscosity_interp_method "
181  "mu_t_as_aux_variable k_t_as_aux_variable linearize_sink_sources",
182  "K-Epsilon model numerical");
183 
184  return params;
185 }
static InputParameters validParams()
Definition: NSFVBase.C:368
static const std::string turbulent_Prandtl
Definition: NS.h:138
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
static const std::string TKE
Definition: NS.h:176
static InputParameters commonTurbulenceParams()
Definition: NSFVBase.C:325
static InputParameters validParams()
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string TKED
Definition: NS.h:177
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _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 48 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(), addAuxiliaryKernels(), WCNSFVFluidHeatTransferPhysics::addEnergyAdvectionKernels(), WCNSLinearFVFluidHeatTransferPhysics::addEnergyAdvectionKernels(), WCNSFVFluidHeatTransferPhysics::addEnergyHeatConductionKernels(), WCNSFVFluidHeatTransferPhysics::addEnergyInletBC(), WCNSLinearFVFluidHeatTransferPhysics::addEnergyInletBC(), WCNSLinearFVFluidHeatTransferPhysics::addEnergyOutletBC(), WCNSFVFluidHeatTransferPhysics::addEnergySeparatorBC(), WCNSFVFluidHeatTransferPhysics::addEnergyTimeKernels(), WCNSLinearFVFluidHeatTransferPhysics::addEnergyWallBC(), WCNSFVFluidHeatTransferPhysics::addEnergyWallBC(), addFlowTurbulenceKernels(), addFluidEnergyTurbulenceKernels(), addFVBCs(), WCNSLinearFVTwoPhaseMixturePhysics::addFVKernels(), WCNSFVTwoPhaseMixturePhysics::addFVKernels(), addInitialConditions(), addKEpsilonAdvection(), addKEpsilonDiffusion(), addKEpsilonSink(), WCNSLinearFVTwoPhaseMixturePhysics::addMaterials(), WCNSFVTwoPhaseMixturePhysics::addMaterials(), addMaterials(), WCNSFVFluidHeatTransferPhysicsBase::addMaterials(), WCNSLinearFVTwoPhaseMixturePhysics::addPhaseDriftFluxTerm(), WCNSFVTwoPhaseMixturePhysics::addPhaseDriftFluxTerm(), WCNSLinearFVScalarTransportPhysics::addScalarAdvectionKernels(), WCNSFVScalarTransportPhysics::addScalarAdvectionKernels(), WCNSLinearFVScalarTransportPhysics::addScalarInletBC(), WCNSFVScalarTransportPhysics::addScalarInletBC(), WCNSLinearFVScalarTransportPhysics::addScalarOutletBC(), WCNSLinearFVTwoPhaseMixturePhysics::checkIntegrity(), getNumberAlgebraicGhostingLayersNeeded(), WCNSFVFluidHeatTransferPhysicsBase::getNumberAlgebraicGhostingLayersNeeded(), WCNSFVScalarTransportPhysicsBase::getNumberAlgebraicGhostingLayersNeeded(), WCNSFVCoupledAdvectionPhysicsHelper::getPorosityFunctorName(), retrieveCoupledPhysics(), WCNSFVFluidHeatTransferPhysicsBase::WCNSFVFluidHeatTransferPhysicsBase(), WCNSFVTwoPhaseMixturePhysics::WCNSFVTwoPhaseMixturePhysics(), WCNSLinearFVScalarTransportPhysics::WCNSLinearFVScalarTransportPhysics(), and WCNSLinearFVTwoPhaseMixturePhysics::WCNSLinearFVTwoPhaseMixturePhysics().

◆ _fluid_energy_physics

const WCNSFVFluidHeatTransferPhysics* WCNSFVTurbulencePhysics::_fluid_energy_physics
private

The heat advection physics to add turbulent mixing for.

Definition at line 83 of file WCNSFVTurbulencePhysics.h.

Referenced by addAuxiliaryKernels(), addFluidEnergyTurbulenceKernels(), addMaterials(), and retrieveCoupledPhysics().

◆ _has_energy_equation

bool WCNSFVTurbulencePhysics::_has_energy_equation
private

◆ _has_flow_equations

bool WCNSFVTurbulencePhysics::_has_flow_equations
private

Definition at line 78 of file WCNSFVTurbulencePhysics.h.

Referenced by addFVKernels(), and retrieveCoupledPhysics().

◆ _has_scalar_equations

bool WCNSFVTurbulencePhysics::_has_scalar_equations
private

Definition at line 80 of file WCNSFVTurbulencePhysics.h.

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

◆ _mixing_length_name

const VariableName WCNSFVTurbulencePhysics::_mixing_length_name
private

◆ _porous_medium_treatment

const bool WCNSFVCoupledAdvectionPhysicsHelper::_porous_medium_treatment
protectedinherited

◆ _pressure_name

const NonlinearVariableName WCNSFVCoupledAdvectionPhysicsHelper::_pressure_name
protectedinherited

Pressure name.

Definition at line 56 of file WCNSFVCoupledAdvectionPhysicsHelper.h.

◆ _scalar_transport_physics

const WCNSFVScalarTransportPhysics* WCNSFVTurbulencePhysics::_scalar_transport_physics
private

The scalar advection physics to add turbulent mixing for.

Definition at line 85 of file WCNSFVTurbulencePhysics.h.

Referenced by addScalarAdvectionTurbulenceKernels(), and retrieveCoupledPhysics().

◆ _tke_name

const VariableName WCNSFVTurbulencePhysics::_tke_name
private

◆ _tked_name

const VariableName WCNSFVTurbulencePhysics::_tked_name
private

◆ _turbulence_model

const MooseEnum WCNSFVTurbulencePhysics::_turbulence_model
private

◆ _turbulence_physics

const WCNSFVTurbulencePhysics* WCNSFVCoupledAdvectionPhysicsHelper::_turbulence_physics
protectedinherited

◆ _turbulence_walls

std::vector<BoundaryName> WCNSFVTurbulencePhysics::_turbulence_walls
private

List of boundaries to act as walls for turbulence models.

Definition at line 91 of file WCNSFVTurbulencePhysics.h.

Referenced by addAuxiliaryKernels(), addFVBCs(), addKEpsilonAdvection(), addKEpsilonDiffusion(), addKEpsilonSink(), and turbulenceWalls().

◆ _turbulent_viscosity_name

const VariableName WCNSFVTurbulencePhysics::_turbulent_viscosity_name = NS::mu_t
private

◆ _velocity_interpolation

const MooseEnum WCNSFVCoupledAdvectionPhysicsHelper::_velocity_interpolation
protectedinherited

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

Definition at line 64 of file WCNSFVCoupledAdvectionPhysicsHelper.h.

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

◆ _velocity_names

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

◆ _wall_treatment_eps

MooseEnum WCNSFVTurbulencePhysics::_wall_treatment_eps
private

Turbulence wall treatment for epsilon (same for all walls currently)

Definition at line 93 of file WCNSFVTurbulencePhysics.h.

Referenced by addAuxiliaryKernels(), addFVBCs(), addKEpsilonSink(), and turbulenceEpsilonWallTreatment().

◆ _wall_treatment_temp

MooseEnum WCNSFVTurbulencePhysics::_wall_treatment_temp
private

Turbulence wall treatment for temperature (same for all walls currently)

Definition at line 95 of file WCNSFVTurbulencePhysics.h.

Referenced by turbulenceTemperatureWallTreatment().


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