TCE Species Mapping

From SysCAD Documentation
(Redirected from TPS Species Mapping)
Jump to navigation Jump to search

Navigation: Models ➔ TCE Models ➔ Thermodynamic Calculation Engines ➔ TCE Species Mapping

Thermodynamic Calculation Engines (TCEs) TCE Add-Ons
TCE Functionality Overview TCE Species Mapping TCE Configuration Options AQSol Add-On ChemApp FACTSage Add-On PHREEQC Add-On OLI Add-On

Latest SysCAD Version: 21 September 2021 - SysCAD 9.3 Build 139.29552


Mapping Overview

Mapping between SysCAD streams and TCE streams is done as shown in the diagram below. The dotted areas represent the control volumes applicable to each type of thermodynamic calculation. The Unit Operation, or the black control volume, incorporates forward mapping, calculation, and reverse mapping. Unit operations would include reactors, evaporators, reverse osmosis units, solvent extraction units, and more. The Side Calculation, or the red control volume, is used to read one or more streams and perform a specific calculation. It can be used as a virtual sensor in the model, and is often used to determine reaction extents for SysCAD reaction blocks. The Direct Calculation, or green control volume, does not use mapping at all. As mentioned previously, it is a direct interface to the thermodynamic software. The Direct Calculation is a user interface for performing single point calculations and generating trends, similar to how one would typically use thermodynamic software directly.

TCE General Mapping.png

Mapping

Each of the thermodynamic engines that link to SysCAD require mapping to convert a SysCAD stream into a representation suitable for the thermodynamic engine. In general, mapping between SysCAD species and ions, and species contained within the thermodynamic model, consists of two steps:

  1. Forward Mapping is used to convert SysCAD species to species within the thermodynamic model
    • All unit operations that take data from SysCAD streams require a forward mapping step. This includes all TCE unit types except Direct Calculations.
  2. Reverse Mapping is used to convert calculated speciation from the thermodynamic model solution back into SysCAD species.
    • When all species predicted by a TCE equilibrium solution are directly mapped to SysCAD species, reverse mapping is quite straightforward. In this case, each species is simply passed into the mapped SysCAD stream species.
    • However, when there are ion mappings involved, the situation is much more complex. In this case, the ion breakdown reactions for each SysCAD species are used to reassemble the SysCAD species.
    • These are done using specialized algorithms to determine the most likely apparent species from ionic species. Details on this algorithm are provided in Reverse Mapping Algorithms.

Forward Mapping

The mapping types are:

  1. Direct mapping: there is a TCE species with matching phase, elemental composition, and charge to that of a SysCAD species
  2. Ion mapping: there is a TCE species with matching phase, elemental composition, and change to a SysCAD Ion (defined in the IonList file, see Ion definitions)
Note that in the case where a species can be directly or ion mapped, direct mapping always takes precedence.

The following applies in Forward Mapping:

  1. All non aqueous species will be mapped using direct mapping. The exception to this rule is AQSol, where all non-aqueous species are broken down.
  2. Aqueous species will be mapped using (in order of priority):
    • direct mapping, if possible
    • ion mapping, if possible, using ions in the IonList file
  3. All aqueous species which do not have a direct mapping, but have a corresponding ion breakdown pathway, will be broken down into ions using the IonList file
  4. Any species which do not have direct mapping or ion mapping to the thermodynamic engine will be bypassed and a warning will be issued to the user.
    • The Ionlist file is stored within the project cfgfiles folder, see Ion definitions
    • Please note that ChemApp only uses direct mapping, Ionlist is not used.
An example of forward mapping to an OLI reactor is shown below:
ForwardMapping Diagram2.png
  • In this case, the first access window shows the composition of the feed stream. The second access window shows the OLI stream composition that will be used by OLI to calculate the equilibrium composition.
  • In this case, there is a ion map between NaCl(aq) in the SysCAD stream and the Na+ and Cl- ions of the OLI model.

Reverse Mapping

The following applies in Reverse Mapping:

  • Used when TCE species need to be converted back into SysCAD species, such as the TCE Reactor. (Note that reverse mapping is not required if the reactor is in side calculation mode.)
  • Direct mappings are done in a similar way to forward mapping
  • For reverse mapping requiring assembly of TCE ions into SysCAD species, the following steps are done:
  1. Product ions are first broken down using ionic breakdowns to their primary ions. Primary ions are ions which cannot break down further.
  2. The primary ions are then used to generate SysCAD species by a user-selected algorithm Reverse Mapping Algorithms
  3. Overall heat balance for the unit is based upon SysCAD streams and heat of reaction predicted by TCE.
An example of reverse mapping from a PHREEQC evaporator to the product stream is shown below:
ReverseMapping Diagram.png
  • In this case, the PHREEQC equilibrium composition predicts a number of different ions.
  • The reverse mapping algorithm uses various ionic breakdowns to calculate the apparent species, which in this case, is dissolved CaSO4(aq).
  • Any additional H+ and OH- species are combined to form water.
  • Full elemental balance checks are provided to ensure that all elemental mass has been properly accounted for.

Reverse Mapping Algorithms

The user-selected Reverse Mapping Algorithms are (selected from the TCE_ModelCfg model, MappingAlgorithm tag):

  1. Simple Extent of reaction
    • Using initial vector of primary ions, determine which reversed breakdown reactions, i.e. formation reactions, have the greatest possible extent
    • For greatest possible extent, we completely consume the limiting reagent
  2. Salts First (recommended method)
    • Now we first process only species which are salts, i.e. do not contain H+ or OH-
    • For this smaller group, do as per Simple extent of reaction
    • Then do the same for acids/bases, i.e. those that contain H+, OH-

NOTES:

  • Acids and bases will react violently to form a salt in almost all cases.
  • Therefore, must prioritize salts to avoid possibility of forming bases and acids together.
  • Please see example 2 below for a reverse mapping example containing brine.
  • In both algorithms, the last reaction to be executed is always the formation of water from H+ and OH-.

Example 1:

Feed to Reactor Product reverse mapping using
Simple extent of reaction
Product reverse mapping using
Salts first
Ca++ = 1 mole
SO4-- = 2 moles
Na+ = 1 mole
H+ = 1 mole
Results order is:
Ca++ + SO4-- = CaSO4
H+ + 0.5 SO4-- = 0.5 H2SO4
Na+ + 0.5 SO4-- = 0.5 Na2SO4
Resulting order is:
Ca++ + SO4-- = CaSO4
Na+ + 0.5 SO4-- = 0.5 Na2SO4
H+ + 0.5 SO4-- = 0.5 H2SO4

Example 2:

  • Using an AQSol example, we have the following feed: 55% Water, 15% H2SO4 and 30% NaCl. The resulting SysCAD species are quite different depending on the reverse mapping algorithm selected, as shown in the following table. P_003 is the feed, P_004 is the product.
Product reverse mapping using
Simple extent of reaction
Product reverse mapping using
Salts first
Comments
TCE SimpleExtent.png TCE SaltsFirst.png
  • Using Simple Extent, lots of H+ favours formation of HCl, steals Cl from NaCl.
  • Using Salts First correctly predicts lots of NaCl, makes sense since NaCl is saturated.
  • Thus Salts First gives a more reasonable speciation in this case.

Unmapped Species

Unmapped Species in Forward Mapping

When a SysCAD stream contains a species for which there is no equivalent species in the TCE, the unmapped species is bypassed. The bypassed stream is reported and is added to the final TCE stream. The user gets a warning in this case.

TCE General Mapping Unmapped Bypassed Species.png

The solution here is to select or generate a different database for use with the TCE which includes the species you are trying to map. Alternately, the user may purposely bypass the species, in which case no warning is generated.

Unmapped Species in Reverse Mapping

When a TCE solver predicts the formation of a species for which there is no equivalent species in SysCAD, this results in the unmapped species being reported as an error and the model switched to a side calculation.

TCE General Mapping Unmapped Species Reverse.png

The solution here is to add species to the SysCAD database to enable mapping to a SysCAD stream, or use the TCE calculation as a side calculation.