21 params.
addClassDescription(
"Assembles the integrated out-of-plane stress to the scalar residual "
22 "for generalized plane strain using automatic differentiation.");
24 "scalar_out_of_plane_strain",
25 "Scalar variable for generalized plane strain");
26 params.
makeParamRequired<std::vector<VariableName>>(
"scalar_out_of_plane_strain");
27 params.
addParam<FunctionName>(
"out_of_plane_pressure_function",
28 "Function used to prescribe pressure (applied toward the body) in "
29 "the out-of-plane direction");
30 params.
addParam<MaterialPropertyName>(
"out_of_plane_pressure_material",
32 "Material used to prescribe pressure (applied toward the "
33 "body) in the out-of-plane direction");
34 MooseEnum out_of_plane_direction(
"x y z",
"z");
36 "out_of_plane_direction", out_of_plane_direction,
"The direction of the out-of-plane strain");
40 "Scale factor applied to prescribed out-of-plane pressure (both material and function)");
41 params.
addParam<std::string>(
"base_name",
"Material property base name");
42 params.
set<
bool>(
"compute_field_residuals") =
false;
50 _base_name(isParamValid(
"base_name") ? getParam<
std::string>(
"base_name") +
"_" :
""),
51 _stress(getADMaterialProperty<
RankTwoTensor>(_base_name +
"stress")),
52 _out_of_plane_pressure_function(parameters.isParamSetByUser(
"out_of_plane_pressure_function")
53 ? &getFunction(
"out_of_plane_pressure_function")
55 _out_of_plane_pressure_material(getMaterialProperty<Real>(
"out_of_plane_pressure_material")),
56 _pressure_factor(getParam<Real>(
"pressure_factor")),
57 _out_of_plane_direction(getParam<
MooseEnum>(
"out_of_plane_direction"))
68 "Generalized plane strain supports only Cartesian and axisymmetric coordinate "
81 const Real out_of_plane_pressure =
registerMooseObject("SolidMechanicsApp", ADGeneralizedPlaneStrain)
DualNumber< Real, DNDerivativeType, true > ADReal
Assembles the contributions of the area integral performed over the elements to the residual for the ...
ADReal computeQpResidual() override
static InputParameters validParams()
ADGeneralizedPlaneStrain(const InputParameters ¶meters)
ADReal computeScalarQpResidual() override
const Real _pressure_factor
Factor applied to the out-of-plane pressure.
const ADMaterialProperty< RankTwoTensor > & _stress
The stress tensor.
unsigned int _out_of_plane_direction
Direction of the out-of-plane strain scalar variable.
void initialSetup() override
const MaterialProperty< Real > & _out_of_plane_pressure_material
Material property defining the applied out-of-plane pressure.
const Function *const _out_of_plane_pressure_function
Function defining the applied out-of-plane pressure.
static InputParameters validParams()
Moose::CoordinateSystemType getBlockCoordSystem()
virtual Real value(Real t, const Point &p) const
const MooseArray< Point > & _q_point
void paramError(const std::string ¶m, Args... args) const