SteveDoyle2 / pyNastran

A Python-based interface tool for Nastran's file formats
Other
393 stars 154 forks source link

Op2 reading of trmbd and trmbu tables #727

Closed benvb-97 closed 1 year ago

benvb-97 commented 1 year ago

This is related to issue #684 (Coordinate transformation of stresses/strains using CSTM, TRMBU, TRMBD result tables).

The TRMBU and TRMBD readers are mostly implemented but were still commented out. I believe they can be uncommented? I've also added getters/setters to be able to retrieve the TRMBU/D and CSTM tables directly from the op2 object, instead of having to use op2.op2_results.X.

SteveDoyle2 commented 1 year ago

Oh yeah...the big issue was I'm not clear on the contents of TRMBU/D, so I didn't want to be calling something I know is incorrect. In the code, it's called out as Euler angles.

What was it ultimately? What is transform?

benvb-97 commented 1 year ago

Hi Steve, I added a description of the table content to the read_trmbu/d functions. I hope that helps to clear them up a bit.

They both contain a large array of euler angles (X, Y, Z) that can be used to transform the stresses of nonlinear SOL401/402 simulations from the material to the basic coordinate system. TRMBU does this for the undeformed configuration (per the description) and TRMBD does this for the deformed one. I've tested this with a 1 solid element example in Simcenter Nastran and I was able to obtain the correct native/material/basic csys stresses using the small python code file attached to issue #684.

codecov[bot] commented 1 year ago

Codecov Report

Merging #727 (5108ce3) into main (ca29e4e) will decrease coverage by 0.01%. The diff coverage is 51.72%.

Additional details and impacted files [![Impacted file tree graph](https://codecov.io/gh/SteveDoyle2/pyNastran/pull/727/graphs/tree.svg?width=650&height=150&src=pr&token=S1ely2b7bK&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Steven+Doyle)](https://codecov.io/gh/SteveDoyle2/pyNastran/pull/727?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Steven+Doyle) ```diff @@ Coverage Diff @@ ## main #727 +/- ## ========================================== - Coverage 72.90% 72.90% -0.01% ========================================== Files 529 529 Lines 180099 180121 +22 Branches 24855 24861 +6 ========================================== + Hits 131308 131323 +15 - Misses 42989 42996 +7 Partials 5802 5802 ``` | [Impacted Files](https://codecov.io/gh/SteveDoyle2/pyNastran/pull/727?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Steven+Doyle) | Coverage Δ | | |---|---|---| | [pyNastran/op2/op2\_interface/op2\_reader.py](https://codecov.io/gh/SteveDoyle2/pyNastran/pull/727?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Steven+Doyle#diff-cHlOYXN0cmFuL29wMi9vcDJfaW50ZXJmYWNlL29wMl9yZWFkZXIucHk=) | `56.64% <0.00%> (-0.07%)` | :arrow_down: | | [pyNastran/op2/op2\_interface/op2\_f06\_common.py](https://codecov.io/gh/SteveDoyle2/pyNastran/pull/727?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Steven+Doyle#diff-cHlOYXN0cmFuL29wMi9vcDJfaW50ZXJmYWNlL29wMl9mMDZfY29tbW9uLnB5) | `79.32% <83.33%> (+0.07%)` | :arrow_up: | ------ [Continue to review full report in Codecov by Sentry](https://codecov.io/gh/SteveDoyle2/pyNastran/pull/727?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Steven+Doyle). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Steven+Doyle) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/SteveDoyle2/pyNastran/pull/727?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Steven+Doyle). Last update [ca29e4e...5108ce3](https://codecov.io/gh/SteveDoyle2/pyNastran/pull/727?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Steven+Doyle). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Steven+Doyle).