OGS
MaterialLib::Solids Namespace Reference

Namespaces

namespace  Creep
 
namespace  Ehlers
 
namespace  Lubby2
 
namespace  MFront
 
namespace  Phasefield
 

Classes

class  LinearElasticIsotropic
 
class  LinearElasticOrthotropic
 
class  LinearElasticTransverseIsotropic
 Linear transverse isotropic elastic model. More...
 
struct  MechanicsBase
 

Enumerations

enum class  ConstitutiveModel {
  Ehlers , LinearElasticIsotropic , Lubby2 , CreepBGRa ,
  Invalid
}
 

Functions

template<int DisplacementDim>
std::unique_ptr< MaterialLib::Solids::MechanicsBase< DisplacementDim > > createConstitutiveRelation (std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, BaseLib::ConfigTree const &config)
 
template std::unique_ptr< MaterialLib::Solids::MechanicsBase< 2 > > createConstitutiveRelation (std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, BaseLib::ConfigTree const &config)
 
template<int DisplacementDim>
std::map< int, std::shared_ptr< MaterialLib::Solids::MechanicsBase< DisplacementDim > > > createConstitutiveRelations (std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, MeshLib::PropertyVector< int > const *const material_ids, BaseLib::ConfigTree const &config)
 
template std::map< int, std::shared_ptr< MaterialLib::Solids::MechanicsBase< 2 > > > createConstitutiveRelations< 2 > (std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, MeshLib::PropertyVector< int > const *const material_ids, BaseLib::ConfigTree const &config)
 
template std::map< int, std::shared_ptr< MaterialLib::Solids::MechanicsBase< 3 > > > createConstitutiveRelations< 3 > (std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, MeshLib::PropertyVector< int > const *const material_ids, BaseLib::ConfigTree const &config)
 
template<int DisplacementDim>
std::unique_ptr< MaterialLib::Solids::MechanicsBase< DisplacementDim > > createConstitutiveRelationIce (std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, BaseLib::ConfigTree const &config)
 
template std::unique_ptr< MaterialLib::Solids::MechanicsBase< 2 > > createConstitutiveRelationIce (std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, BaseLib::ConfigTree const &config)
 
template<typename SolidConstitutiveRelation >
std::map< int, std::shared_ptr< SolidConstitutiveRelation > > createConstitutiveRelationsGeneric (std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, MeshLib::PropertyVector< int > const *const material_ids, BaseLib::ConfigTree const &config, std::unique_ptr< SolidConstitutiveRelation >(*create_constitutive_relation)(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &, std::optional< ParameterLib::CoordinateSystem > const &, BaseLib::ConfigTree const &))
 
template<int DisplacementDim>
std::unique_ptr< LinearElasticIsotropic< DisplacementDim > > createLinearElasticIsotropic (std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, BaseLib::ConfigTree const &config, const bool skip_type_checking)
 
template<int DisplacementDim>
std::unique_ptr< LinearElasticOrthotropic< DisplacementDim > > createLinearElasticOrthotropic (std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, BaseLib::ConfigTree const &config, const bool skip_type_checking)
 
template std::unique_ptr< LinearElasticOrthotropic< 2 > > createLinearElasticOrthotropic (std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, BaseLib::ConfigTree const &config, const bool skip_type_checking)
 
template<int DisplacementDim>
std::unique_ptr< LinearElasticTransverseIsotropic< DisplacementDim > > createLinearElasticTransverseIsotropic (std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, BaseLib::ConfigTree const &config, const bool skip_type_checking)
 
template std::unique_ptr< LinearElasticTransverseIsotropic< 2 > > createLinearElasticTransverseIsotropic (std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, BaseLib::ConfigTree const &config, const bool skip_type_checking)
 
template<int DisplacementDim>
MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > elasticTangentStiffness (double const first_lame_parameter, double const shear_modulus)
 
template<typename SolidMaterialsMap >
auto & selectSolidConstitutiveRelation (SolidMaterialsMap const &constitutive_relations, MeshLib::PropertyVector< int > const *const material_ids, std::size_t const element_id)
 

Enumeration Type Documentation

