test request, multiple solvers

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
bernd
Posts: 8242
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

test request, multiple solvers

Postby bernd » Mon May 02, 2016 5:59 am

Since there are plenty of FEM solvers (OpenSource and Closed Source) out there it would be great to make it easy to add a new solver to FreeCADs FEM module. To get started with this I added Z88 as a second solver for mechanical analysis to FEM module. There have been heavy movements on the python code of FEM module. For the users of CalculiX there should be no changes at all. That is why I would like you guys to test this. You should be able to load old files and recalculate them, and get exact the same results as with the up to date FreeCAD master.

BTW. I added support for quad4 and quad8 as well as hexa8 and hexa20 too. The Z88 runs smooth as well for force constraint. On some examples I get same results for Calculix and Z88. If some one is interested in testing Z88 too you just need to set the path to z88 binary in FemToolsZ88 (https://github.com/berndhahnebach/FreeC ... Z88.py#L63) and add a Z88 solver in the FreeCAD GUI. Z88 has some gread examples in their manual. I started to create FreeCAD files for these examples.

branch:
https://github.com/berndhahnebach/FreeC ... 88analysis

cheers bernd

@sgrogan: Would you provide a Windows64 build of this branch? I'd like to test the Z88 stuff on Windwos too.

EDIT:
- z88 solver binary could be downloaded from github: https://github.com/LSCAD/Z88OS/tree/master/bin
- Only z88r binary is needed
Last edited by bernd on Mon May 02, 2016 2:50 pm, edited 1 time in total.
vejmarie
Posts: 542
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: test request, multiple solvers

Postby vejmarie » Mon May 02, 2016 12:14 pm

@bernd,

Nice try. I will have a look to it for sure. I believe we shall list the code we would like to see integrated. I love to see CFD codes as well. I can try to explain into a post what we are trying to achieve with FreeCAD, but this could be boring either. Any specific function that Z88 is providing that were missing into CalculiX ? I like to jump from code to code, but trying stabalize eveyrthing is also a good thing ;).

On my priority, I have OpenFoam, TrioCFD, Cast3M ;)

vejmarie
User avatar
bernd
Posts: 8242
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: test request, multiple solvers

Postby bernd » Mon May 02, 2016 12:40 pm

We had a few people trying to implement other solver. The only one which really was implemented is the openfoam one here: viewtopic.php?f=18&t=13699 But this one does not integrate into upto date FEM Module very well. It is more a parallel world. We had a lot disscussions about this. I did not had a view on this for a long time.

My idea is to support multiple solvers without dozens of code duplications. I choose Z88 because it is opensource and it has good german documentation and it has real shell and beam elements (Calculix has not, it uses simplified volume elements for shell and beam). The branch I puplished is what I would come up with. Most important for me is solvers exist side by side. CalculiX is just the standard and up to date the one which is supported best. There is still lot's of stuff to do on Z88 side, but the most important work is done: Splitting all Calculix related FreeCAD FEM code from not CalculiX related FreeCAD FEM code !

Curious to hear your opinion about the big picture how I did do the multiple solvers.

bernd
User avatar
bernd
Posts: 8242
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: test request, multiple solvers

Postby bernd » Mon May 02, 2016 2:44 pm

Ahh BTW, there is another one a multiple solver is useful. Select solver Calculix run analysis, check results, select solver Z88 run analysis, check out results. They are nearly identical ... be happy :D They are not identical at all, :o :cry: go out there and seach, seach search ...
User avatar
sgrogan
Posts: 5252
Joined: Wed Oct 22, 2014 5:02 pm

Re: test request, multiple solvers

Postby sgrogan » Mon May 02, 2016 10:45 pm

bernd wrote:and add a Z88 solver in the FreeCAD GUI
I'm having trouble here. It's greyed out? Do I need to set the path for this to be available?
https://github.com/sgrogan/FreeCAD/rele ... g/0.17-FEM
User avatar
bernd
Posts: 8242
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: test request, multiple solvers

Postby bernd » Tue May 03, 2016 4:55 am

sgrogan wrote:
bernd wrote:and add a Z88 solver in the FreeCAD GUI
I'm having trouble here. It's greyed out?
The gui is not updated in this regard. Just drag the calculix solver outside the analysis should do the trick.
User avatar
bernd
Posts: 8242
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: test request, multiple solvers

Postby bernd » Tue May 03, 2016 6:02 am

Thanks! I did a quick test. It works ! I just changed the path to z88r.exe in FemToolsz88.py The windows z88 binary opens an own window with the solver output and an popup that the solver has finished.
User avatar
bernd
Posts: 8242
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: test request, multiple solvers

Postby bernd » Wed May 04, 2016 5:58 am

Made some minor fixes including a new FEM preference setting to set the z88 binary path.

https://github.com/berndhahnebach/FreeC ... 88analysis
User avatar
bernd
Posts: 8242
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: test request, multiple solvers

Postby bernd » Thu May 12, 2016 8:26 am

Again pushed some improvements. Development is done for all CalculiX related changes. At the moment I'm at testing quite a lot. Mainly with CalculiX. As stated before from user point of view there should be no changes at all in CalculiX analysises.

If testing and code review is ok I'd like to make a PullRequest to get this in master. Would be great if more people could get involved in testing and code review!
https://github.com/berndhahnebach/FreeC ... 88analysis
Jee-Bee
Posts: 1942
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: test request, multiple solvers

Postby Jee-Bee » Thu May 12, 2016 12:32 pm

bernd wrote:Development is done for all CalculiX related changes.
...
https://github.com/berndhahnebach/FreeC ... 88analysis
is Z88 needed i don't have that installed. if not maybe i have some time… otherwise i probably late