https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
WallFrictionChurchillMaterial Class Reference

Computes drag coefficient using the Churchill formula for Fanning friction factor. More...

#include <WallFrictionChurchillMaterial.h>

Inheritance diagram for WallFrictionChurchillMaterial:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 WallFrictionChurchillMaterial (const InputParameters &parameters)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialPropertyByName (const std::string &name)
 
void validateDerivativeMaterialPropertyBase (const std::string &base)
 
const MaterialPropertyName derivativePropertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName derivativePropertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName derivativePropertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName derivativePropertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual void computeQpProperties ()
 
MaterialProperty< U > & declarePropertyDerivativeTHM (const std::string &base, const std::string &var_name, const unsigned int i=0)
 Method for declaring derivative material properties.
 
const MaterialProperty< U > & getMaterialPropertyDerivativeTHM (const std::string &base, const std::string &var_name, const unsigned int i=0)
 Method for retrieving derivative material properties.
 
const MaterialProperty< U > & getMaterialPropertyDerivativeTHMPhase (const std::string &base, bool property_is_liquid, const std::string &var_name, bool var_is_liquid, const unsigned int i=0)
 Method for retrieving derivative material properties corresponding to phase-dependent derivatives.
 

Protected Attributes

const MaterialPropertyName _f_D_name
 Darcy wall friction coefficient.
 
MaterialProperty< Real > & _f_D
 
MaterialProperty< Real > & _df_D_drhoA
 
MaterialProperty< Real > & _df_D_drhouA
 
MaterialProperty< Real > & _df_D_drhoEA
 
const MaterialProperty< Real > & _mu
 Dynamic viscosity.
 
const MaterialProperty< Real > & _rho
 Density of the phase.
 
const MaterialProperty< Real > & _vel
 Velocity (x-component)
 
const MaterialProperty< Real > & _D_h
 Hydraulic diameter.
 
const Real & _roughness
 Roughness of the surface.
 

Private Member Functions

bool haveMaterialProperty (const std::string &prop_name)
 
std::vector< VariableName > buildVariableVector (const VariableName &c1, const VariableName &c2, const VariableName &c3)
 
void validateCouplingHelper (const MaterialPropertyName &base, const std::vector< VariableName > &c, const System &system, std::vector< VariableName > &missing)
 
bool isNotObjectVariable (const VariableName &name)
 

Private Attributes

FEProblemBase_dmi_fe_problem
 

Detailed Description

Computes drag coefficient using the Churchill formula for Fanning friction factor.

Definition at line 18 of file WallFrictionChurchillMaterial.h.

Constructor & Destructor Documentation

◆ WallFrictionChurchillMaterial()

WallFrictionChurchillMaterial::WallFrictionChurchillMaterial ( const InputParameters parameters)

Definition at line 36 of file WallFrictionChurchillMaterial.C.

38 _f_D_name(getParam<MaterialPropertyName>("f_D")),
39 _f_D(declareProperty<Real>(_f_D_name)),
40 _df_D_drhoA(declarePropertyDerivativeTHM<Real>(_f_D_name, "rhoA")),
41 _df_D_drhouA(declarePropertyDerivativeTHM<Real>(_f_D_name, "rhouA")),
42 _df_D_drhoEA(declarePropertyDerivativeTHM<Real>(_f_D_name, "rhoEA")),
43
44 _mu(getMaterialProperty<Real>("mu")),
45 _rho(getMaterialProperty<Real>("rho")),
46 _vel(getMaterialProperty<Real>("vel")),
47 _D_h(getMaterialProperty<Real>("D_h")),
48 _roughness(getParam<Real>("roughness"))
49{
50}
const Real & _roughness
Roughness of the surface.
const MaterialProperty< Real > & _D_h
Hydraulic diameter.
const MaterialPropertyName _f_D_name
Darcy wall friction coefficient.
const MaterialProperty< Real > & _vel
Velocity (x-component)
const MaterialProperty< Real > & _mu
Dynamic viscosity.
const MaterialProperty< Real > & _rho
Density of the phase.

