24 params.
addClassDescription(
"Class for setting up the Kernel, ScalarKernel, and UserObject for " 25 "peridynamic generalized plane strain model");
28 "displacements",
"Nonlinear variable name for the displacements");
30 "Scalar variable for strain in the out-of-plane direction");
31 params.
addParam<VariableName>(
"temperature",
"Nonlinear variable for the temperature");
32 MooseEnum formulation_option(
"ORDINARY_STATE NONORDINARY_STATE",
"NONORDINARY_STATE");
33 params.
addParam<
MooseEnum>(
"formulation", formulation_option,
"Peridynamic formulation options");
34 MooseEnum strain_type(
"SMALL FINITE",
"SMALL");
36 params.
addParam<VariableName>(
"out_of_plane_stress_variable",
37 "Name of out-of-plane stress auxiliary variable");
39 "out_of_plane_pressure",
41 "Function used to prescribe pressure in the out-of-plane direction");
42 params.
addParam<
Real>(
"factor", 1.0,
"Scale factor applied to prescribed out-of-plane pressure");
43 params.
addParam<
bool>(
"full_jacobian",
45 "Parameter to set whether to use the nonlocal full Jacobian formulation " 46 "for the scalar components");
47 params.
addParam<std::vector<SubdomainName>>(
"block",
48 "List of ids of the blocks (subdomains) that the " 49 "GeneralizedPlaneStrainActionPD will be applied " 51 params.
addParam<std::vector<MaterialPropertyName>>(
52 "eigenstrain_names", {},
"List of eigenstrains to be applied in this strain calculation");
59 _displacements(getParam<
std::vector<VariableName>>(
"displacements")),
60 _ndisp(_displacements.size()),
61 _formulation(getParam<
MooseEnum>(
"formulation")),
62 _scalar_out_of_plane_strain(getParam<VariableName>(
"scalar_out_of_plane_strain"))
66 mooseError(
"GeneralizedPlaneStrainPD only works for two dimensional case!");
70 mooseWarning(
"Variable out_of_plane_stress_variable will not be used in NONORDINARY_STATE " 71 "formulation option!");
73 mooseError(
"Variable out_of_plane_stress_variable must be provided for ORDINARY_STATE " 74 "formulation option!");
84 k_type =
"GeneralizedPlaneStrainOffDiagOSPD";
86 k_type =
"GeneralizedPlaneStrainOffDiagNOSPD";
89 paramError(
"formulation",
"Unsupported peridynamic formulation");
94 {
"displacements",
"temperature",
"scalar_out_of_plane_strain"});
97 params.
set<std::vector<VariableName>>(
"scalar_out_of_plane_strain") = {
101 for (
unsigned int i = 0; i <
_ndisp; ++i)
106 _problem->addKernel(k_type, k_name, params);
113 VariableName temp = getParam<VariableName>(
"temperature");
114 if (
_problem->getNonlinearSystemBase(0).hasVariable(temp))
116 params.
set<std::vector<VariableName>>(
"temperature") = {temp};
118 std::string k_name =
name() +
"_GeneralizedPlaneStrainPDOffDiag_temp";
119 params.
set<NonlinearVariableName>(
"variable") = temp;
122 params.
set<std::vector<MaterialPropertyName>>(
"eigenstrain_names") =
123 getParam<std::vector<MaterialPropertyName>>(
"eigenstrain_names");
125 _problem->addKernel(k_type, k_name, params);
133 uo_type =
"GeneralizedPlaneStrainUserObjectOSPD";
135 uo_type =
"GeneralizedPlaneStrainUserObjectNOSPD";
137 paramError(
"formulation",
"Unsupported peridynamic formulation!");
141 std::string uo_name =
name() +
"_GeneralizedPlaneStrainPDUserObject";
146 params.
set<std::vector<VariableName>>(
"out_of_plane_stress_variable") = {
147 getParam<VariableName>(
"out_of_plane_stress_variable")};
149 _problem->addUserObject(uo_type, uo_name, params);
153 std::string sk_type(
"GeneralizedPlaneStrainPD");
156 std::string sk_name =
name() +
"_GeneralizedPlaneStrainPD";
161 params.
set<UserObjectName>(
"generalized_plane_strain_uo") =
162 name() +
"_GeneralizedPlaneStrainPDUserObject";
164 _problem->addScalarKernel(sk_type, sk_name, params);
167 mooseError(
"Task error in GeneralizedPlaneStrainActionPD!");
static InputParameters validParams()
const unsigned int _ndisp
VariableName _scalar_out_of_plane_strain
Scalar variable for out-of-plane strain variable.
std::vector< VariableName > _displacements
Displacement variables.
InputParameters getValidParams(const std::string &name) const
virtual const std::string & name() const
void mooseWarning(Args &&... args) const
bool isParamValid(const std::string &name) const
registerMooseAction("PeridynamicsApp", GeneralizedPlaneStrainActionPD, "add_kernel")
static InputParameters validParams()
const MooseEnum _formulation
Option to choose which peridynamic model to use for generalized plane strain formulation: ordinary st...
const T & getParam(const std::string &name) const
const std::string & _current_task
GeneralizedPlaneStrainActionPD(const InputParameters ¶ms)
void paramError(const std::string ¶m, Args... args) const
std::string stringify(const T &t)
Action class to setup peridynamic generalized plane strain models.
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
virtual void act() override