https://mooseframework.inl.gov
SCMMassFlowRateIC.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 "SCMMassFlowRateIC.h"
11 
12 registerMooseObject("SubChannelApp", SCMMassFlowRateIC);
13 
16 {
18  params.addClassDescription(
19  "Computes mass float rate from specified mass flux and cross-sectional area");
20  params.addRequiredCoupledVar("area", "Subchannel surface area [m^2]");
21  params.addRequiredParam<Real>("mass_flux", "Specified mass flux [kg/s-m^2]");
22  return params;
23 }
24 
26  : InitialCondition(parameters),
27  _mass_flux(getParam<Real>("mass_flux")),
28  _area(coupledValue("area"))
29 {
30 }
31 
32 Real
33 SCMMassFlowRateIC::value(const Point & /*p*/)
34 {
35  return _mass_flux * _area[_qp];
36 }
registerMooseObject("SubChannelApp", SCMMassFlowRateIC)
static InputParameters validParams()
Computes mass flow rate from specified mass flux and cross-sectional area.
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
const VariableValue & _area
Cross-sectional area.
SCMMassFlowRateIC(const InputParameters &parameters)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
const Real & _mass_flux
Specified mass flux.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
virtual Real value(const Point &p) override