https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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 WCNSFVTurbulencePhysicsBasegetCoupledTurbulencePhysics () const
 
MooseFunctorName getPorosityFunctorName (bool smoothed) const
 Return the porosity functor name.
 
const MooseFunctorName & densityName () const
 
const MooseFunctorName & dynamicViscosityName () const
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Attributes

const NavierStokesPhysicsBase_advection_physics
 The Physics class using this helper.
 
const WCNSFVFlowPhysicsBase_flow_equations_physics
 Flow physics.
 
const WCNSFVTurbulencePhysicsBase_turbulence_physics
 Turbulence.
 
bool _has_turbulence_model
 Because of the Modules/navierStokesFV syntax, a turbulence physics often exists without a model we save (_turbulence_physics && _turbulence_physics->hasTurbulenceModel()) in this attribute.
 
const MooseEnum _compressibility
 Compressibility type, can be compressible, incompressible or weakly-compressible.
 
const bool _porous_medium_treatment
 Switch to show if porous medium treatment is requested or not.
 
const std::vector< std::string > _velocity_names
 Velocity names.
 
const NonlinearVariableName _pressure_name
 Pressure name.
 
const MooseFunctorName _density_name
 Name of the density material property.
 
const MooseFunctorName _dynamic_viscosity_name
 Name of the dynamic viscosity material property.
 
const MooseEnum _velocity_interpolation
 The velocity / momentum face interpolation method for advecting other quantities.
 

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 WCNSFVFlowPhysicsBase * _flow_equations_physics
Flow physics.
const WCNSFVFlowPhysicsBase * getCoupledFlowPhysics() const
const NonlinearVariableName _pressure_name
Pressure name.
const MooseFunctorName _dynamic_viscosity_name
Name of the dynamic viscosity material property.
const NavierStokesPhysicsBase * _advection_physics
The Physics class using this helper.
const std::vector< std::string > _velocity_names
Velocity names.
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 MooseEnum _velocity_interpolation
The velocity / momentum face interpolation method for advecting other quantities.
const MooseFunctorName _density_name
Name of the density material property.
const NonlinearVariableName & getPressureName() const
const MooseEnum & compressibility() const
Return the compressibility of the flow equations selected.
const std::vector< std::string > & getVelocityNames() const
To interface with other Physics.
const MooseEnum & getVelocityFaceInterpolationMethod() const
Get the face interpolation method for velocity.
const MooseFunctorName & dynamicViscosityName() const
Return the name of the dynamic viscosity functor.
const MooseFunctorName & densityName() const
Return the name of the density functor.
bool porousMediumTreatment() const
Return whether a porous medium treatment is applied.

Member Function Documentation

◆ densityName()

const MooseFunctorName & WCNSFVCoupledAdvectionPhysicsHelper::densityName ( ) const
inline

◆ dynamicViscosityName()

const MooseFunctorName & WCNSFVCoupledAdvectionPhysicsHelper::dynamicViscosityName ( ) const
inline

Definition at line 37 of file WCNSFVCoupledAdvectionPhysicsHelper.h.

◆ 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)
65 if (_advection_physics->checkBlockRestrictionIdentical(
66 physics->name(), physics->blocks(), /*error_if_not_identical=*/false))
67 {
68 return physics;
69 }
70 }
71 mooseError("No coupled flow Physics found of type derived from 'WCNSFVFlowPhysicsBase'. Use the "
72 "'coupled_flow_physics' parameter to give the name of the desired "
73 "WCNSFVFlowPhysicsBase-derived Physics to couple with");
74}
void mooseError(Args &&... args)
char ** blocks
const std::string name
Definition Setup.h:21
const T & getParam(const std::string &name) const
bool isParamValid(const std::string &name) const
const T * getCoupledPhysics(const PhysicsName &phys_name, const bool allow_fail=false) const
Base class for Physics which create the Navier Stokes flow equations.
if(subdm)

◆ getCoupledTurbulencePhysics()

const WCNSFVTurbulencePhysicsBase * WCNSFVCoupledAdvectionPhysicsHelper::getCoupledTurbulencePhysics ( ) const

Definition at line 77 of file WCNSFVCoupledAdvectionPhysicsHelper.C.

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

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

◆ 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

◆ validParams()

InputParameters WCNSFVCoupledAdvectionPhysicsHelper::validParams ( )
static

