Help with solvers (Nastran)

I’ve read the wiki and it seems to indicate that other solvers can be used other than those that come with FreeCAD but I can’t figure out how to do that. I’m trying to get the NASA-JPL NASTRAN to run because I have need to do a DDAM analysis. What would that workflow be like? Any help on this appreciated. Also has anyone here gotten pyNastran to work? Apparently someone ported the nastran code to python but I’m not having success getting it to work but I suspect the python port would be easier to get to work within FreeCAD.

Thanks,
Bill

Before a new solver runs with FreeCAD FEM the new solver needs to be implemented in FreeCAD FEM. As an example have a look at the implementation of oofem solver in FreeCAD FEM.

https://github.com/berndhahnebach/FreeCAD_bhb/commits/femoofem

mainly what FreeCAD FEM does:

  • writes an solver input file
  • executes the solver
  • reads the results

The biggest part is the input file. Since every solver has its own input file format this usually needs to be implemented.

As I understand https://github.com/SteveDoyle2/pyNastran is only about reading and writing the input and output files for Nastran, so you still need the actual solver. While there seems to be some work going on on the open source code of the Nastran https://github.com/SteveDoyle2/NASTRAN-95 I don’t think it is actually working, so at least for now, as I understand, one still needs an commercial Nastran solver for this to work.

Just saw this. Download the 95 version and tried to compile it.

ln is not a DOS command.

LN=ln -s

ln -s

What’s $^ means in Shell command? How can I do it under DOS? I may not need to make this target under DOS.

NASINFO: rf/NASINFO
	$(LN) $^ $@

As for the solver, it might be good to review the different forks if someone has done some more work on it (I haven’t looked at it for some time)…
https://github.com/OdonataResearchLLC/NASTRAN-95/network/members

maybe some interesting work to review further after a quick look at the forks
https://github.com/nasa/NASTRAN-95
https://github.com/AeroDME/NASTRAN-95
https://github.com/OdonataResearchLLC/NASTRAN-95
— — https://github.com/SteveDoyle2/NASTRAN-95
https://github.com/Open-Cascade-SAS/NASTRAN-95 ← Open Cascade !?
https://github.com/twuerfl/NASTRAN-95
— — https://github.com/ldallolio/NASTRAN-95
— — — https://github.com/Atamisk/NASTRAN-95
— — — https://github.com/dad98253/NASTRAN-95

Here one can find also some manuals that might come useful at some point :slight_smile:
https://github.com/SteveDoyle2/NASTRAN-95/tree/develop/reference

also the pyNastran documentation https://pynastran-git.readthedocs.io/en/latest/

also https://www.mystran.com/ which was developed independently but in general supports the NASTRAN format (similar to CalculiX for Abaqus)
https://github.com/dr-bill-c/MYSTRAN
https://github.com/Open-Cascade-SAS/MYSTRAN

mklink ?

https://www.computerhope.com/unix/uln.htm
https://www.computerhope.com/mklink.htm

Just built a few Targets.

nastplot seems working. Is there any test case to plot? Never used nastran. Have no idea.

These two Targets nasthelp & jobs not built yet. Thought they are just files. Maybe could build under Linux and then copied into DOS.

um folder means user manual.

example under inp folder

https://github.com/nasa/NASTRAN-95/blob/master/inp/d06011a.inp

ctrmem2.jpg
ctrmem.jpg

the TH = 90.0 is defined as
ctrmem4.jpg
Photo below is without drawing the 90 degree triangle
no90.jpg

the 90 degree only elements
with90.jpg

How about the holes? Are these holes or elements with normals in the other direction? If the later you should set BackfaceCulling to False in the mesh View properties to show all Faces colored.

It is the normals. BackfaceCulling works. Thanks.

I tried to calculate the normal. If it is in opposite direction, then draw the triangle in the other node sequence.

cr2.jpg

Better to flip normals. For such a mesh all normals should go into the same direction.

This mesh may be generated by hand at the old time, so they didn’t pay too much attention to the normal.

Does it affect fea?

It should not. I have not had any so far. But you never know … May be other had. I do not know. Thus it is best to not have them.

BTW: I have even seen commercial quite expensive FEA packages still create meshes with flipped normls.

you could try this:

  • create a mesh object from it
  • analyse and repair the mesh object (including normal directions)
  • create a Part from it
  • remesh with gmsh, use big minimal element size

yes it does: among other things Pressure or Excentricity are defined thanks to the element normal