Methods for integrating Fortran based finite element applications in a scripting environment

University essay from Lunds universitet/Väg- och vattenbyggnad (CI); Lunds universitet/Byggnadsmekanik

Author: Martin Roos; [2005]

Keywords: Technology and Engineering;

Abstract: The course Software Development for Technical Systems at the division of Structural Mechanics teaches students techniques for implementing finite element applications with both user interface and computational code. Currently Borland Delphi environment is used for the user interface and Fortran is used for the computational part. This master’s thesis is an effort to study methods of integrating Fortran with script languages and user interface to create more flexible and easier to use software. An interesting candidate for user interface and computational environment is Python. Python is a script language, which is easy to use and learn for non-programmers and yet powerful enough to use as a scripting environment for computational codes. A finite element application is developed where the computational code is written in Fortran and the user interface in Python. The main task to solve is how to link Fortran and Python. To perform the link a tool, Fortran to Python interface generator (F2PY) is used after an evaluation of different tools. The test application shows that F2PY creates an interface in a single step, no advantages of Fortran are lost, all major Fortran functions are supported and a F2PY created module is as easy to use as a built-in function in Python. The disadvantage of F2PY is that it need five prerequisites. Overall F2PY fulfills all requirements on a link between Fortran and Python. Python has all features a scripting languages shall have, easy code structure, rapid development and the ability to glue components together. Python also gives the user possibility to create a graphical user interface(GUI) with or without a GUI-builder. Finally all parts that are used are platform independent. This result in that it is recommended to replace Borland Delphi with Python in the course Software Development for Technical Systems.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)