How to extract the result objects tabular data information when running in batch?

Vishnu
Vishnu Member, Employee Posts: 222
100 Comments 100 Likes Second Anniversary Name Dropper
✭✭✭✭
edited April 2024 in Structures

When you use ACT you may need to access the table pane and that does not work well when you have mechanical running in batch especially when you run design point studies


Tagged:

Comments

  • Vishnu
    Vishnu Member, Employee Posts: 222
    100 Comments 100 Likes Second Anniversary Name Dropper
    ✭✭✭✭
    edited March 2023

    One alternative is to get the same tabular data information using DPF and export them to a csv file with a python code object inserted below solution.


    Look at how we parametrize the file number and run various design points:

    Each DP would create its corresponding CSV file with the corresponding file number


    Please refer the below script:

    Things to do to see it working:

    • Open a solved mechanical model or reach out to me for a sample
    • copy the code above and run them in a mechanical editor or console to see for yourself how it works.
    • The code would insert a Python code button under solution with after post target callback.
    • Scope the geometry of interest and result and component you would like to extract the table information for and also specify the folder and file names for export of data
    • After solve you will see a csv file in drive you selected.
    • Now try to parametrize the file number , loads and deformations and run them via design point to see the csv being written even in batch

    Methodology used :

    • The code uses DPF to extract the field information and computes the min_max_fc operator to obtain the min and max at every time point.
    • The average is computed by performing the average of the field data at every time point.
    • Once the min,max and average are computed they are exported to a file location

    Future Expansion:

    At the moment the list includes result like, S,U and EPEL (Stress , Deformation and Elastic Strain).

    You could easily expand this list as you need.

  • Rosse7
    Rosse7 Member Posts: 10
    First Comment
    **

    Hi Vishnu,

    your post is very interesting but can you kindly suggest me how to properly customize it for my target that you can read at:
    https://discuss.ansys.com/discussion/comment/5298#Comment_5298
    please ?

    Thank you

  • pari
    pari Member Posts: 9
    First Anniversary Photogenic Name Dropper First Comment
    **

    Hello Vishnu,

    This is a very robust script that works quite well for me, for exactly what I need. I was even able to extend it to include some more results.

    I am getting an issue when I try to include Force Reaction as a result using "F". This raised an error saying 'mapdl::rst::F' not found.

    Could you tell me how I can extract the Force Reaction into the csv file? Thank you!