https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
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");
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
39Real
41{
42 return (_rhoEA[_qp] + _alpha[_qp] * _pressure[_qp] * _area[_qp]) / _rhoA[_qp];
43}
registerMooseObject("ThermalHydraulicsApp", SpecificTotalEnthalpyIC)
static InputParameters validParams()
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void addCoupledVar(const std::string &name, const std::string &doc_string)
Initial condition for specific total enthalpy.
static InputParameters validParams()
const VariableValue & _pressure
virtual Real value(const Point &)
SpecificTotalEnthalpyIC(const InputParameters &parameters)