=========================================================================
  ThermoFluidCalc — Offline Fortran Execution Guide
=========================================================================

Calculator : Safety & Relief Valve Sizing
Category   : Tools

Files Included:
  - relief_valve.f90 (Fortran Source Code)
  - input.txt (Pre-configured Sample Input)

-------------------------------------------------------------------------
1. How to Compile
-------------------------------------------------------------------------
Make sure you have a Fortran compiler installed (like gfortran).
Run the following compilation command in your terminal:

  gfortran -O3 relief_valve.f90 -o relief_valve

-------------------------------------------------------------------------
2. How to Execute
-------------------------------------------------------------------------
Run the compiled binary and redirect the input.txt file into stdin:

  relief_valve < input.txt

-------------------------------------------------------------------------
3. Input File Details
-------------------------------------------------------------------------
The input file 'input.txt' contains sequential parameters separated by
newlines. Here is the structure of the included 'input.txt':

  Line 1 (Service type (1=Gas/Vapor, 2=Steam, 3=Liquid)): 1
  Line 2 (Set pressure Ps [kPa(g)]): 700.0
  Line 3 (Back pressure Pb [kPa(g)]): 0.0
  Line 4 (Design temperature T [K] (or [C] for steam)): 400.0
  Line 5 (Molar mass MW [g/mol]): 28.0
  Line 6 (Specific heat ratio k (cp/cv)): 1.4
  Line 7 (Required mass flow rate W [kg/h]): 5000.0
  Line 8 (Fluid density [kg/m3] (for liquids)): 0.0
  Line 9 (Dynamic viscosity [cP] (for liquids)): 0.0
  Line 10 (Overpressure allowance [%]): 10.0
  Line 11 (Discharge coefficient Kd (0=default)): 0.0
  Line 12 (Backpressure correction Kb (0=default)): 0.0

=========================================================================
ThermoFluidCalc — https://thermofluidcalc.com
