ChemApp Model Configuration

From SysCAD Documentation
Jump to navigation Jump to search

Navigation: Models ➔ TCE Models ➔ ChemApp ➔ ChemApp Model Configuration

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

Latest SysCAD Version: 19 March 2024 - SysCAD 9.3 Build 139.35102

Related Links: ChemApp SysCAD Project Workflow


Formally released as part of Build 139 (first available as BETA version in Build 138). The ChemApp SysCAD TCE option and models documentation is for the latest version of SysCAD.

General Description

ChemApp is a computer program for thermodynamic phase equilibrium calculation using FactSage calculation techniques. 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
    • This allows user to use the ChemApp functionality to calculate equilibrium data as performed by the ChemApp Direct Calc Model.
  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.

Demonstration Version

SysCAD includes a demonstration version of ChemApp. Using demo mode, demonstration projects for can be run and modified by the user. However, this usage is restricted to loading 20 components in a calculation. To turn off demonstration mode (for users with full TCE add-on licenses), uncheck the Use Demo Version option in TCE Configuration.

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, e.g. 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, select required .dat or .cst file from dropdown list. If only 1 database is available, then this will automatically be selected.
  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. UsedBy tab - This tab displays the ChemApp model units referencing to this ChemApp Model configuration unit.
  5. Engines tab - This tab contains information about the ChemApp Engines.
  6. 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 UnitType or SubClass.
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.
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 Load.png Click on this button to load the required database file.
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.
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.
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.
ElemBal.Tol.Abs Input The absolute tolerance for Element Balance (Input - Output). If the absolute error is > ElemBal.Tol.Abs then an error is generated. The ElemBal is used in all ChemApp unit models.
Convergence Tolerances
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.
Species Without Enthalpy Data Tolerance (Mass Fraction)
SpHfMissing.Tol Input For species which do not have complete enthalpy information, i.e. either H25 or Cp is missing, the mass fraction of the species above which a warning is issued.
TotHfMissing.Tol Input The total mass fraction of all species with missing Cp or H25 data above which a warning is issued.

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.
MissingIons AddtoIonListButton.png This adds the missing ions to the IonList.txt file. The project must be reloaded before the added ions can be mapped. This button will be disabled if all required ions already exist in the IonList.txt file. In this case, pressing Try Map Species.png will map all ions.
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.
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.
SuppressVisible 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.
UnsuppressVisible 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.
ElemDefn Display The Elemental Definition 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:
Suppress 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).
Unsuppress 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).
Select List If there are multiple ChemApp species with same elemental definition, allows user to choose which one to map to the corresponding SysCAD species.
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).

UsedBy tab page

Tag (Long/Short) Input / Calc Description/Calculated Variables / Options
List of all connected Unit Models using this ModelCfg
UsedBy...
Count Display The number of units models that are using this Model Configuration.
(The following table displays the ChemApp unit models referencing to this ChemAppModelCfg model.)
MX Display The unit model (X) referencing the ChemAppModelCfg model.
On Display The On/Off state of the ChemApp unit model referencing this ChemAppModelCfg model.
UnitType Display Displays the UnitType type of the ChemApp unit model referencing this ChemAppModelCfg model.
UnitTag Display The tag of the ChemApp unit model referencing this ChemAppModelCfg model.
AllConnected.Feed Button Generate a composite report of all feed streams of units connected to this ChemAppModelCfg model.
AllConnected.Prod Button Generate a composite report of all product streams of units connected to this ChemAppModelCfg model.

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, Germany
Global Engines for ChemApp Interface
Interface...
Engines.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 The ChemApp software is not installed.
Wrong Version The wrong version of the ChemApp software is installed.
DLL not licensed The ChemApp software is not licensed.
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.
Engines.WaitTime Display The time when all engines are busy.
Engines.Count Display The number of engines used. This can be changed in the SysCAD configuration (.cfg) file for the project.
(The following parameters are shown for all engines (Engines column) and each individual ChemApp Engine in a table:)
ReloadCount Display The number of model reloads that have been performed. The reloads are required when an engine switches between models. It is reset to zero at the beginning of a run.
ReloadTime Display The cumulative amount of time that the ChemApp engine/s have been reloading different models.
AverageReloadTime Display The average amount of time required for a ChemApp reload. AverageReloadTime = ReloadTime/ReloadCount.
CalcCount 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.
CalcTime Display The cumulative amount of time that ChemApp engine/s have been performing calculations. This is cumulative and may include multiple runs.
AverageCalcTime Display The average amount of time required for ChemApp calculations. AverageCalcTime = CalcTime/CalcCount.
MaxCalcTime Display The maximum amount of time required for ChemApp calculations since the last reset of the model.
PropCalcTime Display The total time used to calculate stream properties by ChemApp.
MixingTime Display The total time used to calculate the properties of incoming streams to unit models by ChemApp.
AverageMixingTime Display The average amount of time used to calculate the properties of incoming streams to unit models by ChemApp.
MaxMixingTime Display The maximum amount of time used to calculate the properties of incoming streams to unit models by ChemApp.
LockCount Display The number of times the ChemApp engine/s are locked (is use).
LockedTime Display The cumulative amount of time that ChemApp engine/s have been locked (in use). This is cumulative and may include multiple runs.
SysCAD Solver
Iterations Display Total iterations since beginning of run.
SolveTime Display Total solve time since beginning of run.
PerIter.CalcCount Display The average number of ChemApp calculations per iteration. PerIter.CalcCount = Engines.CalcCount/Iterations.
PerIter.CalcTime Display The average amount of time required for ChemApp calculations per iteration. PerIter.CalcTime = Engines.CalcTime/Iterations.
PerIter.WaitTime Display The average amount of wait time per iteration. PerIter.WaitTime = Engines.WaitTime/Iterations.
PerIter.LockedTime Display The average amount of time the engines are locked (in use) per iteration. PerIter.LockedTime = Engines.LockedTime/Iterations.
Global list of ChemAppModelCfg for ChemApp Interface (Only available in Build 139 or later)
ModelCfgCount Display The number of ChemApp Model Configuration models in the project which are using ChemApp Interface Engines.
ModelCfgTagX Display The tag (X) for each ChemAppModelCfg using this Interface.

Adding this Model to a Project

Insert into Configuration file

Sort either by DLL or Group.

 

DLL:

ScdChemApp.dll

Units/Links

TCE ChemApp: ChemApp Chem Model Configuration

or

Group:

General

Units/Links

TCE ChemApp: ChemApp Chem Model Configuration

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


Insert into Project

 

Insert Unit

TCE ChemApp

ChemApp Chem Model Configuration

See Insert Unit for general information on inserting units.