This example is interactive. Click the play button on any cell to execute it, or run all cells in sequence.

Vapor Pressure Curves

Comparing vapor pressure correlations for water by sweeping temperature through Antoine, Kirchhoff, and Wagner blocks wired into a PathSim simulation.

The IK-CAPE standard defines several temperature-dependent correlations for vapor pressure. Here we compare three of them:

  • Antoine: MATHINLINE0ENDMATH
  • Kirchhoff: MATHINLINE1ENDMATH
  • Wagner: MATHINLINE2ENDMATH

Each correlation is a Function block with a single temperature input and a single pressure output.

Python
Loading...

Define the correlation blocks with literature coefficients for water. All use natural logarithm, temperature in Kelvin, and return pressure in Pascals.

Python
Loading...

Set up a simulation that sweeps temperature from 300 K to 500 K. A Source block generates a linear temperature ramp, which is connected to all three correlations in parallel. A Scope records the three pressure outputs.

Python
Loading...
18:18:27 - INFO - LOGGING (log: True)
18:18:27 - INFO - BLOCKS (total: 5, dynamic: 0, static: 5, eventful: 0)
18:18:27 - INFO - GRAPH (nodes: 5, edges: 6, alg. depth: 2, loop depth: 0, runtime: 0.064ms)
18:18:27 - INFO - STARTING -> TRANSIENT (Duration: 200.00s)
18:18:27 - INFO - --------------------   1% | 0.0s<0.0s | 4810.1 it/s
18:18:27 - INFO - ####----------------  20% | 0.0s<0.0s | 23952.9 it/s
18:18:27 - INFO - ########------------  40% | 0.0s<0.0s | 23462.4 it/s
18:18:27 - INFO - ############--------  60% | 0.0s<0.0s | 21625.3 it/s
18:18:27 - INFO - ################----  80% | 0.0s<0.0s | 22151.7 it/s
18:18:27 - INFO - #################### 100% | 0.0s<--:-- | 23786.6 it/s
18:18:27 - INFO - FINISHED -> TRANSIENT (total steps: 200, successful: 200, runtime: 14.11 ms)
Python
Loading...

All three correlations agree well in their common validity range. The Wagner equation is typically preferred for high-accuracy work since it is constrained to reach the critical point.