Code SILEX - Mechanical web page of Antoine Legay
logo silex

SImulation par ÉLéments finiX
Code SILEX

It seems you are using an outdated browser that does not support canvas :-(

Introduction


Download the SILEX routines:


With UBUNTU OS, you need:

With WINDOWS OS: SILEX works under Windows (but only with the Python version, no Fortran) by installing Gmsh, Python3.4 and Scipy for Windows:



With a MAC OS: no test, try the windows configuration...

Computation of a piston: first steps with SILEX



We want to compute a 3D structure 3D meshed with 4-node tetrahedral elements.





Create the mesh with Gmsh


The studied solid is a piston:




The file piston.step is a CAD file (step format) which has been created with a CAD software.
The file piston-tet4.geo is a gmsh text file: it loads the step file and then perform the mesh.

Open the file piston-tet4.geo with gedit (or Notepad++). In the text file, the h variable defines the average length of the elements: change it to h=5 in order to try the programs in the first runs.

Open piston-tet4.geo with gmsh:

With Ubuntu: use of the Fortran library for Python (it is not necessary for the full Python version)

In a terminal and in the folder silex/librairies, compile the Fortran library of the 4-node tetrahedral element using the following command:

f2py3 -c -m silex_lib_tet4_fortran silex_lib_tet4_fortran.f

A new file silex_lib_tet4.cpython-34m.cpython-34m.so is created in the folder: it is a compiled library that can be read and used by Python.


Main Python program Main-Piston.py


Open the file Main-Piston-tet4.py with idle

Explanations of the program:


Results "Piston": displacements for h=0.8








Results "Piston": Von Mises stress in the elements for h=0.8








Results "Piston": smooth Von Mises stress at the nodes for h=0.8








Results "Piston": elemental contribution to the global error for h=0.8