28 params.
addRequiredParam<std::vector<VariableName>>(
"displacements",
"The displacement variables");
30 "Scalar variable for the out-of-plane strain (in " 31 "y direction for 1D Axisymmetric or in z " 32 "direction for 2D Cartesian problems)");
33 params.
addParam<std::vector<VariableName>>(
"temperature",
"The temperature variable");
34 MooseEnum outOfPlaneDirection(
"x y z",
"z");
36 "out_of_plane_direction", outOfPlaneDirection,
"The direction of the out-of-plane strain.");
38 "out_of_plane_pressure_function",
39 "Function used to prescribe pressure (applied toward the body) in the out-of-plane direction " 40 "(y for 1D Axisymmetric or z for 2D Cartesian problems)");
42 "out_of_plane_pressure",
43 "Function used to prescribe pressure (applied toward the body) in the out-of-plane direction " 44 "(y for 1D Axisymmetric or z for 2D Cartesian problems)",
45 "This has been replaced by 'out_of_plane_pressure_function'");
46 params.
addParam<MaterialPropertyName>(
"out_of_plane_pressure_material",
48 "Material used to prescribe pressure (applied toward the " 49 "body) in the out-of-plane direction");
52 "Scale factor applied to prescribed out-of-plane pressure (both material and function)",
53 "This has been replaced by 'pressure_factor'");
56 "Scale factor applied to prescribed out-of-plane pressure (both material and function)");
57 params.
addParam<
bool>(
"use_displaced_mesh",
false,
"Whether to use displaced mesh");
58 params.
addParam<std::string>(
"base_name",
"Material property base name");
59 params.
addParam<std::vector<SubdomainName>>(
"block",
60 "The list of ids of the blocks (subdomain) " 61 "that the GeneralizedPlaneStrain kernels " 62 "will be applied to");
63 params.
addParam<std::vector<TagName>>(
65 "The tag names for extra vectors that residual data should be saved into");
66 params.
addParam<std::vector<TagName>>(
"absolute_value_vector_tags",
67 "The tag names for extra vectors that the absolute value " 68 "of the residual should be accumulated into");
75 _displacements(getParam<
std::vector<VariableName>>(
"displacements")),
76 _ndisp(_displacements.size()),
77 _out_of_plane_direction(getParam<
MooseEnum>(
"out_of_plane_direction"))
85 const std::string uo_name =
_name +
"_GeneralizedPlaneStrainUserObject";
92 std::string k_type =
"GeneralizedPlaneStrainOffDiag";
96 params.
set<std::vector<VariableName>>(
"scalar_out_of_plane_strain") = {
97 getParam<VariableName>(
"scalar_out_of_plane_strain")};
100 for (
unsigned int i = 0; i <
_ndisp; ++i)
108 _problem->addKernel(k_type, k_name, params);
114 auto temp = getParam<std::vector<VariableName>>(
"temperature");
116 mooseError(
"Only one variable may be specified in 'temperature'");
117 if (
_problem->getNonlinearSystemBase(0).hasVariable(temp[0]))
119 std::string k_name =
_name +
"_GeneralizedPlaneStrainOffDiag_temp";
120 params.
set<NonlinearVariableName>(
"variable") = temp[0];
122 _problem->addKernel(k_type, k_name, params);
132 std::string uo_type =
"GeneralizedPlaneStrainUserObject";
141 {
"out_of_plane_pressure",
"out_of_plane_pressure_function",
"factor",
"pressure_factor"});
143 params.
set<FunctionName>(
"out_of_plane_pressure") =
144 getParam<FunctionName>(
"out_of_plane_pressure");
146 params.
set<FunctionName>(
"out_of_plane_pressure_function") =
147 getParam<FunctionName>(
"out_of_plane_pressure_function");
149 params.
set<
Real>(
"factor") = getParam<Real>(
"factor");
151 params.
set<
Real>(
"pressure_factor") = getParam<Real>(
"pressure_factor");
153 _problem->addUserObject(uo_type, uo_name, params);
161 std::string sk_type =
"GeneralizedPlaneStrain";
164 params.
set<NonlinearVariableName>(
"variable") =
165 getParam<VariableName>(
"scalar_out_of_plane_strain");
168 params.
set<UserObjectName>(
"generalized_plane_strain") = uo_name;
171 params.
set<std::vector<TagName>>(
"extra_vector_tags") =
172 getParam<std::vector<TagName>>(
"extra_vector_tags");
174 params.
set<std::vector<TagName>>(
"absolute_value_vector_tags") =
175 getParam<std::vector<TagName>>(
"absolute_value_vector_tags");
177 _problem->addScalarKernel(sk_type,
_name +
"_GeneralizedPlaneStrain", params);
unsigned int _ndisp
Number of displacement variables.
InputParameters getValidParams(const std::string &name) const
registerMooseAction("SolidMechanicsApp", GeneralizedPlaneStrainAction, "add_scalar_kernel")
bool isParamValid(const std::string &name) const
static InputParameters validParams()
const std::string & _current_task
const unsigned int _out_of_plane_direction
std::string stringify(const T &t)
static InputParameters validParams()
bool isParamSetByUser(const std::string &nm) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void mooseError(Args &&... args) const
std::shared_ptr< FEProblemBase > & _problem
const InputParameters & parameters() const
GeneralizedPlaneStrainAction(const InputParameters ¶ms)
std::vector< VariableName > _displacements