https://mooseframework.inl.gov
SpecificTotalEnthalpyIC.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 
12 registerMooseObject("ThermalHydraulicsApp", SpecificTotalEnthalpyIC);
13 
16 {
18  params.addRequiredCoupledVar("rhoA", "Conserved density");
19  params.addRequiredCoupledVar("rhoEA", "Conserved total energy");
20  params.addRequiredCoupledVar("p", "Pressure");
21  params.addRequiredCoupledVar("A", "Cross-sectional area");
22  params.addCoupledVar("alpha", 1., "Volume fraction");
23  params.addClassDescription(
24  "Sets the initial condition for the special total enthalpy of a phase");
25 
26  return params;
27 }
28 
30  : InitialCondition(parameters),
31  _rhoA(coupledValue("rhoA")),
32  _rhoEA(coupledValue("rhoEA")),
33  _pressure(coupledValue("p")),
34  _area(coupledValue("A")),
35  _alpha(coupledValue("alpha"))
36 {
37 }
38 
39 Real
40 SpecificTotalEnthalpyIC::value(const Point & /*p*/)
41 {
42  return (_rhoEA[_qp] + _alpha[_qp] * _pressure[_qp] * _area[_qp]) / _rhoA[_qp];
43 }
Initial condition for specific total enthalpy.
const VariableValue & _area
const VariableValue & _pressure
const VariableValue & _rhoEA
static InputParameters validParams()
const VariableValue & _rhoA
registerMooseObject("ThermalHydraulicsApp", SpecificTotalEnthalpyIC)
SpecificTotalEnthalpyIC(const InputParameters &parameters)
void addCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
const VariableValue & _alpha
virtual Real value(const Point &)