https://mooseframework.inl.gov
QuadInterWrapperFlowAreaIC.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 "QuadInterWrapperMesh.h"
12 
14 
17 {
19  params.addClassDescription("Computes cross-sectional area for inter-wrapper cells in a square "
20  "lattice subchannel arrangement");
21  return params;
22 }
23 
25  : QuadInterWrapperBaseIC(params)
26 {
27 }
28 
29 Real
31 {
32  auto assembly_pitch = _mesh.getPitch();
33  auto side_x = _mesh.getSideX();
34  auto side_y = _mesh.getSideY();
35  auto gap = _mesh.getGap();
36 
37  // Compute the flow area for a standard inter-wrapper channel (one that touches 4 assemblies).
38  auto assembly_area = side_x * side_y;
39  auto standard_area = assembly_pitch * assembly_pitch - assembly_area;
40 
42  auto subch_type = _mesh.getSubchannelType(i);
43  if (subch_type == EChannelType::CORNER)
44  {
45  // Need to modify later to include the specific side
46  auto side_avg = (side_x + side_y) / 2.0;
47  return side_avg * gap;
48  }
49  else if (subch_type == EChannelType::EDGE)
50  {
51  // Need to modify later to include the specific side
52  auto side_avg = (side_x + side_y) / 2.0;
53  return standard_area * 0.25 + side_avg * gap;
54  }
55  else
56  return standard_area;
57 }
virtual const Real & getSideX() const
Return side lengths of the assembly.
virtual EChannelType getSubchannelType(unsigned int index) const override
Return the type of the inter-wrapper for given inter-wrapper index.
static const std::string assembly_pitch
This class calculates the cross-sectional flow area of the quadrilateral subchannel.
virtual const Real & getPitch() const override
Return the pitch between 2 inter-wrappers.
virtual const Real & getSideY() const
unsigned int getSubchannelIndexFromPoint(const Point &p) const override
Return a inter-wrapper index for a given physical point p
QuadInterWrapperFlowAreaIC(const InputParameters &params)
static InputParameters validParams()
const QuadInterWrapperMesh & _mesh
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
registerMooseObject("SubChannelApp", QuadInterWrapperFlowAreaIC)
An abstract class for ICs for quadrilateral subchannels.