https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SpecificInternalEnergyIC.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("rhouA", "Conserved momentum");
20 params.addRequiredCoupledVar("rhoEA", "Conserved total energy");
22 "Sets the initial condition for the specific internal energy of a phase");
23 return params;
24}
25
27 : InitialCondition(parameters),
28 _rho(coupledValue("rhoA")),
29 _rhou(coupledValue("rhouA")),
30 _rhoE(coupledValue("rhoEA"))
31{
32}
33
34Real
36{
37 return (_rhoE[_qp] - 0.5 * _rhou[_qp] * _rhou[_qp] / _rho[_qp]) / _rho[_qp];
38}
registerMooseObject("ThermalHydraulicsApp", SpecificInternalEnergyIC)
static InputParameters validParams()
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
virtual Real value(const Point &p)
SpecificInternalEnergyIC(const InputParameters &parameters)