Loading [MathJax]/extensions/tex2jax.js
https://mooseframework.inl.gov
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
WCNSFVCoupledAdvectionPhysicsHelper Class Reference

Helper class to interact with a flow and turbulence physics for a Physics that solves an advection problem using incompressible or weakly-compressible finite volume. More...

#include <WCNSFVCoupledAdvectionPhysicsHelper.h>

Inheritance diagram for WCNSFVCoupledAdvectionPhysicsHelper:
[legend]

Public Member Functions

 WCNSFVCoupledAdvectionPhysicsHelper (const NavierStokesPhysicsBase *derived_physics)
 
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 ()
 

Protected Attributes

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

Detailed Description

Helper class to interact with a flow and turbulence physics for a Physics that solves an advection problem using incompressible or weakly-compressible finite volume.

Definition at line 22 of file WCNSFVCoupledAdvectionPhysicsHelper.h.

Constructor & Destructor Documentation

◆ WCNSFVCoupledAdvectionPhysicsHelper()

WCNSFVCoupledAdvectionPhysicsHelper::WCNSFVCoupledAdvectionPhysicsHelper ( const NavierStokesPhysicsBase derived_physics)

Definition at line 32 of file WCNSFVCoupledAdvectionPhysicsHelper.C.

34  : _advection_physics(derived_physics),
43 {
44 }
const std::vector< std::string > & getVelocityNames() const
To interface with other Physics.
const MooseFunctorName & dynamicViscosityName() const
Return the name of the dynamic viscosity functor.
const MooseFunctorName _density_name
Name of the density material property.
const WCNSFVFlowPhysicsBase * getCoupledFlowPhysics() const
const MooseFunctorName _dynamic_viscosity_name
Name of the dynamic viscosity material property.
const MooseFunctorName & densityName() const
Return the name of the density functor.
bool porousMediumTreatment() const
Return whether a porous medium treatment is applied.
const MooseEnum & getVelocityFaceInterpolationMethod() const
Get the face interpolation method for velocity.
const MooseEnum & compressibility() const
Return the compressibility of the flow equations selected.
const MooseEnum _compressibility
Compressibility type, can be compressible, incompressible or weakly-compressible. ...
const bool _porous_medium_treatment
Switch to show if porous medium treatment is requested or not.
const std::vector< std::string > _velocity_names
Velocity names.
const NavierStokesPhysicsBase * _advection_physics
The Physics class using this helper.
const WCNSFVFlowPhysicsBase * _flow_equations_physics
Flow physics.
const MooseEnum _velocity_interpolation
The velocity / momentum face interpolation method for advecting other quantities. ...
const NonlinearVariableName _pressure_name
Pressure name.
const NonlinearVariableName & getPressureName() const

Member Function Documentation

◆ densityName()

const MooseFunctorName& WCNSFVCoupledAdvectionPhysicsHelper::densityName ( ) const
inline

Definition at line 36 of file WCNSFVCoupledAdvectionPhysicsHelper.h.

Referenced by WCNSFVTwoPhaseMixturePhysics::WCNSFVTwoPhaseMixturePhysics().

36 { return _density_name; }
const MooseFunctorName _density_name
Name of the density material property.

◆ dynamicViscosityName()

const MooseFunctorName& WCNSFVCoupledAdvectionPhysicsHelper::dynamicViscosityName ( ) const
inline

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.

◆ getCoupledFlowPhysics()

const WCNSFVFlowPhysicsBase * WCNSFVCoupledAdvectionPhysicsHelper::getCoupledFlowPhysics ( ) const

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

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.

◆ getPorosityFunctorName()

MooseFunctorName WCNSFVCoupledAdvectionPhysicsHelper::getPorosityFunctorName ( bool  smoothed) const

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.

◆ validParams()

InputParameters WCNSFVCoupledAdvectionPhysicsHelper::validParams ( )
static

Definition at line 17 of file WCNSFVCoupledAdvectionPhysicsHelper.C.

Referenced by WCNSFVTurbulencePhysics::validParams(), WCNSFVScalarTransportPhysicsBase::validParams(), and WCNSFVFluidHeatTransferPhysicsBase::validParams().

18 {
20  params.addClassDescription("Class to facilitate coupling between a Physics defining flow "
21  "equations and other objects, notably advection Physics.");
22 
23  params.addParam<PhysicsName>("coupled_flow_physics",
24  "WCNSFVFlowPhysics generating the velocities");
25  params.addParam<PhysicsName>("coupled_turbulence_physics",
26  "Turbulence Physics coupled with this Physics");
27  params.addParamNamesToGroup("coupled_flow_physics coupled_turbulence_physics", "Coupled Physics");
28 
29  return params;
30 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
InputParameters emptyInputParameters()
void addClassDescription(const std::string &doc_string)
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)

Member Data Documentation

◆ _advection_physics

const NavierStokesPhysicsBase* WCNSFVCoupledAdvectionPhysicsHelper::_advection_physics
protected

The Physics class using this helper.

Definition at line 41 of file WCNSFVCoupledAdvectionPhysicsHelper.h.

Referenced by getCoupledFlowPhysics(), and getCoupledTurbulencePhysics().

◆ _compressibility

const MooseEnum WCNSFVCoupledAdvectionPhysicsHelper::_compressibility
protected

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

Definition at line 48 of file WCNSFVCoupledAdvectionPhysicsHelper.h.

Referenced by WCNSFVFluidHeatTransferPhysics::addEnergyTimeKernels().

◆ _density_name

const MooseFunctorName WCNSFVCoupledAdvectionPhysicsHelper::_density_name
protected

◆ _dynamic_viscosity_name

const MooseFunctorName WCNSFVCoupledAdvectionPhysicsHelper::_dynamic_viscosity_name
protected

Name of the dynamic viscosity material property.

Definition at line 61 of file WCNSFVCoupledAdvectionPhysicsHelper.h.

Referenced by WCNSFVFluidHeatTransferPhysics::addEnergyWallBC(), WCNSFVTurbulencePhysics::addMaterials(), and dynamicViscosityName().

◆ _flow_equations_physics

const WCNSFVFlowPhysicsBase* WCNSFVCoupledAdvectionPhysicsHelper::_flow_equations_physics
protected

Flow physics.

Definition at line 43 of file WCNSFVCoupledAdvectionPhysicsHelper.h.

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

◆ _porous_medium_treatment

const bool WCNSFVCoupledAdvectionPhysicsHelper::_porous_medium_treatment
protected

◆ _pressure_name

const NonlinearVariableName WCNSFVCoupledAdvectionPhysicsHelper::_pressure_name
protected

Pressure name.

Definition at line 56 of file WCNSFVCoupledAdvectionPhysicsHelper.h.

◆ _turbulence_physics

const WCNSFVTurbulencePhysics* WCNSFVCoupledAdvectionPhysicsHelper::_turbulence_physics
protected

◆ _velocity_interpolation

const MooseEnum WCNSFVCoupledAdvectionPhysicsHelper::_velocity_interpolation
protected

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

Definition at line 64 of file WCNSFVCoupledAdvectionPhysicsHelper.h.

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

◆ _velocity_names

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

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