24 params.
addClassDescription(
"Plane stress kernel to provide out-of-plane strain contribution.");
26 "The string of displacements suitable for the problem statement");
28 "The name of the temperature variable used in the " 29 "ComputeThermalExpansionEigenstrain. (Not required for " 30 "simulations without temperature coupling.)");
31 params.
addParam<std::vector<MaterialPropertyName>>(
34 "List of eigenstrains used in the strain calculation. Used for computing their derivaties " 35 "for off-diagonal Jacobian terms.");
36 params.
addParam<std::string>(
"base_name",
"Material property base name");
41 "The direction of the out-of-plane strain variable");
43 params.
set<
bool>(
"use_displaced_mesh") =
false;
50 _base_name(isParamValid(
"base_name") ? getParam<
std::string>(
"base_name") +
"_" :
""),
51 _stress(getMaterialProperty<
RankTwoTensor>(_base_name +
"stress")),
52 _Jacobian_mult(getMaterialProperty<
RankFourTensor>(_base_name +
"Jacobian_mult")),
53 _direction(getParam<
MooseEnum>(
"out_of_plane_strain_direction")),
54 _disp_coupled(isCoupled(
"displacements")),
55 _ndisp(_disp_coupled ? coupledComponents(
"displacements") : 0),
57 _temp_coupled(isCoupled(
"temperature")),
58 _temp_var(_temp_coupled ? coupled(
"temperature") : 0)
61 for (
unsigned int i = 0; i <
_ndisp; ++i)
62 _disp_var[i] = coupled(
"displacements", i);
66 for (
auto eigenstrain_name : getParam<std::vector<MaterialPropertyName>>(
"eigenstrain_names"))
68 eigenstrain_name, coupledName(
"temperature", 0)));
73 mooseError(
"The number of displacement variables supplied must match the mesh dimension.");
97 for (
unsigned int coupled_direction = 0; coupled_direction <
_ndisp; ++coupled_direction)
101 unsigned int coupled_direction_index = 0;
106 if (coupled_direction == 0)
107 coupled_direction_index = 1;
109 coupled_direction_index = 2;
114 if (coupled_direction == 0)
115 coupled_direction_index = 0;
117 coupled_direction_index = 2;
122 coupled_direction_index = coupled_direction;
129 _test[_i][_qp] * _grad_phi[_j][_qp](coupled_direction_index);
139 total_deigenstrain_dT += (*deigenstrain_dT)[_qp];
142 for (
unsigned int i = 0; i < 3; ++i)
145 val = -sum * _test[_i][_qp] * _phi[_j][_qp];
static InputParameters validParams()
void mooseError(Args &&... args)
virtual Real computeQpJacobian() override
const MaterialProperty< RankFourTensor > & _Jacobian_mult
std::vector< const MaterialProperty< RankTwoTensor > * > _deigenstrain_dT
d(strain)/d(temperature), if computed by ComputeThermalExpansionEigenstrain
std::vector< unsigned int > _disp_var
Variable numbers of the displacement variables.
registerMooseObject("SolidMechanicsApp", WeakPlaneStress)
WeakPlaneStress(const InputParameters ¶meters)
const unsigned int _temp_var
unsigned int _ndisp
Number of displacement variables.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const MaterialProperty< RankTwoTensor > & _stress
The stress tensor that provides the out-of-plane stress.
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
const unsigned int _direction
The direction of the out-of-plane strain variable.
const bool _disp_coupled
Coupled displacement variables.
virtual Real computeQpResidual() override
static InputParameters validParams()