https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MarvelTriWettedPerimIC.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 "TriSubChannelMesh.h"
12
14
17
18{
20 params.addClassDescription("Computes wetted perimeter of subchannels in a triangular lattice "
21 "arrangement in a MARVEL-type micro-reactor");
22 return params;
23}
24
29
30Real
32{
33 // Define geometry parameters.
34 auto pitch = _mesh.getPitch();
35 auto rod_diameter = _mesh.getPinDiameter();
36 auto wire_diameter = _mesh.getWireDiameter();
37 auto wire_lead_length = _mesh.getWireLeadLength();
38 auto rod_circumference = libMesh::pi * rod_diameter;
39 auto wire_circumference = libMesh::pi * wire_diameter;
40 auto gap = _mesh.getDuctToPinGap();
41 auto r_ref = rod_diameter / 2.0 + gap;
42 auto theta = std::acos(wire_lead_length /
43 std::sqrt(std::pow(wire_lead_length, 2) +
44 std::pow(libMesh::pi * (rod_diameter + wire_diameter), 2)));
45 // given the channel number, i, it computes the wetted perimeter of
46 // the subchannel based on the subchannel type: CENTER, EDGE or CORNER.
48 auto subch_type = _mesh.getSubchannelType(i);
49
50 if (subch_type == EChannelType::CENTER)
51 {
52 return 0.5 * rod_circumference + 0.5 * wire_circumference / std::cos(theta);
53 }
54 else if (subch_type == EChannelType::EDGE)
55 {
56 auto gamma = std::acos(1 - 0.5 * std::pow(pitch / r_ref, 2.0));
57 auto alpha = (libMesh::pi - gamma) / 2.0;
58 auto sector_angle = libMesh::pi / 2.0 - alpha;
59 return 0.5 * rod_circumference + 0.5 * wire_circumference / std::cos(theta) +
60 2.0 * sector_angle * (r_ref);
61 }
62 else
63 {
64 return (rod_circumference + wire_circumference / std::cos(theta)) / 6.0 +
65 (libMesh::pi / 3.0) * (r_ref);
66 }
67}
const Real p
registerMooseObject("SubChannelApp", MarvelTriWettedPerimIC)
void addClassDescription(const std::string &doc_string)
Sets the wetted perimeter of the triangular, edge, and corner subchannels for a MARVEL-type microreac...
static InputParameters validParams()
Real value(const Point &p) override
MarvelTriWettedPerimIC(const InputParameters &params)
virtual const Real & getPitch() const
Return the undeformed pitch between 2 subchannels.
virtual const Real & getPinDiameter() const
Return undeformed Pin diameter.
An abstract class for ICs for hexagonal fuel assemblies.
static InputParameters validParams()
const TriSubChannelMesh & _mesh
const Real & getWireDiameter() const
Return wire diameter.
const Real & getDuctToPinGap() const
Return the the gap thickness between the duct and peripheral fuel pins.
unsigned int getSubchannelIndexFromPoint(const Point &p) const override
Return a subchannel index for a given physical point p
const Real & getWireLeadLength() const
Return the wire lead length.
EChannelType getSubchannelType(unsigned int index) const override
Return the type of the subchannel for given subchannel index.
const Real pi