SteveDoyle2 / pyNastran

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

nastran_to_vtk skipping pressure on ['CHEXA'] #778

Closed guotao1415 closed 4 months ago

guotao1415 commented 5 months ago
from pyNastran.converters.nastran.nastran_to_vtk import nastran_to_vtk

filename = r'D:\WORK\op2_to_vtk\models\unit\pload4\chexa'

bdf_filename = filename+'.bdf'
op2_filename = filename+'.op2'
vtk_filename = filename+'.vtu'

nastran_to_vtk(bdf_filename, op2_filename, vtk_filename)

I'm sorry to bother you again, but I output the following warning while using the above code. I tried other files in the models folder and received a similar warning. Why is this? Shouldn't it be because they don't support these entries?

supported_formats = ['nastran']
WARNING: forces_moments.py:536        skipping pressure on ['CHEXA']
WARNING: forces_moments.py:536        skipping pressure on ['CHEXA']
WARNING: forces_moments.py:536        skipping pressure on ['CHEXA']
WARNING: forces_moments.py:536        skipping pressure on ['CHEXA']
WARNING: forces_moments.py:536        skipping pressure on ['CHEXA']
WARNING: forces_moments.py:536        skipping pressure on ['CHEXA']
WARNING: forces_moments.py:536        skipping pressure on ['CHEXA']
WARNING: forces_moments.py:536        skipping pressure on ['CHEXA']
WARNING: forces_moments.py:536        skipping pressure on ['CHEXA']
WARNING: forces_moments.py:536        skipping pressure on ['CHEXA']
WARNING: forces_moments.py:536        skipping pressure on ['CHEXA']
WARNING: forces_moments.py:536        skipping pressure on ['CHEXA']
WARNING: forces_moments.py:536        skipping pressure on ['CHEXA']
WARNING: forces_moments.py:536        skipping pressure on ['CHEXA']
WARNING: forces_moments.py:536        skipping pressure on ['CHEXA']
WARNING: forces_moments.py:536        skipping pressure on ['CHEXA']
WARNING: forces_moments.py:536        skipping pressure on ['CHEXA']
WARNING: forces_moments.py:536        skipping pressure on ['CHEXA']
WARNING: forces_moments.py:536        skipping pressure on ['CHEXA']
WARNING: forces_moments.py:536        skipping pressure on ['CHEXA']
WARNING: forces_moments.py:536        skipping pressure on ['CHEXA']
WARNING: forces_moments.py:536        skipping pressure on ['CHEXA']
WARNING: forces_moments.py:536        skipping pressure on ['CHEXA']
WARNING: forces_moments.py:536        skipping pressure on ['CHEXA']
trying to read...D:\WORK\op2_to_vtk\models\unit\pload4\chexa.op2
guotao1415 commented 5 months ago

If possible, is there any bdf and op2 file in your warehouse that can be directly used with nastran_to_vtk? I have used several in your models folder, but there will be warnings and vtu files will lose some result information such as stress and strain.

SteveDoyle2 commented 5 months ago

The converter uses the same reader as the gui, so it has the same (or more) limitations. I can’t apply a surface pressure to a solid element and have it only color the face, so there is a warning.

What results that show up in the gui are missing? Most of the results from the op2 are not supported in the gui, but if there’s a specific one, I can look at it.

On Mon, Apr 8, 2024 at 8:19 AM Chovy @.***> wrote:

If possible, is there any bdf and op2 file in your warehouse that can be directly used with nastran_to_vtk? I have used several in your models folder, but there will be warnings and vtu files will lose some result information such as stress and strain.

— Reply to this email directly, view it on GitHub https://github.com/SteveDoyle2/pyNastran/issues/778#issuecomment-2043035898, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAICUWPGZY6NCZTFZA3LXULY4KYPNAVCNFSM6AAAAABF44XJ6CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBTGAZTKOBZHA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

SteveDoyle2 commented 4 months ago

added a log_level' flag (options are debug, info, warning, error (default=='error).

SteveDoyle2 commented 4 months ago

I think i addressed the issue. Not sure about the stress comment, but reopen if you have a model.