17 template <
bool is_ad,
typename T>
23 params.
addParam<
Real>(
"bulk_modulus", -1,
"The bulk modulus for the material.");
24 params.
addParam<
Real>(
"lambda", -1,
"Lame's first constant for the material.");
25 params.
addParam<
Real>(
"poissons_ratio", -1,
"Poisson's ratio for the material.");
26 params.
addParam<
Real>(
"shear_modulus", -1,
"The shear modulus of the material.");
27 params.
addParam<
Real>(
"youngs_modulus", -1,
"Young's modulus of the material.");
28 params.
declareControllable(
"bulk_modulus lambda poissons_ratio shear_modulus youngs_modulus");
32 template <
bool is_ad,
typename T>
36 _bulk_modulus_set(parameters.isParamSetByUser(
"bulk_modulus")),
37 _lambda_set(parameters.isParamSetByUser(
"lambda")),
38 _poissons_ratio_set(parameters.isParamSetByUser(
"poissons_ratio")),
39 _shear_modulus_set(parameters.isParamSetByUser(
"shear_modulus")),
40 _youngs_modulus_set(parameters.isParamSetByUser(
"youngs_modulus")),
41 _bulk_modulus(this->template getParam<
Real>(
"bulk_modulus")),
42 _lambda(this->template getParam<
Real>(
"lambda")),
43 _poissons_ratio(this->template getParam<
Real>(
"poissons_ratio")),
44 _shear_modulus(this->template getParam<
Real>(
"shear_modulus")),
45 _youngs_modulus(this->template getParam<
Real>(
"youngs_modulus")),
46 _effective_stiffness_local(parameters.isParamValid(
"effective_stiffness_local"))
50 if (num_elastic_constants != 2)
51 mooseError(
"Exactly two elastic constants must be defined for material '" +
name() +
"'.");
60 mooseError(
"Bulk modulus must be positive in material '" +
name() +
"'.");
63 mooseError(
"Poissons ratio must be greater than -1 and less than 0.5 in " 68 mooseError(
"Shear modulus must not be negative in material '" +
name() +
"'.");
71 mooseError(
"Youngs modulus must be positive in material '" +
name() +
"'.");
74 template <
bool is_ad,
typename T>
78 std::vector<Real> iso_const(2);
82 if (_youngs_modulus_set && _poissons_ratio_set)
84 _Cijkl.fillSymmetricIsotropicEandNu(_youngs_modulus, _poissons_ratio);
85 _effective_stiffness_local =
86 std::max(
std::sqrt((_youngs_modulus * (1 - _poissons_ratio)) /
87 ((1 + _poissons_ratio) * (1 - 2 * _poissons_ratio))),
88 std::sqrt(_youngs_modulus / (2 * (1 + _poissons_ratio))));
92 if (_lambda_set && _shear_modulus_set)
94 iso_const[0] = _lambda;
95 iso_const[1] = _shear_modulus;
96 elas_mod = (_shear_modulus * (3 * _lambda + 2 * _shear_modulus)) / (_lambda + _shear_modulus);
97 poiss_rat = _lambda / (2 * (_lambda + _shear_modulus));
98 _effective_stiffness_local =
99 std::max(
std::sqrt((elas_mod * (1 - poiss_rat)) / ((1 + poiss_rat) * (1 - 2 * poiss_rat))),
102 else if (_shear_modulus_set && _bulk_modulus_set)
104 iso_const[0] = _bulk_modulus - 2.0 / 3.0 * _shear_modulus;
105 iso_const[1] = _shear_modulus;
106 elas_mod = (9 * _bulk_modulus * _shear_modulus) / (3 * _bulk_modulus + _shear_modulus);
108 (3 * _bulk_modulus - 2 * _shear_modulus) / (2 * (3 * _bulk_modulus + _shear_modulus));
109 _effective_stiffness_local =
110 std::max(
std::sqrt((elas_mod * (1 - poiss_rat)) / ((1 + poiss_rat) * (1 - 2 * poiss_rat))),
113 else if (_poissons_ratio_set && _bulk_modulus_set)
115 iso_const[0] = 3.0 * _bulk_modulus * _poissons_ratio / (1.0 + _poissons_ratio);
117 3.0 * _bulk_modulus * (1.0 - 2.0 * _poissons_ratio) / (2.0 * (1.0 + _poissons_ratio));
118 elas_mod = 3 * _bulk_modulus * (1 - 2 * _poissons_ratio);
119 poiss_rat = _poissons_ratio;
120 _effective_stiffness_local =
121 std::max(
std::sqrt((elas_mod * (1 - poiss_rat)) / ((1 + poiss_rat) * (1 - 2 * poiss_rat))),
122 std::sqrt(elas_mod / (2 * (1 + poiss_rat))));
124 else if (_lambda_set && _bulk_modulus_set)
126 iso_const[0] = _lambda;
127 iso_const[1] = 3.0 * (_bulk_modulus - _lambda) / 2.0;
128 elas_mod = (9 * _bulk_modulus * (_bulk_modulus - _lambda)) / (3 * _bulk_modulus - _lambda);
129 poiss_rat = (_lambda) / ((3 * _bulk_modulus - _lambda));
130 _effective_stiffness_local =
131 std::max(
std::sqrt((elas_mod * (1 - poiss_rat)) / ((1 + poiss_rat) * (1 - 2 * poiss_rat))),
132 std::sqrt(elas_mod / (2 * (1 + poiss_rat))));
134 else if (_shear_modulus_set && _youngs_modulus_set)
136 iso_const[0] = _shear_modulus * (_youngs_modulus - 2.0 * _shear_modulus) /
137 (3.0 * _shear_modulus - _youngs_modulus);
138 iso_const[1] = _shear_modulus;
139 elas_mod = _youngs_modulus;
140 poiss_rat = (_youngs_modulus - 2 * _shear_modulus) / (2 * _shear_modulus);
141 _effective_stiffness_local =
142 std::max(
std::sqrt((elas_mod * (1 - poiss_rat)) / ((1 + poiss_rat) * (1 - 2 * poiss_rat))),
143 std::sqrt(elas_mod / (2 * (1 + poiss_rat))));
145 else if (_shear_modulus_set && _poissons_ratio_set)
147 iso_const[0] = 2.0 * _shear_modulus * _poissons_ratio / (1.0 - 2.0 * _poissons_ratio);
148 iso_const[1] = _shear_modulus;
149 elas_mod = (2 * _shear_modulus * (1 + _poissons_ratio));
150 poiss_rat = (_poissons_ratio);
151 _effective_stiffness_local =
152 std::max(
std::sqrt((elas_mod * (1 - poiss_rat)) / ((1 + poiss_rat) * (1 - 2 * poiss_rat))),
153 std::sqrt(elas_mod / (2 * (1 + poiss_rat))));
155 else if (_youngs_modulus_set && _bulk_modulus_set)
157 iso_const[0] = 3.0 * _bulk_modulus * (3.0 * _bulk_modulus - _youngs_modulus) /
158 (9.0 * _bulk_modulus - _youngs_modulus);
159 iso_const[1] = 3.0 * _bulk_modulus * _youngs_modulus / (9.0 * _bulk_modulus - _youngs_modulus);
160 elas_mod = (_youngs_modulus);
161 poiss_rat = (3 * _bulk_modulus - _youngs_modulus) / (6 * _bulk_modulus);
162 _effective_stiffness_local =
163 std::max(
std::sqrt((elas_mod * (1 - poiss_rat)) / ((1 + poiss_rat) * (1 - 2 * poiss_rat))),
164 std::sqrt(elas_mod / (2 * (1 + poiss_rat))));
166 else if (_lambda_set && _poissons_ratio_set)
168 iso_const[0] = _lambda;
169 iso_const[1] = _lambda * (1.0 - 2.0 * _poissons_ratio) / (2.0 * _poissons_ratio);
170 elas_mod = (_lambda * (1 + _poissons_ratio) * (1 - 2 * _poissons_ratio)) / (_poissons_ratio);
171 poiss_rat = (_poissons_ratio);
172 _effective_stiffness_local =
173 std::max(
std::sqrt((elas_mod * (1 - poiss_rat)) / ((1 + poiss_rat) * (1 - 2 * poiss_rat))),
174 std::sqrt(elas_mod / (2 * (1 + poiss_rat))));
176 else if (_lambda_set && _youngs_modulus_set)
178 iso_const[0] = _lambda;
179 iso_const[1] = (_youngs_modulus - 3.0 * _lambda +
180 std::sqrt(_youngs_modulus * _youngs_modulus + 9.0 * _lambda * _lambda +
181 2.0 * _youngs_modulus * _lambda)) /
183 elas_mod = (_youngs_modulus);
184 poiss_rat = (2 * _lambda) / (_youngs_modulus + _lambda +
186 2 * _youngs_modulus * _lambda));
187 _effective_stiffness_local =
188 std::max(
std::sqrt((elas_mod * (1 - poiss_rat)) / ((1 + poiss_rat) * (1 - 2 * poiss_rat))),
189 std::sqrt(elas_mod / (2 * (1 + poiss_rat))));
192 mooseError(
"Incorrect combination of elastic properties in ComputeIsotropicElasticityTensor.");
195 _Cijkl.fillFromInputVector(iso_const, T::symmetric_isotropic);
198 template <
bool is_ad,
typename T>
203 _elasticity_tensor[_qp] = _Cijkl;
206 _effective_stiffness[_qp] = _effective_stiffness_local;
ComputeIsotropicElasticityTensorTempl(const InputParameters ¶meters)
void mooseError(Args &&... args)
registerMooseObject("SolidMechanicsApp", ComputeIsotropicElasticityTensor)
ComputeElasticityTensorBase the base class for computing elasticity tensors.
void issueGuarantee(const MaterialPropertyName &prop_name, Guarantee guarantee)
virtual void computeQpElasticityTensor() override
ADRealEigenVector< T, D, asd > sqrt(const ADRealEigenVector< T, D, asd > &)
virtual const std::string & name() const
static InputParameters validParams()
bool isParamValid(const std::string &name) const
static InputParameters validParams()
const Real & _shear_modulus
virtual void residualSetup() override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
bool _bulk_modulus_set
Elastic constants.
std::string _elasticity_tensor_name
ComputeIsotropicElasticityTensor defines an elasticity tensor material for isotropic materials...
void mooseError(Args &&... args) const
const Real & _bulk_modulus
const Real & _youngs_modulus
MooseUnits pow(const MooseUnits &, int)