ChemApp Side Calc Model

From SysCAD Documentation
Jump to navigation Jump to search

Navigation: Models -> TPS Models -> ChemApp FactSage Models -> ChemApp Side Calc Model

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

See also: ChemApp SysCAD Project Workflow


This model is only available in SysCAD Build 138 and later versions. Currently in BETA - contact SysCAD for demonstrations or further information.

General Description

The ChemApp Side Calc model allows the user to 'call' the ChemApp solver to determine the state of a defined SysCAD stream. The user defines the SysCAD stream of interest, and the unit will then determine the equilibrium conditions of the resulting stream at the user defined conditions such as temperature or enthalpy. This is similar to the use of the ChemApp Reactor using the Side Calc model option.

The model has no links to any other models in SysCAD. Therefore, this model is not a part of any SysCAD network, but is a stand-alone calculation that allows the user to check the status of a stream.

Notes

  1. The user MUST have added and configured a ChemApp Model Configuration unit in the SysCAD project before this unit can function.
  2. The user MUST have installed a version of ChemApp on their computer to make use of the ChemApp functionality in SysCAD. Please see gtt-technologies.de for more information.

Diagram

TPS Side Calc.png

The diagram shows the default drawing of a ChemApp Side Calc unit model.

Inputs and Outputs

There are no connections to this unit.

Model Theory

The calculations performed using a "ChemApp Side Calc Model" are similar to using ChemApp directly ChemApp Direct Calc Model, except the ChemApp Input is created from a specified SysCAD stream:

  1. User nominates a SysCAD stream to be evaluated using ChemApp algorithms
  2. The SysCAD stream using SysCAD species is converted into ChemApp "Input" using ChemApp Species. The species mapping is defined in the corresponding ChemApp Model Configuration unit model.
  3. The ChemApp Side Calc Model calls the ChemApp algorithms to determine the status of the aqueous solution using the converted ChemApp "input" data.
  4. The ChemApp results are displayed in the "output" tab using ChemApp species only. The results are NOT converted into SysCAD species.

NOTES:

  • The Input, Output and RxnSummary pages are displayed using ChemApp species, as defined in the ChemApp Model file (.dat or .cst) specified in the corresponding ChemApp Model Configuration unit model.
  • The species used in the SysCAD project are shown on the optional Sp pages, shown as part of the QFeed, QBypass, QUnmapped, QRxnProdBypass and QProd pages.

WorkFlow

The suggested workflow for configuring the model is:

  1. Make sure the project contains at least one of the ChemApp Model Configuration model, and the model is loaded with the correct ChemApp Model you would like to use for the side calculation.
  2. On the Side Calc ChemAppSideCalc Tab page, type in the name of the SysCAD stream or content you wish to evaluate (eg: P_001.Qo OR TNK_001.QFeed)
  3. Choose when to perform the calculation.
  4. Choose the Target Calculation Mode and fill in the required information based on the mode selection.
  5. select the correct ChemModel (to match step 1)
  6. Perform an equilibrium calculation by pressing the "Calculate" button or pressing Solve in SysCAD.
  7. The Results are displayed in the Results and Output tabs.

Suggestions on how to use the results:

  • The ChemApp Side Calc results can be used to assist with the configuration of with a SysCAD unit, normally with Reactions sub-model switched on. Based on the results of the ChemApp Side Calc, the reaction and reaction extents can be configured to match results from the ChemApp Side calc. User can use the SetTag controller to transfer ChemApp Side Calc results to the SysCAD unit RB block.

Data Sections

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

  1. ChemAppSideCalc tab - This first tab allows the user to choose the desired SysCAD stream, corresponding ChemApp Model Configuration unit and set some general options.
  2. QFeed - Optional tab, only visible if ShowQFeed is enabled on the first tab page.
  3. VLE - Optional tab, only visible if the UseSysCADVLE/VLE.On option is enabled on the first tab page.
  4. CFE - Optional tab, only visible if the UseCFE option is enabled on the first tab page.
  5. Bypass - Optional tab, only visible if the WithBypass option is enabled on the first tab page.
  6. Results tab - This tab displays the key results of the calculations.
  7. Input tab - This tab displays a summary of the mapped Input stream as ChemApp species.
  8. Output tab - This tab displays the Output stream results including the amounts of each ChemApp species present in the final mixture.
  9. Diff tab - This tab displays the amounts of each species which are formed or reacted as part of the calculations.
  10. ParamSweep tab - This tab allows the user to generate sets of data.
  11. SelectSpForPlot tab - Optional tab, only visible if the SelectSp option is enabled on the ParamSweep tab. This tab allows the user to select which species to be reported in the sets of data to be generated.
  12. ElemBal tab - This tab displays an elemental balance between the Input and Output streams.
  13. Deportment tab - This tab shows the mass movement of elements for the Solid, Liquid and Gas phases.
  14. IDeportment tab - This tab shows the mass movement of elements for the selected ChemApp phases.
  15. QUnmapped - Optional tab, only visible if ShowQUnmapped is enabled on the first tab page.
  16. QBypass - Optional tab, only visible if ShowQBypass is enabled on the first tab page.
  17. QRxnBypass - Optional tab, only visible if ShowQRxnBypass is enabled on the first tab page.
  18. QProd - Optional tab, only visible if ShowQProd is enabled on the first tab page.
  19. Info tab - contains general settings for the unit and allows the user to include documentation about the unit and create Hyperlinks to external documents.

ChemAppSideCalc tab page

Unit Type: ChemAppSideCalc - 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:
  • For pipes, SysCAD will use the text in the 'ConnectDesc' field - this displays the Source and Destination tags of the pipe;
  • For Feeders/Cross Page Connectors, SysCAD will display the state of the unit, i.e. if it is a Feeder or a Sink, etc.;
  • For other units SysCAD will display the unit class ID.
======== BETA VERSION ========
This program contains ChemApp "light" Copyright GTT-Technologies, Kaiserstrasse 103, D-52134 Herzogenrath, Germany http://www.gtt-technologies.de
Requirements
On Tickbox If this option is deselected, the ChemApp SideCalc model will not be operational and thus no calculations will be performed.
SourceTag Input The tag of the stream that the user wants to perform a ChemApp side calculation on. The format is:
[Unit Operation Tag Name].[Tab Page Name]

Examples: XPG_001.QProd, P_001.Qo, X_001.QProd, TNK_001.QFeed

CalcWhen Manual The side calculation will only be performed if the user presses the Calculate button.
Each Iter The side calculation will be performed at the end of each iteration during the model run.
OnStop The side calculation will be performed once at the end of the run when the model is stopped.
CheckTag Check Tag.png If the user clicks on this button, SysCAD will check that the SourceTag is a valid stream.
Calculate Calculate.png Click on this button to perform the side calculation to determine the conditions of the final solution, based on the specified target value.
AllowUnmappedDuringSolve / Slv.AllowUnmapped Tickbox If enabled, unmapped species will be ignored with no warnings given.
Target Calculation
OpMode...
OpMode Temperature The target variable is the Temperature of the final solution.
Enthalpy The target variable is the Enthalpy of the final solution. SysCAD Enthalpy is maintained.
Enthalpy ChemApp The target variable is the Enthalpy of the final solution. ChemApp Enthalpy is maintained.
PhaseFormation The target variable is the amount of a particular phase present in the final solution.
PhasePrecipitation Available in full ChemApp only. The target variable is the point of precipitation of a second phase from a single phase. For example, if you have a stream which is entirely gas phase, you can calculate the temperature at which a second phase starts to appear.
TemperatureReqd / T_Reqd Input Only visible if OpMode = Temperature. The user specified target temperature for the final solution.
dEnth.Reqd / dH.Reqd Input Only visible if OpMode = Enthalpy or Enthalpy ChemApp. The user specified target change of enthalpy.
Phase List Only visible if OpMode = PhaseFormation or PhasePrecipitation. The user can select one phase from the list of all phases in the ChemApp database.
MoleBasis Tickbox Only visible if OpMode = PhaseFormation. Selecting this tickbox allows user to specify the target mole flow. If this is not selected, then mass flow is used.
MassFlowReqd / QmReqd Input Only visible if OpMode = PhaseFormation and MoleBasis = unticked. The user specified mass flow of the chosen phase that is to be formed.
MoleFlowReqd / QMlReqd Input Only visible if OpMode = PhaseFormationand MoleBasis = ticked. The user specified mole flow of the chosen phase that is to be formed.
Detailed Tickbox If enabled, displays additional parameters for the user to specify, see AdjustVar section.
Environmental Heat Transfer
HeatLossMethod None No heat transfer between the unit and the environment.
Fixed HeatFlow The user specifies a fixed heat loss between the unit and the environment.
Ambient SysCAD calculates the overall heat loss based on user specified HTC and Area and the temperature difference between the Feed and environmental temperatures. The environmental temperature is assumed to remain constant.
EHX.HeatLossReqd Input Visible when the HeatLossMethod = Fixed HeatFlow. The required heat loss.
EHX.HTC Input Visible when the HeatLossMethod = Ambient. The Overall Heat Transfer coefficient.
EHX.Area Input Visible when the HeatLossMethod = Ambient. The Heat Transfer area.
EHX.AmbientT Display Visible when the HeatLossMethod = Ambient. The ambient temperature. The ambient temperature is specified in the Plant Model - Environment_Tab
EHX.HeatLoss Calc Visible when the HeatLossMethod = Ambient. The calculated heat flowrate.
(The following fields are only displayed if the Detailed option has been enabled.)
AdjustVar...
Method AdjustT The chosen independent variable for adjustment is Temperature.
AdjustQMl The chosen independent variable is flow of an individual species.
InitTemperature / InitT Input Only visible if Method = AdjustT. The initial guess to be used for the temperature of the final solution.
MaxTemperature / MaxT Input Only visible if Method = AdjustT. The maximum temperature of the final solution.
TargSpAdjust List Only visible if Method = AdjustQMl. The user can select a single species to have limits imposed from the list of all species in the loaded database.
MoleBasis Tickbox Only visible if Method = AdjustQMl. If this box is ticked, user specifies the minimum and maximum mole flow of selected species. If this is not ticked, user can specify these flows in terms of mass flow.
MinSpMassFlow / MinSpQm Input Only visible if Method = AdjustQMl and MoleBasis is not ticked. The minimum mass flow of the selected species in the final solution.
MaxSpMassFlow / MaxSpQm Input Only visible if Method = AdjustQMl and MoleBasis is not ticked. The maximum mass flow of the selected species in the final solution.
MinSpMoleFlow / MinSpQMl Input Only visible if Method = AdjustQMl and MoleBasis is ticked. The minimum mole flow of the selected species in the final solution.
MaxSpMoleFlow / MaxSpQMl Input Only visible if Method = AdjustQMl and MoleBasis is ticked. The maximum mole flow of the selected species in the final solution.
TargCalc ...
UseRelaxation Tickbox
RelaxationFactor Input The relaxationFactor, used when UseRelaxation is ticked. Values limits: 0.001 < RelaxationFactor < 5.
Settings TargSolv Reset Button.png If the user clicks on this button, the all the target solver settings will be reset to their default values.
Solver Options
UseSysCADSolver Tickbox Whether to use internal SysCAD solver or internal solver of ChemAppEngine. This option is only shown when a choice exists. Some options allow only the SysCAD solver or the ChemApp solver, and then this is hidden.
Chemistry Model
ChemModel...
UnitTag List The tag of the relevant ChemApp Model Configuration unit model- this may be chosen from the drop down list of all ChemApp Model Configuration unit models available in the project.
ChemModel.Selected Display The tag of the relevant ChemApp Model Configuration unit model.
Check Check Tag.png If the user clicks on this button, SysCAD will check that the UnitTag is a valid ChemApp Model Configuration unit model.
ConnOK Tickbox If SysCAD finds a valid ChemApp Model Configuration unit model, then this field will be enabled.
Status OK The specified chemistry model (ChemApp Model Configuration) has been initialised correctly and the database file has been found and loaded correctly.
ChemModel Tag not Specified No tag has been specified for the Chemistry Model. Specify the desired Chemistry Model (ChemApp Model Configuration) in the UnitTag field.
Valid ChemModel Tag Required The tag specified for the Chemistry Model in the UnitTag field is invalid and needs to be corrected.
Init Required The specified Chemistry Model (ChemApp Model Configuration) needs to be initialised.
ChemModel Load Required The database of the specified Chemistry Model ((ChemApp Model Configuration) needs to be loaded.
DLL or Version Error There is a problem with the ChemApp DLL or version.
Init Failed Initialisation of the specified Chemistry Model ((ChemApp Model Configuration) has been attempted but failed.
UseSysCADVLE / VLE.On Tickbox This can be used to switch on the SysCAD Vapour Liquid Equilibrium (VLE) calculator. If this is 'On' then the associated page, VLE becomes visible and may be configured.
UseCFE Tickbox If this is ticked, then the CFE (Constrained Free Energy) tab page will appear.
  • This feature is available with the Full version of ChemApp only, and it requires a specially programmed CST file to enable this. If CFE is not available, this ticked box will be greyed out.
  • This option allows a portion of a species to be locked up and not allowed to react.
  • Applying CFE can have a significant effect on the final composition, use of this feature requires detailed knowledge of the process chemistry.
WithBypass Tickbox If this is ticked, then the Bypass tab page will appear.
PhaseElemDeportment Tickbox If this is ticked, then the Deportment tab page will appear. This tab shows the mass movement of elements for the Solid, Liquid and Gas phases.
IPhaseElemDeportment Tickbox If this is ticked, then the IDeportment tab page will appear. This tab shows the mass movement of elements for the selected ChemApp phases.
Options
ShowQFeed Tickbox Allows the user to view the QFeed and associated tab pages, showing the properties of the combined feed stream. See Material Flow Section. This will be prior to any sub-model (eg reactions) actions or ChemApp calculations.
ShowQProd Tickbox Allows the user to view the QProd and associated tab pages, showing the properties of the products. See Material Flow Section. This will be after the actions of any sub-models and ChemApp calculations.
ShowQUnmapped Tickbox Allows the user to view the QUnmapped and associated tab pages. See Material Flow Section. This is the SysCAD species flows which are not mapped to ChemApp species, and therefore are not taken into account in the ChemApp calculation.
ShowQBypass Tickbox Only visible when WithBypass is ticked. Allows the user to view the QBypass and associated tab pages. See Material Flow Section. This is the SysCAD species flows which bypass the ChemApp calculation.
ShowQRxnBypass Tickbox Only visible when WithBypass is ticked. Allows the user to view the QRxnBypass and associated tab pages. See Material Flow Section.
ShowRxnDiff Tickbox Allows the user to view the Diff tab page. This shows the difference between the mapped input stream seen by ChemApp and the ChemApp calculation results.
ShowPlotter Tickbox Allows the user to perform a parameter sweep using the product stream of the side calculator. If this is ticked, then the ParamSweep tab page will appear.
DebugMode Tickbox Allows the user to using the debug mode of ChemApp. When this mode is enabled, a log file will be written to showing the stream inputs seen by ChemApp and calculation results generated by ChemApp.
DebugErrorFile OpenFileButton.png Only visible when DebugMode is ticked. Opens the error debug file that was just written to by the unit operation.
DebugMessageFile OpenFileButton.png Only visible when DebugMode is ticked. Opens the message debug file that was just written to by the unit operation.

Adding this Model to a Project

Insert into Configuration file

Sort either by DLL or Group.

 

DLL:

ScdChemApp.dll

Units/Links

ChemApp: ChemApp SideCalc

or

Group:

General

Units/Links

ChemApp: ChemApp SideCalc

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


Insert into Project

 

Insert Unit

ChemApp

ChemApp SideCalc

See Insert Unit for general information on inserting units.