OLI Chemistry Model

From SysCAD Documentation
Jump to navigation Jump to search

NOTE: This is a LEGACY model, available in the current build for backwards compatibility. It is being phased out and may have limited functionality. Documentation may be outdated. Please consider changing to the most recent version of the model.

Navigation: Models ➔ TCE Models ➔ OLI Chemistry Model

Related Links: OLI Legacy Example Project


General Description

The model is for the definition and configuration of the OLI Chemistry model to be used in SysCAD. The two main functions are to select a Chemistry Model File (*.dbs) previously define in OLI software; and then for the selected Chemistry model 'map' OLI species to SysCAD species used in the project. This allows the other OLI models in SysCAD to convert the SysCAD species flow data to OLI species data and use the OLI functionality to calculate aqueous equilibrium data.

The model does not do any calculations and has no process links to any other models in SysCAD flowsheets. Its sole purpose is for management and configuration of a selected OLI Chemistry Model, other unit models performing OLI calculations will reference this model. Therefore, this model is essential if the user wishes to use the OLI functionality in SysCAD.

The user must use OLI software to setup an OLI Chemistry Model file before initialising the SysCAD OLI Chemistry Model. See Referenced File for instructions to create this file.

NB The user MUST have a valid OLI Engine license to make use of the OLI functionality in SysCAD. Please see http://www.olisystems.com/ for more information.

Referenced File

The file that will be referenced by the SysCAD OLI Chemistry Model is the OLI Chemistry Model Database file created in OLI, e.g. NickelSpecies.dbs.

To generate an "OLI Chemistry Model" perform the following steps in OLI Studio:

  • Create a stream in a new project or for an existing OLI project (*.oad) file.
  • Select MSE or AQ databank.
  • On the Definition tab, add the components of interest.
  • Run an isothermal single point calculation.
  • If File Viewer tab is not visible, select menu Tools|Options. Then for Plug-Ins select the "OLI File Viewer" option and press OK.
  • On the File Viewer tab, for "File Type" select "Generated Model File". Push "Save File" button which will prompt to save a file with .dbs extension. This is the file required by SysCAD.

Notes:

  1. This file is essential for the OLI Chemistry Model to function.
  2. The file can be saved at any location - it does not have to be saved in the SysCAD project.

Diagram

OLI Chemistry Model.png

The diagram shows the default drawing of an OLI Chemistry Model.

Inputs and Outputs

There are no connections to this unit.

Model Theory

OLI requires a defined InFlow which includes compound (not species, no phase) composition. At the given conditions (temperature, pressure), OLI returns an OutFlow which includes a species composition.

The OLI Chemistry Model defines the mapping of SysCAD species to OLI compounds to define the required InFlow, and the mapping of OLI species in the OutFlow to SysCAD species.

Notes:

  • Some automatic mapping functions are available to match species based on molecular weights.
  • Users can also manually adjust the mappings by selecting matching compounds/species from dropdown lists.
  • SysCAD species can be selected to bypass the OLI calculations by excluding them from the defined OLI InFlow.
  • OLI solid species can also be excluded from being formed as part of the OLI OutFlow.

Workflow

The suggested workflow for configuring the model is:

  1. On the OLIChemModel tab page, browse for required .dbs file.
  2. On the OLIChemModel tab page, press the Init and Load button to initialise the model and load the .dbs file.
  3. Map the OutFlow from OLI to SysCAD species on the Sol, Liq and Vap tab pages. The simplest way to do this is to press the Using MW button.
  4. Map the SysCAD species to the OLI InFlow on the InFlow tab page. The simplest way to do this is to press the OutFlow To InFlow button.

Once these steps are performed and the mappings are checked, the project can be run. Any OLI Sample Models or OLI Reactors referencing this OLI Chemistry Model will use the mappings defined.

Whenever the project is reopened, step 2 (Init and Load) will need to be performed before a run is commenced.

Data Sections

The tabs and variable names are described in detail in the following tables.

  1. OLIChemModel tab - This first tab contains general information relating to the unit.
  2. InFlow tab - This tab requires the user to map the SysCAD species to the appropriate OLI species, so the SysCAD stream composition can be sent to OLI.
  3. OutFlowS tab - This tab requires the user to map the OLI Solid species to the appropriate SysCAD Solid species, so the OLI stream composition can be converted to a SysCAD stream.
  4. OutFlowL tab - This tab requires the user to map the OLI Liquid species to the appropriate SysCAD Liquid species, so the OLI stream composition can be converted to a SysCAD stream.
  5. OutFlowV tab - This tab requires the user to map the OLI Vapour species to the appropriate SysCAD Vapour species, so the OLI stream composition can be converted to a SysCAD stream.
  6. Ionic tab - This tab lists the OLI Liquid Ionic Output Species (True Species).
  7. Parms tab - This tab lists the OLI property names and their equivalent names in SysCAD.
  8. Info tab - contains general settings for the unit and allows the user to include documentation about the unit and create Hyperlinks to external documents.

OLI Chem Model tab page

Unit Type: OLIChemModel - The first tab page in the access window will have this name.

Tag (Long/Short) Input / Calc Description/Calculated Variables / Options

Common Data on First Tab Page

OLI

InUse Display Displays if the OLI license is currently being used by SysCAD. If Chemistry Model is currently initialised (refer to Status field), then OLI license will be in use.
LastInitStatus Display The status of the unit after the last attempt at initialisation. If the model was initialised correctly, then the Status = OK. Otherwise, it will display an error.
MakeThreadSafe Tickbox If this box is ticked, then OLI will only be called from a single model at one time to prevent possible problems with accessing it multiple times at once. It is strongly recommended that this option remains ticked.
InitLoadMethod Manual The model will need to be initialised and database loaded manually prior to a run by either pressing the OLI Init.png button followed by the Load.png button, or by simply pressing the Init and Load.png button.
On Project Load The model will automatically be initialised and database loaded when the project is opened. This means the OLI license will be in use as soon as the project is opened.
On Solve The model will automatically be initialised and database loaded when the project is run. The database will be unloaded and OLI license will be released once the run is completed.
AllowSolveWithError Tickbox If this box is ticked, then the unit will attempt to map the species without first checking for a valid OLI license or initialising the unit.
Init.LogMessages Tickbox If this box is ticked, then the user will receive detailed messages in the Messages Window about the initialisation checks performed and their outcome.
Init OLI Init.png If the user clicks on the 'OLI Init' button, then it will initialise the model.
Exit OLI Exit.png If the user clicks on the 'OLI Exit' button, then the OLI license will be released and the user will need to initialise the model and load the database before the next run.
About OLI About.png If the user clicks on the 'OLI About' button, then they will see a dialog window with information about their OLI system and license.
ModelChangeCount Display Only relevant if there is more than one Chemistry Model in the project. The number of times SysCAD has changed between different Chemistry Models. OLI only allows one to be used at a time so if more than one Chemistry Model is in use, then SysCAD will have to keep changing. It is reset to zero at the beginning of a run.
TotalCalcCount Display The number of calculations that have been performed mapping the OLI species data to the SysCAD species data. The mappings are required for other units such as the OLI Sample Model and OLI Reactor. This is cumulative and may include multiple iterations. It is reset to zero at the beginning of a run.
TotalCalcTime Display The cumulative amount of time used to map the OLI species to the SysCAD species. This is cumulative and may include multiple runs.
AverageCalcTime Display The average amount of time required to map the OLI species to the SysCAD species for this unit. AverageCalcTime = TotalCalcTime/TotalCalcCount.

OLI ChemModel Definition

ChemModel...
Status OK The model has been initialised correctly and the database file has been found and loaded correctly.
Init Required The model needs to be initialised.
ChemModel Load Required The database needs to be loaded.
OLI DLL or Version Error There is a problem with the OLI DLL or version.
Init Failed The model initialisation has been attempted but failed.
FileName Input This is the name of the database file that was created by OLI, e.g. NickelSpecies.dbs
Folder Display The folder where the database file shown above is saved.
Browse Browse.png Click on this button to browse to the required database file.
Load Init and Load.png
Load.png
Click on this button to load the required database file. If the model has not been initialised, then the button will show "Init and Load" and when pressed the model will first be initialised and then the database file will be loaded.
LastLoadStatus Display The status of the unit after the last attempt at loading the database. If the database file has been found and loaded correctly, then the Status = OK. Otherwise, it will display an error.
Framework Display The framework used in OLI when generating the database file. For example, MSE or Aqueous.
RedoxEnabled Tickbox This will be enabled or not, depending on if the Redox option was enabled in the OLI project.
InFlow.Count Display The number of components available in the OLI database for InFlow mapping. These are shown in the OLI_Name dropdown list on the InFlow tab page.
Sol.Count Display The number of solid species available in the OLI database. These are shown on the Sol tab page.
Liq.Count Display The number of liquid species available in the OLI database. These are shown on the Liq tab page.
Vap.Count Display The number of gas, or vapour, species available in the OLI database.These are shown on the Vap tab page.
Parm.Count Display The number of parameters available in the OLI database. These are shown on the Parameters tab page.
SolidScales.Count Display The number of OLI solid species that can have solid scales calculated.

Species Mapping

SpMapping...
MWRelTol Input The relative tolerance for the acceptable difference between the Molecular Weights of the OLI species and the SysCAD species. The default is 1e-4.
LiqAqOnly Tickbox If this box is ticked, then only the aqueous species in the SysCAD liquid phase will be used for the mapping when using the Liq.TryMap automatic mapping function.
InFlow.Bypass.Count Display The number of SysCAD species that are bypassed. The percentage is based on the total number of SysCAD species in the project.
InFlow.Mapped.Count Display The number of SysCAD species that are mapped to OLI species on the InFlow tab page. The percentage is based on the total number of SysCAD species in the project.
Sol.Mapped.Count Display The number of solid OLI species that are mapped to SysCAD species on the Sol tab page. The percentage is based on the total number of solid OLI species in the database.
Liq.Mapped.Count Display The number of liquid OLI species that are mapped to SysCAD species on the Liq tab page. The percentage is based on the total number of liquid OLI species in the database.
Vap.Mapped.Count Display The number of gaseous (or vapour) OLI species that are mapped to SysCAD species on the Vap tab page. The percentage is based on the total number of gaseous/vapour OLI species in the database.

InFlow tab page

This tab is used to map the SysCAD species to the OLI compound. This is often a 1 to 1 mapping.

The following table shows the parameters available when the Chem Model dbs file has been loaded. Note that the configuration can only be changed when the Chem Model dbs file has been loaded.

Tag (Long/Short) Input / Calc Description/Calculated Variables / Options
For each SysCAD Species, select OLI Compound
SpMapping.InFlows Reset.png This will reset the mapping of the SysCAD species to the OLI compounds, including Bypass selections.
TryMap OutflowToInflow.png This will use the Outflow mappings (on the following phase tabs) to try to map the SysCAD species to the OLI compounds.
InFlowTryMap Using MW.png This will try to map the SysCAD species to the OLI compounds based on their Molecular Weights.
BypassSet Other Phases.png This will enable the Bypass species option for all liquid phase species having an individual phase other than l or aq (e.g. o, ml, etc.).
Bypass Clear All.png This clears all Bypass selections.
The following 3 tables display the SysCAD species in the project in the Liquid, Solid and Vapour phases. The user can choose, or change, the corresponding OLI compound for each SysCAD species using the dropdown list.
Each table has the following columns:
Sp This shows a list of all liquid, solid or vapour species in the SysCAD project.
OLI_Name Input The user may select the most appropriate OLI compound from a dropdown list to map to the SysCAD species. H2O(l) and H2O(g) are hardwired to H2O.
Byp (Bypass) Tickbox The user may tick this box to Bypass the SysCAD species and therefore not include it in the OLI calculations.
MoleWt Display The Molecular Weight of the selected OLI compound.
MoleWtDiff Display The difference in Molecular Weights between the SysCAD species and the selected OLI compound.

The following table shows the parameters displayed when the Chem Model dbs file has NOT been loaded. Note that the configuration can only be changed when the Chem Model dbs file has been loaded.

Tag (Long/Short) Input / Calc Description/Calculated Variables / Options
*** NB: Chem Model Not Loaded ***
InFlowMap...
The following table displays the SysCAD species in the project with its corresponding OLI compound if this has been defined.
The table has the following columns:
SpXXX This is an index of the SysCAD species.
Scd_Name Display The name of the SysCAD species.
OLI_Name Display The corresponding OLI compound to map to the SysCAD species, if this has previously been defined.
Byp (Bypass) Display Indicates if the option to Bypass this SysCAD species (and therefore not include it in the OLI calculations) has been enabled. 1 = enabled, 0 = not enabled.

OutFlowS tab page

This tab is used to map the OLI solid species to the SysCAD solid species. There are usually more OLI solid species than there are solid species in the SysCAD project.

The following table shows the parameters available when the Chem Model dbs file has been loaded. Note that the configuration can only be changed when the Chem Model dbs file has been loaded.

Tag (Long/Short) Input / Calc Description/Calculated Variables / Options
For each OLI Output species, select SysCAD Species
SpMapping.Sol Reset.png This will reset the mapping of the OLI species to the SysCAD species, including Exclude selections.
Sol.TryMap Using MW.png This will try to map the OLI solid species to the SysCAD solids species based on the Molecular Weights of the species.
The next table displays the solid OLI species in the selected database and the mapped SysCAD solids species. The user can choose, or change, the mapped SysCAD species using the dropdown list.
The table has the following columns:
Sol This is an index of the solid species in the OLI database.
OLI_Name Display The name of the solid species in the OLI database.
Sp Input The user may select the most appropriate SysCAD solid species from a dropdown list to map to the OLI species.
Ex (Exclude) Tickbox The user may tick this box to Exclude the OLI species. Therefore, it is not included in the OLI calculations.
MoleWt Display The Molecular Weight of the OLI species.
MoleWtDiff Display The difference in Molecular Weights between the OLI species and the selected SysCAD species.
Charge Display The electrical charge of the OLI species.

The following table shows the parameters displayed when the Chem Model dbs file has NOT been loaded. Note that the configuration can only be changed when the Chem Model dbs file has been loaded.

Tag (Long/Short) Input / Calc Description/Calculated Variables / Options
*** NB: Chem Model Not Loaded ***
Sol...
The following table displays each OLI solid species with its corresponding SysCAD species if this has been defined.
The table has the following columns:
SpXXX This is an index of the solid species in the OLI database.
OLI_Name Display The name of the solid species in the OLI database.
Scd_Name Display The corresponding SysCAD solid species to map to the OLI solid species, if this has previously been defined.
Ex (Exclude) Display Indicates if the option to Exclude this OLI solid species (and therefore not include it in the OLI calculations) has been enabled. 1 = enabled, 0 = not enabled.

OutFlowL tab page

This tab is used to map the OLI liquid species to the SysCAD liquid species. There are usually more OLI liquid species than there are liquid species in the SysCAD project.

The following table shows the parameters available when the Chem Model dbs file has been loaded. Note that the configuration can only be changed when the Chem Model dbs file has been loaded.

Tag (Long/Short) Input / Calc Description/Calculated Variables / Options
For each OLI Output species, select SysCAD Species
SpMapping.LiqAqOnly Tickbox If this box is ticked, then only the aqueous species in the SysCAD liquid phase will be used for the mapping when using the Liq.TryMap automatic mapping function.
SpMapping.Liq Reset.png This will reset the mapping of the OLI species to the SysCAD species.
Liq.TryMap Using MW.png This will try to map the OLI liquid species to the SysCAD liquid species based on the Molecular Weights of the species.
The next table displays the liquid OLI species in the selected database and the mapped SysCAD liquid species. The user can choose, or change, the mapped SysCAD species using the dropdown list.
The table has the following columns:
Liq This is an index of the liquid species in the OLI database.
OLI_Name Display The name of the liquid species in the OLI database.
Sp Input The user may select the most appropriate SysCAD liquid species from a dropdown list to map to the OLI species.
MoleWt Display The Molecular Weight of the OLI species.
MoleWtDiff Display The difference in Molecular Weights between the OLI species and the selected SysCAD species.
Charge Display The electrical charge of the OLI species.

The following table shows the parameters displayed when the Chem Model dbs file has NOT been loaded. Note that the configuration can only be changed when the Chem Model dbs file has been loaded.

Tag (Long/Short) Input / Calc Description/Calculated Variables / Options
*** NB: Chem Model Not Loaded ***
Liq...
The following table displays each OLI liquid species with its corresponding SysCAD species if this has been defined.
The table has the following columns:
SpXXX This is an index of the liquid species in the OLI database.
OLI_Name Display The name of the liquid species in the OLI database.
Scd_Name Display The corresponding SysCAD liquid species to map to the OLI liquid species, if this has previously been defined.

OutFlowV tab page

This tab is used to map the OLI vapour species to the SysCAD vapour species. There are usually more OLI vapour species than there are vapour species in the SysCAD project.

The following table shows the parameters available when the Chem Model dbs file has been loaded. Note that the configuration can only be changed when the Chem Model dbs file has been loaded.

Tag (Long/Short) Input / Calc Description/Calculated Variables / Options
For each OLI Output species, select SysCAD Species
SpMapping.Vap Reset.png This will reset the mapping of the OLI species to the SysCAD species.
Vap.TryMap Using MW.png This will try to map the OLI vapour species to the SysCAD vapour species based on the Molecular Weights of the species.
The next table displays the vapour OLI species in the selected database and the mapped SysCAD vapour species. The user can choose, or change, the mapped SysCAD species using the dropdown list.
The table has the following columns:
Vap This is an index of the vapour species in the OLI database.
OLI_Name Display The name of the vapour species in the OLI database.
Sp Input The user may select the most appropriate SysCAD vapour species from a dropdown list to map to the OLI species.
MoleWt Display The Molecular Weight of the OLI species.
MoleWtDiff Display The difference in Molecular Weights between the OLI species and the selected SysCAD species.
Charge Display The electrical charge of the OLI species.

The following table shows the parameters displayed when the Chem Model dbs file has NOT been loaded. Note that the configuration can only be changed when the Chem Model dbs file has been loaded.

Tag (Long/Short) Input / Calc Description/Calculated Variables / Options
*** NB: Chem Model Not Loaded ***
Vap...
The following table displays each OLI vapour species with its corresponding SysCAD species if this has been defined.
The table has the following columns:
SpXXX This is an index of the vapour species in the OLI database.
OLI_Name Display The name of the vapour species in the OLI database.
Scd_Name Display The corresponding SysCAD vapour species to map to the OLI vapour species, if this has previously been defined.

Ionic tab page

This tab is used to display the OLI liquid ionic species (true species) which are part of the selected OLI database.

Tag (Long/Short) Input / Calc Description/Calculated Variables / Options
OLI Liquid Ionic Output (True Species)
The table displays the OLI liquid ionic species in the selected database.
The table has the following columns:
IonicLiqXXX This is an index of the liquid ionic species in the OLI database.
OLI_Name Display The name of the liquid ionic species in the OLI database.
MoleWt Display The Molecular Weight of the OLI species.
Charge Display The electrical charge of the OLI species.

