https://mooseframework.inl.gov
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 
10 #include "SCMFlatMassFlowRateAux.h"
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 
31 Real
33 {
34  unsigned int n_ch = _subchannel_mesh.getNumOfChannels();
35  return _mass_flow / n_ch;
36 }
const SubChannelMesh & _subchannel_mesh
Geometry information.
Computes a uniform mass flow rate at the inlet provided a total mass flow rate.
void addRequiredParam(const std::string &name, const std::string &doc_string)
const Real & _mass_flow
Specified mass flow.
virtual unsigned int getNumOfChannels() const =0
Return the number of channels per layer.
const T & getConstMesh(const MooseMesh &mesh)
function to cast const mesh
Definition: SCM.h:21
SCMFlatMassFlowRateAux(const InputParameters &parameters)
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
registerMooseObject("SubChannelApp", SCMFlatMassFlowRateAux)
static InputParameters validParams()
virtual Real computeValue() override
Base class for subchannel meshes.
Definition: SCM.h:16