Skip to content
Even Solbraa edited this page Mar 10, 2023 · 29 revisions

The CPA-EoS

An example of using the the CPA-EoS from NeqSim is given in the following python script. The default CPA-EoS will be the version from Statoil.

import neqsim
from neqsim.thermo.thermoTools import fluid, TPflash
from neqsim.thermo import dataFrame

system = fluid('cpa')
system.addComponent('methane', 0.5, 'mol/sec')
system.addComponent('water', 0.5, 'mol/sec')
system.setMixingRule(10) # Composition dependent and temperature dependent mixing rule
system.setPressure(10.0, 'bara')
system.setTemperature(25.0, 'C')

TPflash(system)

dataFrame(system)

A dataframe with the results of the calculations will be displayed.

image

The sCPA-SRK-EoS

The cubic-plus-association (CPA) equation of state combines the Soave–Redlich–Kwong equation with the association term from SAFT based on Chapman's extensions and simplifications of a theory of associating molecules due to Michael Wertheim. The development of the equation began in 1995 as a research project that was funded by Shell, and in 1996 an article was published which presented the CPA equation of state.

$$ P = \frac{RT}{(V - b)} - \frac{a}{V (V + b)} + \frac{RT}{V} \rho \sum_{A} \left[ \frac{1}{X^\text{A}} - \frac{1}{2} \right] \frac{\partial X^\text{A}}{\partial \rho} $$

where $$\alpha = \left(1 + (0.480 + 1.574\cdot\omega - 0.176\cdot\omega^2) (1-\sqrt{T_r})\right)^2$$ $$a = \frac{1}{9(\sqrt[3]{2}-1)}\cdot \frac{R^2, {T_c}^2}{P_c} = 0.42748\cdot \frac{R^2\cdot {T_c}^2}{P_c}$$ $$b = \frac{\sqrt[3]{2}-1}{3}\cdot \frac{R\cdot T_c}{P_c} = 0.08664\cdot \frac{R\cdot T_c}{P_c}$$

image

where V is the molar volume, XAi is the fraction of A-sites of molecule i that are not bonded with other active sites, and xi is the mole fraction of component i. The letters i and j are used to index the molecules, whereas the letters A and B indicate the bonding sites on a given molecule.

The term Ξ”AiBj, which is the association (binding) strength between site A on molecule i and site B on molecule j is given by

image

where Ξ΅AiBj and Ξ²AiBj are the association energy and volume of interaction between site A of molecule i and site B of molecule j, respectively, and g(Vm)ref is the contact value of the radial distribution function for the reference fluid (i.e., a fluid of hard spheres, meaning that only repulsive forces are present).

The Radial Distribution Function is given as (for the sCPA EoS)

image

The sCPA-SRK-EoS-statoil

Parameters in the sCPA-SRK-EoS-statoil

To improve the flexibility and accuracy of the sCPA-EoS, some modifications have been done to the model:

  • Mathias–Copeman term for the alpha function
  • Volume correction for liquid density
  • Composition and temperature dependent mixing rule

The original Ξ±-function has been replaced by the function of Mathias–Copeman.

$$ \alpha(T_r) = \left[1 + c_1 \left(1 - \sqrt{T_r}\right) + c_2 \left(1 - \sqrt{T_r}\right)^2 + c_3 \left(1 - \sqrt{T_r}\right)^3 \right]^2. $$

Peneloux proposed a simple correction for this by introducing a volume translation

$$V_{\text{m},\text{SRK}} = V_\text{m} + c$$

where $c$ is an additional fluid component parameter that translates the molar volume slightly.

image

The binary interaction parameters and mixing rules are composition dependent and temperature dependent. There is one symmetric parameter Aij , and one a-symmetric parameter, Bij

image

Parameters in the sCPA-SRK-EoS-statoil

  • Mathias Copeman Parameters

To improve vapour pressure predictions for TEG, the folloing C1, C2 and C3 have been used.

C1: 0.903477158616734

C2: 1.514853438

C3: -1.86430399826

  • Volume correction parameters image

image

For components with a given RacketZ different from 0 (some polar components), the volcorr is calculated based on the RacketZ factor based on the above formula.

  • Mixing Rule parameters image

image

Se Excel sheet and Access database with all parameters.

πŸš€ Getting Started

Wiki:

  1. Getting started with NeqSim and GitHub
  2. Getting started as a NeqSim developer
  3. The NeqSim parameter database

Docs:


πŸ§ͺ Thermodynamics

Wiki: 4. Setting up a fluid and flash calculations 5. Select EOS and mixing rule 6. Flash and phase envelope calculations 7. Thermodynamic and physical properties

Docs - Fundamentals:

Docs - Equations of State:

Docs - Flash & Operations:


πŸ›’οΈ Fluid Characterization

Wiki: 8. Oil Characterization 9. Aqueous fluids 10. Electrolytes

Docs:


πŸ”¬ Physical Properties

Docs - Overview:

Docs - Specific Models:


βš™οΈ Process Simulation

Wiki: 11. Process Calculations

Docs - Fundamentals:

Docs - Advanced Process Logic:


πŸ”§ Equipment Models

Compressors & Turbomachinery:

Pumps:

Separation:

Heat Transfer:

Valves & Flow Control:

Tanks & Storage:

Streams & Mixers:

Reactors:

Wells:

Energy & Special Equipment:


🌊 Pipeline & Multiphase Flow

Docs - Overview:

Docs - Single Phase Flow:

Docs - Two-Phase & Multiphase:

Docs - Pressure Drop & Friction:

Docs - Heat & Mass Transfer:

Docs - Transient Flow:


πŸ“Š PVT & Black Oil

Docs - PVT Simulation:

Docs - Black Oil:

Docs - Gas Quality:


🧊 Flow Assurance

Docs - Asphaltene:


⚑ Dynamic & Transient Simulation

Wiki: 18. Dynamic process simulations

Docs:


πŸ›‘οΈ Safety & Relief Systems

Docs - Overview:

Docs - Relief & Blowdown:

Docs - HIPPS:

Docs - Safety Systems:


πŸ“ Standards & Quality

Docs:


πŸ“ˆ Statistics & Parameter Fitting

Docs:


πŸ”Œ Integration & APIs

Wiki: 15. How to make a NeqSim API

Docs - Overview:

Docs - AI/ML:

Docs - MPC & Control:

Docs - Risk & Safety:


🏭 Optimization & Planning

Docs:


πŸ› οΈ Extending NeqSim

Wiki: 12. Adding a thermodynamic model 13. Adding a viscosity model 14. Adding a unit operation

Docs:


⚑ Performance & Deployment

Wiki: 16. Create native image using GraalVM 17. Profiling calculations


πŸ“š Examples & Tutorials

Jupyter Notebooks:

Java Examples:

External:


πŸ”— Quick Links

Clone this wiki locally