nastran_to_vtk bug
Closed this issue · 11 comments
The parsed OP2 result data does not consider the situation of multiple working conditions (SUBCASE1, SUBCASE2, and so on). As a result, when converting to VTK files, different working conditions should be correctly written to different subcases, but now All are written to subcase1-1, and the data is overwritten. The data of subcase2 is written to subcase1.
As you can see from the two pictures above, after converting to VTK, two Subcases should be written, each with stress data of the triangular unit, but the generated VTK file only contains subcase1, and the storage in subcase1 is actually subcase2. data
Can you provide a small example? A 1 element problem with 2 different loadings (and thus displacement/stress) is ideal.
…
On Thu, Apr 18, 2024 at 3:08 AM karma0704 @.> wrote: The parsed OP2 result data does not consider the situation of multiple working conditions (SUBCASE1, SUBCASE2, and so on). As a result, when converting to VTK files, different working conditions should be correctly written to different subcases, but now All are written to subcase1-1, and the data is overwritten. The data of subcase2 is written to subcase1. image.png (view on web) https://github.com/SteveDoyle2/pyNastran/assets/63630092/878c52d5-2c86-4611-97e5-25809490827c image.png (view on web) https://github.com/SteveDoyle2/pyNastran/assets/63630092/2f3a2bc6-2159-4dce-a886-90703e49bc05 As you can see from the two pictures above, after converting to VTK, two Subcases should be written, each with stress data of the triangular unit, but the generated VTK file only contains subcase1, and the storage in subcase1 is actually subcase2. data — Reply to this email directly, view it on GitHub <#780>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAICUWJW272CEUA5WZNVQHTY56LQBAVCNFSM6AAAAABGM6K22OVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI2TAMRZGAYTQMA . You are receiving this because you are subscribed to this thread.Message ID: @.>
demo.zip
this is a demo
I didn't see the specific issue in the file you attached, but I updated the code to always write the icase=... tag. It's the easy way to avoid the counter (-1) that you saw. That was happening because the titles were overlapping. I didn't see any examples of the subcases being wrong though. Take a look at the new version and hopefully the issue of missing cases is just gone.
…
On Thu, Apr 18, 2024 at 5:07 PM karma0704 @.> wrote: Can you provide a small example? A 1 element problem with 2 different loadings (and thus displacement/stress) is ideal. … <#m_5400790347379029356_> On Thu, Apr 18, 2024 at 3:08 AM karma0704 @.> wrote: The parsed OP2 result data does not consider the situation of multiple working conditions (SUBCASE1, SUBCASE2, and so on). As a result, when converting to VTK files, different working conditions should be correctly written to different subcases, but now All are written to subcase1-1, and the data is overwritten. The data of subcase2 is written to subcase1. image.png (view on web) https://github.com/SteveDoyle2/pyNastran/assets/63630092/878c52d5-2c86-4611-97e5-25809490827c https://github.com/SteveDoyle2/pyNastran/assets/63630092/878c52d5-2c86-4611-97e5-25809490827c image.png (view on web) https://github.com/SteveDoyle2/pyNastran/assets/63630092/2f3a2bc6-2159-4dce-a886-90703e49bc05 https://github.com/SteveDoyle2/pyNastran/assets/63630092/2f3a2bc6-2159-4dce-a886-90703e49bc05 As you can see from the two pictures above, after converting to VTK, two Subcases should be written, each with stress data of the triangular unit, but the generated VTK file only contains subcase1, and the storage in subcase1 is actually subcase2. data — Reply to this email directly, view it on GitHub <#780 <#780>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAICUWJW272CEUA5WZNVQHTY56LQBAVCNFSM6AAAAABGM6K22OVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI2TAMRZGAYTQMA https://github.com/notifications/unsubscribe-auth/AAICUWJW272CEUA5WZNVQHTY56LQBAVCNFSM6AAAAABGM6K22OVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI2TAMRZGAYTQMA . You are receiving this because you are subscribed to this thread.Message ID: @.> demo.zip https://github.com/SteveDoyle2/pyNastran/files/15031551/demo.zip this is a demo — Reply to this email directly, view it on GitHub <#780 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAICUWLPWWY5OBAW7MMQRDTY6BN3HAVCNFSM6AAAAABGM6K22OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRVGUYTEMZZGE . You are receiving this because you commented.Message ID: @.**>
Hello, gentleman, after I completed the VTK data output, I wanted to verify whether the data conversion was completed correctly. I found that the original data and the converted VTK file data did not correspond, just like the example in the picture below. , when comparing the stress data in the X direction, it was found that some of the stress values in the X direction in the converted VTK file were obtained from the upper surface, and some were obtained from the lower surface. I don’t understand why this is the case.
I added icase to the tag, so it looks like you're not using the latest version.
Did you attach this case or is it a different one?
It should be clearer once you use the latest version. It corresponds to Absolute Principal Stress, which you can see if you look at the result in the gui. With the icase tag, it's easy to find that specific case.
It should be clearer once you use the latest version. It corresponds to Absolute Principal Stress, which you can see if you look at the result in the gui. With the icase tag, it's easy to find that specific case.
1.4.1?
you need to use the latest dev version
OK, Let me try!
Please forgive my presumption, because I adapted the python3.7.X version in version 1.4.1 and modified many places in the source code. Can you tell me which files you modified? This way I can directly synchronize only your updated files. Thank you so much。