https://mooseframework.inl.gov
SCMTriWettedPerimIC.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 "SCMTriWettedPerimIC.h"
11 #include "TriSubChannelMesh.h"
12 
14 registerMooseObjectRenamed("SubChannelApp",
15  TriWettedPerimIC,
16  "06/30/2025 24:00",
18 
21 
22 {
24  params.addClassDescription(
25  "Computes wetted perimeter of subchannels in a triangular lattice arrangement");
26  return params;
27 }
28 
30  : TriSubChannelBaseIC(params)
31 {
32 }
33 
34 Real
36 {
37  // Define geometry parameters.
38  auto pitch = _mesh.getPitch();
39  auto pin_diameter = _mesh.getPinDiameter();
40  auto wire_diameter = _mesh.getWireDiameter();
41  auto wire_lead_length = _mesh.getWireLeadLength();
42  auto rod_circumference = libMesh::pi * pin_diameter;
43  auto wire_circumference = libMesh::pi * wire_diameter;
44  auto gap = _mesh.getDuctToPinGap();
45  auto theta = std::acos(wire_lead_length /
46  std::sqrt(std::pow(wire_lead_length, 2) +
47  std::pow(libMesh::pi * (pin_diameter + wire_diameter), 2)));
48  // given the channel number, i, it computes the wetted perimeter of
49  // the subchannel based on the subchannel type: CENTER, EDGE or CORNER.
51  auto subch_type = _mesh.getSubchannelType(i);
52 
53  if (subch_type == EChannelType::CENTER)
54  {
55  return 0.5 * rod_circumference + 0.5 * wire_circumference / std::cos(theta);
56  }
57  else if (subch_type == EChannelType::EDGE)
58  {
59  return 0.5 * rod_circumference + 0.5 * wire_circumference / std::cos(theta) + pitch;
60  }
61  else
62  {
63  return (rod_circumference + wire_circumference / std::cos(theta)) / 6.0 +
64  2.0 / std::sqrt(3.0) * (pin_diameter / 2.0 + gap);
65  }
66 }
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.
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.
SCMTriWettedPerimIC(const InputParameters &params)
virtual unsigned int getSubchannelIndexFromPoint(const Point &p) const override
Return a subchannel index for a given physical point p
registerMooseObject("SubChannelApp", SCMTriWettedPerimIC)
An abstract class for ICs for hexagonal fuel assemblies.
static const std::string pitch
registerMooseObjectRenamed("SubChannelApp", TriWettedPerimIC, "06/30/2025 24:00", SCMTriWettedPerimIC)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Sets the wetted perimeter of the triangular, edge, and corner subchannels for hexagonal fuel assembli...
Real value(const Point &p) override
const TriSubChannelMesh & _mesh
static InputParameters validParams()
virtual const Real & getWireLeadLength() const
Return the wire lead length.
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
MooseUnits pow(const MooseUnits &, int)
const Real pi
virtual const Real & getWireDiameter() const
Return wire diameter.