Accessing Strain Results for Nonlinear Analysis

222 views
Skip to first unread message

Jason Ross

unread,
Aug 7, 2019, 1:00:59 PM8/7/19
to pyNastran Discuss
Hello,

I'm working on a problem using Autodesk Nastran In-CAD where I'm interested in the strain history of the nodes.

I've been able to access stress results using the op2.ctetra_stress object. I don't see the same results for strain.

Autodesk Nastran doesn't output an F06 file, but it does produce a .OUT file which is supposedly similar. I've also looked at the .OUT file and it does contain strain data. I've also looked at the "Results Neutral" output file and it contains strain data as well.

Is there a way of getting the strain results from Nastran In-CAD using PyNastran?

Thanks!

Steven Doyle

unread,
Aug 7, 2019, 8:59:38 PM8/7/19
to pyNastran Discuss
Jason,

From what I've seen of Autodesk Nastran/Nastran In-CAD, they make an OP2 very similar to MSC and NX's OP2 other than their geometry definition, which is very different.  I'd expect as long as you're requesting the output data correctly, then pyNastran will read it just fine.  If you can load the strain data in your GUI, I'd assume it would work just fine in pyNastran (or crash/print some message saying the table is messed up).  Otherwise, I need a small example and an ASCII version of the F06 would help a lot as well.

Regarding the neutral file, I've never tried to parse that.  I thought that was ASCII, so it's going to be ~50,000x slower than a good binary parser, so not ideal.

Steve

--
You received this message because you are subscribed to the Google Groups "pyNastran Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pynastran-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pynastran-discuss/eb60809c-b840-4e91-a7ed-9d5f66b96374%40googlegroups.com.

Jason Ross

unread,
Aug 8, 2019, 11:46:12 AM8/8/19
to pyNastran Discuss
Hi Steve,

Thanks for taking the time to help.

I think I know what's going on - The Nastran in-cad model setup has an option for "Output Sets" including force, stress, strain, strain energy, and heat flux. I only had had the "stress" box checked, so it makes sense that those would be the only results I'd get in the OP2. That wasn't very smart of me.

However, when I check the box for "strain", I get 

NotImplementedError: Invalid Table = b'OSTR1'

I can check all of the other boxes but "strain" and I see those results show up in the `result_names` attribute of the OP2 object, but "strain" causes that error to be thrown. Seems like Autodesk Nastran outputs strain results differently than other versions.

The rest of the error message suggests you already saw this coming:

If you have matrices that you want to read, see:
  model.set_additional_matrices_to_read(matrices)  matrices = {
      b'BHH' : True,
      b'KHH' : False,
  }  # you want to read some matrices, but not others
  matrices = [b'BHH', b'KHH']  # assumes True

If you the table is a geom/result table, see:
  model.set_additional_result_tables_to_read(methods_dict)
  methods_dict = {
      b'OUGV1' : [method3, method4],
      b'GEOM4SX' : [method3, method4],
      b'OES1X1' : False,
  }

If you want to take control of the OP2 reader (mainly useful for obscure tables), see:
  methods_dict = {
      b'OUGV1' : [method],
  }
  model.set_additional_generalized_tables_to_read(methods_dict)

What are some of the methods I should try using in methods_dict?

I've attached a simple model I'm trying to work with.

Thanks,
Jason


On Wednesday, August 7, 2019 at 5:59:38 PM UTC-7, steve wrote:
Jason,

From what I've seen of Autodesk Nastran/Nastran In-CAD, they make an OP2 very similar to MSC and NX's OP2 other than their geometry definition, which is very different.  I'd expect as long as you're requesting the output data correctly, then pyNastran will read it just fine.  If you can load the strain data in your GUI, I'd assume it would work just fine in pyNastran (or crash/print some message saying the table is messed up).  Otherwise, I need a small example and an ASCII version of the F06 would help a lot as well.

Regarding the neutral file, I've never tried to parse that.  I thought that was ASCII, so it's going to be ~50,000x slower than a good binary parser, so not ideal.

Steve

On Wed, Aug 7, 2019 at 10:01 AM Jason Ross <jaso...@entro-eng.com> wrote:
Hello,

I'm working on a problem using Autodesk Nastran In-CAD where I'm interested in the strain history of the nodes.

I've been able to access stress results using the op2.ctetra_stress object. I don't see the same results for strain.

Autodesk Nastran doesn't output an F06 file, but it does produce a .OUT file which is supposedly similar. I've also looked at the .OUT file and it does contain strain data. I've also looked at the "Results Neutral" output file and it contains strain data as well.

Is there a way of getting the strain results from Nastran In-CAD using PyNastran?

Thanks!

--
You received this message because you are subscribed to the Google Groups "pyNastran Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pynastra...@googlegroups.com.
9zk6b5uuo.zip

Steven Doyle