Member Function Documentation

◆ computeQpProperties()

void WallFrictionChurchillMaterial::computeQpProperties ( )
protectedvirtual

Definition at line 53 of file WallFrictionChurchillMaterial.C.

54{
55 Real Re = THM::Reynolds(1., _rho[_qp], _vel[_qp], _D_h[_qp], _mu[_qp]);
56
58
60 _df_D_drhoA[_qp] = 0;
61 _df_D_drhouA[_qp] = 0;
62 _df_D_drhoEA[_qp] = 0;
63}
const double Re
auto Reynolds(const T1 &volume_fraction, const T2 &rho, const T3 &vel, const T4 &D_h, const T5 &mu)
Compute Reynolds number.
Definition Numerics.h:118
Real DarcyFrictionFactor(const Real &f_F)
Computes Darcy friction factor from Fanning friction factor.
Real FanningFrictionFactorChurchill(Real Re, Real roughness, Real D_h)
Computes Fanning friction factor using Churchill correlation.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ declarePropertyDerivativeTHM()

MaterialProperty< U > & DerivativeMaterialInterfaceTHM< Material >::declarePropertyDerivativeTHM ( const std::string &  base,
const std::string &  var_name,
const unsigned int  i = 0 
)
protectedinherited

Method for declaring derivative material properties.

Template Parameters
UThe material property type
Parameters
baseThe name of the property to take the derivative of
var_nameThe name of the coupled variable vector containing the variable to take the derivative with respect to
iThe index of the variable to take the derivative with respect to within the coupled variable vector

Definition at line 32 of file DerivativeMaterialInterfaceTHM.h.

91{
92 return this->template declarePropertyDerivative<U>(base, this->coupledName(var_name, i));
93}

◆ getMaterialPropertyDerivativeTHM()

const MaterialProperty< U > & DerivativeMaterialInterfaceTHM< Material >::getMaterialPropertyDerivativeTHM ( const std::string &  base,
const std::string &  var_name,
const unsigned int  i = 0 
)
protectedinherited

Method for retrieving derivative material properties.

Template Parameters
UThe material property type
Parameters
baseThe name of the property to take the derivative of
var_nameThe name of the coupled variable vector containing the variable to take the derivative with respect to
iThe index of the variable to take the derivative with respect to within the coupled variable vector

Definition at line 47 of file DerivativeMaterialInterfaceTHM.h.

101{
102 // get the base property name
103 const std::string prop_name = this->getMaterialPropertyName(base);
104
105 // get the name of the variable which derivative is respect to
106 const std::string der_var_name = this->coupledName(var_name, i);
107
108 return this->template getMaterialPropertyByName<U>(
109 this->derivativePropertyNameFirst(prop_name, der_var_name));
110}
const MaterialPropertyName derivativePropertyNameFirst(const MaterialPropertyName &base, const SymbolName &c1) const

◆ getMaterialPropertyDerivativeTHMPhase()

const MaterialProperty< U > & DerivativeMaterialInterfaceTHM< Material >::getMaterialPropertyDerivativeTHMPhase ( const std::string &  base,
bool  property_is_liquid,
const std::string &  var_name,
bool  var_is_liquid,
const unsigned int  i = 0 
)
protectedinherited

Method for retrieving derivative material properties corresponding to phase-dependent derivatives.

The intended behavior of this function is as follows. If the material property and derivative variable correspond to the same phase, then the material property is retrieved as usual. Else, a zero-valued material property is returned, as it is assumed that the material property depends only upon the variables corresponding to its phase.

Template Parameters
UThe material property type
Parameters
baseThe name of the property to take the derivative of
property_is_liquidDoes the property correspond to the liquid phase?
var_nameThe name of the coupled variable vector containing the variable to take the derivative with respect to
var_is_liquidDoes the derivative variable correspond to the liquid phase?
iThe index of the variable to take the derivative with respect to within the coupled variable vector

Definition at line 71 of file DerivativeMaterialInterfaceTHM.h.