◆ ConstitutiveModel

Function Documentation

◆ createConstitutiveRelation() [1/2]

template<int DisplacementDim>
template std::unique_ptr< MaterialLib::Solids::MechanicsBase< 3 > > MaterialLib::Solids::createConstitutiveRelation ( std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
std::optional< ParameterLib::CoordinateSystem > const & local_coordinate_system,
BaseLib::ConfigTree const & config )
Input File Parameter
material__solid__constitutive_relation__type

Definition at line 33 of file CreateConstitutiveRelation.cpp.

38{
39 auto const type =
41 config.peekConfigParameter<std::string>("type");
42
43 if (type == "Ehlers")
44 {
46 parameters, config);
47 }
48 if (type == "LinearElasticIsotropic")
49 {
50 const bool skip_type_checking = false;
52 DisplacementDim>(parameters, config, skip_type_checking);
53 }
54 if (type == "LinearElasticOrthotropic")
55 {
56 const bool skip_type_checking = false;
58 DisplacementDim>(
59 parameters, local_coordinate_system, config, skip_type_checking);
60 }
61 if (type == "LinearElasticTransverseIsotropic")
62 {
63 const bool skip_type_checking = false;
65 DisplacementDim>(
66 parameters, local_coordinate_system, config, skip_type_checking);
67 }
68 if (type == "Lubby2")
69 {
71 parameters, config);
72 }
73 if (type == "CreepBGRa")
74 {
76 parameters, config);
77 }
78 if (type == "MFront")
79 {
80#ifdef OGS_USE_MFRONT
82 parameters, local_coordinate_system, config);
83#else // OGS_USE_MFRONT
85 "OGS is compiled without MFront support. See OGS_USE_MFRONT CMake "
86 "option.");
87#endif // OGS_USE_MFRONT
88 }
89 OGS_FATAL("Cannot construct constitutive relation of given type '{:s}'.",
90 type);
91}
#define OGS_FATAL(...)
Definition Error.h:26
std::unique_ptr< MaterialLib::Solids::MechanicsBase< DisplacementDim > > createCreepBGRa(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, BaseLib::ConfigTree const &config)
std::unique_ptr< SolidEhlers< DisplacementDim > > createEhlers(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, BaseLib::ConfigTree const &config)
std::unique_ptr< Lubby2< DisplacementDim > > createLubby2(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, BaseLib::ConfigTree const &config)
std::unique_ptr< MechanicsBase< DisplacementDim > > createMFront(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, BaseLib::ConfigTree const &config)
std::unique_ptr< LinearElasticTransverseIsotropic< DisplacementDim > > createLinearElasticTransverseIsotropic(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, BaseLib::ConfigTree const &config, const bool skip_type_checking)
std::unique_ptr< LinearElasticOrthotropic< DisplacementDim > > createLinearElasticOrthotropic(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, BaseLib::ConfigTree const &config, const bool skip_type_checking)
std::unique_ptr< LinearElasticIsotropic< DisplacementDim > > createLinearElasticIsotropic(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, BaseLib::ConfigTree const &config, const bool skip_type_checking)

References MaterialLib::Solids::Creep::createCreepBGRa(), MaterialLib::Solids::Ehlers::createEhlers(), createLinearElasticIsotropic(), createLinearElasticOrthotropic(), createLinearElasticTransverseIsotropic(), MaterialLib::Solids::Lubby2::createLubby2(), MaterialLib::Solids::MFront::createMFront(), OGS_FATAL, and BaseLib::ConfigTree::peekConfigParameter().

Referenced by createConstitutiveRelationIce(), and createConstitutiveRelations().

◆ createConstitutiveRelation() [2/2]

template std::unique_ptr< MaterialLib::Solids::MechanicsBase< 2 > > MaterialLib::Solids::createConstitutiveRelation ( std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
std::optional< ParameterLib::CoordinateSystem > const & local_coordinate_system,
BaseLib::ConfigTree const & config )

◆ createConstitutiveRelationIce() [1/2]