unread,
Aug 8, 2019, 7:27:32 PM8/8/19
to pyNastran Discuss
Jason,

If you update, it should work now.  You'll need to specify the mode as "autodesk" when you call read_op2.

To unsubscribe from this group and stop receiving emails from it, send an email to pynastran-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pynastran-discuss/1ae26f87-a572-43e3-9a33-7c1eed99a26d%40googlegroups.com.

Jason Ross

unread,
Aug 9, 2019, 12:10:15 PM8/9/19
to pyNastran Discuss
Hi Steve,

That worked great! I'm able to view results from a linear analysis now. 

When I read an OP2 from a non-linear analysis using the new autodesk mode, I don't get any error messages but my strain results are empty.

Here's the debug stream when I load the linear results:

DEBUG: op2.py:582 combine=True
DEBUG: op2.py:583 -------- reading op2 with read_mode=1 (array sizing) --------
INFO: op2_scalar.py:1478 op2_filename = 'vm2_32/vm2_32/InCAD/FEA/9zk6b5uuo.OP2'
DEBUG: op2_reader.py:258 mode = 'autodesk'
DEBUG: op2_scalar.py:1629 table_name=b'GEOM1'
DEBUG: op2_scalar.py:1629 table_name=b'GEOM2'
DEBUG: op2_scalar.py:1629 table_name=b'EPT'
DEBUG: op2_scalar.py:1629 table_name=b'MPT'
DEBUG: op2_scalar.py:1629 table_name=b'OUGV1'
DEBUG: op2_scalar.py:1629 table_name=b'OQG1'
DEBUG: op2_scalar.py:1629 table_name=b'OES1'
DEBUG: op2_scalar.py:1629 table_name=b'OSTR1'
DEBUG: op2_scalar.py:1629 table_name=b'ONRGY1'
DEBUG: op2_scalar.py:1629 table_name=b'OUGV1'
DEBUG: op2_scalar.py:1629 table_name=b'OQG1'
DEBUG: op2_scalar.py:1629 table_name=b'OES1'
DEBUG: op2_scalar.py:1629 table_name=b'OSTR1'
DEBUG: op2_scalar.py:1629 table_name=b'ONRGY1'
DEBUG: op2_scalar.py:1629 table_name=b'OUGV1'
DEBUG: op2_scalar.py:1629 table_name=b'OQG1'
DEBUG: op2_scalar.py:1629 table_name=b'OES1'
DEBUG: op2_scalar.py:1629 table_name=b'OSTR1'
DEBUG: op2_scalar.py:1629 table_name=b'ONRGY1'
DEBUG: op2_scalar.py:1629 table_name=b'OUGV1'
DEBUG: op2_scalar.py:1629 table_name=b'OQG1'
DEBUG: op2_scalar.py:1629 table_name=b'OES1'
DEBUG: op2_scalar.py:1629 table_name=b'OSTR1'
DEBUG: op2_scalar.py:1629 table_name=b'ONRGY1'
DEBUG: op2.py:602 -------- reading op2 with read_mode=2 (array filling) --------
DEBUG: op2_reader.py:258 mode = 'autodesk'
DEBUG: op2_scalar.py:1629 table_name=b'GEOM1'
DEBUG: op2_scalar.py:1629 table_name=b'GEOM2'
DEBUG: op2_scalar.py:1629 table_name=b'EPT'
DEBUG: op2_scalar.py:1629 table_name=b'MPT'
DEBUG: op2_scalar.py:1629 table_name=b'OUGV1'
DEBUG: op2_scalar.py:1629 table_name=b'OQG1'
DEBUG: op2_scalar.py:1629 table_name=b'OES1'
DEBUG: op2_scalar.py:1629 table_name=b'OSTR1'
DEBUG: op2_scalar.py:1629 table_name=b'ONRGY1'
DEBUG: op2_scalar.py:1629 table_name=b'OUGV1'
DEBUG: op2_scalar.py:1629 table_name=b'OQG1'
DEBUG: op2_scalar.py:1629 table_name=b'OES1'
DEBUG: op2_scalar.py:1629 table_name=b'OSTR1'
DEBUG: op2_scalar.py:1629 table_name=b'ONRGY1'
DEBUG: op2_scalar.py:1629 table_name=b'OUGV1'
DEBUG: op2_scalar.py:1629 table_name=b'OQG1'
DEBUG: op2_scalar.py:1629 table_name=b'OES1'
DEBUG: op2_scalar.py:1629 table_name=b'OSTR1'
DEBUG: op2_scalar.py:1629 table_name=b'ONRGY1'
DEBUG: op2_scalar.py:1629 table_name=b'OUGV1'
DEBUG: op2_scalar.py:1629 table_name=b'OQG1'
DEBUG: op2_scalar.py:1629 table_name=b'OES1'
DEBUG: op2_scalar.py:1629 table_name=b'OSTR1'
DEBUG: op2_scalar.py:1629 table_name=b'ONRGY1'
DEBUG: op2.py:876 combine_results
DEBUG: op2.py:615 finished reading op2





