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
PorousFlowThermalConductivityIdealTempl< is_ad > Class Template Reference

This material computes thermal conductivity for a PorousMedium - fluid system, by using Thermal conductivity = dry_thermal_conductivity + S^exponent * (wet_thermal_conductivity - dry_thermal_conductivity), where S is the aqueous saturation. More...

#include <PorousFlowThermalConductivityIdeal.h>

Inheritance diagram for PorousFlowThermalConductivityIdealTempl< is_ad >:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 PorousFlowThermalConductivityIdealTempl (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 () override
 

Protected Attributes

const RealTensorValue _la_dry
 Dry thermal conductivity of rock.
 
const bool _wet_and_dry_differ
 Whether _la_wet has been supplied.
 
const RealTensorValue _la_wet
 Wet thermal conductivity of rock.
 
const Real _exponent
 Exponent for saturation.
 
const bool _aqueous_phase
 Whether this is a fluid simulation.
 
const unsigned _aqueous_phase_number
 Phase number of the aqueous phase.
 
const GenericMaterialProperty< std::vector< Real >, is_ad > *const _saturation_qp
 Saturation of the fluid phases at the quadpoints.
 
const MaterialProperty< std::vector< std::vector< Real > > > *const _dsaturation_qp_dvar
 d(Saturation)/d(PorousFlow variable)
 
 usingPorousFlowThermalConductivityMembers
 
GenericMaterialProperty< RealTensorValue, is_ad > & _la_qp
 Thermal conducitivity at the qps.
 
MaterialProperty< std::vector< RealTensorValue > > *const _dla_qp_dvar
 d(thermal conductivity at the qps)/d(PorousFlow variable)
 
const unsigned int _num_phases
 Number of phases.
 
const unsigned int _num_components
 Number of fluid components.
 
const unsigned int _num_var
 Number of PorousFlow variables.
 

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

template<bool is_ad>
class PorousFlowThermalConductivityIdealTempl< is_ad >

This material computes thermal conductivity for a PorousMedium - fluid system, by using Thermal conductivity = dry_thermal_conductivity + S^exponent * (wet_thermal_conductivity - dry_thermal_conductivity), where S is the aqueous saturation.

Definition at line 22 of file PorousFlowThermalConductivityIdeal.h.

Constructor & Destructor Documentation

◆ PorousFlowThermalConductivityIdealTempl()

Definition at line 46 of file PorousFlowThermalConductivityIdeal.C.

49 _la_dry(this->template getParam<RealTensorValue>("dry_thermal_conductivity")),
50 _wet_and_dry_differ(parameters.isParamValid("wet_thermal_conductivity")),
52 ? this->template getParam<RealTensorValue>("wet_thermal_conductivity")
53 : this->template getParam<RealTensorValue>("dry_thermal_conductivity")),
54 _exponent(this->template getParam<Real>("exponent")),
56 _aqueous_phase_number(this->template getParam<unsigned>("aqueous_phase_number")),
58 ? &this->template getGenericMaterialProperty<std::vector<Real>, is_ad>(
59 "PorousFlow_saturation_qp")
60 : nullptr),
62 ? &this->template getMaterialProperty<std::vector<std::vector<Real>>>(
63 "dPorousFlow_saturation_qp_dvar")
64 : nullptr)
65{
67 mooseError("PorousFlowThermalConductivityIdeal: Your aqueous phase number, ",
69 " must not exceed the number of fluid phases in the system, which is ",
71 "\n");
72}
void mooseError(Args &&... args)
bool isParamValid(const std::string &name) const
const unsigned int _num_phases
Number of phases.
Base class for materials that provide thermal conducitivity.
const GenericMaterialProperty< std::vector< Real >, is_ad > *const _saturation_qp
Saturation of the fluid phases at the quadpoints.
const bool _aqueous_phase
Whether this is a fluid simulation.
const MaterialProperty< std::vector< std::vector< Real > > > *const _dsaturation_qp_dvar
d(Saturation)/d(PorousFlow variable)
const RealTensorValue _la_dry
Dry thermal conductivity of rock.
const unsigned _aqueous_phase_number
Phase number of the aqueous phase.
const RealTensorValue _la_wet
Wet thermal conductivity of rock.
const bool _wet_and_dry_differ
Whether _la_wet has been supplied.
TensorValue< Real > RealTensorValue
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Member Function Documentation

◆ computeQpProperties()

template<bool is_ad>
void PorousFlowThermalConductivityIdealTempl< is_ad >::computeQpProperties ( )
overrideprotectedvirtual

Definition at line 76 of file PorousFlowThermalConductivityIdeal.C.

77{
78 using std::pow;
79
80 _la_qp[_qp] = _la_dry;
82 _la_qp[_qp] +=
84
85 if constexpr (!is_ad)
86 {
87 (*_dla_qp_dvar)[_qp].assign(_num_var, RealTensorValue());
89 for (const auto v : make_range(_num_var))
90 (*_dla_qp_dvar)[_qp][v] =
93 }
94}
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const double v
const unsigned int _num_var
Number of PorousFlow variables.
MaterialProperty< std::vector< RealTensorValue > > *const _dla_qp_dvar
d(thermal conductivity at the qps)/d(PorousFlow variable)
GenericMaterialProperty< RealTensorValue, is_ad > & _la_qp
Thermal conducitivity at the qps.
IntRange< T > make_range(T beg, T end)