Definition at line 17 of file WCNSFVCoupledAdvectionPhysicsHelper.C.

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}
InputParameters emptyInputParameters()
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)

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

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 51 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 64 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(), WCNSFVTurbulencePhysicsBase::addAuxiliaryKernels(), WCNSFVTurbulencePhysics::addAxisymmetricTurbulentViscousSource(), WCNSFVFluidHeatTransferPhysics::addEnergyAdvectionKernels(), WCNSLinearFVFluidHeatTransferPhysics::addEnergyAdvectionKernels(), WCNSFVFluidHeatTransferPhysics::addEnergyHeatConductionKernels(), WCNSFVFluidHeatTransferPhysics::addEnergyInletBC(), WCNSLinearFVFluidHeatTransferPhysics::addEnergyInletBC(), WCNSLinearFVFluidHeatTransferPhysics::addEnergyOutletBC(), WCNSFVFluidHeatTransferPhysics::addEnergySeparatorBC(), WCNSFVFluidHeatTransferPhysics::addEnergyTimeKernels(), WCNSFVFluidHeatTransferPhysics::addEnergyWallBC(), WCNSLinearFVFluidHeatTransferPhysics::addEnergyWallBC(), WCNSFVTurbulencePhysics::addFlowTurbulenceKernels(), WCNSFVTurbulencePhysics::addFluidEnergyTurbulenceKernels(), WCNSFVTwoPhaseMixturePhysics::addFunctorMaterials(), WCNSLinearFVTurbulencePhysics::addFunctorMaterials(), WCNSFVTurbulencePhysics::addFVBCs(), WCNSLinearFVTurbulencePhysics::addFVBCs(), WCNSFVTwoPhaseMixturePhysics::addFVKernels(), WCNSLinearFVTwoPhaseMixturePhysics::addFVKernels(), WCNSFVFluidHeatTransferPhysicsBase::addInitialConditions(), WCNSFVTurbulencePhysicsBase::addInitialConditions(), WCNSFVTurbulencePhysics::addKEpsilonAdvection(), WCNSLinearFVTurbulencePhysics::addKEpsilonAdvection(), WCNSFVTurbulencePhysics::addKEpsilonDiffusion(), WCNSFVTurbulencePhysics::addKEpsilonSink(), WCNSLinearFVTurbulencePhysics::addKEpsilonSink(), WCNSLinearFVTurbulencePhysics::addKEpsilonTimeDerivatives(), WCNSFVFluidHeatTransferPhysics::addMaterials(), WCNSFVTurbulencePhysicsBase::addMaterials(), WCNSLinearFVFluidHeatTransferPhysics::addMaterials(), WCNSLinearFVTwoPhaseMixturePhysics::addMaterials(), WCNSFVTwoPhaseMixturePhysics::addPhaseDriftFluxTerm(), WCNSLinearFVTwoPhaseMixturePhysics::addPhaseDriftFluxTerm(), WCNSFVScalarTransportPhysics::addScalarAdvectionKernels(), WCNSLinearFVScalarTransportPhysics::addScalarAdvectionKernels(), WCNSFVScalarTransportPhysics::addScalarInletBC(), WCNSLinearFVScalarTransportPhysics::addScalarInletBC(), WCNSLinearFVScalarTransportPhysics::addScalarOutletBC(), WCNSLinearFVTurbulencePhysics::checkIntegrity(), WCNSLinearFVTwoPhaseMixturePhysics::checkIntegrity(), WCNSFVFluidHeatTransferPhysicsBase::getNumberAlgebraicGhostingLayersNeeded(), WCNSFVScalarTransportPhysicsBase::getNumberAlgebraicGhostingLayersNeeded(), WCNSFVTurbulencePhysics::getNumberAlgebraicGhostingLayersNeeded(), WCNSLinearFVTurbulencePhysics::getNumberAlgebraicGhostingLayersNeeded(), getPorosityFunctorName(), WCNSFVTurbulencePhysicsBase::retrieveCoupledPhysics(), WCNSFVFluidHeatTransferPhysicsBase::WCNSFVFluidHeatTransferPhysicsBase(), WCNSFVTwoPhaseMixturePhysics::WCNSFVTwoPhaseMixturePhysics(), WCNSLinearFVScalarTransportPhysics::WCNSLinearFVScalarTransportPhysics(), and WCNSLinearFVTwoPhaseMixturePhysics::WCNSLinearFVTwoPhaseMixturePhysics().

◆ _has_turbulence_model

bool WCNSFVCoupledAdvectionPhysicsHelper::_has_turbulence_model
protected

◆ _porous_medium_treatment

const bool WCNSFVCoupledAdvectionPhysicsHelper::_porous_medium_treatment
protected

◆ _pressure_name

const NonlinearVariableName WCNSFVCoupledAdvectionPhysicsHelper::_pressure_name
protected

Pressure name.

Definition at line 59 of file WCNSFVCoupledAdvectionPhysicsHelper.h.

◆ _turbulence_physics

const WCNSFVTurbulencePhysicsBase* 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 67 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: