ChemApp Model Configuration

From SysCAD Documentation
Jump to navigation Jump to search

Navigation: Models ➔ TCE Models ➔ ChemApp FACTSage Add-On ➔ ChemApp Model Configuration

ChemApp Overview ChemApp Model Configuration ChemApp Direct Calc Model ChemApp Side Calc Model ChemApp Reactor

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

Related Links: ChemApp SysCAD Project Workflow


First made available in Build 138 (as BETA version). Formally released as part of Build 139. The ChemApp FACTSage SysCAD add-on and models documentation is for the latest version of SysCAD.

General Description

ChemApp is a computer program for thermodynamic phase equilibrium calculation using FactSage. It is developed and maintained by GTT-Technologies. See gtt-technologies.de for further information.

This model allows the user to define the ChemApp Model file to be used in SysCAD and some configuration of its use.

The two main functions of the "ChemApp Model Configuration" model are:

  1. To select a ChemApp Model File (*.dat or *.cst) and
  2. For the mapping of the ChemApp species to SysCAD species/ions used in the project.
    • This allows the other ChemApp models (ChemApp Side Calc Model and ChemApp Reactor) in SysCAD to convert the SysCAD species flow data to ChemApp species data (and vice-versa) and use the ChemApp functionality to calculate equilibrium data.

The ChemApp Model Configuration 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 ChemApp Model file, other unit models performing ChemApp calculations will reference this model. Therefore, this model is essential if the user wishes to use the ChemApp functionality in SysCAD, at least one of these file must exist in the project.

NOTES:

  1. User MUST have installed a version of ChemApp on their computer. Please see gtt-technologies.de for more information.
  2. The user must have a ChemApp Model file before initialising the SysCAD ChemApp Model Configuration. See Referenced File (next heading) for instructions on where to find this file.

Referenced File

The file that will be referenced by the SysCAD ChemApp Model Configuration is the ChemApp Model file which either comes with the installation of ChemApp or is purchased from suppliers (GTT, M4Dynamics, ThermFACT and more). The ChemApp Model file can have extension .dat or .cst

  • The .dat format can be read by a text editor, it is normally used by ChemApp light for evaluation purposes.
  • The .cst format is encrypted, normally for the ChemApp full version to protect the model data information.

For example, ChemApp Light model files are stored in the \dat subfolder of the ChemAppLight installation. Typical path is C:\Program Files (x86)\GTT-Technologies\ChemAppLight\MSVC\Vx.x.x\dat.

Notes:

  1. This file is essential for the ChemApp functionality to work in SysCAD.
  2. The file can be saved at any location - it does not have to be saved in the SysCAD project.

Diagram

TPS Model Cfg.png

The diagram shows the default drawing of a ChemApp Model Configuration unit model.

Inputs and Outputs

There are no connections to this unit.

Model Theory

ChemApp requires a defined input stream which defines species composition in phases. At the given conditions (temperature, pressure), ChemApp returns an output stream in an equilibrium state..

The ChemApp Model Configuration defines the mapping of SysCAD species to ChemApp species to define the required input stream, and the convert the ChemApp output stream back to SysCAD species.

The mapping of species is based on the following criteria:

  1. The SysCAD phase matches the ChemApp phase, via the “IPhaseMap.txt” file.
  2. The elemental compositions of the SysCAD and ChemApp species must match.
  3. The charge of the two species must be the same. The redox state of each element is not compared, and thus, this only provides a partial check of equal redox state.

A diagram is provided below to explain the mapping process. Red lines represent the mapping criteria.

ChemAppMappingDiagram.PNG

Notes:

  • For each phase defined in the ChemApp Model, there should be a corresponding individual phase in SysCAD. Individual phases are all immiscible phases within an occurrence, eg. slag and liquid metal within liquid.
  • Some automatic mapping functions are available to match species based on elements.
  • Users can also manually adjust the mappings by selecting matching species from dropdown lists.
  • Where there are multiple possible matches in either direction (i.e. more than one SysCAD species for one ChemApp species, or vice versa) mapping is completed as per the criteria above and a warning is issued to the user.
  • Not ALL ChemApp species must be mapped. However, if an unmapped ChemApp species is formed in the model, a run time generated warning will result, and the model result will be incorrect.
  • It is the responsibility of the user to ensure proper mapping between SysCAD and ChemApp.
  • There is a utility available to generate a SysCAD database file from a ChemApp Model file. It will use data from the SysCAD default database and other databases supplied by the user to autogenerate a SysCAD database file based on the ChemApp species list.

Workflow

The suggested workflow for configuring the model is:

  1. On the ChemAppModelCfg tab page, browse for required .dat or .cst file.
  2. On the ChemAppModelCfg tab page, press the Load button to load the .dat or .cst file.
  3. Map the ChemApp species to SysCAD species on the ChemAppConfig tab page. The simplest way to do this is to press the Try Map Species button next to Map on the ChemAppConfig tab page.
  4. If required, set the species Suppression on/off on the ChemAppConfig tab page.
  5. Once these steps are performed and the mappings are checked, the project can be run.

NOTES:

  1. The ChemApp Direct Calc Model does not require species mapping between ChemApp and SysCAD. If the user wants to perform ChemApp Direct Calculations only, then only Steps 1 and 2 are required from the above workflow.
  2. Any other ChemApp unit models such as the ChemApp Side Calc Model or ChemApp Reactor referencing this ChemApp Model Configuration unit model will use the mappings defined.

Data Sections

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

  1. ChemAppModelCfg tab - This first tab requires the user select the ChemApp database file and has various related options and parameters.
  2. ChemAppConfig tab - This tab requires the user to map the ChemApp ions/species to the equivalent species/ions in SysCAD, so that ChemApp stream compositions can be converted to a SysCAD stream and vice-versa.
  3. ScdSpMap tab - This tab reports the SysCAD to ChemApp species mapping as a result of choices made on the ChemAppConfig tab page, so the SysCAD stream composition can be converted to a ChemApp stream.
  4. Engines tab - This tab contains information about the ChemApp Engines.
  5. Info tab - contains general settings for the unit and allows the user to include documentation about the unit and create Hyperlinks to external documents.

ChemApp Model Configuration tab page

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

Tag (Long/Short) Input / Calc Description/Calculated Variables / Options
Tag Display This name tag may be modified with the change tag option.
Condition Display OK if no errors/warnings, otherwise lists errors/warnings.
ConditionCount Display The current number of errors/warnings. If condition is OK, returns 0.
GeneralDescription / GenDesc Display This is an automatically generated description for the unit. If the user has entered text in the 'EqpDesc' field on the Info tab (see below), this will be displayed here.
If this field is blank, then SysCAD will display the unit class ID.
This program contains ChemApp Copyright GTT-Technologies, Kaiserstrasse 103, D-52134 Herzogenrath, Germany http://www.gtt-technologies.de
Interface...
Acknowledgement Display This program contains ChemApp Copyright GTT-Technologies, Kaiserstrasse 103, D-52134 Herzogenrath, Germany http://www.gtt-technologies.de
Website Web Link https://gtt-technologies.de/software/chemapp
Version Display This displays the version of ChemApp installed on the user's computer
License.ID Display This displays the ChemApp License ID number. (This is purchased separately from GTT). For ChemApp light, it may display 0001.
License.User Display This displays the Registered ChemApp User. For ChemApp light, it may display "Demonstration Version".
License.Expiration Display This displays the ChemApp License Expiration Date.
Model...
Select ChemApp database file
DatabaseFile/DBFile Input This is the name of the database file that was created by ChemApp, e.g. cosi.dat. It is chosen from a dropdown list of available databases, which are defined in the cfg file for the project.
Folder/DatabaseFilePath/DBFilePath Display The folder where the database file shown above is saved.
CheckForSteam Tickbox If ticked, SysCAD will check if steam (H2O(g)) is included in the list of ChemApp species.
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.
DefnStatus List If the ChemApp database file has been loaded and no errors have been detected then will show OK, otherwise will show error message.
SpDBCount Display The number of species loaded from the ChemApp database file.
Sol.Count Display The number of solid species loaded from the ChemApp database file.
Liq.Count Display The number of liquid species loaded from the ChemApp database file.
Vap.Count Display The number of gaseous species loaded from the ChemApp database file.
ElemCount Display The number of elements loaded from the ChemApp database file.
ElemList Display The list of the elements used in the ChemApp database file.
NumUnitsUsingCfg Display The number of units models that are using this Model Configuration.
Mapping Tolerances
Discard.Tol.SigDigits Input This provides an easy way to change the Discard.Tol.Rel value. For example, 4 here will set 1.00e-4 to Discard.Tol.Rel. If user changes the Discard.Tol.Rel value, this value will also be updated.
Discard.Tol.Rel Input The relative tolerance for ignoring species produced from the ChemApp calculations. If the mass fraction of a species is > DiscardTol and it is not mapped to a SysCAD species/ion then an error is generated.
Convergence Tolerances
ElemBal.Tol.SigDigits Input This provides an easy way to change the ElemBal.Tol.Rel value. For example, 4 here will set 1.00e-4 to ElemBal.Tol.Rel. If user changes the ElemBal.Tol.Rel value, this value will also be updated.
ElemBal.Tol.Rel Input The relative tolerance for Element Balance (Input - Output). If the relative error is > ElemBal.Tol.Rel then an error is generated. The ElemBal is used in all ChemApp unit models.
EnthConv.Tol.SigDigits Input This provides an easy way to change the EnthConv.Tol.Rel value. For example, 4 here will set 1.00e-4 to EnthConv.Tol.Rel. If user changes the EnthConv.Tol.Rel value, this value will also be updated.
EnthConv.Tol.Rel Input Enthalpy convergence tolerance. This is used for iterative enthalpy convergence calculations in SysCAD.

ChemAppConfig tab page

This tab is used to map the ChemApp species to the SysCAD species.

Tag (Long/Short) Input / Calc Description/Calculated Variables / Options
ChemAppConfig...
SpeciesName SpeciesLongButton.png
SpeciesShortButton.png
The Species:Long or Short button is used to change the display of the Species names between the Short form, the Chemical compound, or the longer species names.
Map ChemApp species to SysCAD species
Map / MapByElements Try Map Species.png This will try to map the ChemApp species to the SysCAD species based on their Elemental definition.
CheckMap / CheckMapByElements Check Mapping Button.png This will check the mapping of the ChemApp species to the SysCAD species based on their Elemental definition. Any unexpected results in the current mappings will be displayed as warnings in the Messages Window.
MaximumMWDiff / MaxMWDiff Input This is the maximum allowed difference between molecular weights of mapped species without generating a warning.
MaximumChargeDiff / MaxChargeDiff Input This is the maximum allowed charge difference between mapped species without generating a warning.
SpDBCount Display The number of speciess defined in the ChemApp database.
SpUsedCount Display The number of species in the ChemApp database that are used in the project. These are shown on the ChemAppConfig tab page.
SpMappedCount Display The number of species in the ChemApp database that have been mapped to equivalent SysCAD species.
SpCFECount Display The number of species in the ChemApp database that can be used with CFE (constrained free energy).
DetailedGridView Tickbox Global selection. If enabled, more fields will be shown in grid views (tables) including the tables on this page.
Suppress Suppress Visible.png User can suppress the formation of all species currently visible by pressing this button. The Sup option for all species currently visible will be ticked when you press this button.
Unsuppress Unsuppress Visible.png User can disable the suppress option of all species currently visible by pressing this button. The Sup option for all species currently visible will be unticked when you press this button.
CopyToClipboard Copy Mapping Button.png Adds a table of data to the clipboard making it available to be pasted into other applications. Columns include SysCAD species, ChemApp species, SysCAD molecular weight, ChemApp molecular weight, mapping type and saturation index.
Filter View
Filter Button - Filter On.png
Button - Filter Off.png
This button will enable or disable the species filter options.
ShowUnmapped
(Only visible if Filter is enabled)
Tickbox When enabled, all species will be displayed. When disabled, only species that are mapped to a SysCAD species will be shown.
Phases
(Only visible if Filter is enabled)
All No filtering of species based on phase.
Solids Only show solid phase species, hide other species.
Liquids Only show liquid phase species, hide other species.
Vapours Only show vapour (gaseous) phase species, hide other species.
Solids & Liquids Only show solid and liquid phase species, hide other species.
Solids & Vapours Only show solid and vapour (gaseous) phase species, hide other species.
Liquids & Vapours Only show liquid and vapour (gaseous) phase species, hide other species.
IPhase Only show "IPhase" individual phase species, hide other species. The individual phases shown will depend on the ChemApp database chosen.
Filters Display Always set to 'Content'.
Content
(Only visible if Filter is enabled)
All No filtering of species based on element or name.
Contains Any Element This will display all species that contain any of the elements entered in their elemental definition.
Contains All Elements This will display only species that contain ALL of the elements entered in their elemental definition.
Starts with ... This will display species that start with the text entered based on the short or long species tag depending on the current SpeciesTag selection.
Contains any ... This will display species that contain the text entered in the currently displayed short or long species tag.
Contains All ... This will display species that contain ALL the separate text entered in the currently displayed short or long species tag.
Select Input Only visible if Filter is enabled and Content is NOT set to All. The user specified Elements or text to filter the species list. Refer to Species Filter for more information and examples.
(The following tables (one per phase) display the ChemApp species from the selected database and the mapped SysCAD species. The user can choose, or change, the mapped SysCAD species using the dropdown list.)
(Each table has the following columns (one row per ChemApp species):)
Sup Tickbox User can suppress the formation of species by ticking this option. Note that suppressing species may have a profound effect on the final chemistry, so a good understanding of actual process chemistry is very important when building a predictive model.
MoleWt Display The Molecular Weight of the ChemApp species.
Charge Display Only shown if DetailedGridView has been enabled. The electrical charge of the ChemApp species.
IsCFE Display Only shown if DetailedGridView has been enabled. 1 or ticked = species can be used for CFE (constrained free energy), thus allows a portion of a species to be locked up and not allowed to react.
Index Display Only shown if DetailedGridView has been enabled. The index of the ChemApp species.
MappedSpecies List The user may select the most appropriate SysCAD species from a dropdown list to map to the ChemApp species.
MapSpByEl Button Only shown if DetailedGridView has been enabled. If pressed, SysCAD will try to find the most appropriate SysCAD species to map to this ChemApp species by matching elemental compositions.
At the bottom of each phase table, the following two buttons will appear:
SuppressIPhase Suppress All.png User can suppress the formation of the entire individual phase by pressing this button. The Sup option for all species within this individual phase will be ticked when you press this button (even species that are not visible).
UnsuppressIPhase Unsuppress All.png User can disable the suppress option of all species within the entire individual phase by pressing this button. The Sup option for all species within this individual phase will be unticked when you press this button (even species that are not visible).

ScdSpMap tab page

This tab is used to display the mapping of SysCAD species to ChemApp species. This is often a 1 to 1 mapping.

Tag (Long/Short) Input / Calc Description/Calculated Variables / Options
SysCAD to ChemApp mapping
ScdSpMap...
(The following table displays all the SysCAD species in the project with its mapped ChemApp species (if there is one).)
(The table has the following columns (one row per SysCAD species):)
Mapping Display The name of the first mapped ChemApp species (if there is one).
MapCount Display The number of ChemApp species that are mapped to the relevant SysCAD species.
MW_Diff Display The difference in Molecular Weights between the SysCAD species and the first mapped ChemApp species (shown in the name column).

Engines tab page

The number of engines used can be set in the SysCAD configuration (.cfg) file.

Tag (Long/Short) Input / Calc Description/Calculated Variables / Options
This program contains ChemApp Copyright GTT-Technologies, Kaiserstrasse 103, D-52134 Herzogenrath, Germany http://www.gtt-technologies.de
Global Engines for ChemApp Interface
Interface...
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.
Init Failed The model initialisation has been attempted but failed.
Not installed
Wrong Version
DLL not licensed
NumCfgsUsingEngines Display Only available in Build 139 or later. The number of ChemApp Model Configuration models in the project which are using ChemApp Engines.
Reload Reload Button.png If the user clicks on the 'Reload' button, then it will Reload the ChemApp engine/s.
InitTime Display The time taken to initialise the model on the last attempt.
TotalCalcCount Display The number of calculations that have been performed mapping the ChemApp species data to the SysCAD species data. The mappings are required for other units such as the ChemApp Side Calc Model or ChemApp 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 that ChemApp engines have been performing calculations. This is cumulative and may include multiple runs.
AverageCalcTime Display The average amount of time required for ChemApp calculatiions. AverageCalcTime = TotalCalcTime/TotalCalcCount.
TotalReloadCount Display The number of model reloads that have been performed by all of the ChemApp engines combined. The reloads are required when an engine switches between models. It is reset to zero at the beginning of a run.
TotalReloadTime Display The cumulative amount of time that ChemApp engines have been reloading different models.
AverageReloadTime Display The average amount of time required for a ChemApp reload. AverageReloadTime = TotalReloadTime/TotalReloadCount.
TotalWaitTime Display
(Times that Engine instances are locked. The following parameters are shown for each ChemApp Engine:)
EngineX Display The Engine number (X) of the Engine starting at 1.
TimeLocked Display The time that the relevant Engine is locked.
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.
Init Failed The model initialisation has been attempted but failed.
Not installed
Wrong Version
DLL not licensed

Adding this Model to a Project

Insert into Configuration file

Sort either by DLL or Group.

 

DLL:

ScdChemApp.dll

Units/Links

ChemApp: ChemApp Chem Model Configuration

or

Group:

General

Units/Links

ChemApp: ChemApp Chem Model Configuration

See Model Selection for more information on adding models to the configuration file.


Insert into Project

 

Insert Unit

ChemApp

ChemApp Chem Model Configuration

See Insert Unit for general information on inserting units.