Here's the error stream when I load the non-linear version of the same analysis:

DEBUG: op2.py:582 combine=True
DEBUG: op2.py:583 -------- reading op2 with read_mode=1 (array sizing) --------
INFO: op2_scalar.py:1478 op2_filename = 'vm2_32/vm2_32_nonlinear/InCAD/FEA/NonlinearBeam.OP2'
DEBUG: op2_reader.py:258 mode = 'autodesk'
DEBUG: op2_scalar.py:1629 table_name=b'GEOM1'
DEBUG: op2_scalar.py:1629 table_name=b'GEOM2'
DEBUG: op2_scalar.py:1629 table_name=b'EPT'
DEBUG: op2_scalar.py:1629 table_name=b'MPT'
DEBUG: op2_scalar.py:1629 table_name=b'OUGV1'
DEBUG: op2_scalar.py:1629 table_name=b'OPG1'
DEBUG: op2_scalar.py:1629 table_name=b'OQG1'
DEBUG: op2_scalar.py:1629 table_name=b'OQMG1'
DEBUG: op2_scalar.py:1629 table_name=b'OES1'
DEBUG: op2_scalar.py:1629 table_name=b'OESNLXR'
DEBUG: op2_scalar.py:1629 table_name=b'OGPFB1'
DEBUG: op2_scalar.py:1629 table_name=b'OUGV1'
DEBUG: op2_scalar.py:1629 table_name=b'OPG1'
DEBUG: op2_scalar.py:1629 table_name=b'OQG1'
DEBUG: op2_scalar.py:1629 table_name=b'OQMG1'
DEBUG: op2_scalar.py:1629 table_name=b'OES1'
DEBUG: op2_scalar.py:1629 table_name=b'OESNLXR'
DEBUG: op2_scalar.py:1629 table_name=b'OGPFB1'
DEBUG: op2_scalar.py:1629 table_name=b'OUGV1'
DEBUG: op2_scalar.py:1629 table_name=b'OPG1'
DEBUG: op2_scalar.py:1629 table_name=b'OQG1'
DEBUG: op2_scalar.py:1629 table_name=b'OQMG1'
DEBUG: op2_scalar.py:1629 table_name=b'OES1'
DEBUG: op2_scalar.py:1629 table_name=b'OESNLXR'
DEBUG: op2_scalar.py:1629 table_name=b'OGPFB1'
DEBUG: op2_scalar.py:1629 table_name=b'OUGV1'
DEBUG: op2_scalar.py:1629 table_name=b'OPG1'
DEBUG: op2_scalar.py:1629 table_name=b'OQG1'
DEBUG: op2_scalar.py:1629 table_name=b'OQMG1'
DEBUG: op2_scalar.py:1629 table_name=b'OES1'
DEBUG: op2_scalar.py:1629 table_name=b'OESNLXR'
DEBUG: op2_scalar.py:1629 table_name=b'OGPFB1'
DEBUG: op2.py:602 -------- reading op2 with read_mode=2 (array filling) --------
DEBUG: op2_reader.py:258 mode = 'autodesk'
DEBUG: op2_scalar.py:1629 table_name=b'GEOM1'
DEBUG: op2_scalar.py:1629 table_name=b'GEOM2'
DEBUG: op2_scalar.py:1629 table_name=b'EPT'
DEBUG: op2_scalar.py:1629 table_name=b'MPT'
DEBUG: op2_scalar.py:1629 table_name=b'OUGV1'
DEBUG: op2_scalar.py:1629 table_name=b'OPG1'
DEBUG: op2_scalar.py:1629 table_name=b'OQG1'
DEBUG: op2_scalar.py:1629 table_name=b'OQMG1'
DEBUG: op2_scalar.py:1629 table_name=b'OES1'
DEBUG: op2_scalar.py:1629 table_name=b'OESNLXR'
DEBUG: op2_scalar.py:1629 table_name=b'OGPFB1'
DEBUG: op2_scalar.py:1629 table_name=b'OUGV1'
DEBUG: op2_scalar.py:1629 table_name=b'OPG1'
DEBUG: op2_scalar.py:1629 table_name=b'OQG1'
DEBUG: op2_scalar.py:1629 table_name=b'OQMG1'
DEBUG: op2_scalar.py:1629 table_name=b'OES1'
DEBUG: op2_scalar.py:1629 table_name=b'OESNLXR'
DEBUG: op2_scalar.py:1629 table_name=b'OGPFB1'
DEBUG: op2_scalar.py:1629 table_name=b'OUGV1'
DEBUG: op2_scalar.py:1629 table_name=b'OPG1'
DEBUG: op2_scalar.py:1629 table_name=b'OQG1'
DEBUG: op2_scalar.py:1629 table_name=b'OQMG1'
DEBUG: op2_scalar.py:1629 table_name=b'OES1'
DEBUG: op2_scalar.py:1629 table_name=b'OESNLXR'
DEBUG: op2_scalar.py:1629 table_name=b'OGPFB1'
DEBUG: op2_scalar.py:1629 table_name=b'OUGV1'
DEBUG: op2_scalar.py:1629 table_name=b'OPG1'
DEBUG: op2_scalar.py:1629 table_name=b'OQG1'
DEBUG: op2_scalar.py:1629 table_name=b'OQMG1'
DEBUG: op2_scalar.py:1629 table_name=b'OES1'
DEBUG: op2_scalar.py:1629 table_name=b'OESNLXR'
DEBUG: op2_scalar.py:1629 table_name=b'OGPFB1'
DEBUG: op2.py:876 combine_results
DEBUG: op2.py:615 finished reading op2

