Articles in this section

Creating a Basic Autoclave Simulation in OLI Flowsheet: ESP

Table of Contents

Introduction

Autoclave experiments are pivotal in corrosion studies, particularly when replicating high-temperature and high-pressure (HTHP) downhole environments. OLI Flowsheet: ESP enables researchers and engineers to simulate these systems precisely and efficiently, using thermodynamic rigor to define gas compositions, pressures, and chemical equilibria.

This guide provides a foundational walkthrough for users of OLI Flowsheet: ESP to set up a basic autoclave simulation, simulating the standard TM0177 test scenario.

Note: This example is based on OLI Flowsheet: ESP version 12.0.0.11. Functionality and interface elements may vary slightly in other versions.

Overview of the Autoclave Simulation Process in Five Steps

A typical autoclave simulation in OLI Flowsheet: ESP progresses through the following phases:

  1. Defining the Application Context – Understand the goal: determine the gas mixture required to achieve target partial pressures and pH without adding traditional pH adjusters.
  2. Unit Configuration – Ensure measurement units align with experimental needs for easy interpretation.
  3. Chemistry Model Setup – Establish the thermodynamic framework and chemical components.
  4. Process Construction – Add streams, unit operations/blocks (e.g., Mixer), and define compositions and conditions.
  5. Execution, Interpretation, and Refinement – Run simulations, analyze results, and apply control strategies to refine outputs.

Application Context - Basic Autoclave

Autoclaves are essential tools for corrosion testing under High Temperature, High Pressure (HTHP) conditions, enabling the simulation of downhole environments commonly encountered in oil and gas operations. Accurately reproducing these extreme conditions is inherently complex, with a primary objective being the preparation of a gas mixture that achieves the target partial pressures (or fugacities) of acidic gases (CO₂ and H₂S) at the specified final pressure.

Several industry standards guide autoclave testing, offering specifications for both aqueous phase composition and gas injection parameters. However, determining the precise gas composition needed to meet these targets requires more than static guidelines; it demands the application of thermodynamic modeling. This is where OLI Flowsheet: ESP comes into play, providing a robust platform for simulating the gas-liquid equilibrium necessary for accurate test setup.

The experimental setup referenced in this simulation is based on the TM0177 standard. The solution chemistry employed includes sodium chloride, acetic acid, and sodium acetate, carefully balanced to stabilize the system's pH at 3.5 without the need for additional pH adjusters. The target operating conditions of the autoclave are a final total pressure of 5,000 mbar, with CO₂ and H₂S partial pressures set at 500 mbar each. An inert nitrogen (N₂) carrier gas is used to make up the balance of the pressure.

The objective is to calculate the gas mixture composition necessary to charge the autoclave such that the final conditions, specifically the target partial pressures of CO₂ and H₂S, are achieved, along with the desired solution pH, without relying on external pH adjusters.

The final set up of the autoclave is shown in the figure below.

Step-by-Step Simulation Workflow

1. Defining Units

Accurate simulations start with appropriate units:

  • Go to the Units Manager (Edit Units).
  • For this example, we'll use Metric | Flowing | Mass Fraction. So, we change to: Metric > Flowing > Mass Frac.
  • Customize:
    • Total Flow: Liters/hr
    • Aqueous Composition: mg/L
    • Vapor Composition: mass%
    • Pressure, Partial Pressure, Fugacity: mbar

2. Creating the Chemistry Model

Set up the chemistry model with the following:

  • Framework: MSE-SRK (H3O+ ion)
  • Inflows: NaCl, CH3COOH (acetic acid), Na[C2H3O2] (sodium acetate), CO2, H2S, and N2
  • All default phases enabled (vapor, second liquid, solids)
  • No changes to REDOX or Kinetics tabs for this example

3. Building the Process

  1. Add a Mixer block from the Library panel.
  2. Add streams:
    • Solution B: The test water (Solution B) is a 5 wt% Sodium Chloride (NaCl), 2.5 wt% Acetic Acid (CH₃COOH), and 0.41 wt% Sodium Acetate (Na[C₂H₃O₂]) solution. The temperature for this stream is 25°C. This is the presumed temperature in the climate-controlled laboratory.
    • Gases: Initial CO2, H2S, and N2
    • Final Testing Conditions: outlet stream
  3. Define compositions and flow rates:
    • Solution B: 1 L at 25°C
    • Gases: initially estimated. Both the Total Flow and the Inflows of the Gases stream are assumed. We are guessing the total amount of gas in liters and its composition in mass %. The software will back-calculate the right values for us (and the steps to achieve this will be shown later).
  4. Set Mixer to Isochoric to simulate a constant-volume autoclave. Our example will be set to 25°C, initial guess of 1013.25 mbar, and a volume of 5 L/hr. The top of the panel contains the inlet and outlet streams sections. The "Equilibrium Calculation" section provides various calculation options. The default option is Adiabatic (mix of inflows) at the Minimum Inlet Pressure (the lowest pressure of the inlet streams). However, since autoclaves are constant volume vessels, the calculation type needs to be changed to Isochoric. The testing temperature and the volume of the vessel are known; hence, the pressure can be calculated.

4. Running the Simulation

Click Run (Simulate > Run) to converge the initial model. Now that we have a converged simulation, we can obtain some results. These may not be (and probably will not be) the final results, but it is a good idea to investigate our preliminary results to see if they are reasonable. For example, we expect our “Solution B” stream to have a pH value close to 3.5.

Interpretation of Preliminary Simulation Results

The preliminary results reveal a noteworthy outcome: the final pH of the solution remained nearly unchanged despite the introduction of acidic gases. This behavior suggests the presence of a buffering mechanism within the solution, which helps stabilize the pH under the given chemical conditions.

In terms of pressure, the final testing stream registered at 2456 mbar, which is significantly below the target total pressure, less than half of what is required. Further inspection of the vapor partial pressure table confirms that the simulated CO₂ and H₂S partial pressures fall well short of the goal, registering at less than 30% of the desired 500 mbar for each component.

These findings indicate that the current gas stream configuration is insufficient to meet the specified system conditions. To address this, modifications must be made to the gas composition and flow strategy. This adjustment will be implemented using the next simulation component, the Controller block, which allows for precise tuning to meet the required partial pressures and final system pressure.

5. Adding Controllers (for CO₂ Partial Pressure, H₂S Partial Pressure, and Total Pressure)

The Feedback Controllers are configured to adjust the Gases stream by adding or removing CO₂, H₂S, and N₂ to achieve the specified operating conditions. Specifically, the controllers target the partial pressures of CO₂ (PCO₂) and H₂S (PH₂S), as well as the total system pressure (PT). Upon convergence, the controllers override the initially assumed values for gas composition and flow, replacing them with the calculated values required to meet the simulation’s target conditions.

To refine gas inputs and match experimental requirements, add three Feedback Controllers:

  • PCO2 – Target: 500 mbar
  • PH2S – Target: 500 mbar
  • Total Pressure – Target: 5000 mbar

Each controller adjusts the gas stream to meet the specified target.

6. Viewing Results and Reporting

The final simulation results confirm that the system has successfully reached the desired testing conditions:

  • Total system pressure: 5000 mbar
  • Partial pressures: 500 mbar each for CO₂ and H₂S
  • Balance gases: Primarily N₂, with a small contribution from water vapor, complete the vapor phase composition.

The solution pH stabilizes near 3.5, indicating that the buffering system composed of sodium chloride, acetic acid, and sodium acetate is effectively maintaining the intended chemical environment.

To understand how these final conditions were achieved, it's important to examine the adjustments made to the Gases stream. In the Inflows section, the initially assumed gas composition values have been replaced by those calculated by the Feedback Controllers. The updated results indicate that a total of 16.4 L of gas is required, with the following mole fraction composition:

  • 4.0% CO₂
  • 5.2% H₂S
  • 90.8% N₂

This is the gas mixture that should be communicated to the gas supplier for preparation and delivery to the autoclave system.

Conclusion

This introductory autoclave case marks the successful completion of a basic corrosion testing simulation using OLI Flowsheet: ESP. The example served both as a demonstration of the fundamental workflow for building, running, and converging an autoclave test.

The case focused on a straightforward scenario: loading the autoclave with testing water (Solution B) and introducing a gas mixture into the headspace at ambient temperature to simulate a controlled 5 L autoclave environment. Using the isochoric calculation approach, the software determined the precise quantities and composition of the gases required to achieve the target testing conditions.

The final result showed that 16.4 L of gas mixture, comprising 4.0% CO₂, 5.2% H₂S, and 90.8% N₂ by mole, was necessary to reach the specified 5000 mbar total pressure, with CO₂ and H₂S each at 500 mbar partial pressure, and maintain the solution pH near 3.5.

This basic autoclave simulation highlights the power of OLI Flowsheet: ESP to model complex aqueous-gas systems. Through precise control of chemistry, pressure, and thermodynamic conditions, users can confidently and accurately configure real-world scenarios.

For more information, please contact OLI support.

Was this article helpful?
0 out of 1 found this helpful