https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
34Real
36{
37 return _spfp.rho_from_p_T(_p[_qp], _T[_qp]);
38}
registerMooseObject("FluidPropertiesApp", RhoFromPressureTemperatureIC)
static InputParameters validParams()
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
Computes density from pressure and temperature variables.
const SinglePhaseFluidProperties & _spfp
const VariableValue & _T
The temperature.
const VariableValue & _p
The pressure.
RhoFromPressureTemperatureIC(const InputParameters &parameters)
Common class for single phase fluid properties.