OGS
MaterialLib::Solids::Lubby2 Namespace Reference

Namespaces

namespace  detail

Classes

class  Lubby2
struct  Lubby2MaterialProperties

Functions

template<int DisplacementDim>
std::unique_ptr< Lubby2< DisplacementDim > > createLubby2 (std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, BaseLib::ConfigTree const &config)
template<int DisplacementDim>
Eigen::Matrix< double, Lubby2< DisplacementDim >::JacobianResidualSize, Lubby2< DisplacementDim >::KelvinVectorSize > calculatedGdEBurgers ()
template<int DisplacementDim, typename LinearSolver>
MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > tangentStiffnessA (double const GM0, double const KM0, LinearSolver const &linear_solver)

Function Documentation

◆ calculatedGdEBurgers()

template<int DisplacementDim>
Eigen::Matrix< double, Lubby2< DisplacementDim >::JacobianResidualSize, Lubby2< DisplacementDim >::KelvinVectorSize > MaterialLib::Solids::Lubby2::calculatedGdEBurgers ( )

Calculates the 18x6 derivative of the residuals with respect to total strain.

Definition at line 23 of file Lubby2.cpp.

24{
25 Eigen::Matrix<double, Lubby2<DisplacementDim>::JacobianResidualSize,
27 dGdE =
28 Eigen::Matrix<double, Lubby2<DisplacementDim>::JacobianResidualSize,
30 dGdE.template topLeftCorner<Lubby2<DisplacementDim>::KelvinVectorSize,
32 .diagonal()
33 .setConstant(-2.);
34 return dGdE;
35}
static int const KelvinVectorSize
Definition Lubby2.h:153

References MaterialLib::Solids::Lubby2::Lubby2< DisplacementDim >::KelvinVectorSize.

Referenced by tangentStiffnessA().

◆ createLubby2()

template<int DisplacementDim>
std::unique_ptr< Lubby2< DisplacementDim > > MaterialLib::Solids::Lubby2::createLubby2 ( std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
BaseLib::ConfigTree const & config )
Input File Parameter
material__solid__constitutive_relation__type
Input File Parameter
material__solid__constitutive_relation__Lubby2__kelvin_shear_modulus
Input File Parameter
material__solid__constitutive_relation__Lubby2__kelvin_viscosity
Input File Parameter
material__solid__constitutive_relation__Lubby2__maxwell_shear_modulus
Input File Parameter
material__solid__constitutive_relation__Lubby2__maxwell_bulk_modulus
Input File Parameter
material__solid__constitutive_relation__Lubby2__maxwell_viscosity
Input File Parameter
material__solid__constitutive_relation__Lubby2__dependency_parameter_mk
Input File Parameter
material__solid__constitutive_relation__Lubby2__dependency_parameter_mvk
Input File Parameter
material__solid__constitutive_relation__Lubby2__dependency_parameter_mvm
Input File Parameter
material__solid__constitutive_relation__Lubby2__nonlinear_solver

Definition at line 17 of file CreateLubby2.h.

