OGS
ElasticTangentStiffnessModel.cpp
Go to the documentation of this file.
1
10
#include "
ElasticTangentStiffnessModel.h
"
11
12
#include "
MaterialLib/MPL/Utils/FormEigenTensor.h
"
13
14
namespace
ProcessLib::TH2M
15
{
16
namespace
ConstitutiveRelations
17
{
18
template
<
int
DisplacementDim>
19
void
ElasticTangentStiffnessModel<DisplacementDim>::eval
(
20
SpaceTimeData
const
& x_t,
TemperatureData
const
& T_data,
21
ElasticTangentStiffnessData<DisplacementDim>
& out)
const
22
{
23
namespace
MPL
=
MaterialPropertyLib
;
24
25
MPL::VariableArray
variable_array;
26
MPL::VariableArray
variable_array_prev;
27
28
auto
const
null_state = solid_material_.createMaterialStateVariables();
29
solid_material_.initializeInternalStateVariables(x_t.
t
, x_t.
x
, *null_state);
30
31
using
KV
=
KelvinVector<DisplacementDim>
;
32
33
variable_array.
stress
.emplace<
KV
>(KV::Zero());
34
variable_array.
mechanical_strain
.emplace<
KV
>(KV::Zero());
35
variable_array.
temperature
= T_data.
T
;
36
37
variable_array_prev.
stress
.emplace<
KV
>(KV::Zero());
38
variable_array_prev.
mechanical_strain
.emplace<
KV
>(KV::Zero());
39
variable_array_prev.
temperature
= T_data.
T_prev
;
40
41
auto
&& solution = solid_material_.integrateStress(
42
variable_array_prev, variable_array, x_t.
t
, x_t.
x
, x_t.
dt
, *null_state);
43
44
if
(!solution)
45
{
46
OGS_FATAL
(
"Computation of elastic tangent stiffness failed."
);
47
}
48
49
out.
stiffness_tensor
= std::move(std::get<2>(*solution));
50
}
51
52
template
struct
ElasticTangentStiffnessModel<2>
;
53
template
struct
ElasticTangentStiffnessModel<3>
;
54
}
// namespace ConstitutiveRelations
55
}
// namespace ProcessLib::TH2M
OGS_FATAL
#define OGS_FATAL(...)
Definition
Error.h:26
FormEigenTensor.h
ElasticTangentStiffnessModel.h
MaterialPropertyLib::VariableArray
Definition
VariableType.h:99
MaterialPropertyLib::VariableArray::mechanical_strain
KelvinVector mechanical_strain
Definition
VariableType.h:183
MaterialPropertyLib::VariableArray::stress
KelvinVector stress
Definition
VariableType.h:190
MaterialPropertyLib::VariableArray::temperature
double temperature
Definition
VariableType.h:191
MaterialPropertyLib
Definition
ChemicalSolverInterface.h:21
MathLib::KelvinVector
Definition
KelvinVector-impl.h:16
ProcessLib::TH2M::ConstitutiveRelations::KelvinVector
KV::KelvinVectorType< DisplacementDim > KelvinVector
Definition
Base.h:26
ProcessLib::TH2M
Definition
Advection.cpp:13
ProcessLib::ConstitutiveRelations::SpaceTimeData
Definition
Base.h:73
ProcessLib::ConstitutiveRelations::SpaceTimeData::x
ParameterLib::SpatialPosition x
Definition
Base.h:74
ProcessLib::ConstitutiveRelations::SpaceTimeData::t
double t
Definition
Base.h:75
ProcessLib::ConstitutiveRelations::SpaceTimeData::dt
double dt
Definition
Base.h:76
ProcessLib::TH2M::ConstitutiveRelations::ElasticTangentStiffnessData
Definition
ElasticTangentStiffnessData.h:20
ProcessLib::TH2M::ConstitutiveRelations::ElasticTangentStiffnessData::stiffness_tensor
KelvinMatrix< DisplacementDim > stiffness_tensor
Definition
ElasticTangentStiffnessData.h:21
ProcessLib::TH2M::ConstitutiveRelations::ElasticTangentStiffnessModel
Definition
ElasticTangentStiffnessModel.h:22
ProcessLib::TH2M::ConstitutiveRelations::ElasticTangentStiffnessModel::eval
void eval(SpaceTimeData const &x_t, TemperatureData const &T_data, ElasticTangentStiffnessData< DisplacementDim > &out) const
Definition
ElasticTangentStiffnessModel.cpp:19
ProcessLib::TH2M::ConstitutiveRelations::TemperatureData
Definition
Base.h:52
ProcessLib::TH2M::ConstitutiveRelations::TemperatureData::T_prev
double T_prev
Definition
Base.h:54
ProcessLib::TH2M::ConstitutiveRelations::TemperatureData::T
double T
Definition
Base.h:53
ProcessLib
TH2M
ConstitutiveRelations
ElasticTangentStiffnessModel.cpp
Generated by
1.11.0