OGS
Swelling.cpp
Go to the documentation of this file.
1
10#include "Swelling.h"
11
12#include <Eigen/LU>
13
15
16namespace ProcessLib::TH2M
17{
18namespace ConstitutiveRelations
19{
20template <int DisplacementDim>
22 SpaceTimeData const& x_t, MediaData const& media_data,
24 SaturationData const& S_L_data,
25 PrevState<SaturationData> const& S_L_prev_data,
29{
30 namespace MPL = MaterialPropertyLib;
31
32 auto const& solid_phase = media_data.solid;
33
34 if (!solid_phase.hasProperty(MPL::PropertyType::swelling_stress_rate))
35 {
36 out.eps_m.setZero();
37 state.sigma_sw.setZero();
38 return;
39 }
40
41 MPL::VariableArray variables;
42 variables.liquid_saturation = S_L_data.S_L;
43
44 MPL::VariableArray variables_prev;
45 variables_prev.liquid_saturation = S_L_prev_data->S_L;
46
47 // Swelling and possibly volumetric strain rate update.
48
49 // If there is swelling, compute it. Update volumetric strain rate,
50 // s.t. it corresponds to the mechanical part only.
51 state.sigma_sw = prev_state->sigma_sw;
52
53 auto const sigma_sw_dot =
56 solid_phase[MPL::PropertyType::swelling_stress_rate].value(
57 variables, variables_prev, x_t.x, x_t.t, x_t.dt)));
58 state.sigma_sw += sigma_sw_dot * x_t.dt;
59
60 auto const C_el_inv = C_el_data.stiffness_tensor.inverse().eval();
61
62 out.eps_m.noalias() = C_el_inv * (state.sigma_sw - prev_state->sigma_sw);
63}
64
65template struct SwellingModel<2>;
66template struct SwellingModel<3>;
67} // namespace ConstitutiveRelations
68} // namespace ProcessLib::TH2M
template Eigen::Matrix< double, 3, 3 > formEigenTensor< 3 >(MaterialPropertyLib::PropertyDataType const &values)
KelvinVectorType< DisplacementDim > tensorToKelvin(Eigen::Matrix< double, 3, 3 > const &m)
Represents a previous state of type T.
Definition Base.h:21
ParameterLib::SpatialPosition x
Definition Base.h:74
MaterialPropertyLib::Phase const & solid
Definition Base.h:46
void eval(SpaceTimeData const &x_t, MediaData const &media_data, ElasticTangentStiffnessData< DisplacementDim > const &C_el_data, SaturationData const &S_L_data, PrevState< SaturationData > const &S_L_prev_data, PrevState< SwellingDataStateful< DisplacementDim > > const &prev_state, SwellingDataStateful< DisplacementDim > &state, SwellingDataStateless< DisplacementDim > &out) const
Definition Swelling.cpp:21