What do you recommend?

Thanks,
Jason


On Thursday, August 8, 2019 at 4:27:32 PM UTC-7, steve wrote:
Jason,

If you update, it should work now.  You'll need to specify the mode as "autodesk" when you call read_op2.
NonlinearBeam.zip

Steven Doyle

unread,
Aug 9, 2019, 2:57:31 PM8/9/19
to pyNastran Discuss
Do you have the .out file that goes with that?  I've never had an example for nonlinear solid stress/strain.

To unsubscribe from this group and stop receiving emails from it, send an email to pynastran-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pynastran-discuss/16705505-51f9-4d5c-87a3-0ec32fab3f87%40googlegroups.com.

Jason Ross

unread,
Aug 9, 2019, 3:02:24 PM8/9/19
to pyNastran Discuss
Attached.


On Friday, August 9, 2019 at 11:57:31 AM UTC-7, steve wrote:
Do you have the .out file that goes with that?  I've never had an example for nonlinear solid stress/strain.

NonlinearBeam.zip

Steven Doyle

unread,
Aug 10, 2019, 5:45:13 PM8/10/19
to pyNastran Discuss
Jason,

The nonlinear solid strains should work now.  Autodesk works a bit differently than MSC/NX though.  

For linear stresses/strains in MSC/NX/Autodesk, you'll get your stress/strain data in ctetra_stress or ctetra_strain.  

For nonlinear stress/strains in MSC/NX, the stress/strain data shows up in a single nonlinear table and the results are stored in nonlinear_ctetra_stress_strain.  For Autodesk, the nonlinear stresses show up in ctetra_stress, but the nonlinear strains show up in nonlinear_ctetra_stress_strain, except the stress data is set to 0.  That's what Autodesk is writing, so I don't want to mess with, especially since things may change in the next version.

Steve

To unsubscribe from this group and stop receiving emails from it, send an email to pynastran-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pynastran-discuss/4cc2175d-8d7a-4c6c-bf6f-d9697dd1728e%40googlegroups.com.

Jason Ross

unread,
Aug 13, 2019, 1:35:51 PM8/13/19
to pyNastran Discuss
Hi Steve,

Looks like it's getting the data. Thanks for all your help.

For some reason, when I look at nonlinear_ctetra_stress_strain, the data has 15 columns but only 12 headers are listed. Like you said, most of the columns are all zeros, but all of the unlabeled columns have data in them.

Thanks,
Jason


On Saturday, August 10, 2019 at 2:45:13 PM UTC-7, steve wrote:
Jason,

The nonlinear solid strains should work now.  Autodesk works a bit differently than MSC/NX though.  

For linear stresses/strains in MSC/NX/Autodesk, you'll get your stress/strain data in ctetra_stress or ctetra_strain.  

For nonlinear stress/strains in MSC/NX, the stress/strain data shows up in a single nonlinear table and the results are stored in nonlinear_ctetra_stress_strain.  For Autodesk, the nonlinear stresses show up in ctetra_stress, but the nonlinear strains show up in nonlinear_ctetra_stress_strain, except the stress data is set to 0.  That's what Autodesk is writing, so I don't want to mess with, especially since things may change in the next version.

Steve

Steven Doyle

unread,
Aug 13, 2019, 11:17:32 PM8/13/19
to pyNastran Discuss
The length should be correct now.  The headers were now updated after being copied from the nonlinear plate result.  The data was correct, but the headers were missing a few of the stress/strain tensor terms.  The result also supports f06 writing, so it's worth looking at your data and compare it to your out file to show you what you're seeing.

>>> test_op2 -f nonlinearBeam.op2

is an easy way to generate the f06

Steve

To unsubscribe from this group and stop receiving emails from it, send an email to pynastran-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pynastran-discuss/bf117bca-7910-4e53-976f-6c7b483640d2%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages