TCE Configuration Options

From SysCAD Documentation
Jump to navigation Jump to search

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

Thermodynamic Calculation Engines (TCEs) TCE Add-Ons
TCE Functionality Overview TCE Species Mapping TCE Configuration Options AQSol Add-On ChemApp FACTSage Add-On PHREEQC Add-On OLI Add-On

Latest SysCAD Version: 21 September 2021 - SysCAD 9.3 Build 139.29552


PHREEQC, ChemApp FACTSage and AQSol add-ons are new for Build 138 as BETA versions. PHREEQC and ChemApp FACTSage add-ons have been formally released as part of Build 139. Contact SysCAD for demonstrations or further information.

Currently the changes need to be made manually, that is, user needs to open the .cfg file in a text editor (eg: Notepad++) and add in these lines manually. Please see examples below for syntax.

Settable Options in SysCAD configuration (.cfg) file

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

  • Minimum water content for solve: this specifies the minimum total water content in the feed solution required for the specified TCE to solve. This does not apply to ChemApp.
  • Number of engines loaded: because the SysCAD implementation of TCE supports multithreading, you can choose how many engines to load. The maximum number is limited by the number of cores, i.e. Max = 2 x number of cores. 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.
    • For example, 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
  • Whether the licensed or demonstration version of the interface should be used. The demonstration version can be used without a purchased license, and is intended for evaluation purposes. This does not apply to the OLI interface.
    • 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

Specifying databases for project load in SysCAD configuration (.cfg) file

New for 139. You must specify the databases you wish to load into the project in the SysCAD configuration (.cfg) file.

It is recommended that you place all database files used by a project at the same folder level as the CfgFiles folder (as shown in the image to the right).

Tpsdatabaelocation.png

To add the database location to the configuration file, please edit the configuration file using a text editor (such as notepad++).

  • For example, if you have a folder entitled "Databases" at the same folder level as the CfgFiles, i.e. one folder above each project, you would specify 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.