Extract stress and deformation values with prog results/Spannungs und Verschiebungswerte aus prog results extrahieren

Hello,

I’m trying to add a code to my Teddy-File to list the stress values of each element and the deformation in z direction, but can’t figure out why it doesn’t work.

My code is as follows:

+prog results
kopf Spannungsergebnisse in x-Richtung
lf 4
quad Typ sxxi styp elem dars dlst
Ende

I tried to replicate the code in the sample code example provided by installing SOFiSTiK. When executing the the code, I only get a warning and the result is that in the report file I generate a chapter for the results in the structure tab, but in the report file nothing is shown.
For WinGraf the results are shown in graphics, which leads me to the conclusion that the stress values must exist somewhere.

The goal is to generate a data table which is listed in the .erg file to extract them into a Python code I’m working on for my Master-Thesis.

If you need any further information, please let me know so I can provide them.

Thank you and kind regards

Hallo,
ich bin gerade dabei meinem Teddy-file einen Code hinzuzufügen, welcher die Spannungswerte und Verschiebungen in z-Richtung von allen Elementen ausliest, jedoch funktioniert dies leider nicht ganz.

Mein Code sieht wie folgt aus:

+prog results
kopf Spannungsergebnisse in x-Richtung
lf 4
quad Typ sxxi styp elem dars dlst
Ende

Ich habe versucht anhand des Mustercodes für das Modul results einen für mich funktionierenden Code zu erstellen. Beim Ausführen bekomme ich eine Warnung für das Modul und im Protokoll wird in der Gliederung das Kapitel für das Modul angezeigt, jedoch werden keine Werte ausgelesen, sodass es im eigentlichen Protokoll nicht erscheint. WinGraf erzeugt mir Grafiken mit den Spannungs- und Verschiebungsergebnissen, woraus ich folgere, dass die Ergebnisse auch irgendwo vorhaneden sein müssen.

Das Ziel ist es eine Tabelle mit den Ergebnissen zu erstellen, welche ich mittels Python auslesen kann um ein Automatisierungscode für meine Master-Thesis zu erstellen.

Vielen Dank im Voraus und mit freundlichen Grüßen

Hello,

  1. Are you sure you want stress at xi? Not top/middle/lower (sxu/sxm/sxl)?

  2. You are missing several parts if you want more control. But you definitely need:
    PICT
    Which starts/generates a new graphic (should be above quad command)

  3. The easiest way to figure out the results program is to:
    Open it graphically
    Produce the table(s) you are after
    Save it as a .results file
    Open that file with teddy and start making parametric (variables/loops)

  4. If you want to make parsing of the text file easier use:
    +prog results -e (-e suppresses the output of cadinp code)
    and
    Page Line 99999 (stops those pesky page breaks from splitting tables)

So perhaps try:
+prog results -e
kopf Spannungsergebnisse in x-Richtung
Page Line 99999
lf 4
quad Typ sxL styp elem dars dlst
Ende

Page might be a different keyword in the German version.

Thanks for your reply and help!

The suggested code didn’t work and resulted in a similiar output I described before, the difference is that I got a extra (pretty much blank) page. I exchanged the parts you added to the code with the corresponding germand commands.

  1. I just cycled through every type in the list in hopes to get a list of results, sxi was the last one i stopped at. I probably need the sxu results.

  2. I added the following code right after the +prog results -e command:
    PICT SC 0 SPLT YES
    But that didn’t result in anything in the result protocol.
    (Of course, I used the German input for this.)

  3. I’m trying to avoid graphical inputs because I feel like these are often much harder to code in Python and require more coding lines which would effect the performance and time. Since the results have to exist somewhere I try to generate a table which I can then extract directly into Python.

But again thank you for your advice. If you or anyone has some other advice I’m open to any suggestions.

Kind regards

I understand that you want to do things in text.
However I strongly suggest you:

  1. Make a small example graphically.
    The gui enables you to see which results are available in your database and how the list should look.

  2. Save the example file (*.results) and open it with teddy.
    The gui generates the same code you have to write.
    Although some of the commands might be unnecessary (e.g. filters that are not used)
    Also the commands are not always in the order you want (if you are using nested loops)

So basically -> create the code graphically (takes 5 min) and see what you are doing wrong.
This is how you debug cadinp imo.