The advanced core window is available from the Advanced menu. This gives the capability to execute more advanced functions, such as quickly checking any variable value in the simulation, saving any variables into an Excel file and more. To evaluate the possibilities of the advanced core window open the Tutorial plant from the examples.
As it can be seen in Figure ACW-02 the advanced core window is divided into two panels.
The left panel contains the list of all variables that are available inside the current project. The internal variable symbols (i.e. the names that are used by the Sumo system itself) follow the naming conventions detailed below:
There is a possibility to filter the variable names appearing in the panel: at the top of the left panel a textbox accepts different filter expressions. Typing the first few characters of the internal symbols allows to show only those variables that have symbols starting with those characters. E.g. typing ‘Sumo__Plant__Reactor1’ shows those variables only that belong to the ‘Sumo__Plant__Reactor1’ process unit.
The right panel consists of a list of recently issued core commands (at the top) and a command line where Sumo core commands can be typed manually. This way the full power of the underlying core can be achieved. The commands that can be used are described in the Sumo script commands chapter.
Sumo supports exporting any variables into tab separated (.tsv) text files. These files can be directly read by Microsoft Excel or other applications. For variable exporting the direct command interpretation capability of the advanced core window is used.
To export the results of a run, the ‘writetsv’ command should be used in the command line, with a file name as a parameter. The data to be exported will be saved into the file determined by that file name.
Once the writetsv command has been issued, the simulation needs to be rerun from the command line for the data export to happen.
We will use the birthday cake data from the influent tool thus add it to the Influent unit under Dynamics. It has data for a 16-day simulation. Let us assume that the data from this run needs to be exported to a file. In order to do that, let us open the advanced core window.
At the core window, type the command ‘writetsv “c:\Users\username\Documents\plant.tsv”’ into the command line as it is shown in ACW-03, then press Enter (don’t forget to change ‘username’ to your user name on your computer).
Once Enter has been pressed, the system answers with a ‘530037 TSV writer: “c:\Users\username\Documents\plant.tsv” all Variables’ message in the command history panel. Now start the 16-day simulation from Sumo main window. Once the simulation finished ‘530004 Simulation ended.’ message appears followed by ‘savestates’ messages.
At this point you have your file at your ‘Documents’ folder (if you followed the filename suggestions), that can be opened by your Excel or your favourite application. The data file is a plain ASCII file where the variables are in columns with tab as the column separator. This file format can be read by Microsoft Excel.
With the previous example, we have exported all the variables that could be found in our example project. There are situations however, when we only want to do that for only a few selected variables. In such cases a second parameter can be given to the ‘writetsv’ command.
This second parameter is the name of the file that contains a list of the variable symbols we want to export. This file should also be a plain ASCII file that can be easily created with e.g. the Notepad software on standard windows installations.
In our example let us assume that we only want to export the ammonia and nitrate concentrations in our plant effluent. According to the previous paragraph, we need to create a file that contains the list of the variables. In order to create the file, open Notepad, and type the names of the variables as in Figure ACW-05 (for information how to determine your variables’ symbols, please see the Plantwide Excel file chapter) then Save the file to your ‘My Documents’ folder, and name it as ‘variables.tsv’.
Once this is done, the command ‘writetsv “c:\Users\username\Documents\plant2.tsv” “c:\Users\username\Documents\variables.tsv”’ should be typed into the command line. After this, by typing ‘start’ into the command line and pressing Enter the simulation should be rerun again.
The newly created datafile now contains only those variables that were determined in our list as Figure ACW-06 demonstrates for the 16-day simulation.