Reading Nastran .nas file and Results with .csv file

(Harald Weisz) #1

Hi to the forum,
I’m new with Paraview, but I’m using Nastran for over 30 years. Now a client asked me to show him the loeadpathes in a mechanical problem. These data will not be shown in nastran directly. Only over the MajPrin Stress you can get a feeling about the loadpathes.
I decided to use Paraview and saw that with Nastran (.nas and .f06) there are some problems. Well, the geometry data (.nas) could be read and for the Stresses I made an .csv file. (Attachment)! Worked fine. PV20199126_B01|690x430
Can somebody tell me where to read about how to combine the result data with the geometry? Maybe I overlooked somsthing in the tutorial. Or can someone give some short tipps?
Thank you in advance. Kind Regards. Harald.

(Utkarsh Ayachit) #2

Can you share a samples for the .nas and .csv files? that’ll make it easier.

Are the stresses in .csv associated with the nodes in the geometry and specified in the same order as the nodes in the geometry? In that case, a Python programmable filter that simply combines the arrays may do the trick. If you a sample dataset, I can put together state file.

(Harald Weisz) #3

Hi Utkarsh,
thank you for the answer. Yes the .nas file holds the Grid Points and the Elements(Cells) and the .csv contains the Stresses(,“Plate Top MajorPrn Stress”,“Plate Top PrnStress Angle”,“Plate Top VonMises Stress”,“Strain Energy”).
KP_sol_Elem.csv (30 KB)
KP-000.nas (83.0 KB)
This are the files I worked with. If I would know how to make the association it would be fine.
Thank you in advance.

(Utkarsh Ayachit) #4


Here is the state file merge_arrays_state.pvsm (251.2 KB)

Here’s what I did, I opened the two files then selected the .nas and .csv readers in the pipeline browser and then created the Programmable Filter with the following script:

blk0 = output.GetBlock(0)
tbl = inputs[1]

The result is that all the arrays from the csv are now available on the cells.

(Harald Weisz) #5

Hi Utkarsh.

it works fine. Thank you.
Is there a source to read about these hacks? Or do need the whole python skills? For me visualisation is not that big deal, I need it only once or twice the year. On the other hand, it would be nich to read nastran files. OK, the .nas file is possible to be read, but the .f06. Maybe it is possible to read the /export/analysResults/asCSV. This file is simple.

Have a nice day.

Have a nice day