template<int DisplacementDim>
template std::unique_ptr< MaterialLib::Solids::MechanicsBase< 3 > > MaterialLib::Solids::createConstitutiveRelationIce ( std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
std::optional< ParameterLib::CoordinateSystem > const & local_coordinate_system,
BaseLib::ConfigTree const & config )
Input File Parameter
material__solid__ice_constitutive_relation

Definition at line 22 of file CreateConstitutiveRelationIce.cpp.

27{
28 auto const ice_constitutive_relation_config =
30 config.getConfigSubtreeOptional("ice_constitutive_relation");
31
32 if (!ice_constitutive_relation_config)
33 {
34 return nullptr;
35 }
36
38 parameters, local_coordinate_system, *ice_constitutive_relation_config);
39}
std::unique_ptr< MaterialLib::Solids::MechanicsBase< DisplacementDim > > createConstitutiveRelation(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, BaseLib::ConfigTree const &config)

References createConstitutiveRelation(), and BaseLib::ConfigTree::getConfigSubtreeOptional().

Referenced by ProcessLib::ThermoHydroMechanics::createThermoHydroMechanicsProcess().

◆ createConstitutiveRelationIce() [2/2]

template std::unique_ptr< MaterialLib::Solids::MechanicsBase< 2 > > MaterialLib::Solids::createConstitutiveRelationIce ( std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
std::optional< ParameterLib::CoordinateSystem > const & local_coordinate_system,
BaseLib::ConfigTree const & config )

◆ createConstitutiveRelations()

template<int DisplacementDim>
std::map< int, std::shared_ptr< MaterialLib::Solids::MechanicsBase< DisplacementDim > > > MaterialLib::Solids::createConstitutiveRelations ( std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
std::optional< ParameterLib::CoordinateSystem > const & local_coordinate_system,
MeshLib::PropertyVector< int > const *const material_ids,
BaseLib::ConfigTree const & config )

Definition at line 110 of file CreateConstitutiveRelation.cpp.

116{
119 parameters,
120 local_coordinate_system,
121 material_ids,
122 config,
123 createConstitutiveRelation<DisplacementDim>);
124}
std::map< int, std::shared_ptr< SolidConstitutiveRelation > > createConstitutiveRelationsGeneric(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, MeshLib::PropertyVector< int > const *const material_ids, BaseLib::ConfigTree const &config, std::unique_ptr< SolidConstitutiveRelation >(*create_constitutive_relation)(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &, std::optional< ParameterLib::CoordinateSystem > const &, BaseLib::ConfigTree const &))

References createConstitutiveRelation(), and createConstitutiveRelationsGeneric().

Referenced by ProcessLib::HydroMechanics::createHydroMechanicsProcess(), ProcessLib::LIE::HydroMechanics::createHydroMechanicsProcess(), ProcessLib::PhaseField::createPhaseFieldProcess(), ProcessLib::RichardsMechanics::createRichardsMechanicsProcess(), ProcessLib::SmallDeformationNonlocal::createSmallDeformationNonlocalProcess(), ProcessLib::LIE::SmallDeformation::createSmallDeformationProcess(), ProcessLib::SmallDeformation::createSmallDeformationProcess(), ProcessLib::RichardsMechanics::CreateConstitutiveSetting< DisplacementDim >::createSolidConstitutiveRelations(), ProcessLib::SmallDeformation::ConstitutiveRelations::CreateConstitutiveSetting< DisplacementDim >::createSolidConstitutiveRelations(), ProcessLib::ThermoRichardsMechanics::ConstitutiveStress_StrainTemperature::CreateConstitutiveSetting< DisplacementDim >::createSolidConstitutiveRelations(), ProcessLib::TH2M::createTH2MProcess(), ProcessLib::ThermoHydroMechanics::createThermoHydroMechanicsProcess(), ProcessLib::ThermoMechanicalPhaseField::createThermoMechanicalPhaseFieldProcess(), and ProcessLib::ThermoMechanics::createThermoMechanicsProcess().

◆ createConstitutiveRelations< 2 >()

template std::map< int, std::shared_ptr< MaterialLib::Solids::MechanicsBase< 2 > > > MaterialLib::Solids::createConstitutiveRelations< 2 > ( std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
std::optional< ParameterLib::CoordinateSystem > const & local_coordinate_system,
MeshLib::PropertyVector< int > const *const material_ids,
BaseLib::ConfigTree const & config )

◆ createConstitutiveRelations< 3 >()

template std::map< int, std::shared_ptr< MaterialLib::Solids::MechanicsBase< 3 > > > MaterialLib::Solids::createConstitutiveRelations< 3 > ( std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
std::optional< ParameterLib::CoordinateSystem > const & local_coordinate_system,
MeshLib::PropertyVector< int > const *const material_ids,
BaseLib::ConfigTree const & config )

◆ createConstitutiveRelationsGeneric()

template<typename SolidConstitutiveRelation >
std::map< int, std::shared_ptr< SolidConstitutiveRelation > > MaterialLib::Solids::createConstitutiveRelationsGeneric ( std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
std::optional< ParameterLib::CoordinateSystem > const & local_coordinate_system,
MeshLib::PropertyVector< int > const *const material_ids,
BaseLib::ConfigTree const & config,
std::unique_ptr< SolidConstitutiveRelation >(* create_constitutive_relation )(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &, std::optional< ParameterLib::CoordinateSystem > const &, BaseLib::ConfigTree const &) )
Input File Parameter
material__solid__constitutive_relation
Input File Parameter
material__solid__constitutive_relation__id

Definition at line 22 of file CreateConstitutiveRelationsGeneric.h.

32{
33 auto const constitutive_relation_configs =
35 config.getConfigSubtreeList("constitutive_relation");
36
37 std::map<int, std::shared_ptr<SolidConstitutiveRelation>>
38 constitutive_relations;
39
40 for (auto const& constitutive_relation_config :
41 constitutive_relation_configs)
42 {
43 auto create = [&create_constitutive_relation,
44 &parameters,
45 &local_coordinate_system,
46 &constitutive_relation_config](int const /*id*/)
47 {
48 return create_constitutive_relation(parameters,
49 local_coordinate_system,
50 constitutive_relation_config);
51 };
52
53 auto const material_id_string =
55 constitutive_relation_config.getConfigAttribute<std::string>("id",
56 "0");
57
58 auto const material_ids_of_this_constitutive_relation =
59 MaterialLib::parseMaterialIdString(material_id_string,
60 material_ids);
61
62 for (auto const& material_id :
63 material_ids_of_this_constitutive_relation)
64 {
66 material_id,
67 constitutive_relations,
68 material_ids_of_this_constitutive_relation,
69 create);
70 }
71 }
72
73 DBUG("Found {:d} constitutive relations.", constitutive_relations.size());
74
75 return constitutive_relations;
76}
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30
void createMediumForId(int const id, std::map< int, std::shared_ptr< T > > &media, std::vector< int > const &material_ids_of_this_medium, CreateMedium &&create_medium)
std::vector< int > parseMaterialIdString(std::string const &material_id_string, MeshLib::PropertyVector< int > const *const material_ids)

References MaterialLib::createMediumForId(), DBUG(), BaseLib::ConfigTree::getConfigSubtreeList(), and MaterialLib::parseMaterialIdString().

Referenced by createConstitutiveRelations(), ProcessLib::LargeDeformation::ConstitutiveRelations::CreateConstitutiveSetting< DisplacementDim >::createSolidConstitutiveRelations(), and ProcessLib::ThermoRichardsMechanics::ConstitutiveStressSaturation_StrainPressureTemperature::CreateConstitutiveSetting< DisplacementDim >::createSolidConstitutiveRelations().

◆ createLinearElasticIsotropic()

template<int DisplacementDim>
std::unique_ptr< LinearElasticIsotropic< DisplacementDim > > MaterialLib::Solids::createLinearElasticIsotropic ( std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
BaseLib::ConfigTree const & config,
const bool skip_type_checking )
Input File Parameter
material__solid__constitutive_relation__type
Input File Parameter
material__solid__constitutive_relation__LinearElasticIsotropic__youngs_modulus
Input File Parameter
material__solid__constitutive_relation__LinearElasticIsotropic__poissons_ratio

Definition at line 23 of file CreateLinearElasticIsotropic.h.

26{
27 if (!skip_type_checking)
28 {
30 config.checkConfigParameter("type", "LinearElasticIsotropic");
31 DBUG("Create LinearElasticIsotropic material");
32 }
33
34 // Youngs modulus
35 auto& youngs_modulus = ParameterLib::findParameter<double>(
37 config, "youngs_modulus", parameters, 1);
38
39 DBUG("Use '{:s}' as youngs_modulus parameter.", youngs_modulus.name);
40
41 // Poissons ratio
42 auto& poissons_ratio = ParameterLib::findParameter<double>(
44 config, "poissons_ratio", parameters, 1);
45
46 DBUG("Use '{:s}' as poissons_ratio parameter.", poissons_ratio.name);
47
48 typename LinearElasticIsotropic<DisplacementDim>::MaterialProperties mp{
49 youngs_modulus, poissons_ratio};
50
51 return std::make_unique<LinearElasticIsotropic<DisplacementDim>>(mp);
52}
OGS_NO_DANGLING Parameter< ParameterDataType > & findParameter(std::string const &parameter_name, std::vector< std::unique_ptr< ParameterBase > > const &parameters, int const num_components, MeshLib::Mesh const *const mesh=nullptr)
Definition Utils.h:102

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), and ParameterLib::findParameter().

Referenced by createConstitutiveRelation(), and MaterialLib::Solids::Creep::createCreepBGRa().

◆ createLinearElasticOrthotropic() [1/2]

template<int DisplacementDim>
template std::unique_ptr< LinearElasticOrthotropic< 3 > > MaterialLib::Solids::createLinearElasticOrthotropic ( std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
std::optional< ParameterLib::CoordinateSystem > const & local_coordinate_system,
BaseLib::ConfigTree const & config,
const bool skip_type_checking )
Input File Parameter
material__solid__constitutive_relation__type
Input File Parameter
material__solid__constitutive_relation__LinearElasticOrthotropic__youngs_moduli
Input File Parameter
material__solid__constitutive_relation__LinearElasticOrthotropic__shear_moduli
Input File Parameter
material__solid__constitutive_relation__LinearElasticOrthotropic__poissons_ratios

Definition at line 20 of file CreateLinearElasticOrthotropic.cpp.

25{
26 if (!skip_type_checking)
27 {
29 config.checkConfigParameter("type", "LinearElasticOrthotropic");
30 DBUG("Create LinearElasticOrthotropic material");
31 }
32
33 // The three Youngs moduli are required even in two-dimensional case. Same
34 // for the shear moduli and the Poissons ratios.
35 auto& youngs_moduli = ParameterLib::findParameter<double>(
37 config, "youngs_moduli", parameters, 3);
38 DBUG("Use '{:s}' as youngs_moduli parameter.", youngs_moduli.name);
39
40 // Shear moduli
41 auto& shear_moduli = ParameterLib::findParameter<double>(
43 config, "shear_moduli", parameters, 3);
44 DBUG("Use '{:s}' as shear_moduli parameter.", shear_moduli.name);
45
46 // Poissons ratios
47 auto& poissons_ratios = ParameterLib::findParameter<double>(
49 config, "poissons_ratios", parameters, 3);
50 DBUG("Use '{:s}' as poissons_ratios parameter.", poissons_ratios.name);
51
52 typename LinearElasticOrthotropic<DisplacementDim>::MaterialProperties mp{
53 youngs_moduli, shear_moduli, poissons_ratios};
54
55 return std::make_unique<LinearElasticOrthotropic<DisplacementDim>>(
56 mp, local_coordinate_system);
57}

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), and ParameterLib::findParameter().

Referenced by createConstitutiveRelation().

◆ createLinearElasticOrthotropic() [2/2]

template std::unique_ptr< LinearElasticOrthotropic< 2 > > MaterialLib::Solids::createLinearElasticOrthotropic ( std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
std::optional< ParameterLib::CoordinateSystem > const & local_coordinate_system,
BaseLib::ConfigTree const & config,
const bool skip_type_checking )

◆ createLinearElasticTransverseIsotropic() [1/2]

