14 #include "libmesh/edge_edge2.h" 15 #include "libmesh/unstructured_mesh.h" 24 "lattice arrangement");
37 _n_channels(other_mesh._n_channels),
38 _n_gaps(other_mesh._n_gaps),
39 _n_pins(other_mesh._n_pins),
40 _gap(other_mesh._gap),
41 _nodes(other_mesh._nodes),
42 _gapnodes(other_mesh._gapnodes),
43 _gap_to_chan_map(other_mesh._gap_to_chan_map),
44 _gap_to_pin_map(other_mesh._gap_to_pin_map),
45 _chan_to_gap_map(other_mesh._chan_to_gap_map),
46 _chan_to_pin_map(other_mesh._chan_to_pin_map),
47 _pin_to_chan_map(other_mesh._pin_to_chan_map),
48 _sign_id_crossflow_map(other_mesh._sign_id_crossflow_map),
49 _gij_map(other_mesh._gij_map),
50 _pin_mesh_exist(other_mesh._pin_mesh_exist)
55 ": The number of subchannels cannot be less than 2 in both directions (x and y). " 56 "Smallest assembly allowed is either 2X1 or 1X2. ");
59 std::unique_ptr<MooseMesh>
75 unsigned int i = (p(0) + offset_x + 0.5 *
_pitch) /
_pitch;
93 i = std::min(i, (
int)(
_nx - 1));
96 j = std::min(
j, (
int)(
_ny - 1));
106 unsigned int i = (p(0) + offset_x) /
_pitch;
107 unsigned int j = (p(1) + offset_y) /
_pitch;
108 return j * (
_nx - 1) + i;
116 unsigned int i = (p(0) + offset_x) /
_pitch;
117 unsigned int j = (p(1) + offset_y) /
_pitch;
118 return j * (
_nx - 1) + i;
123 unsigned int nx,
unsigned int ny, Real
pitch, Real elev, std::vector<Point> & pin_centers)
125 mooseAssert(nx >= 2,
"Number of channels in x-direction must be 2 or more.");
126 mooseAssert(ny >= 2,
"Number of channels in y-direction must be 2 or more.");
130 for (
unsigned int iy = 0; iy < ny - 1; iy++)
131 for (
unsigned int ix = 0; ix < nx - 1; ix++)
132 pin_centers.push_back(Point(
pitch * ix - offset_x,
pitch * iy - offset_y, elev));
static InputParameters validParams()
registerMooseObject("SubChannelApp", QuadSubChannelMesh)
virtual unsigned int pinIndex(const Point &p) const override
virtual std::unique_ptr< MooseMesh > safeClone() const override
unsigned int _ny
number of subchannels in the y direction
Creates the mesh of subchannels in a quadrilateral lattice.
std::vector< std::vector< Real > > _subchannel_position
x,y coordinates of the subchannel centroids
virtual const std::string & name() const
virtual unsigned int channelIndex(const Point &point) const override
std::unique_ptr< T > copyConstruct(const T &object)
virtual void buildMesh() override
unsigned int getSubchannelIndexFromPoint(const Point &p) const override
Return a subchannel index for a given physical point p
static const std::string pitch
Real _pitch
Distance between the neighbor fuel pins, pitch.
static void generatePinCenters(unsigned int nx, unsigned int ny, Real pitch, Real elev, std::vector< Point > &pin_centers)
Generate pin centers.
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
QuadSubChannelMesh(const InputParameters ¶meters)
void mooseError(Args &&... args) const
unsigned int getPinIndexFromPoint(const Point &p) const override
Return a pin index for a given physical point p
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
Base class for subchannel meshes.
unsigned int _nx
number of subchannels in the x direction