PHREEQC Side Calc Model
|PHREEQC Overview||PHREEQC Model Configuration||PHREEQC Direct Calc Model||PHREEQC Side Calc Model||PHREEQC Reactor|
New for Build 138. Currently in BETA - contact SysCAD for demonstrations or further information.
The PHREEQC Side Calc model allows the user to 'call' the PHREEQC 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 PHREEQC 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.
- The user MUST have added and configured a PHREEQC Model Configuration unit in the SysCAD project before this unit can function.
- The user MUST have installed a version of PHREEQC on their computer to make use of the PHREEQC functionality in SysCAD. Please see wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc for more information.
The diagram shows the default drawing of a PHREEQC Side Calc unit model.
Inputs and Outputs
There are no connections to this unit.
The PHREEQC Side Calc Model uses the PHREEQC algorithms and data to determine the status of the aqueous solution in the defined stream.
The Input, Output and RxnSummary pages are displayed using PHREEQC species, as defined in the database (dat) file specified in the corresponding PHREEQC 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.
The calculations performed are similar to using PHREEQC directly, except the contents of the SysCAD stream are mapped to equivalent PHREEQC species using the settings defined in the PHREEQC Model Configuration unit model. Please see wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc for more information.
The suggested workflow for configuring the model is:
- Make sure the project contains at least one of the PHREEQC Model Configuration model, and the model is loaded with the correct PHREEQC database file you would like to use for the side calculation.
- On the Side Calc PHREEQCSideCalc Tab page, type in the name of the SysCAD stream or content you wish to evaluate (eg: P_001.Qo OR TNK_001.QFeed)
- Choose when to perform the calculation.
- Choose the Target Calculation Mode and fill in the required information based on the mode selection.
- select the correct ChemModel (to match step 1)
- Perform an equilibrium calculation by pressing the "Calculate" button or pressing Solve in SysCAD.
- The Results are displayed in the Results and Output tabs.
Suggestions on how to use the results:
- The PHREEQC 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 PHREEQC Side Calc, the reaction and reaction extents can be configured to match results from the PHREEQC Side calc. User can use the SetTag controller to transfer PHREEQC Side Calc results to the SysCAD unit RB block.
The tabs and variable names are described in detail in the following tables.
- PHREEQCSideCalc tab - This first tab allows the user to choose the desired SysCAD stream, corresponding PHREEQC Model Configuration unit and set some general options.
- QFeed - Optional tab, only visible if ShowQFeed is enabled on the first tab page.
- VLE - Optional tab, only visible if the UseSysCADVLE/VLE.On option is enabled on the first tab page.
- CFE - Optional tab, only visible if the UseCFE option is enabled on the first tab page.
- Bypass - Optional tab, only visible if the WithBypass option is enabled on the first tab page.
- Results tab - This tab displays the key results of the calculations.
- Input tab - This tab displays a summary of the mapped Input stream as PHREEQC species.
- Output tab - This tab displays the Output stream results including the amounts of each PHREEQC species present in the final mixture.
- Diff tab - This tab displays the amounts of each species which are formed or reacted as part of the calculations.
- ParamSweep tab - This tab allows the user to generate sets of data.
- 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.
- ElemBal tab - This tab displays an elemental balance between the Input and Output streams.
- Deportment tab - This tab shows the mass movement of elements for the Solid, Liquid and Gas phases.
- QBypass - Optional tab, only visible if ShowQBypass is enabled on the first tab page.
- QUnmapped - Optional tab, only visible if ShowQUnmapped is enabled on the first tab page.
- QRxnBypass - Optional tab, only visible if ShowQRxnBypass is enabled on the first tab page.
- QProd - Optional tab, only visible if ShowQProd is enabled on the first tab page.
- Info tab - contains general settings for the unit and allows the user to include documentation about the unit and create Hyperlinks to external documents.
PHREEQCSideCalc tab page
Unit Type: PHREEQCSideCalc - The first tab page in the access window will have this name.
|Tag (Long/Short)||Input / Calc||Description/Calculated Variables / Options|
|======== BETA VERSION ======== |
This program contains PHREEQC Copyright U.S. Geological Survey (USGS)
|On||Tickbox||If this option is deselected, the PHREEQC 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 PHREEQC side calculation on. The format is:
[Unit Operation Tag Name].[Tab Page Name]
Examples: XPG_1.QProd, P_1.Qo, X_1.QProd, TNK_1.QFeed
|CalcWhen||Manual||The side calculation will only be performed if the user presses the Calculate button.|
|EachIter||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||If the user clicks on this button, SysCAD will check that the SourceTag is a valid stream.|
|Calculate||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.|
|OpMode||Temperature||The target variable is the Temperature of the final solution.|
|FeedT||The target variable is the Temperature of the feed solution.|
|Enthalpy||The target variable is the Enthalpy of the final solution.|
|PhaseFormation||The target variable is the amount of a particular phase present in the final solution.|
|SpeciesFormation||The target variable is the amount of a particular species present in the final solution.|
|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. The user specified target duty.|
|Phase||List||Only visible if OpMode = PhaseFormation. The user can select one phase from the list of all phases in the PHREEQC database.|
|Species||List||Only visible if OpMode = SpeciesFormation. The user can select one species from the list of all species in the PHREEQC database.|
|MoleBasis||Tickbox||Only visible if OpMode = PhaseFormation or SpeciesFormation. 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 or SpeciesFormation and MoleBasis = unticked. The user specified mass flow of the chosen phase/species that is to be formed.|
|MoleFlowReqd / QMlReqd||Input||Only visible if OpMode = PhaseFormation or SpeciesFormation and MoleBasis = ticked. The user specified moles of the chosen phase/species that is to be formed.|
|Detailed||Tickbox||If enabled, displays additional parameters for the user to specify as explained below in 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.)|
|Method||AdjustT||The chosen independent variable is Temperature.|
|AdjustQMl||The chosen independent variable is flow of an individual species.|
|AdjustDuty||The chosen independent variable is Duty.|
|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.|
|MinDuty||Input||Only visible if Method = AdjustDuty. The minimum Duty (external energy added or removed from the model).|
|MaxDuty||Input||Only visible if Method = AdjustDuty. The maximum Duty (external energy added or removed from the model).|
|RelaxationFactor||Input||The relaxationFactor, used when UseRelaxation is ticked. Values limits: 0.001 < RelaxationFactor < 5.|
|Settings||If the user clicks on this button, the all the target solver settings will be reset to their default values.|
|UnitTag||List||The tag of the relevant PHREEQC Model Configuration unit model- this may be chosen from the drop down list of all PHREEQC Model Configuration unit models available in the project.|
|Check||If the user clicks on this button, SysCAD will check that the UnitTag is a valid PHREEQC Model Configuration unit model.|
|ConnOK||Tickbox||If SysCAD finds a valid PHREEQC Model Configuration unit model, then this field will be enabled.|
|Status||OK||The specified chemistry model (PHREEQC 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 (PHREEQC 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 (PHREEQC Model Configuration) needs to be initialised.|
|ChemModel Load Required||The database of the specified Chemistry Model ((PHREEQC Model Configuration) needs to be loaded.|
|DLL or Version Error||There is a problem with the PHREEQC DLL or version.|
|Init Failed||Initialisation of the specified Chemistry Model ((PHREEQC 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.
|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.|
|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 PHREEQC 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 PHREEQC 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 PHREEQC species, and therefore are not taken into account in the PHREEQC 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 PHREEQC 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 PHREEQC and the PHREEQC 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.|
|PHREEQCInput||If the user clicks on this button, SysCAD will create the files PHREEQC_outputIn.pqi and PHREEQC_outputOut.pqi in the CfgFiles folder of the project. These files contain information relating to the PHREEQC input and output streams used in the model and can be opened with the PHREEQC software.|
Adding this Model to a Project
Insert into Configuration file
Sort either by DLL or Group.
PHREEQC: PHREEQC SideCalc
PHREEQC: PHREEQC SideCalc
See Project Configuration for more information on adding models to the configuration file.
Insert into Project
See Insert Unit for general information on inserting units.