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

Calculator : TEMA Shell-and-Tube HX Sizing
Category   : Exchangers

Files Included:
  - shell_tube_tema.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 shell_tube_tema.f90 -o shell_tube_tema

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

  shell_tube_tema < 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 (Shell Type (1=E, 2=F, etc.)
): 1
  Line 2 (Tube Layout (1=Triangular, 2=Square)
): 2
  Line 3 (Tube Pass Count (1, 2, 4, 6)
): 1
  Line 4 (Hot fluid inlet temp Thi [°C]
): 90.0
  Line 5 (Hot fluid outlet temp Tho [°C]
): 40.0
  Line 6 (Cold fluid inlet temp Tci [°C]
): 20.0
  Line 7 (Cold fluid outlet temp Tco [°C]
): 35.0
  Line 8 (Hot fluid mass flow rate mh [kg/s]
): 2.0
  Line 9 (Cold fluid mass flow rate mc [kg/s]
): 3.0
  Line 10 (Hot fluid density [kg/m3]
): 990.0
  Line 11 (Hot fluid specific heat [J/kg-K]
): 4180.0
  Line 12 (Hot fluid dynamic viscosity [Pa-s]
): 0.0008
  Line 13 (Hot fluid thermal conductivity [W/m-K]
): 0.6
  Line 14 (Cold fluid density [kg/m3]
): 998.0
  Line 15 (Cold fluid specific heat [J/kg-K]
): 4180.0
  Line 16 (Cold fluid dynamic viscosity [Pa-s]
): 0.001
  Line 17 (Cold fluid thermal conductivity [W/m-K]
): 0.6
  Line 18 (Tube outer diameter [m]
): 0.01905
  Line 19 (Tube wall thickness [m]
): 0.00165
  Line 20 (Active tube length [m]
): 3.0
  Line 21 (Tube pitch [m]
): 0.02381
  Line 22 (Baffle spacing [m]
): 0.15
  Line 23 (Hot fluid fouling factor [m2-K/W]
): 0.0002
  Line 24 (Cold fluid fouling factor [m2-K/W]
): 0.0002
  Line 25 (Tube wall thermal conductivity [W/m-K]
): 50.0
  Line 26 (Shell-side fluid selection (1=Hot fluid in shell, 2=Cold fluid in shell)): 1

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