https://mooseframework.inl.gov
StiffenedGasTwoPhaseFluidProperties.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 #include "NaNInterface.h"
15 
17 
18 #pragma GCC diagnostic push
19 #pragma GCC diagnostic ignored "-Woverloaded-virtual"
20 
25 {
26 public:
28 
29  virtual Real p_critical() const override;
30  virtual Real T_triple() const override;
31  virtual Real L_fusion() const override;
32  virtual Real T_sat(Real pressure) const override;
33  virtual Real p_sat(Real temperature) const override;
34  virtual Real dT_sat_dp(Real pressure) const override;
35  virtual Real sigma_from_T(Real T) const override;
36  virtual Real dsigma_dT_from_T(Real T) const override;
37 
38  virtual bool supportsPhaseChange() const override { return true; }
39 
40 protected:
57  Real compute_p_sat(const Real & T) const;
58 
59  // liquid SGEOS parameters
63  const Real _q_liquid;
66 
67  // vapor SGEOS parameters
69  const Real _cv_vapor;
70  const Real _cp_vapor;
71  const Real _q_vapor;
74 
76  const Real & _T_c;
78  const Real & _p_c;
80  const Real & _T_triple;
82  const Real & _L_fusion;
83 
85  const Real & _sigma_A;
87  const Real & _sigma_B;
89  const Real & _sigma_C;
90 
92  const Real & _T_sat_min;
94  const Real & _T_sat_max;
96  const Real & _p_sat_guess;
98  const unsigned int & _n_sat_samples;
100  const Real _dT_sat;
101 
102  // coefficients for saturation pressure Newton solve
103  const Real _A;
104  const Real _B;
105  const Real _C;
106  const Real _D;
107 
111  const unsigned int _newton_max_iter;
112 
113  // These two vectors store saturation line p(T) information by only calculating
114  // once in constructor and then use interpolation to quickly calculate the value
115  std::vector<Real> _T_vec;
116  std::vector<Real> _p_sat_vec;
117 
120 
121 public:
122  static InputParameters validParams();
123 };
124 
125 #pragma GCC diagnostic pop
virtual Real L_fusion() const override
Returns the latent heat of fusion.
const unsigned int & _n_sat_samples
Number of samples to take in saturation curve.
virtual Real T_triple() const override
Returns the triple-point temperature.
virtual Real p_sat(Real temperature) const override
Computes the saturation pressure at a temperature.
virtual Real dT_sat_dp(Real pressure) const override
Computes dT/dp along the saturation line.
const Real _dT_sat
Temperature increments on saturation curve.
virtual Real p_critical() const override
Returns the critical pressure.
static const std::string temperature
Definition: NS.h:59
virtual Real sigma_from_T(Real T) const override
Computes surface tension sigma of saturated liquid in contact with saturated vapor.
const Real & _sigma_B
&#39;B&#39; constant used in surface tension correlation
const Real & _T_sat_max
Maximum temperature value in saturation curve.
Base class for fluid properties used with two-phase flow.
Two-phase stiffened gas fluid properties.
const unsigned int _newton_max_iter
Newton max number of iterations.
const Real & _sigma_C
&#39;C&#39; constant used in surface tension correlation
const Real & _T_triple
Triple-point temperature.
virtual bool supportsPhaseChange() const override
Returns true if phase change is supported, otherwise false.
Stiffened gas fluid properties.
const Real & _p_sat_guess
Initial guess for saturation pressure Newton solve.
StiffenedGasTwoPhaseFluidProperties(const InputParameters &parameters)
Real compute_p_sat(const Real &T) const
Computes saturation pressure value using Newton solve.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string pressure
Definition: NS.h:56
const InputParameters & parameters() const
const Real & _T_sat_min
Minimum temperature value in saturation curve.
const Real & _sigma_A
&#39;A&#39; constant used in surface tension correlation
Interface class for producing errors, warnings, or just quiet NaNs.
Definition: NaNInterface.h:22
virtual Real T_sat(Real pressure) const override
Computes the saturation temperature at a pressure.
virtual Real dsigma_dT_from_T(Real T) const override
Computes dsigma/dT along the saturation line.