https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
26public:
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
40protected:
57 Real compute_p_sat(const Real & T) const;
58
59 // liquid SGEOS parameters
60 const Real _gamma_liquid;
61 const Real _cv_liquid;
62 const Real _cp_liquid;
63 const Real _q_liquid;
64 const Real _p_inf_liquid;
65 const Real _q_prime_liquid;
66
67 // vapor SGEOS parameters
68 const Real _gamma_vapor;
69 const Real _cv_vapor;
70 const Real _cp_vapor;
71 const Real _q_vapor;
72 const Real _p_inf_vapor;
73 const Real _q_prime_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
109 const Real _newton_tol;
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
121public:
123};
124
125#pragma GCC diagnostic pop
const double T
const InputParameters & parameters() const
Interface class for producing errors, warnings, or just quiet NaNs.
Stiffened gas fluid properties.
Two-phase stiffened gas fluid properties.
const Real & _T_triple
Triple-point temperature.
const unsigned int & _n_sat_samples
Number of samples to take in saturation curve.
virtual Real L_fusion() const override
Returns the latent heat of fusion.
const Real & _T_sat_min
Minimum temperature value in saturation curve.
const Real & _sigma_C
'C' constant used in surface tension correlation
virtual Real dT_sat_dp(Real pressure) const override
Computes dT/dp along the saturation line.
virtual bool supportsPhaseChange() const override
Returns true if phase change is supported, otherwise false.
virtual Real sigma_from_T(Real T) const override
Computes surface tension sigma of saturated liquid in contact with saturated vapor.
const unsigned int _newton_max_iter
Newton max number of iterations.
const Real & _sigma_A
'A' constant used in surface tension correlation
const Real & _T_sat_max
Maximum temperature value in saturation curve.
virtual Real dsigma_dT_from_T(Real T) const override
Computes dsigma/dT along the saturation line.
const Real & _sigma_B
'B' constant used in surface tension correlation
const Real & _p_sat_guess
Initial guess for saturation pressure Newton solve.
const Real _dT_sat
Temperature increments on saturation curve.
Real compute_p_sat(const Real &T) const
Computes saturation pressure value using Newton solve.
virtual Real T_sat(Real pressure) const override
Computes the saturation temperature at a pressure.
virtual Real p_critical() const override
Returns the critical pressure.
virtual Real p_sat(Real temperature) const override
Computes the saturation pressure at a temperature.
virtual Real T_triple() const override
Returns the triple-point temperature.
Base class for fluid properties used with two-phase flow.