💻 Fortran Source Code Library

We currently offer 172 open-source, production-grade Fortran codes for offline testing. Run calculations locally on your own machine, view code structure, read technical explanations, and download compilation packages including sample input files.

Steam Table Calculator (IAPWS-IF97)

Core Numerical Engine in Fortran 90 • 38 total downloads

steam.f90 / steam_calc.f90
! Error: Source file steam.f90 not found on server.

! Error: Source file steam_calc.f90 not found on server.

Solver Description

Calculate high-precision thermodynamic and transport properties of water and steam (liquid, vapor, mixture, supercritical) using the IAPWS-IF97 standard.

Key Numerical Methods & Architecture

  • Input Redirection: Reads parameters sequentially from standard input (`stdin`) using Fortran sequential read (`read(*,*)`), ensuring modular integration.
  • Modular Design: Formulated using pure mathematical routines, separation of equations from output formatting, and precise numerical solvers (e.g. bisection, Newton-Raphson).
  • Standard Compliant: Written in clean, standards-compliant Fortran 90 to ensure cross-compiler compatibility.

🛠️ Local Compilation

To test this code on your machine, compile the source code file(s) using a standard Fortran compiler (e.g., `gfortran`).

Compilation Command:

gfortran -O3 steam.f90 steam_calc.f90 -o steam_calc

Execution Command:

Execute the program by feeding the sample input file into the program using stdin redirection:

steam_calc < input.txt

📥 Downloads & Local Files

Preview of the required input file (input.txt):

! Input parameter type (1=T/P, 2=T/x, 3=P/x, 4=T/h, 5=P/h, 6=P/s, 7=h/s)\nFirst input value (T [C] or P [MPa] or h [kJ/kg])\nSecond input value (P [MPa] or x [0-1] or h [kJ/kg] or s [kJ/kg-K])
1
! Parameter 2
100.0
! Parameter 3
0.1