https://mooseframework.inl.gov
RhoFromPressureTemperatureIC.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 
12 
14 
17 {
19  params.addRequiredParam<UserObjectName>("fp", "The name of fluid properties user object.");
20  params.addRequiredCoupledVar("p", "The pressure [Pa]");
21  params.addRequiredCoupledVar("T", "The temperature [K]");
22  params.addClassDescription("Computes the density from pressure and temperature.");
23  return params;
24 }
25 
27  : InitialCondition(parameters),
28  _spfp(getUserObject<SinglePhaseFluidProperties>("fp")),
29  _p(coupledValue("p")),
30  _T(coupledValue("T"))
31 {
32 }
33 
34 Real
36 {
37  return _spfp.rho_from_p_T(_p[_qp], _T[_qp]);
38 }
registerMooseObject("FluidPropertiesApp", RhoFromPressureTemperatureIC)
const SinglePhaseFluidProperties & _spfp
const VariableValue & _T
The temperature.
virtual Real value(const Point &p)
RhoFromPressureTemperatureIC(const InputParameters &parameters)
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
Common class for single phase fluid properties.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
const VariableValue & _p
The pressure.
Computes density from pressure and temperature variables.