OGS
TransportPorosity.cpp
Go to the documentation of this file.
1
11#include "TransportPorosity.h"
12
14{
15
16template <int DisplacementDim>
17
19 SpaceTimeData const& x_t, MediaData const& media_data,
20 SolidCompressibilityData const& solid_compressibility_data,
21 BishopsData const& bishops_data,
22 PrevState<BishopsData> const& bishops_data_prev,
24 PorosityData const& poro_data, StrainData<DisplacementDim> const& eps_data,
25 PrevState<StrainData<DisplacementDim>> const& eps_prev_data,
26 PrevState<TransportPorosityData> const& transport_poro_data_prev,
27 TransportPorosityData& transport_poro_data) const
28{
29 namespace MPL = MaterialPropertyLib;
30
31 auto const& medium = media_data.medium;
32
33 if (!medium.hasProperty(MPL::PropertyType::transport_porosity))
34 {
35 transport_poro_data.phi = poro_data.phi;
36 return;
37 }
38
39 MPL::VariableArray variables;
40 MPL::VariableArray variables_prev;
41
42 static constexpr int kelvin_vector_size =
45 // Used in
46 // MaterialLib/MPL/Properties/PermeabilityOrthotropicPowerLaw.cpp
47 variables_prev.transport_porosity = transport_poro_data_prev->phi;
48
49 // Used in
50 // MaterialLib/MPL/Properties/TransportPorosityFromMassBalance.cpp
51 variables.grain_compressibility = solid_compressibility_data.beta_SR;
52 // Set volumetric strain rate for the general case without swelling.
53 variables.volumetric_strain = Invariants::trace(eps_data.eps);
54 variables_prev.volumetric_strain = Invariants::trace(eps_prev_data->eps);
55 variables.effective_pore_pressure =
56 -bishops_data.chi_S_L * p_cap_data.p_cap;
57 variables.porosity = poro_data.phi;
58
59 // Used in MaterialLib/MPL/Properties/PorosityFromMassBalance.cpp
60 // and MaterialLib/MPL/Properties/TransportPorosityFromMassBalance.cpp
61 variables_prev.effective_pore_pressure =
62 -bishops_data_prev->chi_S_L * p_cap_data.p_cap_prev;
63
64 transport_poro_data.phi =
65 medium.property(MPL::PropertyType::transport_porosity)
66 .template value<double>(variables, variables_prev, x_t.x, x_t.t,
67 x_t.dt);
68}
69
70template struct TransportPorosityModel<2>;
71template struct TransportPorosityModel<3>;
72
73} // namespace ProcessLib::ThermoRichardsMechanics
constexpr int kelvin_vector_dimensions(int const displacement_dim)
Kelvin vector dimensions for given displacement dimension.
Represents a previous state of type T.
Definition Base.h:21
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, SolidCompressibilityData const &solid_compressibility_data, BishopsData const &bishops_data, PrevState< BishopsData > const &bishops_data_prev, CapillaryPressureData< DisplacementDim > const &p_cap_data, PorosityData const &poro_data, StrainData< DisplacementDim > const &eps_data, PrevState< StrainData< DisplacementDim > > const &eps_prev_data, PrevState< TransportPorosityData > const &transport_poro_data_prev, TransportPorosityData &transport_poro_data) const