template<int DisplacementDim>
std::unique_ptr< LinearElasticTransverseIsotropic< DisplacementDim > > MaterialLib::Solids::createLinearElasticTransverseIsotropic ( std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
std::optional< ParameterLib::CoordinateSystem > const & local_coordinate_system,
BaseLib::ConfigTree const & config,
const bool skip_type_checking )
Input File Parameter
material__solid__constitutive_relation__type
Input File Parameter
material__solid__constitutive_relation__LinearElasticTransverseIsotropic__youngs_modulus_i
Input File Parameter
material__solid__constitutive_relation__LinearElasticTransverseIsotropic__youngs_modulus_a
Input File Parameter
material__solid__constitutive_relation__LinearElasticTransverseIsotropic__poissons_ratio_ii
Input File Parameter
material__solid__constitutive_relation__LinearElasticTransverseIsotropic__poissons_ratio_ia
Input File Parameter
material__solid__constitutive_relation__LinearElasticTransverseIsotropic__shear_modulus_ia

Definition at line 22 of file CreateLinearElasticTransverseIsotropic.cpp.

27{
28 if (!skip_type_checking)
29 {
31 config.checkConfigParameter("type", "LinearElasticTransverseIsotropic");
32 DBUG("Create LinearElasticTransverseIsotropic material");
33 }
34
37 config, "youngs_modulus_i", parameters, 1);
38 DBUG("Use '{}' as the in-plane Young’s modulus, E_i.", E_i.name);
39
42 config, "youngs_modulus_a", parameters, 1);
43 DBUG(
44 "Use '{}' as the Young’s modulus w.r.t. the direction of anisotropy, "
45 "E_a.",
46 E_a.name);
47
48 auto const& nu_ii = ParameterLib::findParameter<double>(
50 config, "poissons_ratio_ii", parameters, 1);
51 DBUG("Use '{}' as the in-plane Poisson’s ratio, nu_ii.", nu_ii.name);
52
53 auto const& nu_ia = ParameterLib::findParameter<double>(
55 config, "poissons_ratio_ia", parameters, 1);
56 DBUG(
57 "Use '{}' as the Poisson ratio perpendicular to the plane of isotropy, "
58 "due to strain in the plane of isotropy, nu_ia.",
59 nu_ia.name);
60
61 auto const& G_ia = ParameterLib::findParameter<double>(
63 config, "shear_modulus_ia", parameters, 1);
64 DBUG(
65 "Use '{}' as the shear modulus between directions of isotropy and "
66 "anisotropy , G_ia.",
67 G_ia.name);
68
69 return std::make_unique<LinearElasticTransverseIsotropic<DisplacementDim>>(
70 E_i, E_a, nu_ii, nu_ia, G_ia, local_coordinate_system);
71}

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), and ParameterLib::findParameter().

Referenced by createConstitutiveRelation().

◆ createLinearElasticTransverseIsotropic() [2/2]

template std::unique_ptr< LinearElasticTransverseIsotropic< 2 > > MaterialLib::Solids::createLinearElasticTransverseIsotropic ( std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
std::optional< ParameterLib::CoordinateSystem > const & local_coordinate_system,
BaseLib::ConfigTree const & config,
const bool skip_type_checking )

◆ elasticTangentStiffness()

template<int DisplacementDim>
MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > MaterialLib::Solids::elasticTangentStiffness ( double const first_lame_parameter,
double const shear_modulus )

Definition at line 125 of file LinearElasticIsotropic.h.

127{
128 using KelvinMatrix =
130
131 KelvinMatrix tangentStiffness = KelvinMatrix::Zero();
132 tangentStiffness.template topLeftCorner<3, 3>().setConstant(
133 first_lame_parameter);
134 tangentStiffness.noalias() += 2 * shear_modulus * KelvinMatrix::Identity();
135 return tangentStiffness;
136}
Eigen::Matrix< double, kelvin_vector_dimensions(DisplacementDim), kelvin_vector_dimensions(DisplacementDim), Eigen::RowMajor > KelvinMatrixType

