Skip to content
Snippets Groups Projects
Commit 00cd6450 authored by Christoph Lehmann's avatar Christoph Lehmann Committed by Dmitri Naumov
Browse files

[PL] Constitutive data provide reflection meta data

parent b0519a3e
No related branches found
No related tags found
No related merge requests found
Showing
with 90 additions and 5 deletions
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "MaterialLib/MPL/Medium.h" #include "MaterialLib/MPL/Medium.h"
#include "MathLib/KelvinVector.h" #include "MathLib/KelvinVector.h"
#include "ParameterLib/SpatialPosition.h" #include "ParameterLib/SpatialPosition.h"
#include "ProcessLib/Reflection/ReflectionData.h"
namespace ProcessLib::ThermoRichardsMechanics namespace ProcessLib::ThermoRichardsMechanics
{ {
...@@ -116,6 +117,13 @@ struct StrainData ...@@ -116,6 +117,13 @@ struct StrainData
{ {
// TODO Move initialization to the local assembler. // TODO Move initialization to the local assembler.
KelvinVector<DisplacementDim> eps = KVzero<DisplacementDim>(); KelvinVector<DisplacementDim> eps = KVzero<DisplacementDim>();
static auto reflect()
{
using Self = StrainData<DisplacementDim>;
return ProcessLib::Reflection::reflectWithName("epsilon", &Self::eps);
}
}; };
} // namespace ProcessLib::ThermoRichardsMechanics } // namespace ProcessLib::ThermoRichardsMechanics
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#pragma once #pragma once
#include "LiquidDensity.h" #include "LiquidDensity.h"
#include "LiquidViscosity.h"
#include "Permeability.h" #include "Permeability.h"
#include "ThermoOsmosis.h" #include "ThermoOsmosis.h"
...@@ -21,6 +20,14 @@ template <int DisplacementDim> ...@@ -21,6 +20,14 @@ template <int DisplacementDim>
struct DarcyLawData struct DarcyLawData
{ {
Eigen::Vector<double, DisplacementDim> v_darcy; Eigen::Vector<double, DisplacementDim> v_darcy;
static auto reflect()
{
using Self = DarcyLawData<DisplacementDim>;
return ProcessLib::Reflection::reflectWithName("velocity",
&Self::v_darcy);
}
}; };
template <int DisplacementDim> template <int DisplacementDim>
......
...@@ -19,6 +19,12 @@ struct LiquidDensityData ...@@ -19,6 +19,12 @@ struct LiquidDensityData
double rho_LR; double rho_LR;
double drho_LR_dp; double drho_LR_dp;
double drho_LR_dT; double drho_LR_dT;
static auto reflect()
{
return ProcessLib::Reflection::reflectWithName(
"liquid_density", &LiquidDensityData::rho_LR);
}
}; };
template <int DisplacementDim> template <int DisplacementDim>
......
...@@ -10,13 +10,19 @@ ...@@ -10,13 +10,19 @@
#pragma once #pragma once
#include "Porosity.h" #include "ProcessLib/ThermoRichardsMechanics/Constitutive/Base.h"
namespace ProcessLib::ThermoRichardsMechanics namespace ProcessLib::ThermoRichardsMechanics
{ {
struct LiquidViscosityData struct LiquidViscosityData
{ {
double viscosity; double viscosity;
static auto reflect()
{
return ProcessLib::Reflection::reflectWithName(
"viscosity", &LiquidViscosityData::viscosity);
}
}; };
template <int DisplacementDim> template <int DisplacementDim>
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#pragma once #pragma once
#include "Bishops.h" #include "Bishops.h"
#include "MathLib/KelvinVector.h"
#include "Saturation.h" #include "Saturation.h"
#include "SolidCompressibility.h" #include "SolidCompressibility.h"
...@@ -20,6 +19,12 @@ namespace ProcessLib::ThermoRichardsMechanics ...@@ -20,6 +19,12 @@ namespace ProcessLib::ThermoRichardsMechanics
struct PorosityData struct PorosityData
{ {
double phi; double phi;
static auto reflect()
{
return ProcessLib::Reflection::reflectWithName("porosity",
&PorosityData::phi);
}
}; };
struct TransportPorosityData struct TransportPorosityData
...@@ -28,8 +33,8 @@ struct TransportPorosityData ...@@ -28,8 +33,8 @@ struct TransportPorosityData
static auto reflect() static auto reflect()
{ {
return std::make_tuple( return ProcessLib::Reflection::reflectWithName(
ReflectionData{"transport_porosity", &TransportPorosityData::phi}); "transport_porosity", &TransportPorosityData::phi);
} }
}; };
......
...@@ -17,6 +17,12 @@ namespace ProcessLib::ThermoRichardsMechanics ...@@ -17,6 +17,12 @@ namespace ProcessLib::ThermoRichardsMechanics
struct SaturationData struct SaturationData
{ {
double S_L; double S_L;
static auto reflect()
{
return ProcessLib::Reflection::reflectWithName("saturation",
&SaturationData::S_L);
}
}; };
struct SaturationDataDeriv struct SaturationDataDeriv
......
...@@ -19,6 +19,12 @@ struct SolidDensityData ...@@ -19,6 +19,12 @@ struct SolidDensityData
{ {
double rho_SR; double rho_SR;
double dry_density_solid; double dry_density_solid;
static auto reflect()
{
return ProcessLib::Reflection::reflectWithName(
"dry_density_solid", &SolidDensityData::dry_density_solid);
}
}; };
template <int DisplacementDim> template <int DisplacementDim>
......
...@@ -25,6 +25,15 @@ struct SolidMechanicsDataStateful ...@@ -25,6 +25,15 @@ struct SolidMechanicsDataStateful
// TODO it seems fragile that some data have to be initialized that way. // TODO it seems fragile that some data have to be initialized that way.
KelvinVector<DisplacementDim> sigma_eff = KVzero<DisplacementDim>(); KelvinVector<DisplacementDim> sigma_eff = KVzero<DisplacementDim>();
KelvinVector<DisplacementDim> eps_m = KVzero<DisplacementDim>(); KelvinVector<DisplacementDim> eps_m = KVzero<DisplacementDim>();
static auto reflect()
{
using Self = SolidMechanicsDataStateful<DisplacementDim>;
// TODO add eps_m?
return ProcessLib::Reflection::reflectWithName("sigma",
&Self::sigma_eff);
}
}; };
template <int DisplacementDim> template <int DisplacementDim>
......
...@@ -20,6 +20,14 @@ template <int DisplacementDim> ...@@ -20,6 +20,14 @@ template <int DisplacementDim>
struct SwellingDataStateful struct SwellingDataStateful
{ {
KelvinVector<DisplacementDim> sigma_sw = KVzero<DisplacementDim>(); KelvinVector<DisplacementDim> sigma_sw = KVzero<DisplacementDim>();
static auto reflect()
{
using Self = SwellingDataStateful<DisplacementDim>;
return ProcessLib::Reflection::reflectWithName("swelling_stress",
&Self::sigma_sw);
}
}; };
template <int DisplacementDim> template <int DisplacementDim>
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
namespace ProcessLib::ThermoRichardsMechanics namespace ProcessLib::ThermoRichardsMechanics
{ {
/// Data whose state must be tracked by the TRM process. /// Data whose state must be tracked by the TRM process.
template <int DisplacementDim> template <int DisplacementDim>
struct StatefulData struct StatefulData
...@@ -40,6 +41,19 @@ struct StatefulData ...@@ -40,6 +41,19 @@ struct StatefulData
StrainData<DisplacementDim> eps_data; StrainData<DisplacementDim> eps_data;
SwellingDataStateful<DisplacementDim> swelling_data; SwellingDataStateful<DisplacementDim> swelling_data;
SolidMechanicsDataStateful<DisplacementDim> s_mech_data; SolidMechanicsDataStateful<DisplacementDim> s_mech_data;
static auto reflect()
{
using Self = StatefulData<DisplacementDim>;
return ProcessLib::Reflection::reflectWithoutName(
&Self::S_L_data,
&Self::poro_data,
&Self::transport_poro_data,
&Self::eps_data,
&Self::swelling_data,
&Self::s_mech_data);
}
}; };
/// Data that is needed for output purposes, but not directly for the assembly. /// Data that is needed for output purposes, but not directly for the assembly.
...@@ -50,6 +64,16 @@ struct OutputData ...@@ -50,6 +64,16 @@ struct OutputData
LiquidDensityData rho_L_data; LiquidDensityData rho_L_data;
LiquidViscosityData mu_L_data; LiquidViscosityData mu_L_data;
SolidDensityData rho_S_data; SolidDensityData rho_S_data;
static auto reflect()
{
using Self = OutputData<DisplacementDim>;
return ProcessLib::Reflection::reflectWithoutName(&Self::darcy_data,
&Self::rho_L_data,
&Self::mu_L_data,
&Self::rho_S_data);
}
}; };
/// Data that is needed for the equation system assembly. /// Data that is needed for the equation system assembly.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment