https://mooseframework.inl.gov
SCMQuadFlowAreaIC.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 "SCMQuadFlowAreaIC.h"
11 
12 #include "SubChannelMesh.h"
13 #include "QuadSubChannelMesh.h"
14 #include "SCM.h"
15 
16 registerMooseObject("SubChannelApp", SCMQuadFlowAreaIC);
17 registerMooseObjectRenamed("SubChannelApp", QuadFlowAreaIC, "06/30/2025 24:00", SCMQuadFlowAreaIC);
18 
21 {
23  params.addClassDescription(
24  "Computes subchannel flow area in the square lattice subchannel arrangement");
25  return params;
26 }
27 
29  : QuadSubChannelBaseIC(params), _subchannel_mesh(SCM::getConstMesh<SubChannelMesh>(_mesh))
30 {
31 }
32 
33 Real
34 SCMQuadFlowAreaIC::value(const Point & p)
35 {
36  Real standard_area, rod_area, additional_area;
37  auto pitch = _mesh.getPitch();
38  auto pin_diameter = _mesh.getPinDiameter();
39  auto gap = _mesh.getGap();
40  auto z_blockage = _mesh.getZBlockage();
41  auto index_blockage = _mesh.getIndexBlockage();
42  auto reduction_blockage = _mesh.getReductionBlockage();
44  auto subch_type = _mesh.getSubchannelType(i);
45 
46  if (subch_type == EChannelType::CORNER)
47  {
48  standard_area = 0.25 * pitch * pitch;
49  rod_area = 0.25 * 0.25 * M_PI * pin_diameter * pin_diameter;
50  additional_area = pitch * gap + gap * gap;
51  }
52  else if (subch_type == EChannelType::EDGE)
53  {
54  standard_area = 0.5 * pitch * pitch;
55  rod_area = 0.5 * 0.25 * M_PI * pin_diameter * pin_diameter;
56  additional_area = pitch * gap;
57  }
58  else
59  {
60  standard_area = pitch * pitch;
61  rod_area = 0.25 * M_PI * pin_diameter * pin_diameter;
62  additional_area = 0.0;
63  }
64 
66  auto subchannel_area = standard_area + additional_area - rod_area;
67 
69  auto index = 0;
70  for (const auto & i_blockage : index_blockage)
71  {
72  if (i == i_blockage && (p(2) >= z_blockage.front() && p(2) <= z_blockage.back()))
73  {
74  return reduction_blockage[index] * subchannel_area;
75  }
76  index++;
77  }
78 
79  return subchannel_area;
80 }
registerMooseObjectRenamed("SubChannelApp", QuadFlowAreaIC, "06/30/2025 24:00", SCMQuadFlowAreaIC)
virtual const Real & getPinDiameter() const
Return Pin diameter.
An abstract class for ICs for quadrilateral subchannels.
This class calculates the cross-sectional flow area of the quadrilateral subchannel.
SCMQuadFlowAreaIC(const InputParameters &params)
const QuadSubChannelMesh & _mesh
const Real & getGap() const
Returns the gap, not to be confused with the gap between pins, this refers to the gap next to the duc...
static InputParameters validParams()
unsigned int getSubchannelIndexFromPoint(const Point &p) const override
Return a subchannel index for a given physical point p
static const std::string pitch
const T & getConstMesh(const MooseMesh &mesh)
function to cast const mesh
Definition: SCM.h:21
static InputParameters validParams()
virtual const std::vector< Real > & getReductionBlockage() const
Get area reduction of blocked subchannels.
virtual const Real & getPitch() const override
Return the pitch between 2 subchannels.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual const std::vector< Real > & getZBlockage() const
Get axial location of blockage (in,out) [m].
void addClassDescription(const std::string &doc_string)
virtual const std::vector< unsigned int > & getIndexBlockage() const
Get index of blocked subchannels.
Base class for subchannel meshes.
virtual EChannelType getSubchannelType(unsigned int index) const override
Return the type of the subchannel for given subchannel index.
Definition: SCM.h:16
Real value(const Point &p) override
registerMooseObject("SubChannelApp", SCMQuadFlowAreaIC)