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
WallFrictionFunctionMaterial Class Reference

Converts Darcy friction factor function into material property. More...

#include <WallFrictionFunctionMaterial.h>

Inheritance diagram for WallFrictionFunctionMaterial:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 WallFrictionFunctionMaterial (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 Function_function
 
const MaterialPropertyName _f_D_name
 
MaterialProperty< Real > & _f_D
 
MaterialProperty< Real > *const _df_D_dbeta
 
MaterialProperty< Real > & _df_D_darhoA
 
MaterialProperty< Real > & _df_D_darhouA
 
MaterialProperty< Real > & _df_D_darhoEA
 

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

Converts Darcy friction factor function into material property.

Definition at line 20 of file WallFrictionFunctionMaterial.h.

Constructor & Destructor Documentation

◆ WallFrictionFunctionMaterial()

WallFrictionFunctionMaterial::WallFrictionFunctionMaterial ( const InputParameters parameters)

Definition at line 33 of file WallFrictionFunctionMaterial.C.

35
36 _function(getFunction("function")),
37
38 _f_D_name(getParam<MaterialPropertyName>("f_D")),
39 _f_D(declareProperty<Real>(_f_D_name)),
40 _df_D_dbeta(isCoupled("beta") ? &declarePropertyDerivativeTHM<Real>(_f_D_name, "beta")
41 : nullptr),
45{
46}
MaterialProperty< U > & declarePropertyDerivativeTHM(const std::string &base, const std::string &var_name, const unsigned int i=0)
Method for declaring derivative material properties.
MaterialProperty< Real > & _df_D_darhouA
MaterialProperty< Real > & _df_D_darhoEA
MaterialProperty< Real > *const _df_D_dbeta
MaterialProperty< Real > & _df_D_darhoA
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Member Function Documentation

◆ computeQpProperties()

void WallFrictionFunctionMaterial::computeQpProperties ( )
protectedvirtual

Definition at line 49 of file WallFrictionFunctionMaterial.C.

50{
51 _f_D[_qp] = _function.value(_t, _q_point[_qp]);
52
53 _df_D_darhoA[_qp] = 0;
54 _df_D_darhouA[_qp] = 0;
55 _df_D_darhoEA[_qp] = 0;
56 if (isCoupled("beta"))
57 (*_df_D_dbeta)[_qp] = 0;
58}
virtual Real value(Real t, const Point &p) const

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

Definition at line 16 of file WallFrictionFunctionMaterial.C.

17{
19 params.addClassDescription("Defines a Darcy friction factor equal to the value of the function "
20 "at the local coordinates and time");
21 params.addRequiredParam<MaterialPropertyName>("f_D", "Darcy friction factor material property");
22
23 params.addRequiredParam<FunctionName>("function", "Darcy friction factor function");
24
25 params.addCoupledVar("beta", "Volume fraction equation variable: beta");
26 params.addRequiredCoupledVar("arhoA", "Mass equation variable: alpha*rho*A");
27 params.addRequiredCoupledVar("arhouA", "Momentum equation variable: alpha*rho*u*A");
28 params.addRequiredCoupledVar("arhoEA", "Energy equation variable: alpha*rho*E*A");
29
30 return params;
31}
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)
void addCoupledVar(const std::string &name, const std::string &doc_string)
static InputParameters validParams()

Member Data Documentation

◆ _df_D_darhoA

MaterialProperty<Real>& WallFrictionFunctionMaterial::_df_D_darhoA
protected

Definition at line 33 of file WallFrictionFunctionMaterial.h.

Referenced by computeQpProperties().

◆ _df_D_darhoEA

MaterialProperty<Real>& WallFrictionFunctionMaterial::_df_D_darhoEA
protected

Definition at line 35 of file WallFrictionFunctionMaterial.h.

Referenced by computeQpProperties().

◆ _df_D_darhouA

MaterialProperty<Real>& WallFrictionFunctionMaterial::_df_D_darhouA
protected

Definition at line 34 of file WallFrictionFunctionMaterial.h.

Referenced by computeQpProperties().

◆ _df_D_dbeta

MaterialProperty<Real>* const WallFrictionFunctionMaterial::_df_D_dbeta
protected

Definition at line 32 of file WallFrictionFunctionMaterial.h.

◆ _f_D

MaterialProperty<Real>& WallFrictionFunctionMaterial::_f_D
protected

Definition at line 31 of file WallFrictionFunctionMaterial.h.

Referenced by computeQpProperties().

◆ _f_D_name

const MaterialPropertyName WallFrictionFunctionMaterial::_f_D_name
protected

Definition at line 30 of file WallFrictionFunctionMaterial.h.

◆ _function

const Function& WallFrictionFunctionMaterial::_function
protected

Definition at line 28 of file WallFrictionFunctionMaterial.h.

Referenced by computeQpProperties().


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