Line data Source code
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 "QuadInterWrapperFlowAreaIC.h" 11 : #include "QuadInterWrapperMesh.h" 12 : 13 : registerMooseObject("SubChannelApp", QuadInterWrapperFlowAreaIC); 14 : 15 : InputParameters 16 68 : QuadInterWrapperFlowAreaIC::validParams() 17 : { 18 68 : InputParameters params = QuadInterWrapperBaseIC::validParams(); 19 68 : params.addClassDescription("Computes cross-sectional area for inter-wrapper cells in a square " 20 : "lattice subchannel arrangement"); 21 68 : return params; 22 0 : } 23 : 24 35 : QuadInterWrapperFlowAreaIC::QuadInterWrapperFlowAreaIC(const InputParameters & params) 25 35 : : QuadInterWrapperBaseIC(params) 26 : { 27 35 : } 28 : 29 : Real 30 17280 : QuadInterWrapperFlowAreaIC::value(const Point & p) 31 : { 32 17280 : auto assembly_pitch = _mesh.getPitch(); 33 17280 : auto side_x = _mesh.getSideX(); 34 17280 : auto side_y = _mesh.getSideY(); 35 17280 : auto gap = _mesh.getGap(); 36 : 37 : // Compute the flow area for a standard inter-wrapper channel (one that touches 4 assemblies). 38 17280 : auto assembly_area = side_x * side_y; 39 17280 : auto standard_area = assembly_pitch * assembly_pitch - assembly_area; 40 : 41 17280 : auto i = _mesh.getSubchannelIndexFromPoint(p); 42 17280 : auto subch_type = _mesh.getSubchannelType(i); 43 17280 : if (subch_type == EChannelType::CORNER) 44 : { 45 : // Need to modify later to include the specific side 46 1920 : auto side_avg = (side_x + side_y) / 2.0; 47 1920 : return side_avg * gap; 48 : } 49 15360 : else if (subch_type == EChannelType::EDGE) 50 : { 51 : // Need to modify later to include the specific side 52 7680 : auto side_avg = (side_x + side_y) / 2.0; 53 7680 : return standard_area * 0.25 + side_avg * gap; 54 : } 55 : else 56 : return standard_area; 57 : }