PFCFreezingIC creates an initial density for a PFC model that has one area of a set crystal structure (initialized using sinusoids) and all the rest with a random structure.
More...
#include <PFCFreezingIC.h>
PFCFreezingIC creates an initial density for a PFC model that has one area of a set crystal structure (initialized using sinusoids) and all the rest with a random structure.
The random values will fall between 0 and 1.
Definition at line 27 of file PFCFreezingIC.h.
◆ PFCFreezingIC()
PFCFreezingIC::PFCFreezingIC |
( |
const InputParameters & |
parameters | ) |
|
Definition at line 44 of file PFCFreezingIC.C.
45 : RandomICBase(parameters),
46 _x1(getParam<Real>(
"x1")),
47 _y1(getParam<Real>(
"y1")),
48 _z1(getParam<Real>(
"z1")),
49 _x2(getParam<Real>(
"x2")),
50 _y2(getParam<Real>(
"y2")),
51 _z2(getParam<Real>(
"z2")),
52 _lc(getParam<Real>(
"lc")),
57 _min(getParam<Real>(
"min")),
58 _max(getParam<Real>(
"max")),
60 _inside(getParam<Real>(
"inside")),
65 for (
unsigned int i = 0; i < LIBMESH_DIM; i++)
66 mooseAssert(
_range(i) >= 0.0,
"x1, y1 or z1 is not less than x2, y2 or z2");
◆ value()
Real PFCFreezingIC::value |
( |
const Point & |
p | ) |
|
|
virtual |
Definition at line 77 of file PFCFreezingIC.C.
80 for (
unsigned int i = 0; i < LIBMESH_DIM; i++)
91 for (
unsigned int i = 0; i <
_icdim; i++)
92 val += std::cos((2.0 /
_lc * p(i)) * libMesh::pi);
98 for (
unsigned int i = 0; i <
_icdim; i++)
100 val += (std::cos((2.0 /
_lc * p(i % 3)) * libMesh::pi) *
101 std::cos((2.0 /
_lc * p((i + 1) % 3)) * libMesh::pi)) /
106 for (
unsigned int i = 0; i <
_icdim; i++)
107 val *= std::cos((2.0 /
_lc * p(i)) * libMesh::pi);
109 val = val / 2.0 + 0.5;
◆ _bottom_left
Point PFCFreezingIC::_bottom_left |
|
private |
◆ _crystal_structure
MooseEnum PFCFreezingIC::_crystal_structure |
|
private |
◆ _icdim
unsigned int PFCFreezingIC::_icdim |
|
private |
◆ _inside
Real PFCFreezingIC::_inside |
|
private |
◆ _lc
◆ _max
◆ _min
◆ _outside
Real PFCFreezingIC::_outside |
|
private |
◆ _range
Point PFCFreezingIC::_range |
|
private |
◆ _top_right
Point PFCFreezingIC::_top_right |
|
private |
◆ _val_range
Real PFCFreezingIC::_val_range |
|
private |
◆ _x1
◆ _x2
◆ _y1
◆ _y2
◆ _z1
◆ _z2
The documentation for this class was generated from the following files: