Skip to main content

LUP Student Papers

LUND UNIVERSITY LIBRARIES

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

Roos, Martin (2005) VSM820
Civil Engineering (M.Sc.Eng.)
Structural Mechanics
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.

... (More)
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. (Less)
Please use this url to cite or link to this publication:
author
Roos, Martin
supervisor
organization
alternative title
Metoder för integrering av Fortran-baserade finita elementprogram i en skript miljö
course
VSM820
year
type
H3 - Professional qualifications (4 Years - )
subject
report number
TVSM-5129
ISSN
0281-6679
language
English
id
3566754
date added to LUP
2013-08-05 14:36:49
date last changed
2013-10-07 11:43:34
@misc{3566754,
  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.}},
  author       = {{Roos, Martin}},
  issn         = {{0281-6679}},
  language     = {{eng}},
  note         = {{Student Paper}},
  title        = {{Methods for integrating Fortran based finite element applications in a scripting environment}},
  year         = {{2005}},
}