The present program has the main goal of calculating isothermal-isobaric flash for multicomponent systems. With this code is possible to obtain:
* Molar fraction (liquid-vapour phases) in the equilibrium condition;
* Volumetric fraction at specific global molar fraction condition;
* Binary or ternary diagrams of phase equilibrium.
- main.py
- EoS.py
- PT_flash.py
- PH_flash.py
- Experimental_points.py
- Parameters.py
- Flash_calculation.py
- requirements.txt
1. The file main.py is the user-executable part of the program. The input parameters necessary for execution of program are:
-
Only flash calculations:
- T: Temperature (K)
- P: Pressure (Pa)
- z: Global molar composition
- Eos: Equation of state
- type: Type of flash (0 --> TP-flash; 1 --> PH-flash)
-
Plot generation:
- save: Save the plot in a folder called Output (1 --> Yes, other number --> No)
- use_Kij: Kij adjustment (0 --> Adjustment; other number --> No adjustment)
- Soave-Redlich-Kowng (SRK): Eos --> 0
- Peng-Robinson (PR): Eos --> 1
- PC-SAFT: Eos --> 2
3. PT_flash.py file is responsible for the equilibrium calculation to a specific pressure and temperature. The output of such algorithm are:
- Volumetric fraction at specific global molar fraction condition;
- Molar fraction (liquid-vapour phases) in the equilibrium condition.
4. PH_flash.py file is responsible for the equilibrium calculation to a specific pressure and enthalpy. The output of such algorithm are:
- Volumetric fraction at specific global molar fraction condition;
- Temperature (K)
OBS: This part of program still need some improvements.
5. Experimental_points.py contains some experimental phase equilibrium points for generating the plots and evaluate the code performance.
6. Parameters.py contains all necessary input parameters of each component for running the entire program.
7. Flash_calculation.py is the heart of entire program. Such part of the program is responsible for:
- Running PT and PH flash;
- Generating binary and ternary plots;
- Adjustment of binary interaction parameter (Kij).
8. requirements.txt is the list of all python extensions needed for running the code.To install such extensions use the command:
--> pip install -r requirements.txt