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

Calculator : Membrane Separation Diffusion
Category   : Masstransfer

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

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

  membrane_diffusion < 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 (Membrane Model (1=Dense Solution-Diffusion, 2=Porous Knudsen, 3=Mixed Resistance)): 1
  Line 2 (Membrane thickness delta [m]): 1.0e-6
  Line 3 (Membrane area A [m2]): 1.0
  Line 4 (Temperature [C]): 25.0
  Line 5 (Feed pressure [bar]): 5.0
  Line 6 (Permeate pressure [bar]): 1.0
  Line 7 (Feed mole fraction A): 0.15
  Line 8 (Permeate mole fraction A): 0.80
  Line 9 (Feed mole fraction B): 0.85
  Line 10 (Permeate mole fraction B): 0.20
  Line 11 (Diffusivity A [m2/s]): 1.0e-10
  Line 12 (Solubility A [mol/m3-Pa]): 3.0e-2
  Line 13 (Diffusivity B [m2/s]): 2.0e-11
  Line 14 (Solubility B [mol/m3-Pa]): 5.0e-3
  Line 15 (Pore radius rp [m]): 50e-9
  Line 16 (Porosity epsilon): 0.35
  Line 17 (Tortuosity tau): 3.0
  Line 18 (Molar mass A [g/mol]): 44.01
  Line 19 (Molar mass B [g/mol]): 28.014
  Line 20 (Feed molar flow rate [mol/s]): 1.0

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