umvarma / pynastran

Automatically exported from code.google.com/p/pynastran
1 stars 0 forks source link

.readF06() crashes with multiple subcases in file. #145

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
How to reproduce problem:
1. Parse a .f06 file run with SOL 101 with multiple (>1) subcases run from 
Nastran 2012.2:

from pyNastran.f06.f06 import F06
f06Name='failure_index_test.f06'                                                
f06 = F06(f06Name)
f06.readF06()

2. You will see that there is an exception in the readSubcaseNameID() function 
where it tries to set isubcase to an integer (this is on line 308 of my 
pyNastran version 0.6.1.
3. I have attached a sample f06 file that would not import with the code used 
above.

Solution: 
Replace line 308 with: "isubcase = int(isubcase.split()[-1])" 
(between double quotes)
This code was previously: "isubcase = int(isubcase.strip('SUBCASE '))"
(between double quotes). 

What version of the product are you using? On what operating system?  System 
parameters: Windows 7 32-Bit, Python 2.7, pyNastran v 0.6.1

Original issue reported on code.google.com by dsmuelle...@gmail.com on 29 Mar 2014 at 5:58

Attachments:

GoogleCodeExporter commented 9 years ago
The bug was already fixed in the trunk.

I added support for the grid point force balance and forces in CQUAD4s 
(bilinear).  I found an additional subcase parsing bug specific to the CQUAD4 
force table, fixed it, and made a test (as I'm sure this will not be the last 
F06 header issue).  No support was added for failure indices as the OP2 support 
for this in incomplete.

Original comment by mesheb82 on 1 Apr 2014 at 5:23