Reaction Block Summary

From SysCAD Documentation
Jump to navigation Jump to search

Navigation: Models ➔ Sub-Models ➔ Reaction Block Summary

Overview Reaction Block Data Section RB Sub Model (Model Theory)
Reaction Editor Reaction Block Summary Reaction Block Tabs (Main) Individual Reactions Reaction Extents Source / Sink /
Heat Exchange
Solving Order -
Sequential or Simultaneous
Energy Balance Heat of Reaction
/ Heat of Dilution
/ Partial Pressures

General Description

Many SysCAD models have the facility to allow the user to enable chemical reactions in the unit. If a unit has this facility, the first access window will have a field called 'Reactions' Button Small 1.png.

  1. To enable the reactions, change the status of the field from 'Off' to some version of 'On' and SysCAD creates a reaction block for the model.
    • For some unit models, the only option for the Reactions field is 'Off' or 'On'.
    • If the Reaction Block is part of an Evaluation Block (EB) then the user may use the 'On-AutoSequence' option or change the evaluation sequence relative to other sub-models by selecting On-Sequence1, On-Sequence2, etc. (refer to Evaluation Block for more information).
    • In dynamic mode, units which have the facility for surge may allow reactions as part of a Content Evaluation Block (CEB). This allows the user to have the reactions occur on the content or surge of the unit and is referred to as a Content Reaction Block (CRB).
  2. Once reactions are switched 'On', an RB or CRB tab will appear as shown below.
    • The user may then access the RB tab and click on the 'Edit RCT File' button Button Small 2.png, as shown below:
    Edit Reactions.png
  3. Pressing the 'Edit RCT File' button will start the reaction editor, see Reaction File for more information.
    • If reaction editor does not start, please see Reaction Editor for instructions.
  4. The completed reaction file is loaded into the unit
    • A user can also manually reload the reaction by pressing the "Reload RCT File" button.
  5. When the SysCAD solver is activated, it will solve the unit with the defined reactions.

Video Links

Location of Reaction Files

  • All reaction files used in a project must be stored within the project in a folder called Reactions.
  • SysCAD automatically creates this folder when you start a new project or upgrade an older project.
  • You may check the location and names of all reaction files in a project by accessing the Project Window - Files List.

Reaction File Format

Chemical reactions are defined in a text file.

The recommended method of editing reaction files is to use the SysCAD Reaction Editor. However, any text editor can be used to edit or view these reactions (see Reaction File (RCT) Text Format). The reaction filename must have the extension .rct.

NOTE:

  • Available from Build 139.32925. It is possible to load an empty reaction file (no reactions), thus allowing a reaction file to contain Reaction Heat Exchange (RHX) only.
  • In builds prior to Build 139.32925, the reaction file must contain at least one reaction. Reaction sources, sinks and heat exchange can not be used in isolation without at least one reaction.

Reaction Block Options and Features

  1. Reaction Solve Order: Reactions within a single reaction block may be solved sequentially or simultaneously. By default the reactions will be solved sequentially, which is the recommended method. Please refer to Solving Reactions for more information.
  2. Reaction Direction: A reaction may proceed in the forward direction only, or may be a reversible reaction, refer to Reaction Directions for more information.
  3. Reaction Extent: There several methods for specifying the extent of each reaction, refer to Reaction Block - Extents for more information.
    • Most reaction extent types are usable for both steady state and dynamic projects.
    • For dynamic projects, reactions may happen instantaneously if specified within the RB blocks (as per steady state projects) or with time constraints if specified within the CRB blocks (Content Reaction Blocks).
    • There are two extent types that will work only in dynamic mode, these contain the word "dynamic" in the extent type name.
    • When choosing reaction extent types, keep in mind factors such as reaction sequence, reaction order, limiting reactants and so on.
    • When using certain extent types, user may use Limit Amount/Fraction Reacted to apply range or constraint to the reactions.
    • Reaction extent can also be based on user defined calculations or selected species property values.
    • See Hints and Comments for more information.
  4. Showing mass/moles reacted per reaction - Refer to Species Change Information
  5. Showing estimated reactant requirements - Refer to Show Species Requirement
  6. Heat of Reaction: Refer to Heat of Reaction (HOR). This includes an explanation of the HOR override for individual reactions. For overall override refer to Override Product Temperature options.
  7. Reaction Source/Sink: A reaction block can optionally have sources and/or sinks of species. Refer to Reaction Block - Other for more information.
  8. Reaction Heat addition/removal: A reaction block can have heat exchange defined. Refer to Reaction Heat Exchange for more information.
  9. Heat of Dilution value reporting: There are additional options and reporting fields available/relevant when a heat of dilution species (e.g. H2SO4(aq)) or a species whose enthalpy changes with pressure (e.g. H2O(g)) is present in a stream where a reaction is taking place. These topics are discussed in more detail in Heat of Dilution in Reaction Energy Calculations and Partial Pressure of Gases in Reaction Energy Calculations.
  10. Summary of Reactions - Table of all reactions in this reaction block. Refer to RS - Summary Table Information for available options.

Reaction Block Settings

  1. Extent Type
    • This list box allows the user to set the error tracking methods for the current RB block.
    • Options are: All_Strict, All_Target, Strict or Target.
    • The last two options, Strict or Target, set the default option for the individual reactions.
    • If the user wants to set the options for individual reactions, select either Strict or Target for ExtentType on the RB tab page, and then set the desired option for each reaction in the Extent.Type field.
    • For simultaneous reactions, the user should change this to All_Target.
    • This setting will also affect whether warnings are displayed if reactions are restricted by the LimitAmountReacted or LimitFractionReacted settings.
  2. Limit Amount Reacted
    • This list box allows the user to limit the amount of the extent species reacted for each individual reaction.
    • Depending on the option chosen (Mass/Mole, Forward/Reverse/Both), additional input fields will be available for each individual reaction.
    • If the limits are reached, the unit will give a warning if ExtentType is set to Strict.
    • This can be very useful for dynamic reactions, see Hints and Comments for some hints on how this can be used.
  3. Limit Fraction Reacted
    • This list box allows the user to limit the fraction of the extent species reacted for each individual reaction.
    • Depending on the option chosen (Forward/Reverse/Both), additional input fields will be available for each individual reaction.
    • If the limits are reached, the unit will give a warning if ExtentType is set to Strict.
    • This can be very useful for dynamic reactions, see Hints and Comments for some hints on how this can be used.
  4. Override Product Temperature
    • This option is recommended if the final temperature from the RB block is set by the user. The overall Energy Balance of the model is maintained and reported in the overall Energy Balance on the first RB tab page and on the Audit page. See Override Product Temperature Option for more information.
    • Selecting this option results in fewer computations in SysCAD and hence increases the solver speed. The HOR of individual reactions does not need to be calculated and is not shown.
    • If this option is enabled an additional group of RB.ProductTemp tags will be visible.

NOTE:

The Limit Amount/Fraction Reacted can be used in a Dynamic project to define maximum reaction rates when using certain reaction extent types. See Hints and Comments for more information.

Display Additional Reaction Information

Users may display additional information for the reactions by changing settings on the RB tab. This will display the additional information for ALL individual reactions and, in the case of the Energy and Species Requirement options, for the overall Reaction Block.

The image on the right shows ALL of the information that may be displayed for each individual reaction if All Energy Info (EnergyInfo), All Species - Both (SpChangeInfo) and AsBoth - All (ShowSpRequirements) have been selected for extra information, AND both ShowReactionLimits and ShowReactionSummary have been enabled AND the 'All Fields' button has been clicked. (Normally hidden fields are shown with a red cross on the left hand side)

RB Extra Energy and Species info 139.png

EnergyInfo

