4
2.5 OMEdit Windows/Tabs ......................................................................................................... 40
2.5.1 Library Window ................................................................................................................ 40
2.5.2 Designer Window .............................................................................................................. 41
2.5.3 Plot Variables Window ...................................................................................................... 41
2.5.4 Messages Window ............................................................................................................. 42
2.5.5 Documentation Window .................................................................................................... 42
2.6 Dialogs ................................................................................................................................... 42
2.6.1 New Model Dialog ............................................................................................................ 43
2.6.2 Simulation Dialog .............................................................................................................. 43
2.6.3 Model Properties Dialog .................................................................................................... 43
2.6.4 Model Attributes Dialog .................................................................................................... 44
2.7 Interactive Simulation in OMEdit .......................................................................................... 45
2.7.1 Invoking Interactive Simulation ........................................................................................ 45
2.7.2 Interactive Simulation View .............................................................................................. 45
Chapter 3 2D Plotting and 3D Animation ....................................................................................... 47
3.1 Enhanced Qt-based 2D Plot Functionality ............................................................................. 47
3.2 Simple 2D Plot ....................................................................................................................... 48
3.2.1 Plot Functions and Their Options ...................................................................................... 51
3.2.2 Zooming ............................................................................................................................ 53
3.2.3 Plotting all variables of a model ........................................................................................ 54
3.2.4 Plotting During Simulation ................................................................................................ 54
3.2.5 Programmable Drawing of 2D Graphics ........................................................................... 55
3.2.6 Plotting of Table Data ....................................................................................................... 56
3.3 Java-based PtPlot 2D plotting ................................................................................................ 57
3.4 3D Animation ......................................................................................................................... 57
3.4.1 Object Based Visualization ............................................................................................... 58
3.4.2 BouncingBall ..................................................................................................................... 58
3.4.3 Pendulum 3D Example ...................................................................................................... 60
3.5 References .............................................................................................................................. 62
Chapter 4 OMNotebook with DrModelica and DrControl ............................................................ 64
4.1 Interactive Notebooks with Literate Programming ................................................................ 64
4.1.1 Mathematica Notebooks .................................................................................................... 64
4.1.2 OMNotebook ..................................................................................................................... 64
4.2 DrModelica Tutoring System – an Application of OMNotebook .......................................... 65
4.3 DrControl Tutorial for Teaching Control Theory .................................................................. 71
4.3.1 Feedback Loop .................................................................................................................. 71
4.3.2 Mathematical Modeling with Characteristic Equations ..................................................... 74
4.4 OpenModelica Notebook Commands .................................................................................... 80
4.4.1 Cells ................................................................................................................................... 80
4.4.2 Cursors ............................................................................................................................... 80
4.4.3 Selection of Text or Cells .................................................................................................. 80
4.4.4 File Menu .......................................................................................................................... 81
4.4.5 Edit Menu .......................................................................................................................... 81
4.4.6 Cell Menu .......................................................................................................................... 82
4.4.7 Format Menu ..................................................................................................................... 83
4.4.8 Insert Menu ........................................................................................................................ 83
4.4.9 Window Menu ................................................................................................................... 83
4.4.10 Help Menu ......................................................................................................................... 83
4.4.11 Additional Features ........................................................................................................... 84