12 #include "FEProblem.h"
13 #include "Conversion.h"
21 InputParameters params = validParams<Action>();
22 params.addClassDescription(
"Bicrystal with a circular grain and an embedding outer grain");
23 params.addRequiredParam<std::string>(
"var_name_base",
"specifies the base name of the variables");
24 params.addRequiredParam<
unsigned int>(
"op_num",
"Number of grains, should be 2");
25 params.addRequiredParam<Real>(
"radius",
"Void radius");
26 params.addRequiredParam<Real>(
"x",
"The x coordinate of the circle grain center");
27 params.addRequiredParam<Real>(
"y",
"The y coordinate of the circle grain center");
28 params.addParam<Real>(
"z", 0.0,
"The z coordinate of the circle grain center");
29 params.addParam<Real>(
30 "int_width", 0.0,
"The interfacial width of the void surface. Defaults to sharp interface");
31 params.addParam<
bool>(
32 "3D_sphere",
true,
"in 3D, whether the smaller grain is a spheres or columnar grain");
38 _var_name_base(getParam<std::string>(
"var_name_base")),
39 _op_num(getParam<unsigned int>(
"op_num")),
40 _radius(getParam<Real>(
"radius")),
41 _x(getParam<Real>(
"x")),
42 _y(getParam<Real>(
"y")),
43 _z(getParam<Real>(
"z")),
44 _int_width(getParam<Real>(
"int_width")),
45 _3D_sphere(getParam<bool>(
"3D_sphere"))
48 paramError(
"op_num",
"op_num must equal 2 for bicrystal ICs");
55 for (
unsigned int op = 0; op <
_op_num; op++)
61 InputParameters poly_params = _factory.getValidParams(
"SmoothCircleIC");
62 poly_params.set<VariableName>(
"variable") = var_name;
63 poly_params.set<Real>(
"x1") =
_x;
64 poly_params.set<Real>(
"y1") =
_y;
65 poly_params.set<Real>(
"z1") =
_z;
66 poly_params.set<Real>(
"radius") =
_radius;
67 poly_params.set<Real>(
"int_width") =
_int_width;
68 poly_params.set<
bool>(
"3D_spheres") =
_3D_sphere;
72 poly_params.set<Real>(
"invalue") = 1.0;
73 poly_params.set<Real>(
"outvalue") = 0.0;
78 poly_params.set<Real>(
"invalue") = 0.0;
79 poly_params.set<Real>(
"outvalue") = 1.0;
83 _problem->addInitialCondition(
84 "SmoothCircleIC",
"BicrystalCircleGrainIC_" + Moose::stringify(op), poly_params);