https://mooseframework.inl.gov
TriInterWrapperFlowAreaIC.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 
11 #include "TriInterWrapperMesh.h"
12 
14 
17 {
19  params.addClassDescription(
20  "Computes flow area of inter-wrapper cells in a triangualar subchannel lattice");
21  return params;
22 }
23 
25  : TriInterWrapperBaseIC(params)
26 {
27 }
28 
29 Real
31 {
32  auto pitch = _mesh.getPitch();
33  auto flat_to_flat = _mesh.getSideX();
34  auto gap = _mesh.getDuctToPinGap();
35  auto element_side = flat_to_flat * std::tan(libMesh::pi / 6.0);
36  auto tight_side_bypass = _mesh.getIsTightSide();
38  // given the channel number, i, it computes the flow area of the subchannel
39  // based on the subchannel type: CENTER, EDGE or CORNER.
40  auto subch_type = _mesh.getSubchannelType(i);
41  if (subch_type == EChannelType::CENTER)
42  {
43  return (pitch - flat_to_flat) * element_side * 3.0 / 2.0 +
44  std::sin(libMesh::pi / 3.) * (pitch - flat_to_flat) * (pitch - flat_to_flat) / 2.0;
45  }
46  else if (subch_type == EChannelType::EDGE)
47  {
48  if (tight_side_bypass)
49  return (pitch - flat_to_flat) * element_side * 0.5 + gap * element_side * 2 +
50  gap * gap * std::tan(libMesh::pi / 6.0);
51  else
52  return (pitch - flat_to_flat) * element_side * 1.0 / 2.0 +
53  (element_side + gap * std::tan(libMesh::pi / 6.0) / 2.0) * gap;
54  }
55  else
56  {
57  if (tight_side_bypass)
58  return (element_side + gap * std::tan(libMesh::pi / 6.0)) * gap;
59  else
60  return (element_side + gap * std::tan(libMesh::pi / 6.0) / 2.0) * gap;
61  }
62 }
An abstract class for ICs for hexagonal fuel assemblies.
virtual EChannelType getSubchannelType(unsigned int index) const override
Return the type of the inter-wrapper for given inter-wrapper index.
This class calculates the area of the triangular, edge, and corner subchannels for hexagonal fuel ass...
virtual const Real & getSideX() const
Return side lengths of the assembly.
static InputParameters validParams()
Real value(const Point &p) override
static InputParameters validParams()
static const std::string pitch
TriInterWrapperMesh & _mesh
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual const bool & getIsTightSide() const
virtual unsigned int getSubchannelIndexFromPoint(const Point &p) const override
Return a inter-wrapper index for a given physical point p
void addClassDescription(const std::string &doc_string)
TriInterWrapperFlowAreaIC(const InputParameters &params)
virtual const Real & getPitch() const
Return the pitch between 2 inter-wrappers.
registerMooseObject("SubChannelApp", TriInterWrapperFlowAreaIC)
const Real pi
virtual const Real & getDuctToPinGap() const