ORCHESTRA model systems are defined in terms of nodes and tasks that operate on these nodes.
A node contains a set of variables that defines the composition of a system at a certain point in space.
Tasks are functions that use the node variables as input or output e.g; reading values from a file, writing values to a file, perform calculations with the node variables, show node values in a graph etc.
The order of execution of these tasks and on which node they operate is defined in the concert file.
The concert file thus defines the global lay-out of an ORCHESTRA model system.
A basic example of a concert file can be found here: simple example .
The following elements can be used to define a system in a concert file:
A node or cell is a part of the system for which a set of state variables is stored. Usually a Node represent a completely mixed sub-volume of a system. The definition of the set of state variables and their initial values is read from an input file.
Currently there is only a single type of Nodes per system, so all Nodes have the same state variables.
For example, a simple system with 1 node will contain the following definitions:
<Nodes TypeFile="column.dat" NrNodes="1" />
The state variables that are stored per node, and the default values for each cell are given in the column.dat file.
Each concert must have one Nodes type definition.
Calculators are user definable calculation modules that act as subroutines or functions. Calculators are used in the defintion of Tasks that operate on a group of Nodes or Links.
The syntax of the definition of a calculator element in Concert is as follows:
<Calculator Name="chemistry1" File="chemistry1.inp" Type="Default"/>
The actual calculations that this calculator carries out are defined in the Calculator input file, chemistry1.inp
An alternative definition of a Calculator provides the calculations literally instead of indirectly via the in the inputfile.
<Calculator Name="chemistry1" Type="Default"> <Body> @Var: pH 7 @component(H+,1) @species(OH-,-1, 1e-14, 1, H+) </body> </Calculator>
The description of the keywords that can be used to define a calculator can be found here.
In Orchestra, all operations (input, output, calculations) are carried out by so called Tasks.
The complete hierarchical stucture of these tasks can be defined in the form of a complete calculation tree in an input file.
The format of a Task definition is:
<Task Name="..." Type="...."> ........ ........ </Task>
The following tasks are currently available:
Connects a group of nodes with a "Calculator" that, for example, can be defined as a chemical equilibrium calculator.
<Task Name="Initial equilibration of nodes" Type="NodeGroup"> <Calculator>chemistry1</Calculator> <Nodes>(1-60)</Nodes> </Task>
Connects a group of links with a "Calculator" (usually a transport calculator) to perform diffusion, convection calculations.
Example of a LinkGroup definition:
<Task Name="Calculate convection" Type="LinkGroup"> <Calculator>convection</Calculator> <Links>(0-1,1-2,2-3,3-4,4-5,5-6,6-7,7-8,8-9,9-10,10-11,11-12,12-13,13-14,14-15,15-16,16-17,17-18,18-19,19-20,20-21,21-22,22-23,23-24,24-25,25-26,26-27,27-28,28-29,29-30,30-31,31-32,32-33,33-34,34-35,35-36,36-37,37-38,38-39,39-40,40-41,41-42,42-43,43-44,44-45,45-46,46-47,47-48,48-49,49-50,50-51,51-52,52-53,53-54,54-55,55-56,56-57,57-58,58-59,59-60,60-61)</Links> </Task>
Links a group of nodes with an inputfile, used to read input for seleceted Nodes.
<Task Name="Read feed node" Type="InstreamGroup"> <File>feed.dat</File> <Nodes>(0)</Nodes> </Task>
Links a group of nodes with an outputfile, used to create ouputfiles from selected cells.
<Task Name="Write output" Type="OutstreamGroup"> <File>output.dat</File> <Nodes>(0-5,6-12)</Nodes> </Task>
Simply used to group a number of arbitrary tasks into a single group. Taskgroups can be defined recursively, that is within other taskgroups.
<Task Name="Initialization" Type="TaskGroup"> <DoTask Name="Read initial node composition" /> <DoTask Name="Initial equilibration of nodes" /> <DoTask Name="Write initial output"/> <DoTask Name="Wait" /> </Task>
Used to carry out a group of tasks until one of the tasks signals that it is ready.
<Task Name="Each Timestep" Type="RepeatingTaskGroup"> <DoTask Name="Read feed node" /> <DoTask Name="Equilibrate feed node" /> <DoTask Name="Equilibrate all nodes" /> <DoTask Name="Calculate convection" /> <DoTask Name="Write output" /> <DoTask Name="Update mass" /> <DoTask Name="klok" /> <DoTask Name="View" /> </Task>
This is the root Task of the calculation Tree. Orchestra starts with performing this Task(group).
<Task Name="Run" Type="TaskGroup"> <DoTask Name="Initialization"/> <DoTask Name="Each Timestep" /> <DoTask Name="Write final output" /> <DoTask Name="Wait" /> </Task>
Displays real time data graphically for a group of nodes one dimensionally.
<Task Name="View" Type="Viewer_1d"> <File>diagram.inp</File> <Nodes>(1-60)</Nodes> </Task>
Displays real time data graphically for a group of nodes two dimensionally.
<Task Name="View" Type="Viewer_2d"> <File>diagram.inp</File> <Nodes>(1-400)</Nodes> </Task>
Examples of system definitions can be found in the CONCERT.XML files of the example projects.