PHREEQC Reactor

From SysCAD Documentation
Jump to navigation Jump to search

Navigation: Models -> TPS Models -> PHREEQC Models -> PHREEQC Reactor

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.


General Description

The PHREEQC Reactor model allows the user to 'call' the PHREEQC solver to determine the state of a SysCAD stream. The composition, temperature and pressure of the 'Feed' stream are based on the feed to the unit. The unit will then determine the equilibrium conditions of the resulting stream.

The results can be applied to the product stream or just performed as a side calculation (similar to use of the PHREEQC Side Calc Model).

Notes

  1. The user MUST have added and configured a PHREEQC Model Configuration unit in the SysCAD project before this unit can function.
  2. 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.

Diagram

Reactor Diagram.png

The diagram shows a drawing of the PHREEQC Reactor unit, with Feed, Product and Vent streams. When the user inserts the PHREEQC Reactor unit into a flowsheet, a different graphics symbol can be selected from a pull down menu. The streams may be connected to any area of the drawing without affecting the actual connection point as SysCAD ignores the physical position of the connection.

Inputs and Outputs

Label Input / Output No. of Connections Description
    Min Max  
Feed Input 1 10 Feed Stream
Product Output 1 1 Product Stream
Vent Output 0 1 Optional Vent Stream

Model Theory

The PHREEQC Reactor uses the PHREEQC algorithms and data to determine the status of the aqueous solution.

Phreeqc reactor.png

The PHREEQC Reactor can be incorporated into a SysCAD flowsheet, it can be connected with SysCAD inlet and outlet streams.

  1. User connects the PHREEQC reactor with SysCAD input streams,
  2. The SysCAD feed stream(s) using SysCAD species is converted into PHREEQC "Input" using PHREEQC Species. The species mapping is defined in the corresponding PHREEQC Model Configuration unit model.
  3. The PHREEQC Reactor calls the PHREEQC algorithms to determine the status of the mixture using the converted PHREEQC "input" data.
  4. The PHREEQC results are displayed in the "output" tab using PHREEQC species.
    • If the PHREEQC reactor is in side calc mode, the results are NOT converted into SysCAD species. (SysCAD stream outlet = sum of SysCAD inlet streams, no change will occur)
    • If the PHREEQC reactor is in Reactor mode, then the results are converted back into SysCAD species. Please see Species Mapping for more information.

NOTES:

  • The Input, Output and Diff tab pages are displayed using PHREEQC species, as defined in the PHREEQC database file (.dat) 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.

WorkFlow

The suggested workflow for configuring the model is:

  1. Make sure the project contains at least one of the PHREEQC Model Configuration model, and the model is loaded with the correct PHREEQC database you would like to use for the PHREEQC Reactor.
  2. On the PHREEQCReactor Tab page, select the Model type
  3. Choose the Target Calculation "OpMode" and fill in the required information based on the operation mode selection.
  4. Select the correct "ChemModel" (to match step 1)
  5. Set the operating pressure (and any other sub-models)
  6. Perform an equilibrium calculation by pressing Solve in SysCAD.
  7. The Results are displayed in the Results and Output tabs.
  8. Check and fix any species mapping issues. (PHREEQC resulting species may change if the operating conditions change, so it is likely a change of temperature or feed composition will result in different PHREEQC species.)

Data Sections

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

  1. PHREEQCReactor tab - This first tab allows the user to to choose the model (Reactor or Side Calc), corresponding PHREEQC Model Configuration unit and set some general options.
  2. RB - Optional tab, only visible if the Reactions are enabled in the Evaluation Block.
  3. MU - Optional tab, or multiple tabs if more than 1 Makeup is selected. Only visible if one of more Makeups are enabled in the Evaluation Block.
  4. QFeed - Optional tab, only visible if ShowQFeed is enabled on the first tab page.
  5. VLE - Optional tab, only visible if the UseSysCADVLE/VLE.On option is enabled on the first tab page.
  6. CFE - Optional tab, only visible if the UseCFE option is enabled on the first tab page.
  7. Bypass - Optional tab, only visible if the WithBypass option is enabled on the first tab page.
  8. Results tab - This tab displays the key results of the calculations.
  9. Input tab - This tab displays a summary of the mapped Input stream as PHREEQC species.
  10. Output tab - This tab displays the Output stream results including the amounts of each PHREEQC species present in the final mixture.
  11. Diff tab - This tab displays the amounts of each species which are formed or reacted as part of the calculations.
  12. ParamSweep tab - This tab allows the user to generate sets of data.
  13. 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.
  14. ElemBal tab - This tab displays an elemental balance between the Input and Output streams.
  15. Deportment tab - This tab shows the mass movement of elements for the Solid, Liquid and Gas phases.
  16. QBypass - Optional tab, only visible if ShowQBypass is enabled on the first tab page.
  17. QUnmapped - Optional tab, only visible if ShowQUnmapped is enabled on the first tab page.
  18. QRxnBypass - Optional tab, only visible if ShowQRxnBypass is enabled on the first tab page.
  19. QProd - Optional tab, only visible if ShowQProd is enabled on the first tab page.
  20. Info tab - contains general settings for the unit and allows the user to include documentation about the unit and create Hyperlinks to external documents.

PHREEQCReactor tab page

Unit Type: PHREEQCReactor - 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 PHREEQC Copyright U.S. Geological Survey (USGS)
Requirements
On Tickbox This allows the user to disable the PHREEQC calculations, and the unit becomes a simple conduit with no calculations.
Model None (Off) No calculations will be performed and input=output.
Side Calc The results from the PHREEQC calculation will be displayed but will not be applied to the output stream (input composition = output composition). This is similar to using the PHREEQC Side Calc Model.
Reactor The results from the PHREEQC calculation will be applied to the output stream, potentially affecting the composition and temperature/enthalpy of the stream.
AllowUnmappedDuringSolve / Slv.AllowUnmapped Tickbox If enabled, unmapped species will be ignored with no warnings will be given.
Target Calculation
OpMode...
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, additional parameters will be displayed in the 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 7 input fields are only displayed if the Detailed option has been enabled.)
AdjustVar...
Method AdjustT The chosen independent variable for adjustment is Temperature.
AdjustDuty The chosen independent variable for adjustment 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.
MinDuty Input Only visible if Method = AdjustDuty . The minimum Duty.
MaxDuty Input Only visible if Method = AdjustDuty . The maximum Duty.
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.
Chemistry Model
ChemModel...
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.
ChemModel.Selected Display The tag of the relevant PHREEQC Model Configuration unit model.
Check Check Tag.png 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.
  • 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.
Vent.SolidsMethod None No solids will be sent to the Vent stream.
Solids to Vent The user can specify a fraction of the solids in the product to be sent to the Vent stream (if connected).
Vent Solids Fraction The user can specify the fraction of solids in the Vent stream (if connected).
SolidsToVent Input Only visible if Vent.SolidsMethod = Solids to Vent. The fraction of the solids in the product to be sent to the Vent stream (if connected).
Vent.SolidFracReqd Input Only visible if Vent.SolidsMethod = Vent Solids Fractiont. The fraction of solids in the Vent stream (if connected).
Operating P...

Method

AutoDetect

If there are any liquids AND no vapours present in the feed, outlet streams will take the highest pressure of the feeds. Else (eg. some vapours present) outlet streams will take the lowest pressure of the feeds.

LowestFeed

Outlet streams will take the lowest pressure of the feeds.

HighestFeed

Outlet streams will take the highest pressure of the feeds.

Atmospheric

Outlet streams will be at Atmospheric Pressure. The atmospheric pressure is calculated by SysCAD based on the user defined elevation (default elevation is at sea level = 101.325 kPa). The elevation can be changed on the Environment tab page of the Plant Model.

RequiredP

Outlet streams will be at the user specified pressure.

IgnoreLowMassFlow / IgnoreLowQm Tick Box This option is only visible if the AutoDetect, LowestFeed or HighestFeed methods are chosen. When calculating the outlet pressure and temperature of the tank, SysCAD will ignore the low flow feed streams should this option be selected. The low flow limit is set in the field below.
LowMassFlowFrac / LowQmFrac Input This field is only visible if the IgnoreLowQm option is selected. This is the amount any stream contributes to the total flow. For example, if the total feed to the tank is 10 kg/s, and this field is set to 1%. Then any feed streams with less than 0.1 kg/s will be ignored in the pressure calculations.
PressureReqd / P_Reqd Input This field is only visible if the RequiredP method is chosen. This is user specified pressure.
Result Display The actual pressure used for the sum of the feeds which will also be the outlet pressure (unless further model options change the pressure).
EB (Evaluation Block) ...
EvalSequence Calc The sequence in which the sub models (which are part of the evaluation blocks) will be calculated. The sequence is determined by the priority selection for the individual sub-models.
Note: If the user chooses On-AutoSequence then SysCAD will determine the sequence of the sub-models. The sequence followed will be MU1, MU2, etc., RB.
Makeups Input The number of makeup blocks required. Extra dropdown options Makeup1, Makeup2, etc will be added to allow these to be switched on.
MakeupX List This can be used to switch the Makeup Block (MU) on or off and prioritise it in relation to the other sub-models. If this is 'On' then the associated page, MUX becomes visible and may be configured.
Note: This field is only visible if the entry for 'Makeups' is greater than 0. If there is one makeup then X=1. If there are two makeups, then X=1 and X=2, etc.
Reactions List This can be used to switch on the Reaction Block (RB). If this is 'On' then the associated page, RB becomes visible and may be configured.
Note: The user does not have to configure a reaction file, even if this block is checked.
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 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 reactor. If this is ticked, then the ParamSweep tab page will appear.
PHREEQCInput PHREEQCInput button.png 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.

 

DLL:

ScdPHREEQC.dll

Units/Links

PHREEQC: PHREEQC Reactor

or

Group:

Energy Transfer

Units/Links

PHREEQC: PHREEQC Reactor

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


Insert into Project

 

Insert Unit

PHREEQC

PHREEQC Reactor

See Insert Unit for general information on inserting units.