23 "Action for applying Allen-Cahn equations and SingleGrainRigidBodyMotion to grains");
24 params.
addRequiredParam<
unsigned int>(
"op_num",
"specifies the number of grains to create");
25 params.
addRequiredParam<std::string>(
"var_name_base",
"specifies the base name of the variables");
26 params.
addParam<VariableName>(
"c",
"Name of coupled concentration variable");
27 params.
addParam<MaterialPropertyName>(
"kappa_name",
"kappa_op",
"The kappa used with the kernel");
28 params.
addParam<MaterialPropertyName>(
"mob_name",
"L",
"The mobility used with the kernel");
29 params.
addParam<MaterialPropertyName>(
30 "f_name",
"Base name of the free energy function F defined in a DerivativeParsedMaterial");
31 params.
addParam<std::string>(
"base_name",
32 "Optional parameter that allows the user to define " 33 "type of force density under consideration");
35 "translation_constant", 500,
"constant value characterizing grain translation");
36 params.
addParam<
Real>(
"rotation_constant", 1.0,
"constant value characterizing grain rotation");
38 "grain_force",
"userobject for getting force and torque acting on grains");
40 "The FeatureFloodCount UserObject to get values from.");
42 "The feature volume VectorPostprocessorValue.");
43 params.
addParam<
bool>(
"implicit",
true,
"Whether kernels are implicit or not");
45 "use_displaced_mesh",
false,
"Whether to use displaced mesh in the kernels");
51 _op_num(getParam<unsigned
int>(
"op_num")),
52 _var_name_base(getParam<
std::string>(
"var_name_base")),
53 _implicit(getParam<bool>(
"implicit"))
60 for (
unsigned int op = 0; op <
_op_num; ++op)
72 std::vector<VariableName> arg;
77 VariableName
c = getParam<VariableName>(
"c");
98 std::vector<VariableName>
v(
_op_num);
108 params.
set<NonlinearVariableName>(
"variable") = var_name;
109 params.
set<
bool>(
"implicit") = getParam<bool>(
"implicit");
110 params.
set<
bool>(
"use_displaced_mesh") = getParam<bool>(
"use_displaced_mesh");
111 params.
set<MaterialPropertyName>(
"kappa_name") = getParam<MaterialPropertyName>(
"kappa_name");
112 params.
set<MaterialPropertyName>(
"mob_name") = getParam<MaterialPropertyName>(
"mob_name");
114 std::string kernel_name =
"ACInt_" + var_name;
115 _problem->addKernel(
"ACInterface", kernel_name, params);
124 params.
set<NonlinearVariableName>(
"variable") = var_name;
125 params.
set<std::vector<VariableName>>(
"args") = arg;
126 params.
set<MaterialPropertyName>(
"mob_name") = getParam<MaterialPropertyName>(
"mob_name");
127 params.
set<MaterialPropertyName>(
"f_name") = getParam<MaterialPropertyName>(
"f_name");
129 params.
set<
bool>(
"use_displaced_mesh") = getParam<bool>(
"use_displaced_mesh");
131 std::string kernel_name =
"AC_" + var_name;
132 _problem->addKernel(
"AllenCahn", kernel_name, params);
141 params.
set<NonlinearVariableName>(
"variable") = var_name;
142 params.
set<std::vector<VariableName>>(
"v") =
v;
143 params.
set<
unsigned int>(
"op_index") = op;
144 params.
set<std::vector<VariableName>>(
"c") = {getParam<VariableName>(
"c")};
146 params.
set<std::string>(
"base_name") = getParam<std::string>(
"base_name");
147 params.
set<
Real>(
"translation_constant") = getParam<Real>(
"translation_constant");
148 params.
set<
Real>(
"rotation_constant") = getParam<Real>(
"rotation_constant");
149 params.
set<UserObjectName>(
"grain_force") = getParam<UserObjectName>(
"grain_force");
150 params.
set<UserObjectName>(
"grain_tracker_object") =
151 getParam<UserObjectName>(
"grain_tracker_object");
152 params.
set<VectorPostprocessorName>(
"grain_volumes") =
153 getParam<VectorPostprocessorName>(
"grain_volumes");
156 params.
set<
bool>(
"use_displaced_mesh") = getParam<bool>(
"use_displaced_mesh");
158 std::string kernel_name =
"RigidBody_" + var_name;
159 _problem->addKernel(
"SingleGrainRigidBodyMotion", kernel_name, params);
168 params.
set<NonlinearVariableName>(
"variable") = var_name;
169 params.
set<
bool>(
"implicit") =
true;
170 params.
set<
bool>(
"use_displaced_mesh") = getParam<bool>(
"use_displaced_mesh");
172 std::string kernel_name =
"IE_" + var_name;
173 _problem->addKernel(
"TimeDerivative", kernel_name, params);
InputParameters getValidParams(const std::string &name) const
registerMooseAction("PhaseFieldApp", RigidBodyMultiKernelAction, "add_kernel")
bool isParamValid(const std::string &name) const
static InputParameters validParams()
RigidBodyMultiKernelAction(const InputParameters ¶ms)
std::string stringify(const T &t)
std::string _var_name_base
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string v
std::shared_ptr< FEProblemBase > & _problem
static InputParameters validParams()
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
void ErrorVector unsigned int