Skip to content

This repository contains isotermic and isenthalpic flash calculation, using Soave-Redlich-Kwong; Peng-Robinson and PC-SAFT (without associating contribution)

Notifications You must be signed in to change notification settings

caio-ramos/Flash-calculation

Repository files navigation

Flash-calculation

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.

The structure of code is divided into:

  1. main.py
  2. EoS.py
  3. PT_flash.py
  4. PH_flash.py
  5. Experimental_points.py
  6. Parameters.py
  7. Flash_calculation.py
  8. requirements.txt

Explanation of each file:

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)

2. EoS.py is the file which equations of state are implemented. The equations are:

  • 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 

About

This repository contains isotermic and isenthalpic flash calculation, using Soave-Redlich-Kwong; Peng-Robinson and PC-SAFT (without associating contribution)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages