PhreeqcUsers Discussion Forum
Click here to donate to keep PhreeqcUsers open

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Mixing »
  • Flash simulation
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Flash simulation  (Read 333 times)

IliasBouchkira

  • Top Contributor
  • Posts: 39
Flash simulation
« on: May 15, 2023, 09:20:21 PM »
Hi everyone

Is there any examples in the forum on how to carry out a Flash calculation (vapor liquid equilibrium)? The purpose is to determine phases compositions and if possible partial pressures..

Many thanks in advance

Ilias
Logged

dlparkhurst

  • Top Contributor
  • Posts: 3081
Re: Flash simulation
« Reply #1 on: May 15, 2023, 10:00:13 PM »
I'm not sure whether you want to heat of cool your solution. Here is an example of water in equilibrium with halite that is heated to 150 C (in the absence of halite solid). The solution is in contact with a 1 liter gas head space. The resulting system has a pressure of 3.6 atm due to H2O(g) in the head space, and the solution is undersaturated with halite, so no halite precipitates.

Code: [Select]
SOLUTION
EQUILIBRIUM_PHASES 1
Halite 0 10
SAVE solution 1
END
USE solution 1
EQUILIBRIUM_PHASES 1
Halite 0 0
REACTION_TEMPERATURE
150
GAS_PHASE
-fixed_volume
-volume 1
H2O(g) 0
END
Logged

IliasBouchkira

  • Top Contributor
  • Posts: 39
Re: Flash simulation
« Reply #2 on: August 22, 2023, 10:06:25 AM »
Dear Dr

Many thanks for the response.

I have made this simple exemple for solubility of CO2(g) in NaCl. I am wondering if there is anyway to check vapor liquid equilibrium condition:

 φi yi fi0V = γi xi fi0L

with yi = mol fraction of i in the vapor phase, and fi0V = the vapor standard state fugacity (the fugacity of pure component vapor at T and P),  xi = mol fraction of i in the liquid phase, and fi0L = the liquid standard state fugacity.

Many thanks in advance

Ilias.



Code: [Select]

SOLUTION 1
    temp      25
    pH        7 Charge
    units     mol/kgw
    Na        1
    Cl        1   
   -water    1 # kg

GAS_PHASE 1
    -fixed_pressure
    -volume 1
    -temperature 25
    CO2(g)    1



REACTION_PRESSURE 1
    10 100 in 10 steps



Logged

dlparkhurst

  • Top Contributor
  • Posts: 3081
Re: Flash simulation
« Reply #3 on: August 22, 2023, 01:51:12 PM »
The Gas phase section of the output gives the pressure and volume of the gas phase and the pressures and fugacity coefficients of the gas phase components.

Code: [Select]
-----------------------------------Gas phase-----------------------------------

Total pressure:  1.00      atmospheres          (Peng-Robinson calculation)
    Gas volume:   3.41e-01 liters
  Molar volume:   2.43e+01 liters/mole
   P * Vm / RT:  0.99445  (Compressibility Factor Z)

                                                        Moles in gas
                                            ----------------------------------
Component         log P           P    phi     Initial       Final       Delta

CO2(g)             0.00   1.000e+00  0.994   4.110e-02   1.400e-02  -2.710e-02

The Saturation indices section of the output gives the fugacity and fugacity coefficient of the gas as calculated from the solution composition.

Code: [Select]
------------------------------Saturation indices-------------------------------

  Phase               SI** log IAP   log K(298 K,   1 atm)

  CH4(g)         -116.59   -119.40   -2.80  CH4
  CO2(g)           -0.00     -1.47   -1.47  CO2 Pressure   1.0 atm, phi 0.994
  H2(g)           -35.64    -38.74   -3.10  H2
  H2O(g)           -1.52     -0.02    1.50  H2O
  Halite           -1.92     -0.35    1.57  NaCl
  O2(g)           -12.05    -14.94   -2.89  O2

**For a gas, SI = log10(fugacity). Fugacity = pressure * phi / 1 atm.
  For ideal gases, phi = 1.
Logged

IliasBouchkira

  • Top Contributor
  • Posts: 39
Re: Flash simulation
« Reply #4 on: August 22, 2023, 02:24:19 PM »
Many thanks, I am wondering why I am not getting the Gas phase section in my results when using my code ?

Code: [Select]


SOLUTION 1
    temp      25
    pH        7 Charge
    units     mol/kgw
    Na        1
    Cl        1   
   -water    1 # kg

GAS_PHASE 1
    -fixed_pressure
    -volume 1
    -temperature 25
    CO2(g)    1



REACTION_PRESSURE 1
    10 100 in 10 steps




Logged

dlparkhurst

  • Top Contributor
  • Posts: 3081
Re: Flash simulation
« Reply #5 on: August 22, 2023, 06:52:05 PM »
I don't know either.
Logged

