OGS
ConstitutiveSetting.cpp
Go to the documentation of this file.
1
10#include "ConstitutiveSetting.h"
11
12#include "Invoke.h"
13
15{
16namespace ConstitutiveRelations
17{
18template <int DisplacementDim>
20 ConstitutiveModels<DisplacementDim>& models, double const t,
21 double const dt, ParameterLib::SpatialPosition const& x_position,
22 MaterialPropertyLib::Medium const& medium, double const T_ref,
24 KelvinVector<DisplacementDim> const& eps_prev,
26 StatefulDataPrev<DisplacementDim> const& prev_state,
31{
32 namespace MPL = MaterialPropertyLib;
33
34 auto& eps_data = out.eps_data;
35 eps_data.eps = eps;
36 auto& eps_data_prev = tmp.eps_data_prev;
37 eps_data_prev->eps = eps_prev;
38 auto& rho_SR = tmp.rho_SR;
39
40 auto& s_mech_data = cd.s_mech_data;
41 auto& volumetric_body_force = cd.volumetric_body_force;
42
43 auto& free_energy_density_data = out.free_energy_density_data;
44
45 Temperature const T{T_ref};
46 SpaceTimeData const x_t{x_position, t, dt};
47 MediaData const media_data{medium};
48
50 models.s_mech_model.eval(x_t, T, eps_data, eps_data_prev, mat_state,
51 prev_state.stress_data, state.stress_data,
52 s_mech_data, free_energy_density_data);
53
55 models.rho_S_model.eval(x_t, media_data, T, rho_SR);
56
58 models.gravity_model.eval(rho_SR, volumetric_body_force);
59}
60
61template struct ConstitutiveSetting<2>;
62template struct ConstitutiveSetting<3>;
63} // namespace ConstitutiveRelations
64} // namespace ProcessLib::SmallDeformation
constexpr void assertEvalArgsUnique(Model const &)
Definition Invoke.h:49
KV::KelvinVectorType< DisplacementDim > KelvinVector
Definition Base.h:26
Data that is needed for the equation system assembly.
SolidMechanicsDataStateless< DisplacementDim > s_mech_data
void eval(ConstitutiveModels< DisplacementDim > &models, double const t, double const dt, ParameterLib::SpatialPosition const &x_position, MaterialPropertyLib::Medium const &medium, double const T_ref, KelvinVector< DisplacementDim > const &eps, KelvinVector< DisplacementDim > const &eps_prev, StatefulData< DisplacementDim > &state, StatefulDataPrev< DisplacementDim > const &prev_state, MaterialStateData< DisplacementDim > &mat_state, ConstitutiveTempData< DisplacementDim > &tmp, OutputData< DisplacementDim > &out, ConstitutiveData< DisplacementDim > &cd) const
Evaluate the constitutive setting.
Data that is needed for output purposes, but not directly for the assembly.
Data whose state must be tracked by the process.
void eval(SpaceTimeData const &x_t, MediaData const &media_data, Temperature const &temperature, SolidDensity &out) const