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.