OGS
ProcessLib::ThermoRichardsMechanics::ConstitutiveStress_StrainTemperature::ConstitutiveSetting< DisplacementDim > Struct Template Reference

Detailed Description

template<int DisplacementDim>
struct ProcessLib::ThermoRichardsMechanics::ConstitutiveStress_StrainTemperature::ConstitutiveSetting< DisplacementDim >

Definition at line 21 of file ConstitutiveSetting.h.

#include <ConstitutiveSetting.h>

Public Member Functions

void init (ConstitutiveModels< DisplacementDim > &models, double const t, double const dt, ParameterLib::SpatialPosition const &x_position, MediaData const &media_data, TemperatureData< DisplacementDim > const &T_data, StatefulData< DisplacementDim > &state, StatefulDataPrev< DisplacementDim > &prev_state) const
 
void eval (ConstitutiveModels< DisplacementDim > &models, double const t, double const dt, ParameterLib::SpatialPosition const &x_position, MaterialPropertyLib::Medium const &medium, TemperatureData< DisplacementDim > const &T_data, CapillaryPressureData< DisplacementDim > const &p_cap_data, KelvinVector< DisplacementDim > const &eps_arg, 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.
 

Static Public Member Functions

static KelvinVector< DisplacementDim > const & statefulStress (StatefulData< DisplacementDim > const &state)
 
static KelvinVector< DisplacementDim > & statefulStress (StatefulData< DisplacementDim > &state)
 
static void convertInitialStressType (StatefulData< DisplacementDim > &state, StatefulDataPrev< DisplacementDim > &prev_state, KelvinVector< DisplacementDim > const &pore_pressure_part)
 

Member Function Documentation

◆ convertInitialStressType()

template<int DisplacementDim>
static void ProcessLib::ThermoRichardsMechanics::ConstitutiveStress_StrainTemperature::ConstitutiveSetting< DisplacementDim >::convertInitialStressType ( StatefulData< DisplacementDim > & state,
StatefulDataPrev< DisplacementDim > & prev_state,
KelvinVector< DisplacementDim > const & pore_pressure_part )
inlinestatic

In case that the input initial data for state.s_mech_data.sigma_eff are total stress values, state.s_mech_data.sigma_eff is reset to effective stress.

Definition at line 58 of file ConstitutiveSetting.h.

62 {
63 auto& sigma_eff =
64 std::get<EffectiveStressData<DisplacementDim>>(state).sigma_eff;
65 sigma_eff.noalias() += pore_pressure_part;
66
67 (std::get<PrevState<EffectiveStressData<DisplacementDim>>>(prev_state)
68 ->sigma_eff)
69 .noalias() = sigma_eff;
70 }

◆ eval()

template<int DisplacementDim>
void ProcessLib::ThermoRichardsMechanics::ConstitutiveStress_StrainTemperature::ConstitutiveSetting< DisplacementDim >::eval ( ConstitutiveModels< DisplacementDim > & models,
double const t,
double const dt,
ParameterLib::SpatialPosition const & x_position,
MaterialPropertyLib::Medium const & medium,
TemperatureData< DisplacementDim > const & T_data,
CapillaryPressureData< DisplacementDim > const & p_cap_data,
KelvinVector< DisplacementDim > const & eps_arg,
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.

Definition at line 81 of file ConstitutiveSetting.cpp.

94{
95 auto const aux_data = std::tuple{SpaceTimeData{x_position, t, dt},
96 MediaData{medium}, T_data, p_cap_data};
97
98 auto const mat_state_tuple = std::tie(mat_state);
99
100 // TODO will eps lag one iteration behind? (since it's not updated after
101 // solving the global equation system)
102 std::get<StrainData<DisplacementDim>>(state).eps.noalias() = eps_arg;
103
104 ProcessLib::Graph::evalAllInOrder(models, aux_data, cd, mat_state_tuple,
105 out, prev_state, state, tmp);
106
107 // TODO why not ordinary state tracking for BishopsPrevModel?
108
109 {
110 auto const& biot_data = std::get<BiotData>(tmp);
111 auto const& poro_data = std::get<PorosityData>(state);
112
113 if (biot_data() < poro_data.phi)
114 {
115 OGS_FATAL(
116 "ThermoRichardsMechanics: Biot-coefficient {} is smaller than "
117 "porosity {} in element/integration point {}/{}.",
118 biot_data(), poro_data.phi, *x_position.getElementID(),
119 *x_position.getIntegrationPoint());
120 }
121 }
122}
#define OGS_FATAL(...)
Definition Error.h:26
void evalAllInOrder(Functions &fs, Tuples &... ts)
Definition Apply.h:294

References ProcessLib::Graph::evalAllInOrder(), ParameterLib::SpatialPosition::getElementID(), ParameterLib::SpatialPosition::getIntegrationPoint(), and OGS_FATAL.

◆ init()

template<int DisplacementDim>
void ProcessLib::ThermoRichardsMechanics::ConstitutiveStress_StrainTemperature::ConstitutiveSetting< DisplacementDim >::init ( ConstitutiveModels< DisplacementDim > & models,
double const t,
double const dt,
ParameterLib::SpatialPosition const & x_position,
MediaData const & media_data,
TemperatureData< DisplacementDim > const & T_data,
StatefulData< DisplacementDim > & state,
StatefulDataPrev< DisplacementDim > & prev_state ) const

Definition at line 52 of file ConstitutiveSetting.cpp.

58{
59 [[maybe_unused]] static const bool model_order_correct =
61
62 // Set eps_m_prev from potentially non-zero eps and sigma_sw from
63 // restart.
64 SpaceTimeData const x_t{x_position, t, dt};
65 ElasticTangentStiffnessData<DisplacementDim> C_el_data;
66 std::get<ElasticTangentStiffnessModel<DisplacementDim>>(models).eval(
67 x_t, T_data, C_el_data);
68
69 auto const& eps = std::get<StrainData<DisplacementDim>>(state).eps;
70 auto const& sigma_sw =
71 std::get<SwellingDataStateful<DisplacementDim>>(state).sigma_sw;
72 std::get<PrevState<MechanicalStrainData<DisplacementDim>>>(prev_state)
73 ->eps_m.noalias() =
74 media_data.solid.hasProperty(
76 ? eps + C_el_data.C_el.inverse() * sigma_sw
77 : eps;
78}
void eval(ConstitutiveModels< DisplacementDim > &models, double const t, double const dt, ParameterLib::SpatialPosition const &x_position, MaterialPropertyLib::Medium const &medium, TemperatureData< DisplacementDim > const &T_data, CapillaryPressureData< DisplacementDim > const &p_cap_data, KelvinVector< DisplacementDim > const &eps_arg, 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.

References ProcessLib::ThermoRichardsMechanics::ConstitutiveStress_StrainTemperature::ElasticTangentStiffnessData< DisplacementDim >::C_el, ProcessLib::ThermoRichardsMechanics::ConstitutiveStress_StrainTemperature::checkCorrectModelEvalOrder(), MaterialPropertyLib::Phase::hasProperty(), ProcessLib::ThermoRichardsMechanics::MediaData::solid, and MaterialPropertyLib::swelling_stress_rate.

◆ statefulStress() [1/2]

template<int DisplacementDim>
static KelvinVector< DisplacementDim > & ProcessLib::ThermoRichardsMechanics::ConstitutiveStress_StrainTemperature::ConstitutiveSetting< DisplacementDim >::statefulStress ( StatefulData< DisplacementDim > & state)
inlinestatic

Definition at line 49 of file ConstitutiveSetting.h.

51 {
52 return std::get<EffectiveStressData<DisplacementDim>>(state).sigma_eff;
53 }

◆ statefulStress() [2/2]

template<int DisplacementDim>
static KelvinVector< DisplacementDim > const & ProcessLib::ThermoRichardsMechanics::ConstitutiveStress_StrainTemperature::ConstitutiveSetting< DisplacementDim >::statefulStress ( StatefulData< DisplacementDim > const & state)
inlinestatic

Definition at line 44 of file ConstitutiveSetting.h.

46 {
47 return std::get<EffectiveStressData<DisplacementDim>>(state).sigma_eff;
48 }

The documentation for this struct was generated from the following files: