-
Notifications
You must be signed in to change notification settings - Fork 39
CPA EoS in NeqSim
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.

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.
where

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

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)

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.
Peneloux proposed a simple correction for this by introducing a volume translation
where

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

- 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

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

Wiki:
- Getting started with NeqSim and GitHub
- Getting started as a NeqSim developer
- The NeqSim parameter database
Docs:
- Modules Overview
- Reference Manual Index
- Developer Setup
- Contributing Structure
- Getting Started Guide
- Usage Examples
- FAQ
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:
- Thermo Module Overview
- Thermodynamics Guide
- Fluid Creation Guide
- Component Database Guide
- Mathematical Models
Docs - Equations of State:
Docs - Flash & Operations:
- Flash Calculations Guide
- Flash Equations and Tests
- Thermodynamic Operations
- Thermodynamic Workflows
- Property Flash Workflows
Wiki: 8. Oil Characterization 9. Aqueous fluids 10. Electrolytes
Docs:
- Fluid Characterization
- TBP Fraction Models
- PVT Fluid Characterization
- Fluid Characterization Mathematics
Docs - Overview:
Docs - Specific Models:
- Viscosity Models
- Viscosity Models (Physical Properties)
- Density Models
- Thermal Conductivity Models
- Diffusivity Models
- Interfacial Properties
- Steam Tables IF97
- Humid Air Calculations
Wiki: 11. Process Calculations
Docs - Fundamentals:
- Process Module Overview
- Process Simulation Guide
- Advanced Process Simulation
- Logical Unit Operations
- Process Control
- Process Controllers
Docs - Advanced Process Logic:
- Process Logic Framework
- Process Logic Implementation
- Process Logic Enhancements
- Advanced Process Logic
- Runtime Logic Flexibility
- Integrated Workflow Guide
- Equipment Factory
- Process Calculator
- Graph-Based Process Simulation
- Parallel Process Simulation
- Recycle Acceleration Guide
- Differentiable Thermodynamics
- Derivatives and Gradients
Compressors & Turbomachinery:
- Compressor Calculations (Wiki)
- Compressor Curves (Wiki)
- Compressors
- Expanders
- Turboexpander Compressor Model
- Ejectors
Pumps:
Separation:
Heat Transfer:
Valves & Flow Control:
Tanks & Storage:
Streams & Mixers:
Reactors:
Wells:
Energy & Special Equipment:
Docs - Overview:
Docs - Single Phase Flow:
Docs - Two-Phase & Multiphase:
Docs - Pressure Drop & Friction:
Docs - Heat & Mass Transfer:
- Pipeline Heat Transfer
- Pipe Wall Heat Transfer
- Heat Transfer
- Interphase Heat Mass Transfer
- Mass Transfer
Docs - Transient Flow:
- Multiphase Transient Model
- Transient Multiphase Pipe
- Pipeline Transient Simulation
- Pipeline Model Recommendations
- Water Hammer Implementation
- Two-Phase Flow Development Plan
Docs - PVT Simulation:
Docs - Black Oil:
Docs - Gas Quality:
Docs - Asphaltene:
- Flow Assurance Overview
- Asphaltene Modeling
- Asphaltene CPA Calculations
- Asphaltene DeBoer Screening
- Asphaltene Method Comparison
- Asphaltene Parameter Fitting
- Asphaltene Validation
Wiki: 18. Dynamic process simulations
Docs:
Docs - Overview:
Docs - Relief & Blowdown:
- PSV Dynamic Sizing
- PSV Dynamic Sizing (Safety)
- Rupture Disk Dynamic Behavior
- ESD Blowdown System
- Fire Blowdown Capabilities
- Fire Heat Transfer Enhancements
Docs - HIPPS:
Docs - Safety Systems:
- Integrated Safety Systems
- SIS Logic Implementation
- Pressure Monitoring ESD
- PSD Valve HIHI Trip
- ESD Fire Alarm System
- Choke Collapse Protection
- Alarm System Guide
- Alarm Triggered Logic Example
- Integration Safety Chain Tests
- Process Safety Scenarios
Docs:
- Standards Overview
- ASTM D6377 RVP
- Dew Point Standards
- ISO 15403 CNG Quality
- ISO 6578 LNG Density
- ISO 6976 Calorific Values
- Sales Contracts
Docs:
Wiki: 15. How to make a NeqSim API
Docs - Overview:
Docs - AI/ML:
Docs - MPC & Control:
Docs - Risk & Safety:
Docs:
- Bottleneck Analysis
- Field Development Planning
- Field Development Engine
- Batch Studies
- Calibration
- Sustainability & Emissions
- Future Infrastructure
- Future API Reference
- Lifecycle Management
Wiki: 12. Adding a thermodynamic model 13. Adding a viscosity model 14. Adding a unit operation
Docs:
Wiki: 16. Create native image using GraalVM 17. Profiling calculations
Jupyter Notebooks:
- ESP Pump Tutorial
- PVT Simulation and Tuning
- MPC Integration Tutorial
- AI Platform Integration
- Graph-Based Simulation
Java Examples:
- Java Test Examples
- Flow Regime Detection
- Multiphase Pressure Drop Comparison
- Transient Pipeline Liquid Accumulation
- Well to Oil Stabilization
External: