https://mooseframework.inl.gov
MarvelTriWettedPerimIC.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #include "MarvelTriWettedPerimIC.h"
11 #include "TriSubChannelMesh.h"
12 
14 
17 
18 {
20  params.addClassDescription("Computes wetted perimeter of subchannels in a triangular lattice "
21  "arrangement in a MARVEL-type micro-reactor");
22  return params;
23 }
24 
26  : TriSubChannelBaseIC(params)
27 {
28 }
29 
30 Real
32 {
33  // Define geometry parameters.
34  auto pitch = _mesh.getPitch();
35  auto rod_diameter = _mesh.getPinDiameter();
36  auto wire_diameter = _mesh.getWireDiameter();
37  auto wire_lead_length = _mesh.getWireLeadLength();
38  auto rod_circumference = libMesh::pi * rod_diameter;
39  auto wire_circumference = libMesh::pi * wire_diameter;
40  auto gap = _mesh.getDuctToPinGap();
41  auto r_ref = rod_diameter / 2.0 + gap;
42  auto theta = std::acos(wire_lead_length /
43  std::sqrt(std::pow(wire_lead_length, 2) +
44  std::pow(libMesh::pi * (rod_diameter + wire_diameter), 2)));
45  // given the channel number, i, it computes the wetted perimeter of
46  // the subchannel based on the subchannel type: CENTER, EDGE or CORNER.
48  auto subch_type = _mesh.getSubchannelType(i);
49 
50  if (subch_type == EChannelType::CENTER)
51  {
52  return 0.5 * rod_circumference + 0.5 * wire_circumference / std::cos(theta);
53  }
54  else if (subch_type == EChannelType::EDGE)
55  {
56  auto gamma = std::acos(1 - 0.5 * std::pow(pitch / r_ref, 2.0));
57  auto alpha = (libMesh::pi - gamma) / 2.0;
58  auto sector_angle = libMesh::pi / 2.0 - alpha;
59  return 0.5 * rod_circumference + 0.5 * wire_circumference / std::cos(theta) +
60  2.0 * sector_angle * (r_ref);
61  }
62  else
63  {
64  return (rod_circumference + wire_circumference / std::cos(theta)) / 6.0 +
65  (libMesh::pi / 3.0) * (r_ref);
66  }
67 }
MarvelTriWettedPerimIC(const InputParameters &params)
virtual EChannelType getSubchannelType(unsigned int index) const override
Return the type of the subchannel for given subchannel index.
virtual const Real & getPinDiameter() const
Return Pin diameter.
registerMooseObject("SubChannelApp", MarvelTriWettedPerimIC)
Real value(const Point &p) override
virtual const Real & getDuctToPinGap() const
Return the the gap thickness between the duct and peripheral fuel pins.
virtual const Real & getPitch() const
Return the pitch between 2 subchannels.
virtual unsigned int getSubchannelIndexFromPoint(const Point &p) const override
Return a subchannel index for a given physical point p
An abstract class for ICs for hexagonal fuel assemblies.
static const std::string pitch
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string alpha
Definition: NS.h:134
const TriSubChannelMesh & _mesh
static InputParameters validParams()
virtual const Real & getWireLeadLength() const
Return the wire lead length.
void addClassDescription(const std::string &doc_string)
Sets the wetted perimeter of the triangular, edge, and corner subchannels for a MARVEL-type microreac...
MooseUnits pow(const MooseUnits &, int)
const Real pi
virtual const Real & getWireDiameter() const
Return wire diameter.