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 : 15 : InputParameters 16 30 : SCMFlatMassFlowRateAux::validParams() 17 : { 18 30 : InputParameters params = AuxKernel::validParams(); 19 60 : params.addRequiredParam<Real>("mass_flow", "Specified total mass flow at the inlet [kg/s]"); 20 30 : params.addClassDescription("Computes a uniform mass flow rate at the inlet"); 21 30 : return params; 22 0 : } 23 : 24 16 : SCMFlatMassFlowRateAux::SCMFlatMassFlowRateAux(const InputParameters & parameters) 25 : : AuxKernel(parameters), 26 16 : _mass_flow(getParam<Real>("mass_flow")), 27 32 : _subchannel_mesh(SCM::getConstMesh<SubChannelMesh>(_mesh)) 28 : { 29 16 : } 30 : 31 : Real 32 1890 : SCMFlatMassFlowRateAux::computeValue() 33 : { 34 1890 : unsigned int n_ch = _subchannel_mesh.getNumOfChannels(); 35 1890 : return _mass_flow / n_ch; 36 : }