OGS
Porosity.cpp
Go to the documentation of this file.
1
11#include "Porosity.h"
12
14{
15template <int DisplacementDim>
17 SpaceTimeData const& x_t, MediaData const& media_data,
18 SolidCompressibilityData const& solid_compressibility_data,
19 SaturationData const& S_L_data,
20 PrevState<SaturationData> const& S_L_prev_data,
21 BishopsData const& bishops_data,
22 PrevState<BishopsData> const& bishops_data_prev,
24 StrainData<DisplacementDim> const& eps_data,
25 PrevState<StrainData<DisplacementDim>> const& eps_prev_data,
26 PrevState<PorosityData> const& poro_prev_data, PorosityData& out) const
27{
28 static constexpr int kelvin_vector_size =
31
32 namespace MPL = MaterialPropertyLib;
33 MPL::VariableArray variables;
34 MPL::VariableArray variables_prev;
35 // TODO Used in MaterialLib/MPL/Properties/PorosityFromMassBalance.cpp
36 // and MaterialLib/MPL/Properties/TransportPorosityFromMassBalance.cpp
37 variables.grain_compressibility = solid_compressibility_data.beta_SR;
38
39 variables.liquid_saturation = S_L_data.S_L;
40 variables_prev.liquid_saturation = S_L_prev_data->S_L;
41
42 variables.effective_pore_pressure =
43 -bishops_data.chi_S_L * p_cap_data.p_cap;
44
45 // Used in MaterialLib/MPL/Properties/PorosityFromMassBalance.cpp
46 // and MaterialLib/MPL/Properties/TransportPorosityFromMassBalance.cpp
47 variables_prev.effective_pore_pressure =
48 -bishops_data_prev->chi_S_L * p_cap_data.p_cap_prev;
49
50 // Used in MaterialLib/MPL/Properties/PorosityFromMassBalance.cpp
51 // and MaterialLib/MPL/Properties/TransportPorosityFromMassBalance.cpp
52 // and MaterialLib/MPL/Properties/StrainDependentPermeability.cpp
53 // Set volumetric strain rate for the general case without swelling.
54 variables.volumetric_strain = Invariants::trace(eps_data.eps);
55 variables_prev.volumetric_strain = Invariants::trace(eps_prev_data->eps);
56
57 // Porosity update
58 variables_prev.porosity = poro_prev_data->phi;
59 out.phi = media_data.medium.property(MPL::PropertyType::porosity)
60 .template value<double>(variables, variables_prev, x_t.x,
61 x_t.t, x_t.dt);
62}
63
64template struct PorosityModel<2>;
65template struct PorosityModel<3>;
66} // namespace ProcessLib::ThermoRichardsMechanics
Property const & property(PropertyType const &p) const
Definition Medium.cpp:54
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, SaturationData const &S_L_data, PrevState< SaturationData > const &S_L_prev_data, BishopsData const &bishops_data, PrevState< BishopsData > const &bishops_data_prev, CapillaryPressureData< DisplacementDim > const &p_cap_data, StrainData< DisplacementDim > const &eps_data, PrevState< StrainData< DisplacementDim > > const &eps_prev_data, PrevState< PorosityData > const &poro_prev_data, PorosityData &out) const
Definition Porosity.cpp:16