IliasBouchkira

  • Top Contributor
  • Posts: 39
Re: Flash simulation
« Reply #6 on: August 23, 2023, 10:56:31 AM »
Dear Dr. Many thanks for the answers,

I still can not check the vapor/liquid equilibrium as:

LHS (Left-hand side) for CO2:
LHS = φ_CO2 * y_CO2 * P = 0.978*2.723*1e-1*8.04 = 2,14E+00



RHS (Right-hand side) for CO2:
RHS = γ_CO2 * x_CO2 * f0L_CO2 = 10^(0.065)*7.3181e-2*0.978 =8,31E-02

Is it please the right way to check the equilibrium condition?

Many thanks in advance














Code: [Select]

-----------------------------------Gas phase-----------------------------------

Total pressure:  8.04      atmospheres          (Peng-Robinson calculation)
    Gas volume:   1.00e+00 liters
  Molar volume:   3.67e+00 liters/mole
   P * Vm / RT:  0.97730  (Compressibility Factor Z)

                                                        Moles in gas
                                            ----------------------------------
Component         log P           P    phi     Initial       Final       Delta

CO2(g)             0.91   8.040e+00  0.978   3.458e-01   2.723e-01  -7.348e-02

-----------------------------Solution composition------------------------------

Elements           Molality       Moles

C                 7.348e-02   7.348e-02
Cl                1.000e+00   1.000e+00
Na                1.000e+00   1.000e+00

----------------------------Description of solution----------------------------

                                       pH  =   3.616      Charge balance
                                       pe  =   4.000      Adjusted to redox equilibrium
      Specific Conductance (µS/cm,  95°C)  = 210339
                          Density (g/cm³)  =   1.00020
                               Volume (L)  =   1.06147
                        Activity of water  =   0.965
                 Ionic strength (mol/kgw)  =   1.000e+00
                       Mass of water (kg)  =   1.000e+00
                 Total alkalinity (eq/kg)  =  -3.304e-14
                       Total CO2 (mol/kg)  =   7.348e-02
                         Temperature (°C)  =  95.00
                           Pressure (atm)  =  8.04
                  Electrical balance (eq)  =  -5.426e-10
 Percent error, 100*(Cat-|An|)/(Cat+|An|)  =  -0.00
                               Iterations  =  24
                         Gamma iterations  =   4
                      Osmotic coefficient  =   0.94219
                         Density of water  =   0.96222
                                  Total H  = 1.110124e+02
                                  Total O  = 5.565318e+01

----------------------------Distribution of species----------------------------

                                                    MacInnes  MacInnes
                                MacInnes       Log       Log       Log    mole V
   Species          Molality    Activity  Molality  Activity     Gamma    cm³/mol

   H+              3.015e-04   2.420e-04    -3.521    -3.616    -0.096      0.00
   OH-             3.573e-09   1.921e-09    -8.447    -8.716    -0.269     -2.64
   H2O             5.551e+01   9.654e-01     1.744    -0.015     0.000     18.72
C(4)          7.348e-02
   CO2             7.318e-02   8.506e-02    -1.136    -1.070     0.065     38.47
   HCO3-           3.015e-04   1.389e-04    -3.521    -3.857    -0.337     27.69
   CO3-2           6.048e-10   4.051e-11    -9.218   -10.392    -1.174     -0.89
Cl            1.000e+00
   Cl-             1.000e+00   5.820e-01     0.000    -0.235    -0.235     18.17
Na            1.000e+00
   Na+             1.000e+00   6.826e-01     0.000    -0.166    -0.166      1.22

------------------------------Saturation indices-------------------------------

  Phase               SI** log IAP   log K(368 K,   8 atm)

  CO2(g)            0.90     -1.07   -1.97  CO2 Pressure   8.0 atm, phi 0.978
  H2O(g)           -0.10     -0.02    0.08  H2O
  Halite           -1.99     -0.40    1.59  NaCl
  Nahcolite        -3.44    -14.17  -10.74  NaHCO3
  Natron          -10.03    -10.88   -0.84  Na2CO3:10H2O
  Trona           -13.55    -24.93  -11.38  Na3H(CO3)2:2H2O

**For a gas, SI = log10(fugacity). Fugacity = pressure * phi / 1 atm.
  For ideal gases, phi = 1.


Logged

dlparkhurst

  • Top Contributor
  • Posts: 3081
Re: Flash simulation
« Reply #7 on: August 23, 2023, 03:35:32 PM »
Code: [Select]
Kh = a(CO2)/f(CO2) = a(CO2) / (phi(CO2)*P(CO2))

10^-1.97 = 0.0851/(0.978*8.04)

0.0107 = 0.0851 / 7.86 = 0.0108

More decimal places are needed to show that the equivalence is exact.
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Mixing »
  • Flash simulation
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines | Terms and Policies
  • XHTML
  • RSS
  • WAP2