Table of Contents
- Introduction
-
Steps to Configure the OLI Engine
- 1. Access the Fluid Packages Section
- 2. Select the OLI Electrolytes Option
- 3. Launch the Internal Chemistry Builder
- 4. Select the OLI Engine Thermodynamic Framework
- 5. Add Components to the Chemistry Model
- 6. Define Additional Chemistry Settings
- 7. Exit the Chemistry Builder
- 8. Finalize the Fluid Package
- 9. Run the Simulation
- Storing the .DBS File Externally
- Using a Custom Database / External Databank
- Troubleshooting
- Key Considerations
- Conclusion
Introduction
The OLI Engine is a powerful tool within Petro-SIM by KBC (a Yokogawa company) that enables users to model complex electrolyte systems, providing accurate predictions for water chemistry, scaling risks, corrosion, and other electrolyte-related phenomena.
There are two options for Petro-SIM to use an OLI databank (.dbs file) for the OLI Engine: Petro-SIM's internal Chemistry Builder or the external OLI Chemistry Wizard. This article focuses primarily on Petro-SIM's internal Chemistry Builder. For more information about the OLI Chemistry Wizard, see this article.
Note: This guide outlines the steps to set up and use the OLI Engine version 12.0 in Petro-SIM version 7.4, assuming familiarity with the software. For this example, OLI Engine version 11 and above and Petro-SIM version 7.2 and above are required.
Steps to Configure the OLI Engine
1. Access the Fluid Packages Section
- Open your Petro-SIM simulation file.
- Navigate to the Basis tab in the simulation environment.
- Under the Fluid Packages section, click Add to create a new fluid package.
2. Select the OLI Electrolytes Option
- From the list of available property package types, choose OLI Electrolytes. This option enables the use of the OLI thermodynamic framework for electrolyte modeling.
- You have the option to import a .dbs file (such as from OLI Chemistry Wizard for Petro-SIM) or use Petro-SIM's internal Chemistry Builder. This section will continue with Petro-SIM's internal Chemistry Builder. For more information about the OLI Chemistry Wizard, check out this article.
3. Launch the Internal Chemistry Builder
- After selecting OLI Electrolytes, if you have multiple OLI Engine versions, select the desired OLI Engine version in the OLI Version dropdown. This example uses OLI Engine 12.0.
- If you encounter a license issue, press the About OLI (?) button
- This will open the About OLI Engine in PetroSim dialog. From here, you can update the license information, similar to what is done in this Support Center article.
- If you encounter a license issue, press the About OLI (?) button
- Press the Launch the Chemistry Builder button. This will open the internal Chemistry Builder interface to OLI Engine in Petro-SIM, which allows you to configure the thermodynamic framework and define the chemistry for your simulation.
4. Select the OLI Engine Thermodynamic Framework
- In the Chemistry Builder, choose the appropriate OLI thermodynamic framework that matches your process requirements. The most commonly used frameworks include:
- MSE (Mixed-Solvent Electrolyte): Ideal for high concentrations and mixed-solvent systems.
- AQ (Aqueous): Suitable for dilute aqueous solutions.
- Ensure the selected framework aligns with the chemistry of the process you are modeling. We'll use MSE (H3O+ ion) for this example. Press Next >.
5. Add Components to the Chemistry Model
- The next screen is the Selected Components page. Note: Water is always selected as the first choice and cannot be removed. Its databank source shows PUB, but it is in fact using the Thermodynamic Framework databank we chose in the previous step (MSE).
- Select the components relevant to your simulation by pressing Add. This will open the Add Component screen.
- You can add components by searching for them in the database in the Match field. In this example, we'll search for NH3. Double-click "Ammonia" or your component to add it to the Selected Components list or click the Add Selected Component button.
- On the Components screen, to add hypothetical or pseudo components, press Hypothetical. This will open the Hypothetical Components Available screen. From here, you can add a hypothetical group or individual hypothetical components. In many instances, it will suffice to simply add the hypothetical group HypoGroup1 and then delete the hypo NBP components that aren't used for an assay. For this example, we'll add the HypoGroup1 by selecting it and pressing Add Group and Close.
You may notice that the hypo components will show their source databank as PS. - Verify that all necessary components are included to accurately represent the chemical system and press Next >. For this example, we added the following components and group:
- H2
- O2
- N2
- CO
- CO2
- Methane
- Ethane
- Propane
- Isobutane
- n-Butane
- Isopetnane
- n-Pentane
- H2S
- HCl
- NH3
- 20Aminoethanol (MEXH)
- Diethylenetriamine (DETA)
- HypoGroup1
6. Define Additional Chemistry Settings
- Configure any additional chemistry settings, such as:
-
Redox Reactions: Specify if redox reactions are relevant to your process. For this example, we'll keep unchecked.
-
Phases and Precipitation: Ensure that the phases and precipitation of solids is enabled if necessary. For this example, we'll check Second Liquid to include the organic hydrocarbon phase.
-
Redox Reactions: Specify if redox reactions are relevant to your process. For this example, we'll keep unchecked.
7. Exit the Chemistry Builder
- Once the chemistry setup is complete, press Finish.
- You should be brought back to the Simulation Basis Manager screen with this newly added OLI Electrolytes property package.
8. Finalize the Fluid Package
- Review the fluid package details to ensure the OLI chemistry is properly configured.
- If you wish to rename the property package, highlight it and press View. This will open the property package settings. In the Name field, change the name from "Basis-..." to your desired name. For this example, we renamed it to OLI Electrolytes-1.
- The Simulation Basis Manager will show the updated name.
- If you wish to rename the property package, highlight it and press View. This will open the property package settings. In the Name field, change the name from "Basis-..." to your desired name. For this example, we renamed it to OLI Electrolytes-1.
- Assign the fluid package to the relevant simulation FlowSheets or unit operations within Petro-SIM.
- You can press Return to Simulation Environment to start using the OLI electrolytes property package in Petro-SIM.
9. Run the Simulation
- Proceed with your simulation as usual. The OLI Engine will now provide thermodynamic and electrolyte chemistry calculations for the defined system of streams and unit ops with their Fluid Package set to our defined OLI Electrolytes-1 package.
- Review the simulation results, including phase behavior, pH, scaling tendencies, and other electrolyte-specific properties.
Storing the .DBS File Externally
If you want to save your .DBS file to use the custom databank in another Petro-SIM file, you can press the "Store the DBS file externally" button to externally save the database.
This will open a "Store OLI File" save dialog. You can save the .dbs file with a different name than the default "Created in Petro-SIM.dbs" file name and to the desired location on your computer. This screenshot shows the file name changed to "UserDatabank1.dbs."
Once "Save" is pressed, you will be taken back to the Fluid Package screen.
You can find your saved .dbs file in the directory you specified.
You can now use this custom databank in other Petro-SIM simulation files.
Using a Custom Database / External Databank
To use an externally saved custom database, such as from a previously saved Petro-SIM file or from OLI Chemistry Wizard, press the Browse for DBS file open button in the Fluid Package screen with OLI Electrolytes selected as the property package.
This will open the OLI File Browse window. Select your desired custom .dbs database and press Open.
This will take you back to the Fluid Package screen. The file path name will appear in the top line.
You can press View to see the components in this databank.
You can exit the Component List, Fluid Package, and Simulation Basis Manager screens to return to the PFD. You can proceed with using this custom databank in Petro-SIM.
Troubleshooting
When connecting a stream and unit operation with different fluid packages, Petro-SIM will use a Stream Cutter. It is recommended to use the T-P flash transfer basis to avoid enthalpy or vapor fraction calculation issues between the Petro-SIM package and OLI Engine package.
Key Considerations
- Compatibility: Ensure that the OLI Engine license is active and properly configured for use within Petro-SIM.
- Component Selection: Verify that all components needed for your simulation are available in the selected OLI thermodynamic framework. Missing components may lead to incomplete or inaccurate results.
- Validation: Always validate your simulation results by comparing them with experimental data or known benchmarks, especially when using custom configurations.
Conclusion
By following these steps, you can effectively integrate the OLI Engine into your Petro-SIM simulations to model complex electrolyte chemistry. The internal Chemistry Builder provides a user-friendly interface for selecting thermodynamic frameworks and defining the chemistry of your process. With the OLI Engine, Petro-SIM users can achieve accurate and reliable predictions for electrolyte-related phenomena, enabling better decision-making and process optimization.
An OLI Engine V12 for Petro-SIM: Getting Started User Guide is available here.
An introduction and overview of using OLI Chemistry Wizard is available here.
For more information or troubleshooting, consult the OLI Systems or Petro-SIM documentation (Petro-SIM 7.1, Petro-SIM 7.2) or reach out to OLI technical support or KBC Petro-SIM support.