OGS
SolidMechanics.cpp
Go to the documentation of this file.
1
11#include "SolidMechanics.h"
12
14{
15namespace ConstitutiveStress_StrainTemperature
16{
17template <int DisplacementDim>
19 const SpaceTimeData& x_t,
20 SolidThermalExpansionData<DisplacementDim> const& s_therm_exp_data,
21 SwellingDataStateless<DisplacementDim> const& swelling_data,
24 BiotData const& biot_data,
25 BishopsData const& bishops_data,
26 SaturationDataDeriv const& dS_L_data,
27 StrainData<DisplacementDim> const& eps_data,
28 PrevState<StrainData<DisplacementDim>> const& eps_prev_data,
30 PrevState<EffectiveStressData<DisplacementDim>> const& sigma_eff_prev_data,
34 TotalStressData<DisplacementDim>& total_stress_data,
35 EquivalentPlasticStrainData& equiv_plast_strain_data,
37{
38 namespace MPL = MaterialPropertyLib;
39 MPL::VariableArray variables;
40
41 double const T_prev = T_data.T_prev;
42 double const dT = T_data.T - T_prev;
43
44 eps_m_data.eps_m.noalias() =
45 eps_m_prev_data->eps_m + eps_data.eps - eps_prev_data->eps -
46 s_therm_exp_data.solid_linear_thermal_expansivity_vector * dT +
47 swelling_data.eps_m;
48
50 eps_m_data.eps_m);
51 variables.temperature = T_data.T;
52
53 MPL::VariableArray variables_prev;
54 variables_prev.stress.emplace<KelvinVector<DisplacementDim>>(
55 sigma_eff_prev_data->sigma_eff);
57 eps_m_prev_data->eps_m);
58 variables_prev.temperature = T_prev;
59
60 auto solution = solid_material_.integrateStress(
61 variables_prev, variables, x_t.t, x_t.x, x_t.dt,
62 *mat_state.material_state_variables);
63
64 if (!solution)
65 {
66 OGS_FATAL("Computation of local constitutive relation failed.");
67 }
68
69 std::tie(sigma_eff_data.sigma_eff, mat_state.material_state_variables,
70 out.stiffness_tensor) = std::move(*solution);
71
72 auto const& identity2 = MathLib::KelvinVector::Invariants<
74 DisplacementDim)>::identity2;
75 total_stress_data.sigma_total.noalias() =
76 sigma_eff_data.sigma_eff +
77 biot_data() * bishops_data.chi_S_L * p_cap_data.p_cap * identity2;
78
79 out.J_uT_BT_K_N.noalias() = // TODO is this thermal stress?
80 -out.stiffness_tensor *
82
83 double const J_up_X_BTI2N =
84 -biot_data() *
85 (bishops_data.chi_S_L +
86 bishops_data.dchi_dS_L * p_cap_data.p_cap * dS_L_data.dS_L_dp_cap);
87
88 out.J_up_BT_K_N.noalias() =
89 swelling_data.J_up_BT_K_N + J_up_X_BTI2N * identity2;
90
91 equiv_plast_strain_data.equivalent_plastic_strain =
92 mat_state.material_state_variables->getEquivalentPlasticStrain();
93}
94
95template struct SolidMechanicsModel<2>;
96template struct SolidMechanicsModel<3>;
97
98} // namespace ConstitutiveStress_StrainTemperature
99} // namespace ProcessLib::ThermoRichardsMechanics
#define OGS_FATAL(...)
Definition Error.h:26
constexpr int kelvin_vector_dimensions(int const displacement_dim)
Kelvin vector dimensions for given displacement dimension.
KV::KelvinVectorType< DisplacementDim > KelvinVector
Definition Base.h:26
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
void eval(const SpaceTimeData &x_t, SolidThermalExpansionData< DisplacementDim > const &s_therm_exp_data, SwellingDataStateless< DisplacementDim > const &swelling_data, TemperatureData< DisplacementDim > const &T_data, CapillaryPressureData< DisplacementDim > const &p_cap_data, BiotData const &biot_data, BishopsData const &bishops_data, SaturationDataDeriv const &dS_L_data, StrainData< DisplacementDim > const &eps_data, PrevState< StrainData< DisplacementDim > > const &eps_prev_data, MaterialStateData< DisplacementDim > &mat_state, PrevState< EffectiveStressData< DisplacementDim > > const &sigma_eff_prev_data, EffectiveStressData< DisplacementDim > &sigma_eff_data, PrevState< MechanicalStrainData< DisplacementDim > > const &eps_m_prev_data, MechanicalStrainData< DisplacementDim > &eps_m_data, TotalStressData< DisplacementDim > &total_stress_data, EquivalentPlasticStrainData &equiv_plast_strain_data, SolidMechanicsDataStateless< DisplacementDim > &out) const