Displays extra information about the energy for the Overall Reaction Block AND each Individual Reaction.
Options include:
Button Small 1.png
  • Basic Info Only: Energy parameters calculated at 0°C and Reaction Pressure will be shown.
  • User Defined Info: Energy parameters calculated at User Defined Temperature (UserDefT) and User Defined Pressure (UsrDefP) will be shown.
  • Feed Info: Energy parameters calculated at Feed Temperature and Reaction Pressure will be shown.
  • Product Info: Energy parameters calculated at Product Temperature and Reaction Pressure will be shown.
  • Feed and Product Info: Energy parameters calculated at Feed and Product Temperatures and Reaction Pressure will be shown.
  • Reference Info: Energy parameters calculated at Reference conditions (0°C and 101.325kPa) will be shown.
  • All Energy Info: Energy parameters calculated at various conditions (as specified in above options) will be shown.
Please refer to Overall Heat of Reaction Data Fields and Individual Heat of Reaction Data Fields for an explanation of the fields.

SpChangeInfo

Displays extra information about the amount of each species reacted or produced in each Individual Reaction.
Options include:
Button Small 2.png
  • Basic Info Only
  • All Species - Mass
  • All Species - Molar
  • All Species - Both
Please refer to Species Change Data Fields for an explanation of the fields.

ShowReactionLimits

Button Small 3.png If this is enabled, then each individual reaction will display additional information about the maximum mass and molar changes that are possible with the reaction in the forward and reverse directions, based on the available amounts of reaction species.

ShowSpRequirements

Displays extra information about the amount of each species required to meet the required extent for the Overall Reaction Block AND Individual Reaction.
Options include:
Button Small 4.png
  • Off
  • AsMass - All - adds the mass flow requirements of all the reacting species.
  • AsMass - Select - adds the mass flow requirements of the selected species.
  • AsMoles - All - adds the mole flow requirements of all the reacting species.
  • AsMoles - Select - adds the mole flow requirements of the selected species.
  • AsBoth - All - adds mass and mole flow requirements of all the reacting species.
  • AsBoth - Select - adds mass and mole flow requirements of the selected species.
  • The results for the overall reaction block can be found on RB.. Tab.
  • The results for the individual reaction are displayed at the bottom of each individual reactions.

Refer to Hints and Comments for more some tips and refer to Example - Using Show Species Requirements for an example of how this can be used.

Example project Lime Preparation (Makeup) Project shows how to use the species requirements to calculate the Lime requirements (with excess).

ShowReactionSummary

Button Small 5.png If this is enabled, then each individual reaction for ALL reaction blocks in the project will display additional information about the Mass and Molar changes associated with the species in that reaction.
RB Individual Reaction3 139.png

Hints and Comments

General Hints

  1. By default, reactions will solve in a sequential order, the order is defined by how they appear in the reaction file. However, the user can change the reaction evaluation sequence by inserting a different sequence number for each individual reaction. For simultaneous reactions, the user must provide the same sequence number to all the reactions to be solved at the same time. All reactions found under a specified sequence number will be assigned the same sequence number and thus solved simultaneously. Sequential reactions are computationally faster, so it is recommended that simultaneous reactions are only used where absolutely necessary.
  2. For simultaneous reactions, problems may arise if a species acts as both as a reactant and a product because the reacting amount available comes solely from the feed, not from the reactions. This is not a problem for sequential equations.
  3. Heat of formation information must be entered for all species involved in reactions. If Hf information is missing, then Heat of Reaction values should be provided. If neither is present, then SysCAD will give a warning and the Heat of Reaction value calculated will be incorrect (any missing Hf's are assumed to be +100 kJ/mol).
  4. If multiple reactions are present in single reaction block, the Final Concentration or Final Fraction extent methods give the FinalConc or FinalFrac at that specific reaction and NOT for the reaction block exit stream. Therefore it is recommended to put these type of reactions last in the list.
  5. Make sure -> is used instead of = or <-> when writing reactions that are non-reversible.
  6. Consider using the more efficient OverrideProductT option (see Override Product Temperature Option) where the product temperature of the unit that includes reactions is set, rather than using EHX or RB.HX.
  7. If the order of the reactions is changed, SysCAD will remember any overridden extents and still associate them with the old reaction number. Eg. if the extent of the old R2 was overridden to be 10%, then the extent of the new R2 will also be manually overridden to 10%.
  8. The outlet temperature from the reaction block (Prod.T) will be set to no less than 10 degrees below the project minimum temperature and no more than 10 degrees above the project maximum temperature. This may cause an energy imbalance across the unit. These temperature limits can be set in the Project Configuration file.
  9. A species which has been defined as a Reaction Source cannot be used as the extent species for any reactions in the same reaction block.
  10. Turning on the ShowSpRequirements option will return an estimated amount of the "selected" or all reacting species involved in a reaction. When used correctly, this can be useful as a feedforward control for reagents supply.
    • Note that this may not work for all reaction files, the user may need to check factors such as reaction extent type, reaction direction, reaction extent species and reaction order to make sure there is a possible calculation path for this to work correctly.
    • Example project Lime Preparation (Makeup) Project shows how to use the species requirements to calculate the Lime requirements (with excess).
  11. User may specify a limit for the reaction extent to avoid fully reacting a species. (This option is switched on from RB Tab - under Settings - LimitFractionReacted, when switched on, extra limit fields will be visible for each individual reactions.)
  12. User may specify a limit for the maximum mass or moles reacted. (This option is switched on from RB Tab - under Settings - LimitAmountReacted, when switched on, extra limit fields will be visible for each individual reactions.)
  13. The UserCalc reaction extent type can be a very useful way to define a reaction (with a calculation) to avoid the need of extra PID control.
    • The user calculation may be some definition of concentration/ratio calculation.
    • The Gold Example project shows the use of reaction extent type User Calc.
  14. If reactions are not solving, the user can either increase the maximum iterations or increase the tolerance values. These are set at the bottom of the first RB tab page.

Using Reaction Extents and Reaction Limits in Dynamic projects

For dynamic projects with CRB, users may use an “iterative” type Extent with the Limit Amount Reacted or Limit Fraction Reacted options switched on to control the rate (kinetics).

  • This is significantly easier and numerically more stable than using an amount reacted per timestep type Extent control.
  • An "iterative" type reaction extent is solved iteratively, and includes extent types: Final XXX, Ratio, Equilibrium, UserCalc, Sp Calc and Sp Model Prop.
  • The following are not "iterative" reaction extent types: Amount Reacted, Dynamic Rate & Dynamic Fraction.
  • Users may set the maximum rates independent of setting final composition conditions via the extent type setting.
  • The reaction limits can be used as maximum rate. This maximum rate can be applied as a form of ranging when using certain extent types or controls.
  • The Forward and Reverse reaction limits can be set separately, this can correspond to kinetic rates in each direction.
    • If for example, precipitation occurs more readily than dissolution, then different values can be set in forward or reverse rates to represent the kinetics.
    • If the kinetic rates differ significantly, we can block the reaction in one direction by entering a zero value for the limit.

Example - Using UserCalc Reaction Extent

The UserCalc reaction extent type can be a very useful way to define a reaction (with a calculation), especially in a dynamic simulation. The UserCalc extent type can be particularly useful to get the correct result in a time step, and for steady state improved accuracy/convergence per iteration.

  • A good example is Langmuir Adsorption Isotherm. The equation is shown below (Mass Transfer Fundamentals and Applications, A.L. Hines and R.N. Maddox, 1985):
[math]\displaystyle{ q_A = Q * \cfrac{K^{'}C_A}{1+K^{'}C_A} }[/math]
where:
qA = equilibrium uptake by the adsorbent (g solute/g solid)
Q = weight of adsorbate for complete monolayer coverage (g solute/g solid)
K' = constant (cm³/mol)
CA = concentration of solute in fluid phase (mol/cm³)
  • If we have a reaction defined for the adsorption of a aqueous metal ion onto the surface of a solid adsorbent, then we can use a UserCalc to determine the required reaction extent which satisfies the equation above. The reaction would usually involve an ion exchange such as the following:
LangmuirExample1.png
where:
Li = Lithium, the metal to be adsorbed
K = Potassium, the metal to be exchanged
Cl = chloride aqueous ion
R = exchange resin species (represented by a pseudo element R)
  • If we rearrange the Langmuir equation shown above to have the LHS equal to zero, then we can define a UserCalc which should equal zero:
LangmuirExample2.png
where:
ResLi = a previously defined user calc for the ratio of Li on the resin to pure resin (equivalent to qA)
Val(1) = reference to Project User Value 1 (set in Plant Model) (equivalent to Q)
Val(2) = reference to Project User Value 2 (set in Plant Model) (equivalent to K')
C_Li = a previously defined user calc for the liquid molar concentration of Li in the aqueous phase (equivalent to CA)
  • The reaction extent for the adsorption reaction can now be set to equal the Langmuir UserCalc with a target value of 0.
LangmuirExample4.png
LangmuirExample3.png

Example - Using Show Species Requirements

An example of "how Show Species Estimates can be used to improve controller" can be found in "High Pressure Autoclave Leaching Example".

In this example project, we have a reaction block with many reactions, acid is being both consumed and produced in reactions (as shown in the following picture):

ShowSpReqExample1.png

The amount of acid needed by the reaction block = Total acid consumed - Total Acid produced - Acid in recycle stream + excess Acid required. So theoretically, one can use a PGM file to calculate the amount of acid required from the stoichiometric ratio and reaction extents. However, this could become very tedious when we have many reactions in the reaction block.

An easier way is to let SysCAD do part of the above calculation for you. To do so:

ShowSpReqExample2.png
  1. On the RB tab, select to show Species mass flow requirements for H2SO4(aq)
  2. Press F10 twice to solve the project for one iteration. This will calculate the H2SO4(aq) requirements and display the total required amount on the RB.. tab.
    • This requirement does not include the recycle stream acid or excess acid requirements, we can adjust these using PGM and PID.
  3. Add a calculation to the PGM file to subtract the recycle stream acid from the estimated amount. If no excess is required, then we can use the estimated value directly as a feed forward controller.
    • This can be done inside an if statement in the PGM file, when excess acid requirement is zero, we can turn the PID controller to manual mode, and set the required amount directly.
  4. The excess amount in the project is defined as g/L of free acid, we have added a PID controller to adjust the acid requirements to meet this target. To assist the PID controller, we can
    • use estimated amount to set the minimum controller output, this will ensure there is always enough acid to the controller.
    • use estimated amount multiply by a factor to set the maximum controller output, having a tighter range will ensure we don't add too much acid, thus improving the solve speed of the controller.

See below for the above mentioned PGM code.

Example PGM code      
;-------------------- Using Estimated Acid Requirements----------------------
Acidconc_Act = ["P_114.Qo.CMC:LPh.H2SO4 (g/L)"]
ShowSpReqd_Acid = ["High_Pressure_Autoclave.RB.MsReqd.H2SO4(aq) (t/h)"]
Estimated_Acid_Rqed = (ShowSpReqd_Acid - ["P_107.Qo.QM:Ph.H2SO4(aq) (t/h)"])/["Conc_Acid.Content.MF.H2SO4(l) (.)"]
Excess_Acid = (["Acid_Mixer.QFeed.CQM.H2SO4 (t/h)"] - ShowSpReqd_Acid )/ ShowSpReqd_Acid *100
["Autoclave_Acid.Cfg.[1].OutMin"] = Estimated_Acid_Rqed	
["Autoclave_Acid.Cfg.[1].OutMax"] = Estimated_Acid_Rqed * 1.1	
If Acidconc_SP > 0
	["Autoclave_Acid.Cfg.[1].Auto"] = 1
else
	["Autoclave_Acid.Cfg.[1].Auto"] = 0
	["Autoclave_Acid.Cfg.[1].Out"] = Estimated_Acid_Rqed
endif