https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FluidPropertiesMaterialPH.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("pressure", "Fluid pressure (Pa)");
19 params.addRequiredCoupledVar("h", "Fluid specific enthalpy (J/kg)");
20 params.addRequiredParam<UserObjectName>("fp", "The name of the user object for fluid properties");
22 "Fluid properties using the (pressure, specific enthalpy) formulation");
23 return params;
24}
25
27 : Material(parameters),
28 _pressure(coupledValue("pressure")),
29 _h(coupledValue("h")),
30
31 _T(declareProperty<Real>("T")),
32 _s(declareProperty<Real>("s")),
33
34 _fp(getUserObject<SinglePhaseFluidProperties>("fp"))
35{
36}
37
39
40void
42{
43 _T[_qp] = _fp.T_from_p_h(_pressure[_qp], _h[_qp]);
44 _s[_qp] = _fp.s_from_h_p(_h[_qp], _pressure[_qp]);
45}
registerMooseObject("FluidPropertiesTestApp", FluidPropertiesMaterialPH)
Computes fluid properties using (pressure, specific enthalpy) formulation.
const VariableValue & _pressure
Pressure (Pa)
const VariableValue & _h
Specific enthalpy (J/kg)
MaterialProperty< Real > & _T
Temperature (K)
FluidPropertiesMaterialPH(const InputParameters &parameters)
static InputParameters validParams()
const SinglePhaseFluidProperties & _fp
Fluid properties UserObject.
MaterialProperty< Real > & _s
Specific entropy (J/kg/K)
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)
unsigned int _qp
static InputParameters validParams()
Common class for single phase fluid properties.