OGS
ProcessLib::TH2M::ConstitutiveRelations::ThermalConductivityModel< DisplacementDim > Struct Template Reference

Detailed Description

template<int DisplacementDim>
struct ProcessLib::TH2M::ConstitutiveRelations::ThermalConductivityModel< DisplacementDim >

Definition at line 38 of file ThermalConductivity.h.

#include <ThermalConductivity.h>

Public Member Functions

void eval (SpaceTimeData const &x_t, MediaData const &media_data, TemperatureData const &T_data, PorosityData const &porosity_data, SaturationData const &S_L_data, ThermalConductivityData< DisplacementDim > &thermal_conductivity_data) const
 
void dEval (SpaceTimeData const &x_t, MediaData const &media_data, TemperatureData const &T_data, PorosityData const &porosity_data, PorosityDerivativeData const &porosity_d_data, SaturationData const &S_L_data, ThermalConductivityDerivativeData< DisplacementDim > &thermal_conductivity_d_data) const
 

Member Function Documentation

◆ dEval()

template<int DisplacementDim>
void ProcessLib::TH2M::ConstitutiveRelations::ThermalConductivityModel< DisplacementDim >::dEval ( SpaceTimeData const & x_t,
MediaData const & media_data,
TemperatureData const & T_data,
PorosityData const & porosity_data,
PorosityDerivativeData const & porosity_d_data,
SaturationData const & S_L_data,
ThermalConductivityDerivativeData< DisplacementDim > & thermal_conductivity_d_data ) const

Definition at line 39 of file ThermalConductivity.cpp.

46{
47 namespace MPL = MaterialPropertyLib;
48 MPL::VariableArray variables;
49 variables.temperature = T_data.T;
50 variables.porosity = porosity_data.phi;
51 variables.liquid_saturation = S_L_data.S_L;
52
53 // Derivatives computed here and not in the MPL property because various
54 // derivatives are not available in the VariableArray.
55
56 auto const lambdaGR =
57 media_data.gas.hasProperty(MPL::PropertyType::thermal_conductivity)
59 media_data.gas[MPL::PropertyType::thermal_conductivity].value(
60 variables, x_t.x, x_t.t, x_t.dt))
61 : MPL::formEigenTensor<DisplacementDim>(0.);
62
63 auto const dlambda_GR_dT =
64 media_data.gas.hasProperty(MPL::PropertyType::thermal_conductivity)
66 media_data.gas[MPL::PropertyType::thermal_conductivity]
67 .dValue(variables, MPL::Variable::temperature, x_t.x,
68 x_t.t, x_t.dt))
70
71 auto const lambdaLR =
72 media_data.liquid.hasProperty(MPL::PropertyType::thermal_conductivity)
74 media_data.liquid[MPL::PropertyType::thermal_conductivity]
75 .value(variables, x_t.x, x_t.t, x_t.dt))
77
78 auto const dlambda_LR_dT =
79 media_data.liquid.hasProperty(MPL::PropertyType::thermal_conductivity)
81 media_data.liquid[MPL::PropertyType::thermal_conductivity]
82 .dValue(variables, MPL::Variable::temperature, x_t.x,
83 x_t.t, x_t.dt))
85
86 auto const lambdaSR =
87 media_data.solid.hasProperty(MPL::PropertyType::thermal_conductivity)
89 media_data.solid[MPL::PropertyType::thermal_conductivity]
90 .value(variables, x_t.x, x_t.t, x_t.dt))
92
93 auto const dlambda_SR_dT =
94 media_data.solid.hasProperty(MPL::PropertyType::thermal_conductivity)
96 media_data.solid[MPL::PropertyType::thermal_conductivity]
97 .dValue(variables, MPL::Variable::temperature, x_t.x,
98 x_t.t, x_t.dt))
100
101 thermal_conductivity_d_data.dlambda_dp_cap =
102 -porosity_d_data.dphi_L_dp_cap * lambdaGR +
103 porosity_d_data.dphi_L_dp_cap * lambdaLR;
104
105 double const phi_L = S_L_data.S_L * porosity_data.phi;
106 double const phi_G = (1. - S_L_data.S_L) * porosity_data.phi;
107 double const phi_S = 1. - porosity_data.phi;
108
109 // Assuming dS_L/dT = 0, then:
110 // dphi_G_dT = -dS_L/dT * phi + (1 - S_L) * dphi_dT = (1 - S_L) * dphi_dT
111 // dphi_L_dT = dS_L/dT * phi + S_L * dphi_dT S_L * dphi_dT
112 // dphi_S_dT = -dphi_dT -dphi_dT
113 thermal_conductivity_d_data.dlambda_dT =
114 (1 - S_L_data.S_L) * porosity_d_data.dphi_dT * lambdaGR +
115 phi_G * dlambda_GR_dT +
116 S_L_data.S_L * porosity_d_data.dphi_dT * lambdaLR +
117 +phi_L * dlambda_LR_dT - porosity_d_data.dphi_dT * lambdaSR +
118 phi_S * dlambda_SR_dT;
119}
Eigen::Matrix< double, GlobalDim, GlobalDim > formEigenTensor(MaterialPropertyLib::PropertyDataType const &values)

References ProcessLib::TH2M::ConstitutiveRelations::ThermalConductivityDerivativeData< DisplacementDim >::dlambda_dp_cap, ProcessLib::TH2M::ConstitutiveRelations::ThermalConductivityDerivativeData< DisplacementDim >::dlambda_dT, ProcessLib::TH2M::ConstitutiveRelations::PorosityDerivativeData::dphi_dT, ProcessLib::TH2M::ConstitutiveRelations::PorosityDerivativeData::dphi_L_dp_cap, ProcessLib::ConstitutiveRelations::SpaceTimeData::dt, MaterialPropertyLib::formEigenTensor(), ProcessLib::TH2M::ConstitutiveRelations::MediaData::gas, MaterialPropertyLib::Phase::hasProperty(), ProcessLib::TH2M::ConstitutiveRelations::MediaData::liquid, MaterialPropertyLib::VariableArray::liquid_saturation, ProcessLib::TH2M::ConstitutiveRelations::PorosityData::phi, MaterialPropertyLib::VariableArray::porosity, ProcessLib::TH2M::ConstitutiveRelations::SaturationData::S_L, ProcessLib::TH2M::ConstitutiveRelations::MediaData::solid, ProcessLib::TH2M::ConstitutiveRelations::TemperatureData::T, ProcessLib::ConstitutiveRelations::SpaceTimeData::t, MaterialPropertyLib::VariableArray::temperature, and ProcessLib::ConstitutiveRelations::SpaceTimeData::x.

◆ eval()

template<int DisplacementDim>
void ProcessLib::TH2M::ConstitutiveRelations::ThermalConductivityModel< DisplacementDim >::eval ( SpaceTimeData const & x_t,
MediaData const & media_data,
TemperatureData const & T_data,
PorosityData const & porosity_data,
SaturationData const & S_L_data,
ThermalConductivityData< DisplacementDim > & thermal_conductivity_data ) const

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