OGS
PermeabilityModel.cpp
Go to the documentation of this file.
1
11#include "PermeabilityModel.h"
12
14
16{
17template <int DisplacementDim>
19 SpaceTimeData const& x_t, MediaData const& media_data,
20 SaturationData const& S_L_data,
23 TransportPorosityData const& transport_poro_data,
24 TotalStressData<DisplacementDim> const& total_stress_data,
25 StrainData<DisplacementDim> const& eps_data,
26 EquivalentPlasticStrainData const& equiv_plast_strain_data,
28{
29 namespace MPL = MaterialPropertyLib;
30
31 static constexpr int kelvin_vector_size =
34
35 auto const& medium = media_data.medium;
36
37 MPL::VariableArray variables;
38 variables.liquid_saturation = S_L_data.S_L;
39 variables.temperature = T_data.T;
40 variables.capillary_pressure = p_cap_data.p_cap;
41 variables.transport_porosity = transport_poro_data.phi;
42
43 out.k_rel = medium.property(MPL::PropertyType::relative_permeability)
44 .template value<double>(variables, x_t.x, x_t.t, x_t.dt);
45 out.dk_rel_dS_L =
46 medium.property(MPL::PropertyType::relative_permeability)
47 .template dValue<double>(variables,
48 MPL::Variable::liquid_saturation,
49 x_t.x,
50 x_t.t,
51 x_t.dt);
52
53 // For stress dependent permeability.
54 using SymmetricTensor =
55 KelvinVector<DisplacementDim>; // same data type, but different
56 // semantics
57 variables.total_stress.emplace<SymmetricTensor>(
59 total_stress_data.sigma_total));
60
62 equiv_plast_strain_data.equivalent_plastic_strain;
63
64 variables.volumetric_strain = Invariants::trace(eps_data.eps);
65
66 auto const K_intrinsic = MPL::formEigenTensor<DisplacementDim>(
67 medium.property(MPL::PropertyType::permeability)
68 .value(variables, x_t.x, x_t.t, x_t.dt));
69
70 out.Ki = K_intrinsic;
71}
72
73template struct PermeabilityModel<2>;
74template struct PermeabilityModel<3>;
75} // namespace ProcessLib::ThermoRichardsMechanics
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.
KV::KelvinVectorType< DisplacementDim > KelvinVector
Definition Base.h:26
ParameterLib::SpatialPosition x
Definition Base.h:74
MathLib::KelvinVector::KelvinVectorType< DisplacementDim > eps
Definition StrainData.h:20
MaterialPropertyLib::Medium const & medium
Definition Base.h:61
void eval(SpaceTimeData const &x_t, MediaData const &media_data, SaturationData const &S_L_data, CapillaryPressureData< DisplacementDim > const &p_cap_data, TemperatureData< DisplacementDim > const &T_data, TransportPorosityData const &transport_poro_data, TotalStressData< DisplacementDim > const &total_stress_data, StrainData< DisplacementDim > const &eps_data, EquivalentPlasticStrainData const &equiv_plast_strain_data, PermeabilityData< DisplacementDim > &out) const