# Reaction Editor

Navigation: User Guide ➔ Editors and Utilities ➔ Reaction Editor

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

# Introduction

With all the features it provides, the SysCAD Reaction Editor makes it easier to create and edit reaction files. Therefore, we highly recommend our SysCAD users install it.

These short video clips are available in the Tutorial Section of the Help documentation, or directly in YouTube.

# Set up the Reaction Editor

## Installing the SysCAD Reaction Editor

1. When SysCAD is installed there is an option to install the Reaction Editor. If this option was selected then there is nothing more to do.
2. If Reaction Editor wasn't installed as part of the SysCAD install then the user needs to obtain a copy of the Reaction Editor installation file. They can obtain this:
• Run the Reaction Editor installer file (.msi) and follow the steps outlined in the dialog boxes. If the default settings are used, the Reaction Editor will be installed in the folder C:\Program Files\SysCAD.
3. The Reaction Editor uses the .net framework (version 4.5).

## Reaction Editor Options

 On the main Reaction Editor Edit menu, there is an Options field. This field has two options which can be enabled or disabled: Autoload All On Startup: If enabled, all reactions files in the current project will be loaded when the reaction editor is first launched Enforce Charge Balance: If enabled, Charge imbalances in reactions will be reported as errors. This is a new option only available in a recent version of Reaction Editor (v1.2 or later).

# Reaction Files

## Location of Reaction Files

 When a new project is created, a sub-folder called Reactions is automatically added, any reactions created within the project will be automatically added to this folder. The picture shown here is for the Demo Nickel Copper Project. This folder contains the file 'SpeciesData.ini', which contains all of the information about the species used within the project. The SysCAD Reaction Editor uses the information in this file to display the available species, determine if reactions are balanced, autobalance reactions if required, etc. The SysCAD Reaction Editor will automatically save any new reaction files into this folder. Note: If the user add or deletes species from the SysCAD project while the reaction editor is opened, the user will need to: restart the SysCAD project to update the 'SpeciesData.ini' file restart the reaction editor to update the species list.

## Creating a New Reaction File

A reaction file can be automatically created when you press the "Edit Rct File" button.

• The RCT_Name can be left empty, in this case, the reaction file name created will be "UnitName".rct, so for the example used in the picture above, it will be Ni_Diss_2.rct.
• The RCT_Name can also be typed in prior to pressing the Edit_Rct_File" button. If the file does not exist, it will create one for you.
• The first time a reaction file is created in a project, the Reaction Editor will start with a blank reaction.
• Please see Adding a New Reaction for information on how to add the reactants and products.

## Opening Existing Reaction Files

Once SysCAD has been set to use Reaction Editor (see How to Set SysCAD to use the SysCAD Reaction Editor), reaction files can be opened from SysCAD by pressing the 'Edit RCT' button.

The SysCAD Reaction Editor will start up and shows all reaction files in the current project with the selected one being in the current window. See example below:

Number Description
The existing reactions are displayed in the reaction Window.
The reaction editing panel will show details of the selected reaction, such as reactants, products, reaction extent, heat of reaction override and so on. Use this to edit the reaction.
The species used in the currently selected reaction are in bold and in blue in the species list in the right hand side window. The species used in other reactions in the current reaction file are in bold and in black in the species list in the right hand side window.
The filter can be used to shorten the display of the species list. For example, type in (aq) will show only the aqueous species, or type in Ni will display species containing Ni only.
The Title bar shows the current reaction file name.
All the reaction file in the current project are listed here.
 Files in Grey colour are in the same project but has not been opened in the reaction editor, click on the file to open it Files in Black are opened in the reaction editor with no unsaved modifications. Files in Blue are opened in the reaction editor with unsaved modifications.
This shows the species database location. See note in Location of Reaction Files
The log window will display any messages/warnings/errors found by the Reaction Editor. To clear the log go to View-Clear Log.

## Saving and Closing Reaction Files

 If a file has been changed it will be blue in the left hand side window and have an '*' next to the file name on the top of the reaction window. If there are any unsaved changes to the file, the user will be asked if they wish to save the file prior to it being closed. Reaction files can be individually closed either by using the menu command File-Close or clicking on the X in the top right corner of the reaction window.

# Editing the Reactions

For example, let's add the following reaction, note it is in an unbalanced state:

$\ce{ FeSO4(aq) + O2(g) + H2SO4(aq) \; = \; Fe2[SO4]3(aq) + H2O(l) }$

The image below shows a new reaction being added:

Number Description
This table continues from the previous table in Opening Existing Reaction Files, refers to the numbers listed in that table.
Reactant box - drag the species from the species list to here. Users do not have to type in the + signs when using drag and drop, simply drag and drop all the reactants. For our example: These are shown with a green dot in the above picture, we will also need drag in O2(g), which is not shown in the picture.
Product box - drag the species from the species list to here. Users do not have to type in the + signs when using drag and drop, simply drag and drop all the products. For our example: These are shown with a purple dot in the above picture.
button - Once all the reactants and products are placed in the boxes, press to balance the reaction. See Balancing the Reaction.
Reaction Extents - Specify the reaction extent type, values, and the extent species. Please see Reaction Extents for more detail.
Heat of Reaction - SysCAD normally uses the Heats of Formation of the products and reactants to calculate the Heat of Reaction. However, if a Heat of Formation value is missing in the species database for any compounds involved in the reaction, then user will need to tick the Override tick box and specify a user defined Heat of Reaction.
Once a reaction has been entered, its status will be shown just above the log window on the status line.

Notes:

1. Users should FIRST drag species into the Reactant and Product boxes and THEN adjust the number of moles of each species reacting, or use the automatic balance functionality.
2. The finished reaction may look like this

or the one shown in Opening Existing Reaction Files, depends on the stoichiometric coefficient of the first species in the reaction when the button is pressed. See Balancing the Reaction for more information.

## Balancing the Reaction

Normally two things will happen when the button is pressed, user will either be shown the balanced reaction or be asked to specify extra species. We will explain these using two examples:

### Example 1 Sufficient Species

For example, in the above topic, we have added the Ferrous to Ferric reaction,

1. $\ce{ FeSO4(aq) + O2(g) + H2SO4(aq) \; = \; Fe2[SO4]3(aq) + H2O(l) }$
• This reaction is not balanced, users will find a message displayed in the Status bar: Status: Imbalanced. Excess product elements: {Fe = 1}, {S = 1}, {O = 3}.
2. To balance the reaction, either
• manually enter the number of moles of each species in the reaction;
• Or press the button for suggestion from SysCAD.
3. When the button is pressed, the Reaction Editor will attempt to balance the active reaction with the specified Reactants and Products.
• The Autobalancer will display both the original and the balanced reaction: and the user may
• The user may then either:
• accept the changes by pressing 'OK', or
• reject the changes by pressing 'Cancel'
4. Note that the Auto balance will balance the equation to meet the number of moles specified for the first reactant. As shown in the above picture. If user prefers whole numbers, then cancel the balance, adjust the number of moles for the first species, or move the species with the lower number of moles to be the first species.

### Example 2 Insufficient Species

For example,

1. If a user simply enters Ferrous and Ferric as reactant and product, and nothing else, then pressed the button,
2. As we are missing Sulfuric acid, water and oxygen, we will have the "Autobalancer Additional Species" dialog box opened:
3. When this happens, user can either:
• use a previously specified 'Set' of species, or set up a new Set of species for balancing reactions.
4. In the dialog box above there are no previous species Sets specified that is useful for this reaction, and hence we will define a new Species Set
• Type in a name in the Species Group box
• Type in the name of the required additional species, including phase
• You CANNOT drag species into this dialog box, but can select from a drop list after the first letter is entered as shown below:
• After all the additional species are entered, you can press OK and the reaction can now be balanced:

NOTES:

• When a species set is saved, users can use it again to define other reactions.
• The species sets can be managed via the reactions editor - Edit menu.
• If a species set is no longer required, press the Delete button to remove it.
• For a new group, simply change the name in the species group and modify the species in the group as we have done in Example 2 above.
• This functionality is especially useful when the user has a number of reactions that involve the same reagent and by-product.
For example, using the Sulfuric Acid species set (with additional species H2SO4(aq) and H2O(l), we can simply drag in the main reactant and product, and the autobalancer will fill in the additional species from the species set:
• Please see Video Link for a video showing you how to set up and use a Species Group in the Reaction Editor.

Number Description
This table continues from the previous tables in Opening Existing Reaction Files and Adding a New Reaction, refers to the numbers listed in previous tables.
• The source species can be added in a number of ways:
1. Drag the species from species list and drop into the Source Species box
2. Right click on the species in species list and select set as Source
3. Manually typed in.
• Any species being used a source will have a icon displayed next to it.
• You may only add a Source once to a reaction file, but you can add multiple species to a single Source.
• The source will always be reaction 1.
Select what the source should be treated as: Source only, Recycle only or Source and recycle. Please see Reaction Source for more information.

This is similar to Adding a New Source. The differences are listed here:

• Click on Add Other and select Sink.
• Any species being used a sink will have a icon displayed next to it.
• You may only add a Sink once to a reaction file, but you can add multiple species to a single Sink.
• The Sink will always be the last reaction.

• To add Heat Exchange, click on Add Other and select Heat Exchange.
• In the Heat Exchange box, select the appropriate option from the drop down list and then specify the value of associated variables depending on options chosen.
• These options are explained in Reaction Heat Exchange.

### Remove a Reaction, Source, Sink or Heat Exchange

• To remove a reaction, source, sink or heat exchange, simply select it in the reaction window and click Remove.
• If you only wish to disable the reaction, source, sink or heat exchange, clear the Enabled box at the bottom of the reaction window.

## Specifying the Reaction Order

By default, SysCAD reactions are added sequentially. Alternatively, user can choose to specify two or more simultaneous reactions. Simultaneous reactions requires the Sequences Enabled option to be on.

• The reaction order is as they appear in the reaction file. To change the order of the reactions in the reaction file, select the desired reaction in the reaction window and click the up and down arrow buttons to move to the desired place in the reaction file.

Notes:

• If included, sources will always be first, sinks will always be last or second last and heat exchange will always be last (as shown above). These cannot be re-ordered.
• The reaction file in the picture shown above started with an existing reaction file, then new reactions, sink and HX options were added for demonstration purposes.
• Any reaction with "*" marked means it is new or has been modified, and the new information has not been saved yet
• If the reaction has been saved previously, and the order is now changed, then a number in (x) will shows the reaction order change. In the example above, the reaction 5 was saved as reaction 2 before the move.
• When the reaction file is saved, these markers will disappear.

## Other Features

### Clone a Reaction

The user may wish to clone a reaction when a very similar reaction is required. Select the required reaction in the reaction window and click Clone. A new reaction will be created at the bottom of the list which can be edited as for other reactions.

NOTE: when editing a cloned reaction, be sure to check and edit the extent species as this may have changed, especially if the "old" compound has been deleted.

### Copying Reactions from other opened files in the Reaction Editor

Reactions can be easily copied from one reaction file to another using the Reaction Editor.

If the reaction files are in the same project, and they are both opened in the reaction editor, then

• With the Files pane open, drag the reaction to be copied with the left mouse, hold down and drop it into the other reaction file.

### Copying Reactions from another instance of Reactions Editor

To copy a reaction from a reaction file in a different project, open the reaction files in a different instances of the Reaction Editor.

Select the reaction to be copied, <ctrl+C> or right mouse click and select copy.
Go to the other instance of Reaction Editor, right click on the reaction window of the desired reaction file and select paste.

NOTE:

• Existing Reaction Files can be opened from the SysCAD Reaction Editor without starting the SysCAD project.
• Start up the Reaction Editor from the start menu. Menu command <File> - <Open> and select the reaction file to open.
• Alternatively, with one instance of the reaction editor opened, Menu command <File> - <Open Folder> and select the reactions folder for a particular project. The files will be opened in another instance of the Reaction Editor.

## Options Tab

For every reaction file there is a Options tab. Click on the tab to access the Options tab. An example is shown below.

This tab allows the user to enable the following:

### Sequences Enabled

• This causes the reactions to be solved simultaneously, if required. This is NOT the recommended solution method - please see Reaction Block - Solving Reactions for more information.
• With the Sequences Enabled option ticked, each reaction will automatically be assigned a Sequence number of 1 - which means that all of the reactions are placed in sequence 1 and solved simultaneously.
• The user may change the sequence number of a reaction on the Reactions tab and hence create groups of reactions. Each group of reactions is solved simultaneously. In the example shown below, we have moved one of the reaction to a second sequence for demonstration purposes.

### Always Use First Reactant for Extent

• This allows the user to specify that the first reactant is always to be used for the extent for the reactions in this reaction file.
• Normally when a reaction is inserted the default extent species used is the first reactant, but the user may change this. If this option is enabled, then the user cannot change the extent species.

### Description

• Add any comments to the description box for this reaction file.
• Any comments which were previously in a reaction file created without the Reaction Editor will be automatically moved to the description box. The date that the file was first saved using the Reaction Editor will automatically be noted in the description box as shown in the example above.

# Troubleshooting

1. If you are getting this error message during the reaction editor start up: "An item with the same key has already been added", it may be caused by issues with the species database definition. Please check the message window - species database tab for any errors.