https://mooseframework.inl.gov
TriInterWrapperWettedPerimIC.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 wetted perimeter of inter-wrapper cells in a triangular subchannel lattice");
21  return params;
22 }
23 
25  : TriInterWrapperBaseIC(params)
26 {
27 }
28 
29 Real
31 {
32  auto flat_to_flat = _mesh.getSideX();
33  auto gap = _mesh.getDuctToPinGap();
34  auto element_side = flat_to_flat * std::tan(libMesh::pi / 6.0);
35  bool tight_side_bypass = _mesh.getIsTightSide();
36  auto element_side_ext = (flat_to_flat + 2. * gap) * std::tan(libMesh::pi / 6.0);
37 
39  // given the channel number, i, it computes the wetted perimeter of the subchannel
40  // based on the subchannel type: CENTER, EDGE or CORNER.
41  auto subch_type = _mesh.getSubchannelType(i);
42  if (subch_type == EChannelType::CENTER)
43  {
44  return 3.0 * element_side;
45  }
46  else if (subch_type == EChannelType::EDGE)
47  {
48  if (tight_side_bypass)
49  return 5.0 * element_side;
50  else
51  return 3.0 * element_side + 2.0 * gap * std::tan(libMesh::pi / 6.0);
52  }
53 
54  else
55  {
56  if (tight_side_bypass)
57  return (element_side + element_side_ext);
58  else
59  return 2.0 * element_side + 2.0 * gap * std::tan(libMesh::pi / 6.0);
60  }
61 }
TriInterWrapperWettedPerimIC(const InputParameters &params)
An abstract class for ICs for hexagonal fuel assemblies.
registerMooseObject("SubChannelApp", TriInterWrapperWettedPerimIC)
virtual EChannelType getSubchannelType(unsigned int index) const override
Return the type of the inter-wrapper for given inter-wrapper index.
virtual const Real & getSideX() const
Return side lengths of the assembly.
Sets the wetted perimeter of the triangular inter-wrapper flow channel.
Real value(const Point &p) override
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
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)
const Real pi
virtual const Real & getDuctToPinGap() const