121{
122 if (property_is_liquid == var_is_liquid)
123 {
124 return getMaterialPropertyDerivativeTHM<U>(base, var_name, i);
125 }
126 else
127 {
128 const std::string prop_name = this->getMaterialPropertyName(base);
129 const std::string der_var_name = this->coupledName(var_name, i);
130 const std::string der_prop_name = this->derivativePropertyNameFirst(prop_name, der_var_name);
131 return this->template getZeroMaterialProperty<U>(der_prop_name);
132 }
133}

◆ validParams()

InputParameters WallFrictionChurchillMaterial::validParams ( )
static

Definition at line 17 of file WallFrictionChurchillMaterial.C.

18{
20 params.addClassDescription("Computes the Darcy friction factor using the Churchill correlation.");
21 params.addRequiredCoupledVar("rhoA", "Mass equation variable: rho*A");
22 params.addRequiredCoupledVar("rhouA", "Momentum equation variable: rho*u*A");
23 params.addRequiredCoupledVar("rhoEA", "Total energy equation variable: rho*E*A");
24 params.addRequiredParam<MaterialPropertyName>("rho", "Density");
25 params.addRequiredParam<MaterialPropertyName>("vel", "x-component of the velocity");
26 params.addRequiredParam<MaterialPropertyName>("D_h", "hydraulic diameter");
27
28 params.addRequiredParam<MaterialPropertyName>("f_D", "Darcy friction factor material property");
29 params.addRequiredParam<MaterialPropertyName>("mu", "Dynamic viscosity material property");
30
31 params.addRequiredParam<Real>("roughness", "Surface roughness");
32 params.declareControllable("roughness");
33 return params;
34}
void declareControllable(const std::string &name, std::set< ExecFlagType > execute_flags={})
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()

Member Data Documentation

◆ _D_h

const MaterialProperty<Real>& WallFrictionChurchillMaterial::_D_h
protected

Hydraulic diameter.

Definition at line 41 of file WallFrictionChurchillMaterial.h.

Referenced by computeQpProperties().

◆ _df_D_drhoA

MaterialProperty<Real>& WallFrictionChurchillMaterial::_df_D_drhoA
protected

Definition at line 29 of file WallFrictionChurchillMaterial.h.

Referenced by computeQpProperties().

◆ _df_D_drhoEA

MaterialProperty<Real>& WallFrictionChurchillMaterial::_df_D_drhoEA
protected

Definition at line 31 of file WallFrictionChurchillMaterial.h.

Referenced by computeQpProperties().

◆ _df_D_drhouA

MaterialProperty<Real>& WallFrictionChurchillMaterial::_df_D_drhouA
protected

Definition at line 30 of file WallFrictionChurchillMaterial.h.

Referenced by computeQpProperties().

◆ _f_D

MaterialProperty<Real>& WallFrictionChurchillMaterial::_f_D
protected

Definition at line 28 of file WallFrictionChurchillMaterial.h.

Referenced by computeQpProperties().

◆ _f_D_name

const MaterialPropertyName WallFrictionChurchillMaterial::_f_D_name
protected

Darcy wall friction coefficient.

Definition at line 27 of file WallFrictionChurchillMaterial.h.

◆ _mu

const MaterialProperty<Real>& WallFrictionChurchillMaterial::_mu
protected

Dynamic viscosity.

Definition at line 34 of file WallFrictionChurchillMaterial.h.

Referenced by computeQpProperties().

◆ _rho

const MaterialProperty<Real>& WallFrictionChurchillMaterial::_rho
protected

Density of the phase.

Definition at line 37 of file WallFrictionChurchillMaterial.h.

Referenced by computeQpProperties().

◆ _roughness

const Real& WallFrictionChurchillMaterial::_roughness
protected

Roughness of the surface.

Definition at line 43 of file WallFrictionChurchillMaterial.h.

Referenced by computeQpProperties().

◆ _vel

const MaterialProperty<Real>& WallFrictionChurchillMaterial::_vel
protected

Velocity (x-component)

Definition at line 39 of file WallFrictionChurchillMaterial.h.

Referenced by computeQpProperties().


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