Line data Source code
1 : /********************************************************************/ 2 : /* SOFTWARE COPYRIGHT NOTIFICATION */ 3 : /* Cardinal */ 4 : /* */ 5 : /* (c) 2021 UChicago Argonne, LLC */ 6 : /* ALL RIGHTS RESERVED */ 7 : /* */ 8 : /* Prepared by UChicago Argonne, LLC */ 9 : /* Under Contract No. DE-AC02-06CH11357 */ 10 : /* With the U. S. Department of Energy */ 11 : /* */ 12 : /* Prepared by Battelle Energy Alliance, LLC */ 13 : /* Under Contract No. DE-AC07-05ID14517 */ 14 : /* With the U. S. Department of Energy */ 15 : /* */ 16 : /* See LICENSE for full restrictions */ 17 : /********************************************************************/ 18 : 19 : #pragma once 20 : 21 : #include "MooseMesh.h" 22 : #include "HexagonalLatticeUtils.h" 23 : 24 : /** 25 : * Base class for creating meshes related to subchannel discretizations 26 : * in a hexagonal lattice. 27 : */ 28 : class HexagonalSubchannelMeshBase : public MooseMesh 29 : { 30 : public: 31 : static InputParameters validParams(); 32 : 33 : HexagonalSubchannelMeshBase(const InputParameters & parameters); 34 0 : HexagonalSubchannelMeshBase(const HexagonalSubchannelMeshBase & /* other_mesh */) = default; 35 : 36 : HexagonalSubchannelMeshBase & operator=(const HexagonalSubchannelMeshBase & other_mesh) = delete; 37 : 38 : protected: 39 : /** 40 : * Rotate a point counterclockwise about the z axis 41 : * @param[in] p point 42 : * @param[in] theta angle (radians) by which to rotate 43 : * @return rotated point 44 : */ 45 : const Point rotatePoint(const Point & p, const Real & theta) const; 46 : 47 : /// Bundle pitch (distance across bundle measured flat-to-flat on the inside of the duct) 48 : const Real & _bundle_pitch; 49 : 50 : /// Pin pitch 51 : const Real & _pin_pitch; 52 : 53 : /// Pin diameter 54 : const Real & _pin_diameter; 55 : 56 : /// Total number of rings of pins 57 : const unsigned int & _n_rings; 58 : 59 : /// Vertical axis of the bundle along which the pins are aligned 60 : const unsigned int _axis; 61 : 62 : /// Utility providing hexagonal lattice geometry calculations 63 : HexagonalLatticeUtils _hex_lattice; 64 : 65 : /// Coordinates for the pin centers 66 : const std::vector<Point> & _pin_centers; 67 : 68 : /// Element ID 69 : int _elem_id_counter; 70 : 71 : /// Node ID 72 : int _node_id_counter; 73 : 74 : static const Real SIN30; 75 : 76 : static const Real COS30; 77 : 78 : /// Number of nodes per prism6 element 79 : static const unsigned int NODES_PER_PRISM; 80 : 81 : /// Number of sides in a hexagon 82 : static const unsigned int NUM_SIDES; 83 : };