How to use in-line Python in Strurel

Did you know? You can use in-line Python functions directly in a symbolic expression in STRUREL.

For example, assume a problem for which you have the two random variables R and S in your stochastic model, where R represents the resistance of a system of interest and S is the system load. The symbolic expression for the corresponding limit-state function in the native syntax of STRUREL would be:

FLIM(1) = R-S

However, if you have Python installed on your system and if the Python interface of Strurel is configured correctly, you could also use the following expression:

FLIM(1) = pythonf("R-S")

Sure, calling the Python interpreter for this simple demonstration example is like taking a sledgehammer to crack a nut. However, the interface-function pythonf is a tool that gives you access to the full power of Python directly in the symbolic expression of Strurel.

Sponsored Post Learn from the experts: Create a successful blog with our brand new courseThe Blog is excited to announce our newest offering: a course just for beginning bloggers where you’ll learn everything you need to know about blogging from the most trusted experts in the industry. We have helped millions of blogs get up and running, we know what works, and we want you to to know everything we know. This course provides all the fundamental skills and inspiration you need to get your blog started, an interactive community forum, and content updated annually.

STRUREL 2020 is available

The new release of STRUREL is available. We have added many helpful features to our software packages COMREL, SYSREL and COSTREL. Most notably, we extended the external interface of STRUREL: All our packages can now be coupled to C/C++, FORTRAN, Maplesoft Maple, Wolfram Mathematica, MathWorks Matlab, Python and Ruby. It is now straight-forward to use an external interface of STRUREL in your analysis. We also pushed our Add-On Feature to a new level, so that you can work with complex and challenging limit-state functions and share your projects with others.

COMREL 10 released

We released the latest version of Comrel: COMREL 10.

Major improvements include:(i) Limit-state functions entered in Comrel are automatically expressed in mathematical notation. (ii) The help system has been revised. (iii) The symbolic expression editor supports undo/redo.

Please note: Since Comrel 9.5 users can directly load limit-state functions written in C/C++, FORTRAN and Matlab into Comrel. Furthermore, data, documentation material and other information can be incorporated into the associated user-made libraries.

You can download the demo version of COMREL 10 from

Version 9.5 of COMREL is available!

The new release of COMREL comes with numerous improvements. The most notable new features are: (i) Limit-state functions coded in Python can now directly be analyzed. (ii) You can now easily develop your own interfaces to external programs by employing the new Sturel Add-On (SAO) feature. (iii) The COMREL manual is now directly integrated into the graphical user interface.

Improved GUI of COMREL in upcoming version

The release of Comrel 9.5 is in the offing. In the new version, the documentation is now directly embedded in the graphical user-interface (GUI). Moreover, the symbolic expressions editor (that is used to define limit-state functions) now comes with an ‘undo & redo’ feature that allows you to easily revert erroneous edits.

The application also comes with improved usability in shortcuts.

Presented Strurel at the UNCECOMP conference in Rhodos

The 2nd International Conference on Uncertainty Quantification in Computational Sciences and Engineering (UNCECOMP) took place at Rhodes Island, Greece. We presented the different modules of Strurel.

Abstract: Strurel is a leading commercial general-purpose software package for probabilistic modeling and structural reliability assessment. Strurel includes software modules with state-of-the-art computational methods for component and system reliability analysis. These include the First and Second Order Reliability methods (FORM/SORM) and sampling based method including Monte Carlo simulation, subset simulation, importance sampling, line sampling, directional simulation and adaptive importance sampling. Strurel can handle static as well as time-dependent problems, and supports a wide range of probabilistic models encountered in structural reliability. It also includes a set of tools for the calibration of safety factors in structural design. Strurel comes with an easy to use graphical user interface and additionally enables coupling of limit-state functions with user-defined system models through an interface with external programs.
The computational core of Strurel has been coupled with the finite element package SOFiSTiK in a new module called RELY that comes as part of the SOFiSTiK software package. RELY is specifically designed to perform reliability analysis employing SOFiSTiK finite element models. In RELY, the engineering system of interest is modeled using the full capabilities of the SOFiSTiK finite element package; existing SOFiSTiK finite element models can be readily employed for reliability analysis.
We demonstrate Strurel and RELY on two example applications. Firstly, a reliability analysis using a limit-state function for a pressure vessel coded in Matlab is conducted in Strurel. Secondly, a reliability analysis of a design concept for a submerged floating tube bridge is performed with RELY.

Couple a FORTRAN library with Strurel (MinGW-compiler)

The latest version of Sturel allows you to couple external libraries with the application. In this post we show how to link a limit-state function written in FORTRAN to Comrel. As compiler we employ a variant of the free MinGW compiler (

Install the 64-bit MinGW compiler

First, you have to download the installer mingw-w64-install.exe from Thereafter, please execute the downloaded installer and select x86-64 as architecture (you do not have to modify the other settings).

Compile the FORTRAN limit-state function

We assume that you implemented your limit-state function of interest in FORTRAN. A FORTRAN limit-state function that you can use as template can be downloaded from:

In this tutorial, we will directly compile the above mentioned file. The function is compiled using the Windows command prompt (cmd.exe). In the command prompt, first go to the installation directory of mingw-w64 (you can change directories with the command cd) and execute the bat-file mingw-w64.bat. Thereafter, to the folder containing the FORTRAN limit-state function and execute the following commands:

gfortran -fno-underscoring -c Module.for
gfortran -O3 -shared -o FORDLL.dll Module.o

where Module.for is the name of the FORTRAN file to compile and FORDLL.dll is the name of the DLL-library to generate.

If you do not have the FORTRAN compiler installed, you can download the compiled library from:

Load the compiled library in Comrel

If you compiled the above mentioned template file without modifications, you can download the file Comrel file Pressure-Vessel.iti from:
Put the file in the same folder as the compiled library (e.g., FORDLL.dll), and open the file with Comrel to see how the library can be used to perform a reliability analysis.