Parameters tab page

This tab lists the OLI property names. For each OLI property, the OLI name, SysCAD equivalent tag, conversion unit in OLI and description of the parameter is given. All fields are result fields. Depending on the database chosen, the list of parameters may differ from those given below. This page will be blank if the Chem Model has not been loaded.

Tag OLI_Name SysCAD_Tag Cnv OLI_Description / OLI_Desc
List of all OLI Result Parameters
Parm001 T T C Temperature
Parm002 PT P atm Pressure
Parm003 MOLES_Total Ml C Moles - Total
Parm004 MOLES_Solid SMl mol Moles - Solid
Parm005 MOLES_Liquid1 LMl mol Moles - Liquid1
Parm006 MOLES_Vapor VMl mol Moles - Vapor
Parm007 MOLES_IonicLiquid1 Moles - Liquid1 (true)
Parm008 MASS_Total Mt g Mass - Total
Parm009 MASS_Solid SMt g Mass - Solid
Parm010 MASS_Liquid1 LMt g Mass - Liquid1
Parm011 MASS_Vapor VMt g Mass - Vapor
Parm012 DENSITY_Solid SRho g/L Density - Solid
Parm013 DENSITY_Liquid1 LRho g/L Density - Liquid1
Parm014 DENSITY_Vapor VRho g?l Density - Vapor
Parm015 ECOND_Liquid1 Electrical Conductivity (specific) - Liquid1
Parm016 ECONDM_Liquid1 Electrical Conductivity (molar) - Liquid1
Parm017 ENTHALPY_Total totHf@T cal Heat Duty - Total
Parm018 ENTHALPY_Solid SHf@T cal Heat Duty - Solid
Parm019 ENTHALPY_Liquid1 LHf@T cal Heat Duty - Liquid1
Parm020 ENTHALPY_Vapor VHf@T cal Heat Duty - Vapor
Parm021 PH_Liquid1 pH pH - Liquid1
Parm022 THERMCOND_Vapor VThermalCond cal/h.m.C Thermal Conductivity - Vapor
Parm023 VAPFRAC MlVf Vapor Fraction
Parm024 VISABS_Liquid1 LViscosity cP Absolute Viscosity - Liquid1
Parm025 VISABS_Vapor Absolute Viscosity - Vapor
Parm026 VISREL_Liquid1 Relative Viscosity - Liquid1
Parm027 VOLUME_Total Volume - Total
Parm028 VOLUME_Solid Volume - Solid
Parm029 VOLUME_Liquid1 Volume - Liquid1
Parm030 VOLUME_Vapor Volume - Vapor
Parm031 CP_Total Cp cal/g.C Heat Capacity - Total
Parm032 CP_Solid SmsCp@T cal/g.C Heat Capacity - Solid
Parm033 CP_Liquid1 LmsCp@T cal/g.C Heat Capacity - Liquid1
Parm034 CP_Vapor VmsCp@T cal/g.C Heat Capacity - Vapor
Parm035 IONIC_Liquid1 Ionic Strength (x-based) - Liquid1
Parm036 IONICM_Liquid1 Ionic Strength (m-based) - Liquid1
Parm037 ORP_Liquid1 ORP - Liquid1
Parm038 OSMOTIC OsmoticP atm Osmotic Pressure

Adding this Model to a Project

Insert into Configuration file

Sort either by DLL or Group.

 

DLL:

ScdOLI.dll

Units/Links

Process 2: OLI ChemModel Definition

or

Group:

General

Units/Links

Process 2: OLI ChemModel Definition

See Project Configuration for more information on adding models to the configuration file.


Insert into Project

 

Insert Unit

Process 2

OLI ChemModel Definition

See Insert Unit for general information on inserting units.

Hints and Comments

Refer to OLI Example Projects for example projects which demonstrate the use of this model.