22 params.
addRequiredParam<std::string>(
"var_name_base",
"specifies the base name of the variables");
23 params.
addRequiredParam<
unsigned int>(
"op_num",
"Number of grains, should be 2");
25 params.
addRequiredParam<Real>(
"x",
"The x coordinate of the circle grain center");
26 params.
addRequiredParam<Real>(
"y",
"The y coordinate of the circle grain center");
27 params.
addParam<Real>(
"z", 0.0,
"The z coordinate of the circle grain center");
29 "int_width", 0.0,
"The interfacial width of the void surface. Defaults to sharp interface");
31 "3D_sphere",
true,
"in 3D, whether the smaller grain is a spheres or columnar grain");
32 params.
addParam<std::vector<SubdomainName>>(
"block",
33 "Block restriction for the initial condition");
40 _var_name_base(getParam<
std::string>(
"var_name_base")),
41 _op_num(getParam<unsigned
int>(
"op_num")),
42 _radius(getParam<Real>(
"radius")),
43 _x(getParam<Real>(
"x")),
44 _y(getParam<Real>(
"y")),
45 _z(getParam<Real>(
"z")),
46 _int_width(getParam<Real>(
"int_width")),
47 _3D_sphere(getParam<bool>(
"3D_sphere"))
50 paramError(
"op_num",
"op_num must equal 2 for bicrystal ICs");
57 for (
unsigned int op = 0; op <
_op_num; op++)
64 poly_params.
set<VariableName>(
"variable") = var_name;
65 poly_params.
set<Real>(
"x1") =
_x;
66 poly_params.
set<Real>(
"y1") =
_y;
67 poly_params.
set<Real>(
"z1") =
_z;
74 poly_params.
set<Real>(
"invalue") = 1.0;
75 poly_params.
set<Real>(
"outvalue") = 0.0;
80 poly_params.
set<Real>(
"invalue") = 0.0;
81 poly_params.
set<Real>(
"outvalue") = 1.0;
87 "SmoothCircleIC",
"BicrystalCircleGrainIC_" +
Moose::stringify(op), poly_params);
registerMooseAction("PhaseFieldApp", BicrystalCircleGrainICAction, "add_ic")
void ErrorVector unsigned int
static InputParameters validParams()
std::shared_ptr< FEProblemBase > & _problem
Bicrystal with a circular grain and an embedding outer grain.
static InputParameters validParams()
BicrystalCircleGrainICAction(const InputParameters ¶ms)
const std::string _var_name_base
const unsigned int _op_num
InputParameters getValidParams(const std::string &name) const
void paramError(const std::string ¶m, Args... args) const
const InputParameters & _pars
std::string stringify(const T &t)