https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected 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. More...
 
const bool _wet_and_dry_differ
 Whether _la_wet has been supplied. More...
 
const RealTensorValue _la_wet
 Wet thermal conductivity of rock. More...
 
const Real _exponent
 Exponent for saturation. More...
 
const bool _aqueous_phase
 Whether this is a fluid simulation. More...
 
const unsigned _aqueous_phase_number
 Phase number of the aqueous phase. More...
 
const GenericMaterialProperty< std::vector< Real >, is_ad > *const _saturation_qp
 Saturation of the fluid phases at the quadpoints. More...
 
const MaterialProperty< std::vector< std::vector< Real > > > *const _dsaturation_qp_dvar
 d(Saturation)/d(PorousFlow variable) More...
 
 usingPorousFlowThermalConductivityMembers
 
GenericMaterialProperty< RealTensorValue, is_ad > & _la_qp
 Thermal conducitivity at the qps. More...
 
MaterialProperty< std::vector< RealTensorValue > > *const _dla_qp_dvar
 d(thermal conductivity at the qps)/d(PorousFlow variable) More...
 
const unsigned int _num_phases
 Number of phases. More...
 
const unsigned int _num_components
 Number of fluid components. More...
 
const unsigned int _num_var
 Number of PorousFlow variables. More...
 

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 }
const unsigned int _num_phases
Number of phases.
const GenericMaterialProperty< std::vector< Real >, is_ad > *const _saturation_qp
Saturation of the fluid phases at the quadpoints.
void mooseError(Args &&... args)
const MaterialProperty< std::vector< std::vector< Real > > > *const _dsaturation_qp_dvar
d(Saturation)/d(PorousFlow variable)
const bool _aqueous_phase
Whether this is a fluid simulation.
TensorValue< Real > RealTensorValue
const RealTensorValue _la_dry
Dry thermal conductivity of rock.
const bool _wet_and_dry_differ
Whether _la_wet has been supplied.
const unsigned _aqueous_phase_number
Phase number of the aqueous phase.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Base class for materials that provide thermal conducitivity.
const RealTensorValue _la_wet
Wet thermal conductivity of rock.
bool isParamValid(const std::string &name) const

Member Function Documentation

◆ computeQpProperties()

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

Definition at line 76 of file PorousFlowThermalConductivityIdeal.C.

77 {
78  _la_qp[_qp] = _la_dry;
80  _la_qp[_qp] +=
82 
83  if constexpr (!is_ad)
84  {
85  (*_dla_qp_dvar)[_qp].assign(_num_var, RealTensorValue());
87  for (const auto v : make_range(_num_var))
88  (*_dla_qp_dvar)[_qp][v] =
90  (*_dsaturation_qp_dvar)[_qp][_aqueous_phase_number][v] * (_la_wet - _la_dry);
91  }
92 }
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.
TensorValue< Real > RealTensorValue
GenericMaterialProperty< RealTensorValue, is_ad > & _la_qp
Thermal conducitivity at the qps.
const unsigned int _num_var
Number of PorousFlow variables.
const RealTensorValue _la_dry
Dry thermal conductivity of rock.
const bool _wet_and_dry_differ
Whether _la_wet has been supplied.
const unsigned _aqueous_phase_number
Phase number of the aqueous phase.
static const std::string v
Definition: NS.h:84
IntRange< T > make_range(T beg, T end)
const RealTensorValue _la_wet
Wet thermal conductivity of rock.
MooseUnits pow(const MooseUnits &, int)

◆ 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 addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
TensorValue< Real > RealTensorValue
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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: