OGS
TRMHeatStorageAndFlux.cpp
Go to the documentation of this file.
1
12
14
16{
17template <int DisplacementDim>
19 SpaceTimeData const& x_t, MediaData const& media_data,
20 LiquidDensityData const& rho_L_data, SolidDensityData const& rho_S_data,
21 SaturationData const& S_L_data, SaturationDataDeriv const& dS_L_data,
22 PorosityData const& poro_data, LiquidViscosityData const& mu_L_data,
25 DarcyLawData<DisplacementDim> const& darcy_data,
27{
28 namespace MPL = MaterialPropertyLib;
29 MPL::VariableArray variables;
30 variables.temperature = T_data.T;
31 variables.porosity = poro_data.phi;
32 variables.liquid_saturation = S_L_data.S_L;
33
34 auto const& liquid_phase = media_data.liquid;
35 auto const& solid_phase = media_data.solid;
36
37 auto const specific_heat_capacity_fluid =
39 .template value<double>(variables, x_t.x, x_t.t, x_t.dt);
40
41 auto const specific_heat_capacity_solid =
42 solid_phase
44 .template value<double>(variables, x_t.x, x_t.t, x_t.dt);
45
46 double const phi = poro_data.phi;
47
48 // TODO real vs. "non-real" values
49 double const volumetric_heat_capacity_liquid =
50 rho_L_data.rho_LR * specific_heat_capacity_fluid;
51
52 // NOTE: Gas phase is not included.
53 double const volumetric_heat_capacity_liquid_and_solid =
54 rho_S_data.rho_SR * specific_heat_capacity_solid * (1 - phi) +
55 S_L_data.S_L * phi * volumetric_heat_capacity_liquid;
56
57 out.M_TT_X_NTN = volumetric_heat_capacity_liquid_and_solid;
58
60 media_data.medium
62 .value(variables, x_t.x, x_t.t, x_t.dt));
63
64 // Unit is J / m^2 / s / K. It's not a heat flux, but related.
66 volumetric_heat_capacity_liquid * darcy_data();
67
68 //
69 // temperature equation, pressure part
70 //
71 out.K_Tp_NT_V_dN = -volumetric_heat_capacity_liquid * perm.k_rel /
72 mu_L_data() * (perm.Ki.transpose() * T_data.grad_T);
73 out.K_Tp_X_NTN = -volumetric_heat_capacity_liquid *
74 darcy_data().dot(T_data.grad_T) / perm.k_rel *
75 perm.dk_rel_dS_L * dS_L_data.dS_L_dp_cap;
76}
77
78template struct TRMHeatStorageAndFluxModel<2>;
79template struct TRMHeatStorageAndFluxModel<3>;
80} // namespace ProcessLib::ThermoRichardsMechanics
Property const & property(PropertyType const &p) const
Definition Medium.cpp:54
Property const & property(PropertyType const &p) const
Definition Phase.cpp:53
virtual PropertyDataType value() const
Definition Property.cpp:76
Eigen::Matrix< double, GlobalDim, GlobalDim > formEigenTensor(MaterialPropertyLib::PropertyDataType const &values)
ParameterLib::SpatialPosition x
Definition Base.h:74
MaterialPropertyLib::Medium const & medium
Definition Base.h:61
MaterialPropertyLib::Phase const & liquid
Definition Base.h:62
MaterialPropertyLib::Phase const & solid
Definition Base.h:63
GlobalDimVector< DisplacementDim > advective_heat_flux_contribution_to_K_liquid
void eval(SpaceTimeData const &x_t, MediaData const &media_data, LiquidDensityData const &rho_L_data, SolidDensityData const &rho_S_data, SaturationData const &S_L_data, SaturationDataDeriv const &dS_L_data, PorosityData const &poro_data, LiquidViscosityData const &mu_L_data, PermeabilityData< DisplacementDim > const &perm, TemperatureData< DisplacementDim > const &T_data, DarcyLawData< DisplacementDim > const &darcy_data, TRMHeatStorageAndFluxData< DisplacementDim > &out) const
Eigen::Vector< double, DisplacementDim > grad_T
Definition Base.h:71