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 29 of file Lubby2.cpp.

30{
31 Eigen::Matrix<double, Lubby2<DisplacementDim>::JacobianResidualSize,
33 dGdE =
34 Eigen::Matrix<double, Lubby2<DisplacementDim>::JacobianResidualSize,
36 dGdE.template topLeftCorner<Lubby2<DisplacementDim>::KelvinVectorSize,
38 .diagonal()
39 .setConstant(-2.);
40 return dGdE;
41}

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 24 of file CreateLubby2.h.

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

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 44 of file Lubby2.cpp.

46{
47 // Calculate dGdE for time step
48 auto const dGdE = calculatedGdEBurgers<DisplacementDim>();
49
50 // Consistent tangent from local Newton iteration of material
51 // functionals.
52 // Only the upper left block is relevant for the global tangent.
53 static int const KelvinVectorSize =
55 using KelvinMatrix =
57
58 KelvinMatrix const dzdE =
59 linear_solver.solve(-dGdE)
60 .template topLeftCorner<KelvinVectorSize, KelvinVectorSize>();
61
63 auto const& P_sph = Invariants::spherical_projection;
64 auto const& P_dev = Invariants::deviatoric_projection;
65
66 KelvinMatrix C = GM0 * dzdE * P_dev + 3. * KM0 * P_sph;
67 return C;
68};
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().