dutitello / paransys2

A Python module that allows you to run ANSYS APDL scripts setting selected parameters values by Python, and returning the values of all parameters in the end of the analysis.
https://dutitello.github.io/paransys2/
MIT License
1 stars 0 forks source link

POST26 variables #2

Closed dutitello closed 3 years ago

dutitello commented 4 years ago

All data available at POST26 could be stored in a CSV file and then imported as a Pandas DataFrame (idea)

dutitello commented 3 years ago

It's done! The variables are set in the solve() function by the parameter P26vars that is a list of POST26 variables numbers (take a look at cantilever.py at examples).

The solution adopted is: a macro with 1 parameter (variable number) is created, it export a block with all data for the set variable inside P26VAR=VARNUM ... P26END. It run for each asked variable and append the values. If the parameter is 0 it erase the file. The data is imported in Python using this block constructors, it is put in a dataframe and the index is set to variable 1/Time. With this solve function has 2 returns: parameters out and POST26 dataframe.