17 #include "libmesh/quadrature.h" 26 "Generalized plane strain UserObject to provide residual and diagonal Jacobian entries.");
27 params.
addParam<UserObjectName>(
"subblock_index_provider",
28 "SubblockIndexProvider user object name");
29 params.
addParam<FunctionName>(
"out_of_plane_pressure_function",
30 "Function used to prescribe pressure (applied toward the body) in " 31 "the out-of-plane direction");
33 "out_of_plane_pressure",
34 "Function used to prescribe pressure (applied toward the body) in the out-of-plane direction " 35 "(y for 1D Axisymmetric or z for 2D Cartesian problems)",
36 "This has been replaced by 'out_of_plane_pressure_function'");
37 params.
addParam<MaterialPropertyName>(
"out_of_plane_pressure_material",
39 "Material used to prescribe pressure (applied toward the " 40 "body) in the out-of-plane direction");
41 MooseEnum outOfPlaneDirection(
"x y z",
"z");
43 "out_of_plane_direction", outOfPlaneDirection,
"The direction of the out-of-plane strain.");
46 "Scale factor applied to prescribed out-of-plane pressure (both material and function)",
47 "This has been replaced by 'pressure_factor'");
50 "Scale factor applied to prescribed out-of-plane pressure (both material and function)");
51 params.
addParam<std::string>(
"base_name",
"Material properties base name");
60 _base_name(isParamValid(
"base_name") ? getParam<
std::string>(
"base_name") +
"_" :
""),
61 _Jacobian_mult(getMaterialProperty<
RankFourTensor>(_base_name +
"Jacobian_mult")),
62 _stress(getMaterialProperty<
RankTwoTensor>(_base_name +
"stress")),
63 _subblock_id_provider(nullptr),
64 _out_of_plane_pressure_function(parameters.isParamSetByUser(
"out_of_plane_pressure_function")
65 ? &getFunction(
"out_of_plane_pressure_function")
66 : parameters.isParamSetByUser(
"out_of_plane_pressure")
67 ? &getFunction(
"out_of_plane_pressure")
69 _out_of_plane_pressure_material(getMaterialProperty<
Real>(
"out_of_plane_pressure_material")),
70 _pressure_factor(parameters.isParamSetByUser(
"pressure_factor")
71 ? getParam<
Real>(
"pressure_factor")
72 : parameters.isParamSetByUser(
"factor") ? getParam<
Real>(
"factor")
77 mooseError(
"Cannot specify both 'out_of_plane_pressure_function' and 'out_of_plane_pressure'");
79 mooseError(
"Cannot specify both 'pressure_factor' and 'factor'");
92 mooseError(
"Unsupported coordinate system for generalized plane strain formulation");
103 const unsigned int subblock_id =
106 for (
unsigned int _qp = 0; _qp <
_qrule->n_points(); _qp++)
108 const Real out_of_plane_pressure =
119 out_of_plane_pressure);
138 for (
unsigned int i = 0; i <
_residual.size(); ++i)
unsigned int _scalar_out_of_plane_strain_direction
The direction of the out-of-plane strain scalar variable.
const MaterialProperty< RankTwoTensor > & _stress
The stress tensor.
const Real _pressure_factor
Factor applied to out-of-plane pressure applied by function and material.
const MooseArray< Point > & _q_point
const MooseArray< Real > & _coord
void initialize() override
void threadJoin(const UserObject &uo) override
static InputParameters validParams()
const Function * _out_of_plane_pressure_function
Function defining applied out-of-plane pressure.
virtual unsigned int getMaxSubblockIndex() const =0
The max index of subblock.
bool isParamValid(const std::string &name) const
ADRealEigenVector< T, D, asd > abs(const ADRealEigenVector< T, D, asd > &)
const SubblockIndexProvider * _subblock_id_provider
A Userobject that carries the subblock ID for all elements.
registerMooseObject("SolidMechanicsApp", GeneralizedPlaneStrainUserObject)
static InputParameters validParams()
virtual Real returnReferenceResidual(unsigned int scalar_var_id=0) const override
const ExecFlagType EXEC_LINEAR
const ExecFlagType EXEC_NONLINEAR
std::vector< Real > _jacobian
virtual unsigned int getSubblockIndex(const Elem &) const =0
The index of subblock this element is on.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const QBase *const & _qrule
const Elem *const & _current_elem
std::vector< Real > _residual
const MooseArray< Real > & _JxW
void mooseError(Args &&... args) const
const InputParameters & parameters() const
virtual Real returnResidual(unsigned int scalar_var_id=0) const override
const MaterialProperty< Real > & _out_of_plane_pressure_material
Material property defining applied out-of-plane pressure.
const MaterialProperty< RankFourTensor > & _Jacobian_mult
const Moose::CoordinateSystemType & coordSystem()
virtual Real value(Real t, const Point &p) const
virtual Real returnJacobian(unsigned int scalar_var_id=0) const override
std::vector< Real > _reference_residual
GeneralizedPlaneStrainUserObject(const InputParameters ¶meters)