Referenced by MaterialLib::Solids::LinearElasticIsotropic< DisplacementDim >::getElasticTensor(), and MaterialLib::Solids::Ehlers::SolidEhlers< DisplacementDim >::integrateStress().

◆ selectSolidConstitutiveRelation()

template<typename SolidMaterialsMap >
auto & MaterialLib::Solids::selectSolidConstitutiveRelation ( SolidMaterialsMap const & constitutive_relations,
MeshLib::PropertyVector< int > const *const material_ids,
std::size_t const element_id )

Choose solid material model for given element id out of a set of models, possibly using the material ids.

Only two possibilities yield a valid result and result in OGS_FATAL call otherwise.

  1. If the material id is not defined then search for a constitutive relation with id 0 (the default value if not specified).
  2. There is only one constitutive relation with id 0 then the material and element ids are ignored and the only constitutive relation (under id 0) is returned.
  3. If material ids are defined then search for a constitutive relation corresponding to the material id of the current element.

Definition at line 36 of file SelectSolidConstitutiveRelation.h.

40{
41 // Multiple constitutive relations and no material ids should not be valid.
42 if (constitutive_relations.size() > 1 && material_ids == nullptr)
43 {
45 "There are {} constitutive relations provided in the project file "
46 "but no MaterialIDs could be found in the mesh.",
47 constitutive_relations.size());
48 }
49
50 int const material_id = ((constitutive_relations.size() == 1 &&
51 constitutive_relations.begin()->first == 0) ||
52 material_ids == nullptr)
53 ? 0
54 : (*material_ids)[element_id];
55
56 auto const constitutive_relation = constitutive_relations.find(material_id);
57 if (constitutive_relation == end(constitutive_relations))
58 {
60 "No constitutive relation found for material id {:d} and element "
61 "{:d}. There are {:d} constitutive relations available, "
62 "corresponding to the ids: {}",
63 material_id, element_id, constitutive_relations.size(),
64 fmt::join(constitutive_relations | ranges::views::keys, " "));
65 }
66
67 if (constitutive_relation->second == nullptr)
68 {
70 "The constitutive relation found for material id {:d} and element "
71 "{:d} is a nullptr, which is impossible.",
72 material_id, element_id);
73 }
74
75 return *constitutive_relation->second;
76}

References OGS_FATAL.

Referenced by ProcessLib::HydroMechanics::HydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::HydroMechanicsLocalAssembler(), ProcessLib::LIE::HydroMechanics::HydroMechanicsLocalAssemblerMatrix< ShapeFunctionDisplacement, ShapeFunctionPressure, GlobalDim >::HydroMechanicsLocalAssemblerMatrix(), ProcessLib::PhaseField::PhaseFieldLocalAssembler< ShapeFunction, DisplacementDim >::PhaseFieldLocalAssembler(), ProcessLib::LIE::SmallDeformation::SmallDeformationLocalAssemblerMatrix< ShapeFunction, DisplacementDim >::SmallDeformationLocalAssemblerMatrix(), ProcessLib::LIE::SmallDeformation::SmallDeformationLocalAssemblerMatrixNearFracture< ShapeFunction, DisplacementDim >::SmallDeformationLocalAssemblerMatrixNearFracture(), ProcessLib::SmallDeformationNonlocal::SmallDeformationNonlocalLocalAssembler< ShapeFunction, DisplacementDim >::SmallDeformationNonlocalLocalAssembler(), ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::ThermoHydroMechanicsLocalAssembler(), ProcessLib::ThermoMechanicalPhaseField::ThermoMechanicalPhaseFieldLocalAssembler< ShapeFunction, DisplacementDim >::ThermoMechanicalPhaseFieldLocalAssembler(), ProcessLib::ThermoMechanics::ThermoMechanicsLocalAssembler< ShapeFunction, DisplacementDim >::ThermoMechanicsLocalAssembler(), ProcessLib::HydroMechanics::HydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::assembleWithJacobian(), ProcessLib::HydroMechanics::HydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::assembleWithJacobianForPressureEquations(), ProcessLib::HydroMechanics::HydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::postTimestepConcrete(), and ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::updateConstitutiveRelations().