TCE Configuration Options

From SysCAD Documentation
(Redirected from TPS Configuration Options)
Jump to navigation Jump to search

Navigation: Models ➔ TCE Models ➔ Thermodynamic Calculation Engines ➔ TCE Configuration Options

Thermodynamic Calculation Engines (TCEs) TCE Options TCE FAQ
TCE Functionality Overview TCE Species Mapping TCE Configuration Options AQSol ChemApp PHREEQC OLI

Latest SysCAD Version: 25 October 2024 - SysCAD 9.3 Build 139.36522

Related Links: TCE Configuration


Edit TCE Configuration

Available from Build 139. The following Thermodynamic Calculation Engines (TCE's) are available in SysCAD: AQSol, ChemApp, OLI and PHREEQC.

In Build 139.29706 or later, the configuration file options for the TCE add-ons is edited via the Configuration editor.

Configfile TCE2.png

There are several configuration settings to modify how a particular TCE behaves within a project. These include:

Number Setting/Selection Description
Button Small 1.png TCE Add-On Edit the relevant TCE section based on your project requirements. TCE add-ons available are: AQSol, ChemApp, OLI and PHREEQC. In the example screenshot above, PHREEQC is used.
Button Small 2.png TCE License Option User can specify whether the licensed or demonstration version of the TCE interface should be used.
  • The demonstration version can be used without a purchased TCE license, and is intended for evaluation purposes.
  • This does not apply to the OLI interface. OLI requires fully licensed interface.
Button Small 3.png Number of Engines The SysCAD implementation of TCE supports multithreading, you can choose how many engines to load.
  • The maximum number of engines is limited by the number of cores, i.e. Max = 2 x number of cores.
  • Caution: Care should be taken to ensure that you don't run out of heap space.
  • In Build 139 or later, if the number of engines is not specified in the cfg file then SysCAD will assume 3 engines.
Button Small 4.png Minimum Water Content This specifies the minimum total water content in the feed solution required for the specified TCE to solve.
  • This does not apply to ChemApp.
Use Ion Mapping If checked, ion mapping algorithms will be available for use within ChemApp. This is only needed if using an aqueous database with ChemApp.
Button Small 5.png TCE Database Folder

Required for Build 139. You must specify the database file(s) you wish to load into the project in the cfg file.

  • All databases used by the project must be stored in the same folder, selected via the "Browse..." button.
  • The recommended folder location is at the same folder level as the CfgFiles folder, see image to the right. It is not recommended to store database folder/files within the project folder (.spf). Folder path is saved relative to the CfgFiles folder.
  • In the example shown, there are two databases available in the "Databases_for_PHREEQC" folder, user can select both databases for use in the project.
  • Database files shown in grey were expected by existing cfg settings, but not found in the selected folder. These will be removed from the cfg on "OK".
Tpsdatabaelocation.png
Button Small 6.png TCE Database File(s)
Button Small 7.png IonList The ion list can be viewed / edited using the "Edit Ion List" button. This will open the ion list stored in the project CfgFiles folder for editing (via the default text editor).
  • A warning is given if no IonList.txt file is found. A default copy will be created on project load.
  • NOTE: Currently the IonList is required for the AQSol and PHREEQC models.
Button Small 8.png Use Registry to locate OLI For OLI only. It is recommended to select this option as the registry entry corresponds to the most recently installed version of the OLI Engine.
Button Small 9.png OLI Dll Path This is used if the Use Registry to locate OLI option is not checked. This option is only required if multiple versions of OLI Engines are installed on the machine, and the user wishes to use a specific engine file to run the SysCAD model. Caution: If this option is used, other users may not be able to open the project as is, because their OLI engine path may be different. For others to use the project, they may need to edit the OLI DLL path to point to the correct OLI Engine location.
Button Small 10.png AQSol Database Folder This refers to the installation folder of AQSol. Use the ‘Browse’ button to locate the installation folder. Typically, this is found at C:\Program Files (x86)\AQSolxxx\.
Button Small 11.png Edit IPhaseMap File This button enables the user to create or edit the IPhaseMap File. See Defining IPhaseMap for more information.

Edit TCE Configuration Manually (OLI Liquid-2 Phase)

Available from Build 139.34985. Liquid-2 functionality is available for use in the SysCAD-OLI interface when a second liquid phase, typically used for organics, is configured in the OLI dbs file. This functionality allows for the modelling of unit operations where two immiscible liquids are present, such as OLI Solvent Extraction. To use this functionality, the SysCAD configuration file must be manually updated to indicate the individual phase in the SysCAD species database which corresponds with the second liquid phase in the OLI dbs file. If using multiple dbs files, this is repeated for each OLI dbs file that contains a second liquid phase. The steps are as follows:

  1. Open the cfg file within the CfgFiles folder using a text editor.
  2. Search for "[OLI]" to locate the OLI section of the file.
  3. Update the cfg file in a similar manner to that shown in the following example.

Example:

Given an [OLI] section that looks like this in the cfg file:
[OLI]
NumEngines=3
MinWaterContentForSolve=0.2
DatabaseFolder=C:\SysCAD Projects\OLItest\OLI\
Database0=SolvEx.dbs
the cfg file [OLI] section should be modified to this:
[OLI]
NumEngines=3
MinWaterContentForSolve=0.2
DatabaseFolder=C:\SysCAD Projects\OLItest\OLI\
Database0=SolvEx.dbs
Second_Liquid_Phase_Name0=o
where:
  • SolvEx.dbs contains a second liquid phase
  • The SysCAD database contains corresponding species for mapping to the second liquid phase using the individual phase "o" for organic, i.e.:
    • C12H26(o)
    • R3NH2SO4(o)
    • etc...

Edit TCE Configuration Manually (Before Build 139.29706)

Prior to Build 139.29706 (and for BETA versions in Build 138), it was required to edit the configuration file manually by opening the .cfg file in a text editor (e.g.: Notepad++). The required syntax is given below.

NOTE: For older projects upgraded to Build 139.29706 or later, please edit the configuration file via the Configuration editor to auto-update these settings to the new format. Be sure to review database folder location and file selection. Once the TCE configuration data has been updated via this method, the following old format is ignored.

Examples

  • Example 1: If you are wanting to not allow PHREEQC to solve below 20% water, and you want to use 5 engines, you would add the following lines to the configuration:
[PHREEQC]
MinWaterContentForSolve=0.2
NumEngines=5
  • Example 2: You can specify to use the demonstration version of the interface for PHREEQC, ChemApp, and AQSol by adding the following line in the configuration file:
[AQSol]
UseDemoVersion=1
[ChemApp]
UseDemoVersion=1
[PHREEQC]
UseDemoVersion=1
If this line does not exist, SysCAD will assume that you wish to use the licensed version. The Demonstration version has some limitations but can be used for:
  1. Regular operation for a limited number of species
  2. Full single point calculations in the DirectCalc unit operation
  • Example 3: If you are storing the TCE database files in a folder at the same folder level as the CfgFiles, i.e. one folder above each project, you would specify the database options as shown below.
[AQSol_DATABASES]
DB0000=$Prj\~\Databases\AQSol001.dat
DBName0000=AQSol001.dat
[ChemApp_DATABASES]
DB0000=$Prj\~\ChemApp_DAT_File\cno.dat
DBName0000=cno.dat
[PHREEQC_DATABASES]
DB0000=$Prj\~\Databases_for_PHREEQC\minteq.v4.dat
DB0001=$Prj\~\Databases_for_PHREEQC\pitzer.dat
DBName0000=minteq_v4
DBName0001=pitzer

NOTES:

  1. The examples are given for AQSol, ChemApp and PHREEQC. You can copy and paste this into your configuration file, change the name as required, and then specify the correct database folder and database filenames.
  2. In the above, DB0000 line entry specifies the actual file location. DBName0000 specifies the short name for this file, which is listed as an option within a model configuration unit in SysCAD.
  3. The $Prj is a shortcut for the project folder. The \~\ moves the location to one folder above the project folder. Thus, $Prj\~\Databases would look for the Databases folder from the parent folder of the project folder (usually where you store the configuration folder CfgFiles).
  4. You can also use full path names for the files.

Additional steps for AQSol

SysCAD 138 required an AQSol configuration file similar to this example. H2O Aqueous Solutions ApS (https://www.phasediagram.dk/) has added new functionality to the AQSol software which eliminates the need for an AQSol configuration file. Users of AQSol can contact H2O Aqueous Solutions ApS to get an updated AQSol dll that does not require an AQSol configuration file.

That being said, the AQSol configuration file can continue to be used with your existing AQSol dll version. However, in this case, the user must add the following line to their AQSol configuration file (this line is NOT added by the SysCAD configuration editor when modifying from the TCEs tab):

DllPath
C:\Program Files (x86)\AQSOLxxx\

This update is required to ensure that the correct AQSol dll is loaded. Note that the above is the normal installation location of AQSol. If it is located elsewhere, set the DllPath to the correct location.

This step is only required if you wish to use your existing AQSol dll.