Modelica Code Generation with Polymorphic Arrays and Records Used in Wind Turbine Modeling

Roland Samlaus
Fraunhofer Institute for Wind Energy and Energy System Technology IWES, Germany

Peter Fritzson
Dept. of Computer and Information Science, Linköpings universitet, Sweden

Adam Zuga
Fraunhofer Institute for Wind Energy and Energy System Technology IWES, Germany

Michael Strobel
Fraunhofer Institute for Wind Energy and Energy System Technology IWES, Germany

Claudio Hillmann
Fraunhofer Institute for Wind Energy and Energy System Technology IWES, Germany

Ladda ner artikelhttp://dx.doi.org/10.3384/ecp12076809

Ingår i: Proceedings of the 9th International MODELICA Conference; September 3-5; 2012; Munich; Germany

Linköping Electronic Conference Proceedings 76:83, s. 809-818

Visa mer +

Publicerad: 2012-11-19

ISBN: 978-91-7519-826-2

ISSN: 1650-3686 (tryckt), 1650-3740 (online)


At Fraunhofer Institute for Wind Energy and Energy System Technology IWES a simulation software for offshore wind farms is being developed; concentrating on the ability to define physical models at different levels of detail. Therefore parameterizable models representing parts of wind turbines are defined that can be transformed for various purposes like simulation with Finite Element Method (FEM) tools or Modelica solvers. This paper describes the concepts of purely parametric physical models and code generation. It is elucidated how models of different complexity can be transformed into each other by model driven development techniques. Thereby the focus is set on the generation of Modelica code and it is explained how the use of Modelica libraries simplifies the generation of simulatable code. During the development of generators for Modelica; issues arose regarding type compatibility of arrays with different sizes when using polymorphism. These issues are explained by an example and possible enhancements for the Modelica language are suggested.


model transformation; polymorphism; code generation; wind turbine modeling


[1] Frank Budinsky; Stephen A. Brodsky; and Ed Merks. Eclipse Modeling Framework. Pearson Education; 2003.

[2] Eric Clayberg and Dan Rubel. Eclipse Plug-ins. AddisonWesley Professional; 3rd. edition; 2009.

[3] International Electrotechnical Commission. Wind turbines - part 3: Design requirements for offshore wind turbines; 2009.

[4] Dynasim AB. Dymola User Manual: Version 6. Dassault Systemes; Lund (Sweden); 2009.

[5] Germanischer Lloyd Wind Energie. Guideline for the certification of offshore wind turbines; 2005.

[6] Martin Fowler. UML Distilled: A Brief Guide to the Standard Object Modeling Language. Addison-Wesley Longman Publishing Co.; Inc.; Boston; MA; USA; 3 edition; 2003.

[7] Peter Fritzson; Adrian Pop; Martin Sjölund; Per Östlund; and et. al. Openmodelica useres guide: Version 2012-01-30 for openmodelica 1.8.1. Linköping (Sweden); January 2012.

[8] Richard C. Gronback. Eclipse Modeling Project: A Domain-Specific Language (DSL) Toolkit. Addison-Wesley; 2009.

[9] J Jonkman; S Butterfield;WMusial; and G Scott. Definition of a 5-mw reference wind turbine for offshore system development. Contract; 324(February):75; 2009.

[10] Alexander Königs. Model transformation with triple graph grammars. In Model Transformations in Practice; Satellite Workshop of Models 2005; Montego; 2005.

[11] Donald E. Knuth. Top-down syntax analysis. Acta Informatica; 1:79–110; 1971. doi: 10.1007/BF00289517.

[12] Jan Köhnlein and Sven Efftinge. Xtext 2.1 documentation; October 31; 2011.

[13] Jeff McAffer; Paul VanderLei; and Simon Archer. OSGi and Equinox: Creating Highly Modular Java Systems. Addison-Wesley Professional; 1st edition; 2010.

[14] Modelica Association. The Modelica Language Specification version 3.2; 2010.

[15] OMG. Meta Object Facility (MOF) Core Specification Version 2.0; 2006.

[16] Roland Samlaus; Claudio Hillmann; Birgit Demuth; and Martin Krebs. Towards a model driven modelica ide. In 8th International Modelica Conference; 2011.

[17] M. Strach; F. Vorpahl; C. Hillmann; M. Strobel; and M. Brommundt. Modeling offshore wind turbine substructures using engineer design data — a newly developed approach. In Proceedings of the Twenty-second (2012) International Offshore and Polar Engineering Conference; Rhodes; June 2012. International Society of Offshore and Polar Engineers (ISOPE). Accepted.

[18] M. Strobel; R. Vorpahl; C. Hillmann; X. Gu; A. Zuga; and U Wihlfahrt. The onwind modelica library for offshore wind turbines - implementation and first results. In Proceedings of the Modelica Conference; 2011.

Citeringar i Crossref