20{
22 config.checkConfigParameter("type", "Lubby2");
23 DBUG("Create Lubby2 material");
24
25 // Kelvin shear modulus.
26 auto& kelvin_shear_modulus = ParameterLib::findParameter<double>(
28 config, "kelvin_shear_modulus", parameters, 1);
29
30 DBUG("Use '{:s}' as kelvin shear modulus parameter.",
31 kelvin_shear_modulus.name);
32
33 // Kelvin viscosity.
34 auto& kelvin_viscosity = ParameterLib::findParameter<double>(
36 config, "kelvin_viscosity", parameters, 1);
37
38 DBUG("Use '{:s}' as kelvin viscosity parameter.", kelvin_viscosity.name);
39
40 // Maxwell shear modulus.
41 auto& maxwell_shear_modulus = ParameterLib::findParameter<double>(
43 config, "maxwell_shear_modulus", parameters, 1);
44
45 DBUG("Use '{:s}' as maxwell shear modulus parameter.",
46 maxwell_shear_modulus.name);
47
48 // Maxwell bulk modulus.
49 auto& maxwell_bulk_modulus = ParameterLib::findParameter<double>(
51 config, "maxwell_bulk_modulus", parameters, 1);
52
53 DBUG("Use '{:s}' as maxwell bulk modulus parameter.",
54 maxwell_bulk_modulus.name);
55
56 // Maxwell viscosity.
57 auto& maxwell_viscosity = ParameterLib::findParameter<double>(
59 config, "maxwell_viscosity", parameters, 1);
60
61 DBUG("Use '{:s}' as maxwell viscosity parameter.", maxwell_viscosity.name);
62
63 // Dependency parameter for mK.
64 auto& dependency_parameter_mK = ParameterLib::findParameter<double>(
66 config, "dependency_parameter_mk", parameters, 1);
67
68 DBUG("Use '{:s}' as dependency parameter mK.",
69 dependency_parameter_mK.name);
70
71 // Dependency parameter for mvK.
72 auto& dependency_parameter_mvK = ParameterLib::findParameter<double>(
74 config, "dependency_parameter_mvk", parameters, 1);
75
76 DBUG("Use '{:s}' as dependency parameter mvK.",
77 dependency_parameter_mvK.name);
78
79 // Dependency parameter for mvM.
80 auto& dependency_parameter_mvM = ParameterLib::findParameter<double>(
82 config, "dependency_parameter_mvm", parameters, 1);
83
84 DBUG("Use '{:s}' as dependency parameter mvM.",
85 dependency_parameter_mvM.name);
86
88 kelvin_shear_modulus, maxwell_shear_modulus,
89 maxwell_bulk_modulus, kelvin_viscosity,
90 maxwell_viscosity, dependency_parameter_mK,
91 dependency_parameter_mvK, dependency_parameter_mvM};
92
93 auto const& nonlinear_solver_config =
95 config.getConfigSubtree("nonlinear_solver");
96 auto const nonlinear_solver_parameters =
97 NumLib::createNewtonRaphsonSolverParameters(nonlinear_solver_config);
98
99 return std::unique_ptr<Lubby2<DisplacementDim>>{
100 new Lubby2<DisplacementDim>{nonlinear_solver_parameters, mp}};
101}
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:22
NewtonRaphsonSolverParameters createNewtonRaphsonSolverParameters(BaseLib::ConfigTree const &config)
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)

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

Referenced by MaterialLib::Solids::createConstitutiveRelation().

◆ tangentStiffnessA()

template<int DisplacementDim, typename LinearSolver>
MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > MaterialLib::Solids::Lubby2::tangentStiffnessA ( double const GM0,
double const KM0,
LinearSolver const & linear_solver )

Definition at line 38 of file Lubby2.cpp.

40{
41 // Calculate dGdE for time step
42 auto const dGdE = calculatedGdEBurgers<DisplacementDim>();
43
44 // Consistent tangent from local Newton iteration of material
45 // functionals.
46 // Only the upper left block is relevant for the global tangent.
47 static int const KelvinVectorSize =
49 using KelvinMatrix =
51
52 KelvinMatrix const dzdE =
53 linear_solver.solve(-dGdE)
54 .template topLeftCorner<KelvinVectorSize, KelvinVectorSize>();
55
57 auto const& P_sph = Invariants::spherical_projection;
58 auto const& P_dev = Invariants::deviatoric_projection;
59
60 KelvinMatrix C = GM0 * dzdE * P_dev + 3. * KM0 * P_sph;
61 return C;
62};
Eigen::Matrix< double, Lubby2< DisplacementDim >::JacobianResidualSize, Lubby2< DisplacementDim >::KelvinVectorSize > calculatedGdEBurgers()
Definition Lubby2.cpp:23
constexpr int kelvin_vector_dimensions(int const displacement_dim)
Kelvin vector dimensions for given displacement dimension.
Eigen::Matrix< double, kelvin_vector_dimensions(DisplacementDim), kelvin_vector_dimensions(DisplacementDim), Eigen::RowMajor > KelvinMatrixType

References calculatedGdEBurgers(), and MathLib::KelvinVector::kelvin_vector_dimensions().

Referenced by MaterialLib::Solids::Lubby2::Lubby2< DisplacementDim >::integrateStress().