https://mooseframework.inl.gov
Loading...
Searching...
No Matches
TabulatedPVTFluidProperties.h
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
10#pragma once
11
13#include "LinearInterpolation.h"
14
20{
21public:
23
25
26#pragma GCC diagnostic push
27#pragma GCC diagnostic ignored "-Woverloaded-virtual"
28
29 virtual std::string fluidName() const override;
30 virtual Real molarMass() const override;
31
32 using SinglePhaseFluidProperties::rho_from_p_T;
33 virtual Real rho_from_p_T(Real p, Real T) const override;
34 virtual void
35 rho_from_p_T(Real p, Real T, Real & rho, Real & drho_dp, Real & drho_dT) const override;
36
37 using SinglePhaseFluidProperties::mu_from_p_T;
38 virtual Real mu_from_p_T(Real p, Real T) const override;
39 virtual void mu_from_p_T(Real p, Real T, Real & mu, Real & dmu_dp, Real & dmu_dT) const override;
40
41 using SinglePhaseFluidProperties::e_from_p_T;
42 virtual Real e_from_p_T(Real p, Real T) const override;
43 virtual void e_from_p_T(Real p, Real T, Real & e, Real & de_dp, Real & de_dT) const override;
44
45 using SinglePhaseFluidProperties::h_from_p_T;
46 virtual Real h_from_p_T(Real p, Real T) const override;
47 virtual void h_from_p_T(Real p, Real T, Real & h, Real & dh_dp, Real & dh_dT) const override;
48
49#pragma GCC diagnostic pop
50
51protected:
59 void interpolate(Real p, const LinearInterpolation & table, Real & value, Real & dvalue_dp) const;
60
62 const Real _density_sc;
63
65 const std::vector<Real> _p;
66
69
73
75 const Real _cv;
76
79 enum class OOBBehavior
80 {
81 Ignore,
82 Throw,
86 };
88};
const double mu
const InputParameters & parameters() const
Common class for single phase fluid properties.
e e e e s T T T T T rho v v T e h
Fluid properties from a table of pressure, formation volume factor and viscosity (PVDO/PVDG style)
OOBBehavior
Property evaluation behavior outside the tabulated pressure range (as in TabulatedFluidProperties).
virtual std::string fluidName() const override
Fluid name.
LinearInterpolation _inv_B_mu_table
Interpolation of the reciprocal of the product of formation volume factor and viscosity,...
virtual Real e_from_p_T(Real p, Real T) const override
const Real _density_sc
Density at standard (surface) conditions (kg/m^3)
virtual Real rho_from_p_T(Real p, Real T) const override
virtual Real molarMass() const override
Molar mass [kg/mol].
LinearInterpolation _inv_B_table
Interpolation of the reciprocal of the formation volume factor, 1/B, in pressure.
const Real _cv
Constant specific heat capacity at constant volume (J/kg/K)
virtual Real h_from_p_T(Real p, Real T) const override
const std::vector< Real > _p
Tabulated pressures (Pa), strictly increasing.
void interpolate(Real p, const LinearInterpolation &table, Real &value, Real &dvalue_dp) const
Interpolate a tabulated quantity in pressure, applying the out-of-bounds behavior.
virtual Real mu_from_p_T(Real p, Real T) const override