Skip to main content

LUP Student Papers

LUND UNIVERSITY LIBRARIES

Development of visualization functions in CALFEM for Python

Åmand, Andreas LU (2022) In TVSM-5000 VSMM01 20212
Structural Mechanics
Department of Construction Sciences
Abstract
Visualizing results is an important part of Finite Element (FE) modeling. Many tools exist for visualizing these results, they are often part of complete software packages for FE analysis. These packages often rely on the user being familiar with FE analysis, making them unsuitable for use in teaching the FE Method.

CALFEM (Computer Aided Learning of the Finite Element Method) is an FE toolbox developed at LTH with an emphasis on teaching. It enables the user to implement the steps that otherwise are done behind the scenes in commercial FE software. CALFEM exists in two variants today, the original one implemented in MATLAB, while a Python version is continuously being developed in parallel. The main aim of this thesis is to develop... (More)
Visualizing results is an important part of Finite Element (FE) modeling. Many tools exist for visualizing these results, they are often part of complete software packages for FE analysis. These packages often rely on the user being familiar with FE analysis, making them unsuitable for use in teaching the FE Method.

CALFEM (Computer Aided Learning of the Finite Element Method) is an FE toolbox developed at LTH with an emphasis on teaching. It enables the user to implement the steps that otherwise are done behind the scenes in commercial FE software. CALFEM exists in two variants today, the original one implemented in MATLAB, while a Python version is continuously being developed in parallel. The main aim of this thesis is to develop visualization tools for the Python version of CALFEM. This will be integrated into the existing toolbox, allowing users to visualize results from calculations and aiding in the understanding of the FE Method.

To identify the needs for visualization, a study was conducted of the current visualization tools available in CALFEM. Current visualization tools only allow for visualizing of 2D problems. While CALFEM has support for many 3D elements, visualizing these in full 3D is not currently possible. The focus for this thesis is therefore on 3D visualization. Since using CALFEM requires manual scripting, visualizing geometries and meshes before solving the problem is very helpful, and emphasis is therefore put on visualizing all steps in the FE process. Another study was conducted to understand the visualization needs using CALFEM at relevant departments at LTH.

Python has an extensive amount of libraries for visualizing scientific data structures. A third study was conducted to find suitable libraries for implementing the identified visualizations in CALFEM. As a result of this study, a library called Vedo, based on the Visualization Toolkit (VTK) was chosen.

Using the libraries and results from the two first studies, several visualization functions for several different element types were implemented. Care was taken to implement these as seamlessly as possible into the Python version, following the same principles, syntax, and naming of existing functions. Functionality for importing data for visualization from the MATLAB version was implemented, along with export to VTK-files. The export functions allow for visualization of the results in ParaView, a more advanced open-source visualization tool. (Less)
Popular Abstract (Swedish)
Visualisering är ett viktigt verktyg för förståelsen av olika fenomen inom mekaniken. Vid datormodellering med finita elementmetoden utförs flera steg som med hjälp av visualisering kan underlätta förståelse och inlärning. CALFEM är ett finita elementverktyg utvecklat vid LTH, med fokus på utbildning. För att verifiera att en finita elementmodell är korrekt utformad är det viktigt att kunna visualisera exempelvis geometri, elementindelning, krafter och randvillkor. Ett annat viktigt syfte med visualisering är en förståelse för de resultat som kommer fram vid beräkningen.
Please use this url to cite or link to this publication:
author
Åmand, Andreas LU
supervisor
organization
alternative title
Utveckling av visualiseringsfunktioner i CALFEM för Python
course
VSMM01 20212
year
type
H3 - Professional qualifications (4 Years - )
subject
keywords
CALFEM, Python, Finite Elements, Visualization, VTK, Vedo, ParaView, MATLAB
publication/series
TVSM-5000
report number
TVSM-5256
ISSN
0281-6679
language
English
id
9077945
alternative location
http://www.byggmek.lth.se/english/publications/tvsm-5000-present-2014/
date added to LUP
2022-06-08 14:58:54
date last changed
2022-06-08 14:58:54
@misc{9077945,
  abstract     = {{Visualizing results is an important part of Finite Element (FE) modeling. Many tools exist for visualizing these results, they are often part of complete software packages for FE analysis. These packages often rely on the user being familiar with FE analysis, making them unsuitable for use in teaching the FE Method.

CALFEM (Computer Aided Learning of the Finite Element Method) is an FE toolbox developed at LTH with an emphasis on teaching. It enables the user to implement the steps that otherwise are done behind the scenes in commercial FE software. CALFEM exists in two variants today, the original one implemented in MATLAB, while a Python version is continuously being developed in parallel. The main aim of this thesis is to develop visualization tools for the Python version of CALFEM. This will be integrated into the existing toolbox, allowing users to visualize results from calculations and aiding in the understanding of the FE Method.

To identify the needs for visualization, a study was conducted of the current visualization tools available in CALFEM. Current visualization tools only allow for visualizing of 2D problems. While CALFEM has support for many 3D elements, visualizing these in full 3D is not currently possible. The focus for this thesis is therefore on 3D visualization. Since using CALFEM requires manual scripting, visualizing geometries and meshes before solving the problem is very helpful, and emphasis is therefore put on visualizing all steps in the FE process. Another study was conducted to understand the visualization needs using CALFEM at relevant departments at LTH.

Python has an extensive amount of libraries for visualizing scientific data structures. A third study was conducted to find suitable libraries for implementing the identified visualizations in CALFEM. As a result of this study, a library called Vedo, based on the Visualization Toolkit (VTK) was chosen.

Using the libraries and results from the two first studies, several visualization functions for several different element types were implemented. Care was taken to implement these as seamlessly as possible into the Python version, following the same principles, syntax, and naming of existing functions. Functionality for importing data for visualization from the MATLAB version was implemented, along with export to VTK-files. The export functions allow for visualization of the results in ParaView, a more advanced open-source visualization tool.}},
  author       = {{Åmand, Andreas}},
  issn         = {{0281-6679}},
  language     = {{eng}},
  note         = {{Student Paper}},
  series       = {{TVSM-5000}},
  title        = {{Development of visualization functions in CALFEM for Python}},
  year         = {{2022}},
}