Class: Toji::Swvp::Wagner
- Inherits:
-
Object
- Object
- Toji::Swvp::Wagner
- Includes:
- Singleton, Base
- Defined in:
- lib/toji/swvp/wagner.rb
Overview
Wagnerの式
Constant Summary collapse
- Pc =
hPa:臨界圧
221200- Tc =
K:臨界温度
647.3- A =
-7.76451- B =
1.45838- C =
-2.7758- D =
-1.2303
Instance Method Summary collapse
Instance Method Details
#calc(temp) ⇒ Object
18 19 20 21 |
# File 'lib/toji/swvp/wagner.rb', line 18 def calc(temp) x = 1 - (temp.to_f + 273.15) / Tc Pc * Math.exp((A * x + B * x**1.5 + C * x**3 + D * x**6) / (1 - x)) end |