Hi All,
For the past week, I have been working on integration of the Elmer 2D magnetostatics solver into the FreeCAD FEM workbench. My first little success moment was yesterday, when I could create the SIF, calculate the 2D vector potential results from a horseshoe magnet and show the results in FreeCAD . My goal is to integrate the 3D solvers as well, but I have to start somewhere and 2D cases are easier to test imho.
Currently, I have a little design question that is related to post processing in Elmer. The result from the magnetostatics solver (MagDyn2D/MagDyn) is a vector potential which is not always too useful. Hence Elmer provides a post-processing solver to determine the magnetic flux density via the MagnetoDynamics module and MagnetoDynamicsCalcFields subroutine. To add this post-processing solver to FreeCAD, it would be easiest to just create another equation object. However, this seems to contradict the requirement for a general front-end where equation objects can be reused between several solvers in the FEM Workbench. Another solution would be to make the magnetostatic equation object a bit more dynamic where you can set multiple solvers in one go. So what is the preferred way of doing this? Or is there another way that I don't see?
For the ones interested, this is the repository, it is updated regularly.
https://github.com/rzonnie/FreeCAD/tree ... etostatics
I hope to hear from you.
Kind Regards,
Remi
Elmer Magnetostatics Integration
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Re: Elmer Magnetostatics Integration
Dear Remi,
Nice to see that the support for Elmer is worked on. Love it .
Magnetostatics simulations are more often used than electrostatics which are already incorporated. So go for it
Regarding your question about the flux-solver ..... isn't it similar to the flux-sover/equation for electrostatics?
Some time ago I tried to integrate 'freetextinputs' to enable the user to simply input whatever he/she likes but I never had time to go for a pull-request https://github.com/HoWilgh/FreeCAD/tree ... etextinput. Maybe this is of some help or at least some inspiration for you.
BR,
HoWil
BTW, do you already know the FEM-Examples under the menu 'Utilities' .. there you can open several examples for 'Solvers'-> 'elmer'
Nice to see that the support for Elmer is worked on. Love it .
Magnetostatics simulations are more often used than electrostatics which are already incorporated. So go for it
Regarding your question about the flux-solver ..... isn't it similar to the flux-sover/equation for electrostatics?
Some time ago I tried to integrate 'freetextinputs' to enable the user to simply input whatever he/she likes but I never had time to go for a pull-request https://github.com/HoWilgh/FreeCAD/tree ... etextinput. Maybe this is of some help or at least some inspiration for you.
BR,
HoWil
BTW, do you already know the FEM-Examples under the menu 'Utilities' .. there you can open several examples for 'Solvers'-> 'elmer'
Re: Elmer Magnetostatics Integration
Hey Howil,
Thanks for your response. I checked out your work on freetextinput, that is indeed handy pass custom scripts to ElmerSolver. Seems like a shame not to go for a pull request.
The magnetostatics solvers are a bit different from the electrostatic ones. In case of electrostatics you can just set a few parameters in the SIF file for the eletrostatics solver and it will calculate the fields. However, in case of magnetostatics, the AV solution is directly passed to another solver to determine the fields. Hence, the SIF file needs at least two solvers to obtain the fields (not including for example result output solver section). For now I will just stick this to an equation object, so that the user can tinker around with the correct solver settings easily in the GUI. Eventually, it can always be changed when people don't agree.
I will post some updates when there is something cool to show.
Thanks, stay safe.
Remi
Thanks for your response. I checked out your work on freetextinput, that is indeed handy pass custom scripts to ElmerSolver. Seems like a shame not to go for a pull request.
The magnetostatics solvers are a bit different from the electrostatic ones. In case of electrostatics you can just set a few parameters in the SIF file for the eletrostatics solver and it will calculate the fields. However, in case of magnetostatics, the AV solution is directly passed to another solver to determine the fields. Hence, the SIF file needs at least two solvers to obtain the fields (not including for example result output solver section). For now I will just stick this to an equation object, so that the user can tinker around with the correct solver settings easily in the GUI. Eventually, it can always be changed when people don't agree.
I will post some updates when there is something cool to show.
Thanks, stay safe.
Remi
Re: Elmer Magnetostatics Integration
If it still works with current FC and somebody is willing to test it, I think it could be included during the holidays.
BR,
Howil
Re: Elmer Magnetostatics Integration
Hallo everyone,
I'm new to the forum and, in general, I'm not an experienced user of FC (I'm learning right now how to make a proper mesh).
Anyway I would like to exploit more the FEM capabilities of FC, in particular I would like to make some magnetostatic analysis and so: are there any news about this topic?
I sow that there is the possibility to develop new add-on for the FEM workbench but I am not enough advanced in FreeCAD to approach the problem in this way. Maybe I can help a forerunner.
Regards
Alberto
p.s.
I'm using:
I'm new to the forum and, in general, I'm not an experienced user of FC (I'm learning right now how to make a proper mesh).
Anyway I would like to exploit more the FEM capabilities of FC, in particular I would like to make some magnetostatic analysis and so: are there any news about this topic?
I sow that there is the possibility to develop new add-on for the FEM workbench but I am not enough advanced in FreeCAD to approach the problem in this way. Maybe I can help a forerunner.
Regards
Alberto
p.s.
I'm using:
Code: Select all
OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.29177 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: 68e337670e227889217652ddac593c93b5e8dc94
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.2
Locale: Italian/Italy (it_IT)
Re: Elmer Magnetostatics Integration
You are lucky, those analyses were recently implemented: viewtopic.php?t=75888
FEM EquationMagnetodynamic