23 _assembly_flow_area(0.0),
24 _assembly_wetted_perimeter(0.0),
25 _assembly_hydraulic_diameter(0.0)
31 _pin_mesh_exist(other_mesh._pin_mesh_exist),
32 _duct_mesh_exist(other_mesh._duct_mesh_exist),
33 _unheated_length_entry(other_mesh._unheated_length_entry),
34 _heated_length(other_mesh._heated_length),
35 _unheated_length_exit(other_mesh._unheated_length_exit),
36 _z_grid(other_mesh._z_grid),
37 _k_grid(other_mesh._k_grid),
38 _duct_nodes(other_mesh._duct_nodes),
39 _chan_to_duct_node_map(other_mesh._chan_to_duct_node_map),
40 _duct_node_to_chan_map(other_mesh._duct_node_to_chan_map),
41 _spacer_z(other_mesh._spacer_z),
42 _spacer_k(other_mesh._spacer_k),
43 _z_blockage(other_mesh._z_blockage),
44 _index_blockage(other_mesh._index_blockage),
45 _reduction_blockage(other_mesh._reduction_blockage),
46 _kij(other_mesh._kij),
47 _pitch(other_mesh._pitch),
48 _pin_diameter(other_mesh._pin_diameter),
49 _assembly_flow_area(other_mesh._assembly_flow_area),
50 _assembly_wetted_perimeter(other_mesh._assembly_wetted_perimeter),
51 _assembly_hydraulic_diameter(other_mesh._assembly_hydraulic_diameter),
52 _n_cells(other_mesh._n_cells)
60 Real unheated_length_exit,
62 std::vector<Real> & z_grid)
64 Real L = unheated_length_entry + heated_length + unheated_length_exit;
66 for (
unsigned int i = 0; i <
n_cells + 1; i++)
67 z_grid.push_back(dz * i);
82 unsigned int hi =
_z_grid.size();
85 unsigned int mid = (lo + hi) / 2;
86 if (std::abs(
_z_grid[mid] - point(2)) < 1e-5)
88 else if (
_z_grid[mid] < point(2))
118 mooseError(
"setChannelToDuctMaps: _z_grid is empty; cannot match duct nodes by z.");
122 "setChannelToDuctMaps: _subchannel_position is empty; cannot map duct nodes to channels.");
124 for (
size_t i = 0; i < duct_nodes.size(); ++i)
126 Node * dn = duct_nodes[i];
129 unsigned int min_chan = 0;
130 Real min_dist = std::numeric_limits<Real>::max();
132 const Point ductpos((*dn)(0), (*dn)(1), 0.0);
137 const Real dist = (chanpos - ductpos).
norm();
static InputParameters validParams()
static InputParameters validParams()
std::vector< Real > _z_grid
axial location of nodes
Node * getDuctNodeFromChannel(Node *channel_node) const
Function that gets the duct node from the channel node.
std::map< Node *, Node * > _duct_node_to_chan_map
std::vector< std::vector< Real > > _subchannel_position
x,y coordinates of the subchannel centroids
std::vector< Node * > _duct_nodes
A list of all mesh nodes that form the (elements of) the duct mesh that surrounds the pins/subchannel...
static void generateZGrid(Real unheated_length_entry, Real heated_length, Real unheated_length_exit, unsigned int n_cells, std::vector< Real > &z_grid)
Generate the spacing in z-direction using heated and unteaded lengths.
Node * getChannelNodeFromDuct(Node *duct_node) const
Function that gets the channel node from the duct node.
virtual Node * getChannelNode(unsigned int i_chan, unsigned int iz) const =0
Get the subchannel mesh node for a given channel index and elevation index.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::map< Node *, Node * > _chan_to_duct_node_map
Maps between channel nodes and duct nodes.
void setChannelToDuctMaps(const std::vector< Node *> &duct_nodes)
Function that sets the channel-to-duct maps.
void mooseError(Args &&... args) const
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
Base class for subchannel meshes.
virtual unsigned int getZIndex(const Point &point) const
Get axial index of point.
SubChannelMesh(const InputParameters ¶meters)