DTU Risų Campus Technical University of Denmark

Introduction to graphics

In the following we demonstrate some basic graphic facilities of Chemsimul.

Load the file "Miniplot.csc" from the package "SmallSamples". Click the tab "Reaction System". There are 5 species A, B, C, D, E. The reaction mechanism consists of a first-order reaction RE1 followed by a second-order reaction RE2 ending in the equilibrium RE3 and RE4.

Click "Show" in the menu at the top of the window, then Show original Case file. In the $Graphics block you will see that 5 plot expressions are already defined, while only one plot command PLOT(TIME;PE1) is defined so far. This will plot ln(A) as a function of time.
  To see the result, run a simulation ("!") and click the "Graphics Output" tab. The graph shows a straight line in accordance with the first-order reaction.

Click the "Integration Parameters" tab and change the integration time from 0.2 to 20 s. Click the "Graphics Setup" tab. Click "Delete plot". Click "New plot" and set Y1 to PE2 (second-order plot), accept with "OK". Click "New plot" and set X to PE4 and Y1 to PE3 (equilibrium check). Click "New plot" and set X to PE3 and Y1 to PE5 (dE/dt); this plot will provide an alternative test of the equilibrium. Run a simulation [!] and study the 3 plots by using the "Graphics Output" tab. Note that the current graph is the last plot; use the Prev button to navigate back and Next to navigate forward.

Click the "Output Control" tab and activate "Show differential equations", then run. You see the equations in the Report and notice that dE/dt = K3*D - K4*E = 0.1*D - 0.1*E. Since we already have a plot expression PE5 containing E' = dE/dt, we can make a test: In "Graphics Setup" use the "Add" button to add a new plot expression PE6 containing 0.1*D - 0.1*E. Then use the "New plot" button and set Y1 to PE5 and Y2 to PE6. Run again. The Graphics Output now hopefully shows two coinciding curves, the last one completely covering the first.

Finally try to fit a simulation to experimental data. Click "Graphics Setup". Delete plots by clicking "Delete all". Click "New plot" and set Y1 to PE3. Click "Find new file", Find File and navigate to locate and open the file "miniexperiment.txt" also contained in the package "Small Samples". In the Datafile Handler click "OK". Edit the plot and set Y2 to DF1. Run a simulation and study the plot.


  • Peter Kirkegaard
    Applied Mathematician, Ph.D.
    DTU - Risų Campus, Roskilde, Denmark
  • Erling Bjergbakke
    Bjergbakke Chemical Consulting
    Roskilde, Denmark
  • Jens V. Olsen
    System Programming Analyst
    DTU - Risų Campus, Roskilde, Denmark
  • Webmaster 13 Mar 2012