www.mooseframework.org
MultiComponentFluidPropertiesMaterialPT.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
9 
10 template <>
11 InputParameters
13 {
14  InputParameters params = validParams<Material>();
15  params.addRequiredCoupledVar("pressure", "pressure (Pa)");
16  params.addRequiredCoupledVar("temperature", "temperature (K)");
17  params.addRequiredCoupledVar("xmass", "Solute mass fraction (-)");
18  params.addRequiredParam<UserObjectName>("fp", "The name of the user object for fluid properties");
19  params.addParam<bool>("vapor", false, "Flag to calculate vapor pressure");
20  params.addClassDescription(
21  "Fluid properties of a multicomponent fluid using the (pressure, temperature) formulation");
22  return params;
23 }
24 
26  const InputParameters & parameters)
27  : Material(parameters),
28  _pressure(coupledValue("pressure")),
29  _temperature(coupledValue("temperature")),
30  _xmass(coupledValue("xmass")),
31 
32  _rho(declareProperty<Real>("density")),
33  _h(declareProperty<Real>("enthalpy")),
34  _cp(declareProperty<Real>("cp")),
35  _e(declareProperty<Real>("e")),
36 
37  _fp(getUserObject<MultiComponentFluidPropertiesPT>("fp"))
38 {
39 }
40 
42 
43 void
45 {
46  _rho[_qp] = _fp.rho(_pressure[_qp], _temperature[_qp], _xmass[_qp]);
47  _h[_qp] = _fp.h(_pressure[_qp], _temperature[_qp], _xmass[_qp]);
48  _cp[_qp] = _fp.cp(_pressure[_qp], _temperature[_qp], _xmass[_qp]);
49  _e[_qp] = _fp.e(_pressure[_qp], _temperature[_qp], _xmass[_qp]);
50 }
virtual Real h(Real pressure, Real temperature, Real xmass) const =0
Enthalpy.
const VariableValue & _xmass
Mass fraction of solute (-)
MultiComponentFluidPropertiesMaterialPT(const InputParameters &parameters)
MaterialProperty< Real > & _rho
Density (kg/m^3)
virtual Real e(Real pressure, Real temperature, Real xmass) const =0
Internal energy.
InputParameters validParams< MultiComponentFluidPropertiesMaterialPT >()
MaterialProperty< Real > & _h
Enthalpy (kJ/kg)
virtual Real cp(Real pressure, Real temperature, Real xmass) const =0
Isobaric specific heat capacity.
Common class for multiple component fluid properties using a pressure and temperature formulation...
MaterialProperty< Real > & _e
Internal energy (kJ/kg)
virtual Real rho(Real pressure, Real temperature, Real xmass) const =0
Density.
MaterialProperty< Real > & _cp
Isobaric heat capacity (kJ/kg/K)