Elmer Integration (GSoC) - Activity Log

Contributions from the participants, questions and answers to their projects.
Discussions of proposals for upcoming events.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
m42kus
Posts: 159
Joined: Tue Sep 02, 2014 9:41 am

Re: Elmer Integration (GSoC) - Activity Log

Post by m42kus »

Support for multiple Materials is finished :D.
The video below shows a bi-metal thermomechanical analysis.
phpBB [video]
My GSoC Devlog: ceeli.github.io/gsoc
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Elmer Integration (GSoC) - Activity Log

Post by HoWil »

Great :!: :D
Is the chosen model a specific elmer-test case with an analytical solution?
m42kus
Posts: 159
Joined: Tue Sep 02, 2014 9:41 am

Re: Elmer Integration (GSoC) - Activity Log

Post by m42kus »

HoWil wrote: Wed Jul 05, 2017 5:07 am Great :!: :D
Is the chosen model a specific elmer-test case with an analytical solution?
Nope, but there is a very similar case part of elmers testsuit (https://github.com/ElmerCSC/elmerfem/tr ... alBiMetal2). I haven't had the time to steal an analytical solution somewhere jet ;)
My GSoC Devlog: ceeli.github.io/gsoc
m42kus
Posts: 159
Joined: Tue Sep 02, 2014 9:41 am

Re: Elmer Integration (GSoC) - Activity Log

Post by m42kus »

Hello,

I created a prototype of a selection macro that helps selecting hidden or difficult to reach sub objects (solids, faces, edges, vertexes). I thought this nessessary as it is often required when preparing multiphysics simulations. But it's propably also helpful in many other workflows.

Here is a short demo:
phpBB [video]


Unfortunately highlighting of solids and edges doesn't work atm. See my main post for more details and the code (https://forum.freecadweb.org/viewtopic. ... 97#p181397). If you happen to know about a solution please let me know.
My GSoC Devlog: ceeli.github.io/gsoc
m42kus
Posts: 159
Joined: Tue Sep 02, 2014 9:41 am

Re: Elmer Integration (GSoC) - Activity Log

Post by m42kus »

The not entirely functional but in my opinion already very useful list selection add-on is now published on github: https://github.com/drhooves/SelectionTools
Hope you find it as useful as I do :)
My GSoC Devlog: ceeli.github.io/gsoc
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Elmer Integration (GSoC) - Activity Log

Post by HoWil »

Fantastic news :!: This should find its way into the Addon-manager.
I did already some testing and like it even if there are the known limitations of highlighting edges and solids.
m42kus
Posts: 159
Joined: Tue Sep 02, 2014 9:41 am

Update 07-24

Post by m42kus »

Hi, much has changed since my last update. Changes include:
  • New generic execution framework where everything that is run in the background is registered by the application. This means that the solver control task panel is now able to reattach to a already running solver (see video at 0:23). Multiple solvers can be running at the same time. The framework uses the python threading module as a backend. It doesn't depend on Qt in any way if FreeCAD is started without a GUI. It also handles the working directory in a generic way. As soon as it is considered "finished" by me and all other interested Fem developer it should be quite easy to make calculix use it too.
  • Post processing via vtk inside FreeCAD. Only elmer uses it in this way right now. A pipeline is created instead of the traditional result file. It is updated in place (not deleted and newly created). This means that once the filter are set up, results are immediately visible after the solver finished.
  • Multiple different settings for management of working directory (see settings screenshot below). This settings are honored only by solver using the new execution framework (atm only Elmer :P).
Edit: Some remarks to model choosen for the video: It is inspired by the example used in the elmer gui tutorial. It uses the same mesh and model parameters. The only difference is that I make a thermodynamical simulation while in the gui tutorial only uses a heat solver. Atm the simulation takes quite a while. This can probably be reduced by using a better preconditioner (atm diagonal) and lowering the convergence tolarances. But I haven't experimented much jet.

phpBB [video]
settings.png
settings.png (62.22 KiB) Viewed 3671 times
My GSoC Devlog: ceeli.github.io/gsoc
m42kus
Posts: 159
Joined: Tue Sep 02, 2014 9:41 am

Re: Elmer Integration (GSoC) - Activity Log

Post by m42kus »

ickby wrote:ping
During the last two weeks I discovered a few VTK related "bugs":
  • Inconsistend update handling of VTK objects: My solver implementation always calles recompute on the tip of the vtk pipeline. In the video above it works because the wrap filter updates the 3d view when recompute is called. However it doesn't work if only a pipeline object is used. It this intentional?
  • Vtk export missing: A Pipeline.write method in addition to the read method would be very nice. I initially created a "Open in Paraview" command. It is no longer functional because I updated the handling of the working directories which makes it hard to find be post file. Now I would like the command to export the pipeline and open this temporary file in paraview. However I need a write method to implement this. Would you (ickby) be willing to implement this?
  • FreeCAD segaults on an attempt to select geometryids as the Field in the vtk filter task panel. The vtu file containing the geometryids field is attached together with the traceback in the tar.gz below.
I discovered one much more severe bug a few days ago: https://freecadweb.org/tracker/view.php?id=3137. One consequence of that bug is that I can't use the material task panel because it messes up certain parameters as soon as I open and accept it. I set some parameters via the python console for that reason. I hope it will get fixed very soon.
Attachments
segfault.tar.gz
(21.44 KiB) Downloaded 89 times
My GSoC Devlog: ceeli.github.io/gsoc
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Elmer Integration (GSoC) - Activity Log

Post by HoWil »

I also simulated the model Markus did show in his video. The attached screenshot shows the results depicted in the Elmer-tutorials (left, from page 8 in ftp://nic.funet.fi/index/elmer/doc/ElmerTutorials.pdf) and on the right you see the same results directly in FreeCAD :D :
Screenshot from 2017-07-20 16-28-25.png
Screenshot from 2017-07-20 16-28-25.png (581.1 KiB) Viewed 3644 times
The results were also double-checked opening the original vtk-results in paraview.
Nice!
joha2
Posts: 303
Joined: Tue Oct 11, 2016 9:48 pm

Re: Elmer Integration (GSoC) - Activity Log

Post by joha2 »

Hi markus!

Nice videos and nice solver! How do you plan to incorporate the multi physics support of Elmer? Is this a target for your efforts at all? looo and I started a generic solver project for FreeCAD. This project is somehow on ice since looo is doing the Python 3 conversion and I am still implementing the mesh transfer for Fenics. But if we awake this generic solver project again, can you write down some tips and tricks for us and pitfalls you came over? In particular the communication between solver and FreeCAD would be interesting. Or are your GSoC logs available somewhere?

Best wishes
Johannes
Post Reply