https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SCMFlatMassFlowRateAux.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 "SCM.h"
12
14
17{
19 params.addRequiredParam<Real>("mass_flow", "Specified total mass flow at the inlet [kg/s]");
20 params.addClassDescription("Computes a uniform mass flow rate at the inlet");
21 return params;
22}
23
25 : AuxKernel(parameters),
26 _mass_flow(getParam<Real>("mass_flow")),
27 _subchannel_mesh(SCM::getConstMesh<SubChannelMesh>(_mesh))
28{
29}
30
31Real
33{
34 unsigned int n_ch = _subchannel_mesh.getNumOfChannels();
35 return _mass_flow / n_ch;
36}
registerMooseObject("SubChannelApp", SCMFlatMassFlowRateAux)
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
Computes a uniform mass flow rate at the inlet provided a total mass flow rate.
const SubChannelMesh & _subchannel_mesh
Geometry information.
static InputParameters validParams()
SCMFlatMassFlowRateAux(const InputParameters &parameters)
virtual Real computeValue() override
const Real & _mass_flow
Specified mass flow.
Base class for subchannel meshes.
virtual unsigned int getNumOfChannels() const =0
Return the number of channels per layer.
Definition SCM.h:17