OGS
ElasticTangentStiffnessModel.cpp
Go to the documentation of this file.
1
12
14{
15namespace ConstitutiveStress_StrainTemperature
16{
17template <int DisplacementDim>
19 SpaceTimeData const& x_t, TemperatureData<DisplacementDim> const& T_data,
21{
22 namespace MPL = MaterialPropertyLib;
23
24 MPL::VariableArray variable_array;
25 MPL::VariableArray variable_array_prev;
26
27 auto const null_state = solid_material_.createMaterialStateVariables();
28 solid_material_.initializeInternalStateVariables(x_t.t, x_t.x, *null_state);
29
31
32 variable_array.stress.emplace<KV>(KV::Zero());
33 variable_array.mechanical_strain.emplace<KV>(KV::Zero());
34 variable_array.temperature = T_data.T;
35
36 variable_array_prev.stress.emplace<KV>(KV::Zero());
37 variable_array_prev.mechanical_strain.emplace<KV>(KV::Zero());
38 variable_array_prev.temperature = T_data.T_prev;
39
40 auto&& solution = solid_material_.integrateStress(
41 variable_array_prev, variable_array, x_t.t, x_t.x, x_t.dt, *null_state);
42
43 if (!solution)
44 {
45 OGS_FATAL("Computation of elastic tangent stiffness failed.");
46 }
47
48 out.C_el = std::move(std::get<2>(*solution));
49}
50
53} // namespace ConstitutiveStress_StrainTemperature
54} // namespace ProcessLib::ThermoRichardsMechanics
#define OGS_FATAL(...)
Definition Error.h:26
KV::KelvinVectorType< DisplacementDim > KelvinVector
Definition Base.h:26
ParameterLib::SpatialPosition x
Definition Base.h:74
void eval(SpaceTimeData const &x_t, TemperatureData< DisplacementDim > const &T_data, ElasticTangentStiffnessData< DisplacementDim > &out) const