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 "SCMFlatMassFlowRateAux.h" 11 : #include "SCM.h" 12 : 13 : registerMooseObject("SubChannelApp", SCMFlatMassFlowRateAux); 14 : registerMooseObjectRenamed("SubChannelApp", 15 : FlatMassFlowRateAux, 16 : "06/30/2025 24:00", 17 : SCMFlatMassFlowRateAux); 18 : 19 : InputParameters 20 35 : SCMFlatMassFlowRateAux::validParams() 21 : { 22 35 : InputParameters params = AuxKernel::validParams(); 23 70 : params.addRequiredParam<Real>("mass_flow", "Specified total mass flow at the inlet [kg/s]"); 24 35 : params.addClassDescription("Computes a uniform mass flow rate at the inlet"); 25 35 : return params; 26 0 : } 27 : 28 20 : SCMFlatMassFlowRateAux::SCMFlatMassFlowRateAux(const InputParameters & parameters) 29 : : AuxKernel(parameters), 30 20 : _mass_flow(getParam<Real>("mass_flow")), 31 40 : _subchannel_mesh(SCM::getConstMesh<SubChannelMesh>(_mesh)) 32 : { 33 20 : } 34 : 35 : Real 36 2268 : SCMFlatMassFlowRateAux::computeValue() 37 : { 38 2268 : unsigned int n_ch = _subchannel_mesh.getNumOfChannels(); 39 2268 : return _mass_flow / n_ch; 40 : }