
OpenModelica User’s Guide Release v1.13.0 Open Source Modelica Consortium Dec 20, 2018 CONTENTS 1 Introduction 3 1.1 System Overview...........................................4 1.2 Interactive Session with Examples..................................5 1.3 Summary of Commands for the Interactive Session Handler.................... 23 1.4 Running the compiler from command line.............................. 24 2 OMEdit – OpenModelica Connection Editor 27 2.1 Starting OMEdit........................................... 27 2.2 MainWindow & Browsers...................................... 28 2.3 Perspectives............................................. 33 2.4 Modeling a Model.......................................... 37 2.5 Simulating a Model......................................... 39 2.6 Plotting the Simulation Results................................... 41 2.7 Re-simulating a Model........................................ 42 2.8 3D Visualization........................................... 42 2.9 Interactive Simulation........................................ 45 2.10 How to Create User Defined Shapes – Icons............................. 45 2.11 Global head section in documentation................................ 46 2.12 Settings................................................ 47 2.13 __OpenModelica_commandLineOptions Annotation........................ 53 2.14 __OpenModelica_simulationFlags Annotation........................... 54 2.15 Debugger............................................... 54 2.16 Editing Modelica Standard Library................................. 54 2.17 State Machines............................................ 54 3 2D Plotting 57 3.1 Example............................................... 57 3.2 Plot Command Interface....................................... 59 4 Solving Modelica Models 61 4.1 Integration Methods......................................... 61 4.2 DAE Mode Simulation........................................ 62 5 Debugging 63 5.1 The Equation-based Debugger.................................... 63 5.2 The Algorithmic Debugger...................................... 65 6 Generating Graph Representations for Models 71 7 FMI and TLM-Based Simulation and Co-simulation of External Models 73 7.1 Functional Mock-up Interface - FMI................................. 73 7.2 Transmission Line Modeling (TLM) Based Co-Simulation..................... 75 7.3 Composite Model Editing of External Models............................ 75 8 OMSimulator 91 i 9 OpenModelica Encryption 93 9.1 Encrypting the Library........................................ 93 9.2 Loading an Encrypted Library.................................... 93 9.3 Notes................................................. 93 10 OMNotebook with DrModelica and DrControl 95 10.1 Interactive Notebooks with Literate Programming......................... 95 10.2 DrModelica Tutoring System – an Application of OMNotebook.................. 95 10.3 DrControl Tutorial for Teaching Control Theory.......................... 101 10.4 OpenModelica Notebook Commands................................ 112 10.5 References.............................................. 117 11 Optimization with OpenModelica 119 11.1 Builtin Dynamic Optimization with OpenModelica and IpOpt................... 119 11.2 Compiling the Modelica code.................................... 119 11.3 An Example............................................. 119 11.4 Different Options for the Optimizer IPOPT............................. 122 11.5 Dynamic Optimization with OpenModelica and CasADi...................... 122 11.6 Parameter Sweep Optimization using OMOptim.......................... 127 12 Parameter Sensitivities with OpenModelica 135 12.1 Background.............................................. 135 12.2 An Example............................................. 135 13 PDEModelica1 139 13.1 PDEModelica1 language elements.................................. 139 13.2 Limitations.............................................. 140 13.3 Viewing results............................................ 140 14 MDT – The OpenModelica Development Tooling Eclipse Plugin 141 14.1 Introduction............................................. 141 14.2 Installation.............................................. 141 14.3 Getting Started............................................ 142 15 MDT Debugger for Algorithmic Modelica 155 15.1 The Eclipse-based Debugger for Algorithmic Modelica....................... 155 16 Modelica Performance Analyzer 163 16.1 Profiling information for ProfilingTest................................ 164 16.2 Genenerated JSON for the Example................................. 167 16.3 Using the Profiler from OMEdit................................... 167 17 Simulation in Web Browser 169 18 Interoperability – C and Python 171 18.1 Calling External C functions..................................... 171 18.2 Calling external Python Code from a Modelica model....................... 172 18.3 Calling OpenModelica from Python Code.............................. 174 19 OpenModelica Python Interface and PySimulator 177 19.1 OMPython – OpenModelica Python Interface............................ 177 19.2 Enhanced OMPython Features.................................... 180 19.3 PySimulator............................................. 183 20 OMMatlab – OpenModelica Matlab Interface 185 20.1 Current Prototype.......................................... 185 20.2 Test Commands........................................... 185 20.3 List of Planned API support..................................... 186 ii 21 OMJulia – OpenModelica Julia Interface 187 21.1 Features of OMJulia......................................... 187 21.2 Test Commands........................................... 187 21.3 Standard get methods........................................ 188 21.4 Usage of getMethods......................................... 189 21.5 Standard set methods......................................... 190 21.6 Usage of setMethods......................................... 190 21.7 Advanced Simulation........................................ 190 21.8 Linearization............................................. 191 21.9 Usage of Linearization methods................................... 191 21.10 Sensitivity Analysis......................................... 191 21.11 Usage................................................. 192 22 Scripting API 193 22.1 OpenModelica Scripting Commands................................ 193 22.2 Simulation Parameter Sweep..................................... 248 22.3 Examples............................................... 249 23 OpenModelica Compiler Flags 255 23.1 Options................................................ 255 23.2 Debug flags.............................................. 270 23.3 Flags for Optimization Modules................................... 276 24 Small Overview of Simulation Flags 277 24.1 OpenModelica (C-runtime) Simulation Flags............................ 277 25 Technical Details 285 25.1 The MATv4 Result File Format................................... 285 26 Frequently Asked Questions (FAQ) 287 26.1 OpenModelica General........................................ 287 26.2 OMNotebook............................................. 287 26.3 OMDev - OpenModelica Development Environment........................ 288 27 Major OpenModelica Releases 289 27.1 Release Notes for OpenModelica 1.14.0............................... 289 27.2 Release Notes for OpenModelica 1.13.0............................... 289 27.3 Release Notes for OpenModelica 1.12.0............................... 289 27.4 Release Notes for OpenModelica 1.11.0............................... 291 27.5 Release Notes for OpenModelica 1.10.0............................... 293 27.6 Release Notes for OpenModelica 1.9.4............................... 294 27.7 Release Notes for OpenModelica 1.9.3............................... 295 27.8 Release Notes for OpenModelica 1.9.2............................... 296 27.9 Release Notes for OpenModelica 1.9.1............................... 298 27.10 Release Notes for OpenModelica 1.9.0............................... 300 27.11 Release Notes for OpenModelica 1.8.1............................... 302 27.12 OpenModelica 1.8.0, November 2011................................ 303 27.13 OpenModelica 1.7.0, April 2011................................... 305 27.14 OpenModelica 1.6.0, November 2010................................ 306 27.15 OpenModelica 1.5.0, July 2010................................... 306 27.16 OpenModelica 1.4.5, January 2009................................. 307 27.17 OpenModelica 1.4.4, Feb 2008................................... 308 27.18 OpenModelica 1.4.3, June 2007................................... 308 27.19 OpenModelica 1.4.2, October 2006................................. 309 27.20 OpenModelica 1.4.1, June 2006................................... 310 27.21 OpenModelica 1.4.0, May 2006................................... 311 27.22 OpenModelica 1.3.1, November 2005................................ 311 28 Contributors to OpenModelica 313 iii 28.1 OpenModelica Contributors 2015.................................. 313 28.2 OpenModelica Contributors 2014.................................. 315 28.3 OpenModelica Contributors 2013.................................. 316 28.4 OpenModelica Contributors 2012.................................. 318 28.5 OpenModelica Contributors 2011.................................. 320 28.6 OpenModelica Contributors 2010.................................. 322 28.7 OpenModelica Contributors 2009.................................. 323 28.8 OpenModelica
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages337 Page
-
File Size-