NASTRAN file format question

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: NASTRAN file format question

Post by sgrogan »

chennes wrote: Fri Sep 24, 2021 3:36 pm I think it would be a good idea to add a unit test for this new format support -- would it be OK for me to include Hinge.bdf in our repo?
What are the other dependencies for this?
At bernd's I've added some Nastran stuff to the LP weekly builds. I don't think any of our other builds have this yet.

Or are you planning to guard the test somehow?
"fight the good fight"
User avatar
chennes
Veteran
Posts: 3904
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: NASTRAN file format question

Post by chennes »

There are no dependencies, this code is completely self-contained in the Mesh WB (all within a single function, in fact!).
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: NASTRAN file format question

Post by sgrogan »

chennes wrote: Fri Sep 24, 2021 7:08 pm There are no dependencies, this code is completely self-contained in the Mesh WB (all within a single function, in fact!).
Then I don't see a problem with adding the test.
"fight the good fight"
User avatar
chennes
Veteran
Posts: 3904
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: NASTRAN file format question

Post by chennes »

Adding Hinge.bdf to the FreeCAD repo is going to end up putting it under the LGPL (as far as I understand such things, IANAL), so I thought I should make sure I had permission from its author first.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: NASTRAN file format question

Post by sgrogan »

chennes wrote: Fri Sep 24, 2021 7:13 pm Adding Hinge.bdf to the FreeCAD repo is going to end up putting it under the LGPL (as far as I understand such things, IANAL), so I thought I should make sure I had permission from its author first.
Gotcha, makes sense.

As a packager I'm sensitive to adding dependencies, or my worry in this case, making an optional dependency mandatory to pass a self test.
We've had problems in the past.

Sorry for the noise.
"fight the good fight"
User avatar
chennes
Veteran
Posts: 3904
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: NASTRAN file format question

Post by chennes »

No noise at all, it's an important concern -- keep doing what you do, there are lots of things to keep tabs on!
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
aerospaceweeb
Posts: 118
Joined: Fri Apr 09, 2021 3:26 am

Re: NASTRAN file format question

Post by aerospaceweeb »

@chennes

Sorry I'm so late to this forum.

I'm a developer on mystran, a solver that's trying to get into FreeCAD FEM at the moment.

The best users guide currently is the MSC nastran QRG master PDF that goes over the gridpoint format in grusome detail.

More specifically, here's the bulk data format in a few of the more important chunks from the MSC Nastran Quick Reference Guide. The pdf is too large to attach here, but you can surely find it out there on the internet.
Bulk_Data_01.png
Bulk_Data_01.png (144.97 KiB) Viewed 3204 times
Bulk_Data_02.png
Bulk_Data_02.png (121.52 KiB) Viewed 3204 times
Bulk_Data_03.png
Bulk_Data_03.png (100.81 KiB) Viewed 3204 times
Bulk_Data_04.png
Bulk_Data_04.png (72.7 KiB) Viewed 3204 times
Bulk_Data_05.png
Bulk_Data_05.png (105.31 KiB) Viewed 3204 times
I'll attach more after this it's limited me.
Last edited by aerospaceweeb on Sat Oct 02, 2021 9:16 pm, edited 1 time in total.
aerospaceweeb
Posts: 118
Joined: Fri Apr 09, 2021 3:26 am

Re: NASTRAN file format question

Post by aerospaceweeb »

... continuing
Bulk_Data_07.png
Bulk_Data_07.png (120.07 KiB) Viewed 3197 times
Bulk_Data_06.png
Bulk_Data_06.png (109.56 KiB) Viewed 3197 times
One relatively large issue we have in freeCAD at the moment is that we can't export more than one mesh object at a time.
This is bad, because the only way to assign properties to elements that I have gotten to work in freeCAD is to do so to FemMesh objects.

If you had, say, a part with more than one thickness to it, or even an assembly with more than one part, or even two different types of elements, you can't really get any of that info out.

Another MASSIVE problem is that FreeCAD can't import something, and then export it without changing it in an unpredictable way.
Namely, FreeCAD changes the IDs of every single object in the mesh when it imports it, and then changes the IDs again, in a way I don't fully understand, while exporting it.

This may be off topic.

One thing you may be elated to know is that nastran has the best open source reader that exists for any FEM solver I know of; pynastran, maintained by another mystran developer named Steve.

https://github.com/SteveDoyle2/pyNastran

Pynastran is the best bdf reader/writer out there; better even than the enterprise tools that exist in some ways.
We'll be using pynastran in the FEM workbench to my knowledge to deal with some of the bdf files strangenesses, so it may already be in FreeCAD! This would theoretically make bdf files easier to write than calculix inp files
User avatar
chennes
Veteran
Posts: 3904
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: NASTRAN file format question

Post by chennes »

Thanks for the great docs, aerospaceweeb!! To be honest I'm not entirely sure what the use-case is for the Mesh WB NASTRAN reader -- I started in on it mostly just because it was clearly missing some obvious cases. The reader in Fem is totally separate, and looks to be much more robust. That said, if there is some interest in improving the way Mesh handles these meshes I'm happy to dig in further. I just don't want to be spending time on something that no one will use :) .
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
johnwang
Veteran
Posts: 1382
Joined: Sun Jan 27, 2019 12:41 am

Re: NASTRAN file format question

Post by johnwang »

chennes wrote: Sat Oct 02, 2021 10:01 pm I just don't want to be spending time on something that no one will use :) .
Some usage like this:
1. import this file which is a surface
2. close the two holes at the top and bottom
3. generate a solid model
mesh_hole1.jpg
mesh_hole1.jpg (13.21 KiB) Viewed 3033 times
mesh_hole.jpg
mesh_hole.jpg (30.66 KiB) Viewed 3033 times
HiSpaceFrame.bdf.txt
(5.16 KiB) Downloaded 86 times
hfc series CAE workbenches for FreeCAD (hfcNastran95, hfcMystran, hfcFrame3DD, hfcSU2 and more)
Post Reply