OGS
MaterialLib::Solids::Lubby2 Namespace Reference

Namespaces

 detail
 

Classes

struct  Lubby2MaterialProperties
 
class  Lubby2
 

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

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

◆ 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 
94  Lubby2MaterialProperties mp{
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(char const *fmt, Args const &... args)
Definition: Logging.h:27
NewtonRaphsonSolverParameters createNewtonRaphsonSolverParameters(BaseLib::ConfigTree const &config)

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

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

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

References MathLib::KelvinVector::kelvin_vector_dimensions().