12 #include "Conversion.h"
13 #include "FEProblem.h"
21 InputParameters params = validParams<Action>();
22 params.addRequiredParam<
unsigned int>(
23 "num_L",
"specifies the number of complex L variables will be solved for");
24 params.addRequiredParam<NonlinearVariableName>(
"n_name",
"Variable name used for the n variable");
25 params.addRequiredParam<std::string>(
"L_name_base",
"Base name for the complex L variables");
26 params.addParam<MaterialPropertyName>(
"mob_name",
"M",
"The mobility used for n in this model");
27 MooseEnum log_options(
"tolerance cancelation expansion");
28 params.addRequiredParam<MooseEnum>(
29 "log_approach", log_options,
"Which approach will be used to handle the natural log");
30 params.addParam<Real>(
"tol", 1.0e-9,
"Tolerance used when the tolerance approach is chosen");
31 params.addParam<Real>(
32 "n_exp_terms", 4.0,
"Number of terms used in the Taylor expansion of the natural log term");
33 params.addParam<
bool>(
34 "use_displaced_mesh",
false,
"Whether to use displaced mesh in the kernels");
40 _num_L(getParam<unsigned int>(
"num_L")),
41 _L_name_base(getParam<std::string>(
"L_name_base")),
42 _n_name(getParam<NonlinearVariableName>(
"n_name"))
50 InputParameters poly_params = _factory.getValidParams(
"TimeDerivative");
51 poly_params.set<NonlinearVariableName>(
"variable") =
_n_name;
52 poly_params.set<
bool>(
"use_displaced_mesh") = getParam<bool>(
"use_displaced_mesh");
53 _problem->addKernel(
"TimeDerivative",
"IE_n", poly_params);
56 std::vector<VariableName> real_v(
_num_L);
57 for (
unsigned int l = 0; l <
_num_L; ++l)
58 real_v[l] =
_L_name_base + Moose::stringify(l) +
"_real";
61 poly_params = _factory.getValidParams(
"CHPFCRFF");
62 poly_params.applyParameters(parameters());
63 poly_params.set<NonlinearVariableName>(
"variable") =
_n_name;
64 poly_params.set<std::vector<VariableName>>(
"v") = real_v;
65 _problem->addKernel(
"CHPFCRFF",
"CH_bulk_n", poly_params);