Fortran Project - Finite Element Solver

It has been difficult to find people that can program in Fortran, so I thought I would ask here. If anyone is interested in helping out with a Finite Element solver, have a look at https://www.mystran.com. FEA (Finite Element Analysis) has been instrumental in improving the state of engineering, science, and medicine. It was popularized by NASA in the 70’s and 80’s. The MYSTRAN project was developed by former NASA engineers (as a variation of NASTRAN), then became a commercial code, and then later became an open source project. We have a forum and a Discord chat (which is now more active) as well. For now, we have a couple bugs that could use smashing and some performance issues. But there are also bigger goals if we can get some help.

9 Likes

Welcome to the forum! FEA is not my area of expertise and there is plenty of other stuff I am currently involved in, but I am sure there are people here who can help out. It does sound like an interesting project.

(I noticed a small typo on your website: documenation :wink: )

Thanks, got the typo fixed up. Hopefully there is some interest. Its a worthwhile project IMO. Its just becoming harder and harder to find people who know Fortran.

I plan to do my masters in Computational mechanics which involves a fair bit of FEM, and I intend to use Fortran heavily. I could consider collaborating with you once I have some more expertise in the subject.
However, for now let me introduce @Ashok to you who knows some Fortran and has expertise on FEM as well.

Thanks @Aurelius_Nero for the referral.
Hi @FEA_Stress, I am a Ph.D in structural engineering with expertise in FEM and Dynamics. I am also looking for some opportunities to code a FEA solver in Fortran - for now I am writing some toy solvers for myself. I am happy to collaborate on this - let me know your requirements.
Thanks,
Ashok

1 Like

That seems great…we would appreciate any help.

Well…there are many options. One of the more challenging ones would be to add Bathe’s MITC shell elements and shell buckling to MYSTRAN. There are some comments here:
https://www.mystran.com/forums/showthread.php?tid=85

Another thing that would help is to look at BUGS/Item 2 in this file:

We believe this bug was introduced between 13.2 and 13.3 (but discovered recently) and the windows EXE and source for the older versions. There is a MYSTRAN_Releases on GitHub that has these versions, but since I am a new user, I am limited to just 2 links per post.

There are also some performance issues, but the developers on the Discord channel are more familiar with the details of that. Bill was the primary developer, but he passed away. Our other developers are better at python and other languages, but struggle in Fortran.

Also, there was another request regarding how to deal with some output files, but that discussion was ongoing in the Discord chat.

Let me know what I can do to assist you further.

3 Likes

Oh God! What a coincidence. I was exactly looking for implementing shell buckling in my toy solver. Fine, I will be happy to work on this. I will contact you further in the mystran forum.

In contrast, most of us here may struggle to understand how the various pieces of a highly complex package such as Nastran fit together. Therefore, it may be helpful if you (and your developers) can describe specific problems that you are seeing with the Fortran modules/subroutines in your codebase. Doing so would reduce the risk that one of us may offer a fix that breaks the functioning of the remaining body of the package.

1 Like

Thanks for the responses. Adding the MITC shells and shell buckling would be a major improvement (its really the biggest missing ingredient now). We have shells now, but they are not the best and they are only first order (3-node tri and 4-node quad).

MYSTRAN is a complex package, but still much easier to work with than the NASA open package NASTRAN-95, which has been abandoned. We have a big challenge though. The main developer passed away in 2021. There are some files here (though I am not sure what is the most current that may be of assistance): MYSTRAN_Documentation/Developer_Docs/Source_Code_Structure at main · MYSTRANsolver/MYSTRAN_Documentation · GitHub

Starting on page 11 in the following document, there is also some information:MYSTRAN_Documentation/MYSTRAN_Installation_and_Run_Manual_1.0.pdf at main · MYSTRANsolver/MYSTRAN_Documentation · GitHub

But to get into the details, it may be better to go to our Discord chat or post on our forum since it could easily get complex if we try to do everything in the thread here. And while some developers are good at python, none of us are very familiar with the MYSTRAN code base itself (we have relied on the primary author in the past). For now, we are scrambling to figure things out more. Perhaps we should make better documentation for that.

Sounds good…either the forum or Discord chat. We can talk in more detail about it then.

FWIW, out of curiosity, I tried building the package on Windows. My experiences are less than satisfying:

  • As suggested I tried building via MSYS2 (or rather MinGW-w64). That failed because despite a message that CMake 3.23 would be installed, I am stuck with CMake 3.17.
  • Instead, I switched to Cygwin, which does have an up-to-date version on my machine.
  • The configuration step started, but then I got a complaint that submodules had not been downloaded. No indication of what submodules are to be downloaded. There is no indication in the BUILD.md file either.
  • A quick check of the MakeLists.txt file showed a few packages are needed, but there is no information that I can see about where to get the various packages.
  • I was also surprised to see f2c - is that really necessary?
  • The information in BUILD.md suggests though the script will do it. Is that outdated information?

Sorry to have all these complaints. Just thought you might like to know the experiences of a layman via-à-vis this FEA package.

2 Likes

This definitely needs to be looked at and we will work on it. There is also a process to use CodeBlocks. Would that be something you find useful? If so, I will try to update that document and post a link.

Well, I am not a CodeBlocks user :slight_smile:, but I am proficient enough with CMake to get through the various steps, even if I need to read the CMakeLists.txt files. It is just that there is more to it than “download, unpack, run CMake, run make.”

Understood. We want to make it as user friendly as possible so we will look into it. Thanks for the feedback.

I will try to continue with this, but it may take a while.

Side note: I find a fairly recent version of CMake in the installation but it does not do much (no output, stops immediately - missing DLLs?). In the MinGW-w64 console a different version is invoked that actually works.

I downloaded the source code for superlu and after being puzzled about the same error, I realised that the build script assumes you are building in the source directory. That is kind of unexpected - I usually build in a separate directory of my own choosing to keep the source directory clean. But now it is building, with the object files and the like appearing in separate directories.

Great :slight_smile: We had some initial feedback from developers who said this.
“The initial response is to use a modern version of msys2 and install the correct version of cmake. This will be added to the trouble shoot section of the BUILD.MD file.”

Also, another comment: “I got same or similar message when compiling v14.01 on macOS. I had to copy superlu on the mystran directory since the zip from github doesn’t include it. After that everything went as expected.”

I do have a relatively recent version of MinGW-w64/MSYS2 (installed in 2020 and updated this week) but I find the package manager/management a trifle confusing. That is my problem :wink: Anyway, I got it built via Cygwin.

One remark: the compiler issued a bunch of warnings on the parse_command_line function. They may be specific to the platform (Windows in particular):

/cygdrive/d/fortran/mystran/superlu/TESTING/cdrive.c: In function ‘parse_command_line’:
/cygdrive/d/fortran/mystran/superlu/TESTING/cdrive.c:533:18: warning: ‘optarg’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
533 | extern char *optarg;
|
I have no idea if that has any serious impact. As it is part of superlu, you may not have any control over this.

Hi @Ashok, have you been able to take a look at MYSTRAN? We could certainly use the help :slight_smile: