OGS
PermeabilityModel.cpp
Go to the documentation of this file.
1
10#include "PermeabilityModel.h"
11
13
14namespace ProcessLib::TH2M
15{
16namespace ConstitutiveRelations
17{
18template <int DisplacementDim>
20 SpaceTimeData const& x_t, MediaData const& media_data,
21 SaturationData const& S_L_data, CapillaryPressureData const& p_cap,
22 TemperatureData const& T_data,
23 TotalStressData<DisplacementDim> const& total_stress_data,
24 StrainData<DisplacementDim> const& eps_data,
25 EquivalentPlasticStrainData const& equivalent_plastic_strain,
27{
28 namespace MPL = MaterialPropertyLib;
29
30 static constexpr int kelvin_vector_size =
33
34 auto const& medium = media_data.medium;
35
36 MPL::VariableArray variables;
37 variables.liquid_saturation = S_L_data.S_L;
38 variables.temperature = T_data.T;
39 variables.capillary_pressure = p_cap();
40
41 out.k_rel_G =
42 medium
43 .property(MPL::PropertyType::relative_permeability_nonwetting_phase)
44 .template value<double>(variables, x_t.x, x_t.t, x_t.dt);
45
46 out.dk_rel_G_dS_L =
47 medium[MPL::PropertyType::relative_permeability_nonwetting_phase]
48 .template dValue<double>(variables,
49 MPL::Variable::liquid_saturation, x_t.x,
50 x_t.t, x_t.dt);
51
52 out.k_rel_L = medium.property(MPL::PropertyType::relative_permeability)
53 .template value<double>(variables, x_t.x, x_t.t, x_t.dt);
54
55 out.dk_rel_L_dS_L = medium[MPL::PropertyType::relative_permeability]
56 .template dValue<double>(
57 variables, MPL::Variable::liquid_saturation,
58 x_t.x, x_t.t, x_t.dt);
59
60 // For stress dependent permeability.
61 variables.total_stress =
63 total_stress_data.sigma_total);
64
65 variables.equivalent_plastic_strain = equivalent_plastic_strain();
66
67 variables.volumetric_strain = Invariants::trace(eps_data.eps);
68
70 medium.property(MPL::PropertyType::permeability)
71 .value(variables, x_t.x, x_t.t, x_t.dt));
72}
73
74template struct PermeabilityModel<2>;
75template struct PermeabilityModel<3>;
76} // namespace ConstitutiveRelations
77} // namespace ProcessLib::TH2M
Eigen::Matrix< double, GlobalDim, GlobalDim > formEigenTensor(MaterialPropertyLib::PropertyDataType const &values)
Eigen::Matrix< double, 4, 1 > kelvinVectorToSymmetricTensor(Eigen::Matrix< double, 4, 1, Eigen::ColMajor, 4, 1 > const &v)
constexpr int kelvin_vector_dimensions(int const displacement_dim)
Kelvin vector dimensions for given displacement dimension.
ParameterLib::SpatialPosition x
Definition Base.h:74
MathLib::KelvinVector::KelvinVectorType< DisplacementDim > eps
Definition StrainData.h:20
MaterialPropertyLib::Medium const & medium
Definition Base.h:45
void eval(SpaceTimeData const &x_t, MediaData const &media_data, SaturationData const &S_L_data, CapillaryPressureData const &p_cap, TemperatureData const &T_data, TotalStressData< DisplacementDim > const &total_stress_data, StrainData< DisplacementDim > const &eps_data, EquivalentPlasticStrainData const &equivalent_plastic_strain, PermeabilityData< DisplacementDim > &out) const