◆ validParams()

template<bool is_ad>
InputParameters PorousFlowThermalConductivityIdealTempl< is_ad >::validParams ( )
static

Definition at line 17 of file PorousFlowThermalConductivityIdeal.C.

18{
21 "dry_thermal_conductivity",
22 "The thermal conductivity of the rock matrix when the aqueous saturation is zero");
23 params.addParam<RealTensorValue>("wet_thermal_conductivity",
24 "The thermal conductivity of the rock matrix when the aqueous "
25 "saturation is unity. This defaults to "
26 "dry_thermal_conductivity.");
27 params.addParam<Real>("exponent",
28 1.0,
29 "Exponent on saturation. Thermal conductivity = "
30 "dry_thermal_conductivity + S^exponent * "
31 "(wet_thermal_conductivity - dry_thermal_conductivity), "
32 "where S is the aqueous saturation");
33 params.addParam<unsigned>("aqueous_phase_number",
34 0,
35 "The phase number of the aqueous phase. In simulations without "
36 "fluids, this parameter and the exponent parameter will not be "
37 "used: only the dry_thermal_conductivity will be used.");
38 params.addClassDescription("This Material calculates rock-fluid combined thermal conductivity by "
39 "using a weighted sum. Thermal conductivity = "
40 "dry_thermal_conductivity + S^exponent * (wet_thermal_conductivity - "
41 "dry_thermal_conductivity), where S is the aqueous saturation");
42 return params;
43}
void addRequiredParam(const std::string &name, const std::string &doc_string)
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)

Member Data Documentation

◆ _aqueous_phase

template<bool is_ad>
const bool PorousFlowThermalConductivityIdealTempl< is_ad >::_aqueous_phase
protected

◆ _aqueous_phase_number

template<bool is_ad>
const unsigned PorousFlowThermalConductivityIdealTempl< is_ad >::_aqueous_phase_number
protected

◆ _dla_qp_dvar

template<bool is_ad>
MaterialProperty<std::vector<RealTensorValue> >* const PorousFlowThermalConductivityBaseTempl< is_ad >::_dla_qp_dvar
protectedinherited

d(thermal conductivity at the qps)/d(PorousFlow variable)

Definition at line 30 of file PorousFlowThermalConductivityBase.h.

◆ _dsaturation_qp_dvar

template<bool is_ad>
const MaterialProperty<std::vector<std::vector<Real> > >* const PorousFlowThermalConductivityIdealTempl< is_ad >::_dsaturation_qp_dvar
protected

d(Saturation)/d(PorousFlow variable)

Definition at line 54 of file PorousFlowThermalConductivityIdeal.h.

◆ _exponent

template<bool is_ad>
const Real PorousFlowThermalConductivityIdealTempl< is_ad >::_exponent
protected

Exponent for saturation.

Definition at line 42 of file PorousFlowThermalConductivityIdeal.h.

◆ _la_dry

template<bool is_ad>
const RealTensorValue PorousFlowThermalConductivityIdealTempl< is_ad >::_la_dry
protected

Dry thermal conductivity of rock.

Definition at line 33 of file PorousFlowThermalConductivityIdeal.h.

◆ _la_qp

template<bool is_ad>
GenericMaterialProperty<RealTensorValue, is_ad>& PorousFlowThermalConductivityBaseTempl< is_ad >::_la_qp
protectedinherited

Thermal conducitivity at the qps.

Definition at line 27 of file PorousFlowThermalConductivityBase.h.

◆ _la_wet

template<bool is_ad>
const RealTensorValue PorousFlowThermalConductivityIdealTempl< is_ad >::_la_wet
protected

Wet thermal conductivity of rock.

Definition at line 39 of file PorousFlowThermalConductivityIdeal.h.

◆ _num_components

const unsigned int PorousFlowMaterialVectorBase::_num_components
protectedinherited

◆ _num_phases

const unsigned int PorousFlowMaterialVectorBase::_num_phases
protectedinherited

◆ _num_var

const unsigned int PorousFlowMaterialVectorBase::_num_var
protectedinherited

◆ _saturation_qp

template<bool is_ad>
const GenericMaterialProperty<std::vector<Real>, is_ad>* const PorousFlowThermalConductivityIdealTempl< is_ad >::_saturation_qp
protected

Saturation of the fluid phases at the quadpoints.

Definition at line 51 of file PorousFlowThermalConductivityIdeal.h.

◆ _wet_and_dry_differ

template<bool is_ad>
const bool PorousFlowThermalConductivityIdealTempl< is_ad >::_wet_and_dry_differ
protected

Whether _la_wet has been supplied.

Definition at line 36 of file PorousFlowThermalConductivityIdeal.h.

◆ usingPorousFlowThermalConductivityMembers

template<bool is_ad>
PorousFlowThermalConductivityIdealTempl< is_ad >::usingPorousFlowThermalConductivityMembers
protected

Definition at line 56 of file PorousFlowThermalConductivityIdeal.h.


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