https://mooseframework.inl.gov
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 
12 registerMooseObject("FluidPropertiesTestApp", FluidPropertiesMaterialPH);
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");
21  params.addClassDescription(
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 
40 void
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 }
Computes fluid properties using (pressure, specific enthalpy) formulation.
MaterialProperty< Real > & _T
Temperature (K)
FluidPropertiesMaterialPH(const InputParameters &parameters)
static InputParameters validParams()
MaterialProperty< Real > & _s
Specific entropy (J/kg/K)
void addRequiredParam(const std::string &name, const std::string &doc_string)
const SinglePhaseFluidProperties & _fp
Fluid properties UserObject.
unsigned int _qp
static InputParameters validParams()
const VariableValue & _pressure
Pressure (Pa)
Common class for single phase fluid properties.
registerMooseObject("FluidPropertiesTestApp", FluidPropertiesMaterialPH)
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 & _h
Specific enthalpy (J/kg)