Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODB reading Python scripting issues 2

Status
Not open for further replies.

Demetrio92

Mechanical
Jun 24, 2017
2
Hi everibody,

I'm trying to work on odb files via Python script. More in detail, I want to extract the E11 strain component value for each frame (61 frames) of a step (Implicit dynamic step) for some nodes which I'm interested in, and save these values into a file.

The script I've written works fine except for two things:
1) the odb reading is extremely slow: extracting the 61 values for the sets of interest (which are more or less 40) takes more than 1 hour (the odbs size is around 5 GB);

2) the odb increases its size while I'm reading data from it! It grows and shifts from 5GB to 200GB or more [surprise]! Once the reading is completed, I can open the odb and apparently nothing has changed, apart from the size . How can this be possible?

I'm new to python scripting, so I'm probably missing something! Attached you can find the script.

Kind regards,
Demetrio
 
 http://files.engineering.com/getfile.aspx?folder=83dd1e47-1c9c-4dec-b379-201cc3bea5ff&file=odb_reading.py
Replies continue below

Recommended for you

1. Try to loop first through the frames and in that through the sets. With that you can longer hold the variable E and just have to modify the subset. That can improve the speed.

2. Check what's happening when using the readOnly parameter at openOdb.
 
Dear Mustaine3,
thank you very much, I'll try to follow your advices!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor