19 #include "libmesh/string_to_enum.h" 32 "Set up the variable and the kernels needed for a non-conserved phase field variable");
38 "Specifies the family of FE " 39 "shape functions to use for this variable");
42 "Specifies the order of the FE " 43 "shape function to use for this variable");
44 params.
addParam<
Real>(
"scaling", 1.0,
"Specifies a scaling factor to apply to this variable");
45 params.
addParam<
bool>(
"implicit",
true,
"Whether kernels are implicit or not");
47 "use_displaced_mesh",
false,
"Whether to use displaced mesh in the kernels");
49 params.
addParam<MaterialPropertyName>(
"mobility",
"L",
"The mobility used with the kernel");
50 params.
addCoupledVar(
"args",
"Vector of nonlinear variable arguments this kernel depends on");
53 "free_energy",
"Base name of the free energy function F defined in a free energy material");
54 params.
addParam<MaterialPropertyName>(
"kappa",
"kappa_op",
"The kappa used with the kernel");
55 params.
addParam<
bool>(
"variable_mobility",
57 "The mobility is a function of any MOOSE variable (if " 58 "this is set to false, L must be constant over the " 60 params.
addParam<std::vector<SubdomainName>>(
61 "block", {},
"Block restriction for the variables and kernels");
84 var_params.applySpecificParameters(
_pars, {
"family",
"order",
"block"});
85 var_params.set<std::vector<Real>>(
"scaling") = {getParam<Real>(
"scaling")};
97 std::string kernel_type =
"TimeDerivative";
99 std::string kernel_name =
_var_name +
"_" + kernel_type;
101 params1.
set<NonlinearVariableName>(
"variable") =
_var_name;
104 _problem->addKernel(kernel_type, kernel_name, params1);
107 kernel_type =
"AllenCahn";
109 kernel_name =
_var_name +
"_" + kernel_type;
111 params2.
set<NonlinearVariableName>(
"variable") =
_var_name;
112 params2.
set<MaterialPropertyName>(
"mob_name") = getParam<MaterialPropertyName>(
"mobility");
113 params2.
set<MaterialPropertyName>(
"f_name") = getParam<MaterialPropertyName>(
"free_energy");
116 _problem->addKernel(kernel_type, kernel_name, params2);
119 kernel_type =
"ACInterface";
121 kernel_name =
_var_name +
"_" + kernel_type;
123 params3.
set<NonlinearVariableName>(
"variable") =
_var_name;
124 params3.
set<MaterialPropertyName>(
"mob_name") = getParam<MaterialPropertyName>(
"mobility");
125 params3.
set<MaterialPropertyName>(
"kappa_name") = getParam<MaterialPropertyName>(
"kappa");
126 params3.
set<
bool>(
"variable_L") = getParam<bool>(
"variable_mobility");
129 _problem->addKernel(kernel_type, kernel_name, params3);
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
NonconservedAction(const InputParameters ¶ms)
static MooseEnum getNonlinearVariableFamilies()
static InputParameters validParams()
static MooseEnum getNonlinearVariableOrders()
static InputParameters validParams()
T string_to_enum(const std::string &s)
const std::string & type() const
const std::string & _current_task
static std::string variableType(const libMesh::FEType &fe_type, const bool is_fv=false, const bool is_array=false)
const libMesh::FEType _fe_type
FEType for the variable being created.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const InputParameters & _pars
registerMooseAction("PhaseFieldApp", NonconservedAction, "add_variable")
std::shared_ptr< FEProblemBase > & _problem
const InputParameters & parameters() const
const NonlinearVariableName _var_name
Name of the variable being created.