23 params.
addRequiredParam<
unsigned int>(
"op_num",
"Number of grain order parameters");
24 params.
addRequiredParam<
unsigned int>(
"op_index",
"Index for the current grain order parameter");
25 params.
addParam<
Real>(
"theta1", 135.0,
"Angle of first grain at triple junction in degrees");
26 params.
addParam<
Real>(
"theta2", 135.0,
"Angle of second grain at triple junction in degrees");
29 "The point where the triple junction is located. Default is the center of the mesh");
35 _mesh(_fe_problem.
mesh()),
36 _op_num(getParam<unsigned
int>(
"op_num")),
37 _op_index(getParam<unsigned
int>(
"op_index")),
38 _theta1(getParam<
Real>(
"theta1")),
39 _theta2(getParam<
Real>(
"theta2"))
42 paramError(
"op_num",
"Tricrystal ICs must have op_num = 3");
45 paramError(
"theta1",
"Sum of the angles theta1 and theta2 must total less than 360 degrees");
60 paramError(
"junction",
"Triple junction out of bounds");
115 if ((((dist_left >= 0 && dist_center >= 0) || (dist_center < 0)) &&
_op_index == 1) ||
116 (dist_right <= 0 && dist_center > 0 &&
_op_index == 2) ||
117 (dist_left < 0 && dist_center > 0 && dist_right > 0 &&
_op_index == 3))
124 else if (_tan_theta2 < 0 && _theta2 >=
libMesh::pi / 2.0)
126 if ((dist_left <= 0 && dist_center <= 0 &&
_op_index == 1) ||
127 (((dist_right >= 0 && dist_center <= 0) || (dist_center > 0)) &&
_op_index == 2) ||
128 (dist_left > 0 && dist_right < 0 && dist_center < 0 &&
_op_index == 3))
136 if ((dist_left <= 0 && dist_center <= 0 &&
_op_index == 1) ||
137 (dist_right <= 0 && dist_center > 0 &&
_op_index == 2) ||
138 (((dist_left > 0 && dist_center < 0) || (dist_right > 0 && dist_center >= 0)) &&
virtual Real getMaxInDimension(unsigned int component) const
virtual Real getMinInDimension(unsigned int component) const
const unsigned int _op_num
Number of order parameters.
virtual Real value(const Point &p)
TricrystalTripleJunctionIC creates a 3-grain structure with a triple junction centered at _junction a...
static constexpr std::size_t dim
static InputParameters validParams()
static InputParameters validParams()
Real _theta2
Angle of third grain at triple junction in radians.
Real _tan_theta1
tangent of the first angle after a shift of pi/2
Real _theta1
Angle of first grain at triple junction in radians.
void paramError(const std::string ¶m, Args... args) const
Real _tan_theta2
tangent of the second angle after a shift of pi/2
registerMooseObject("PhaseFieldApp", TricrystalTripleJunctionIC)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
IntRange< T > make_range(T beg, T end)
const InputParameters & parameters() const
const unsigned int _op_index
Point _junction
Point where the triple junction occurs.
void ErrorVector unsigned int
TricrystalTripleJunctionIC(const InputParameters ¶meters)