Hello,
I'm trying to utilize Elmer for calculations of magnetic flux distribution around some curved wire. I created model of wire in inventor ( 1_zwoj.igs in attached archive). Then i load geometry to Netgen 5.3 (with OCC). After meshing (mesh.gmsh in attached archive) i run elmergrid (14 2 mesh.gmsh -autoclean) in order to achieve requiered mesh.
I created two .sif files. File current.sif utilizes only StatCurrentSolver in order to calculate volume current in wire as a result of potetnial difference on its boundaries.
In current+mg.sif resulting current calculated by StatCurrentSolver is utilized as a body force for mgdynamics solver. And this is where convergence problem occures. Calculations described in current.sif converge effectively and provide expected results (current flows in wire - see attached Current.ep). But when I run simulations for current+mg.sif i recive convergence errors (after 1000 steps convergence is around E+10).
I persume that convergence problem is caused by importing geometry from inventor. When I created simplified geometry (simple.geo) in netgen primitives i could create proper mesh in netgen. After typical elmergrid operations (elmergrid 14 2 simple.gmsh -autoclean) and running simulations (StatCurrentSolver and MGdynamics) described in For_simple.sif I achieved expected results and converged simulations.
Has anyone occured simmilar problems with utilizing geometry created in Inventor in Elmer simulations? Are there other reccomended mesh softwares ( i tried gmsh but achieved mesh consisted only one body despite having two initial elements and elmer coudn't detect any boundaries.) which properly mesh Inventor models?
Thanks in Advance
Paweł
Mgdynamics solver - lack of convergence.
Mgdynamics solver - lack of convergence.
- Attachments
-
- Forum.rar
- (1.98 MiB) Downloaded 315 times
Re: Mgdynamics solver - lack of convergence.
Hi,
you can try Salomé (http://www.salome-platform.org) which has a rather powerful CAD module (GEOM). I would expect that .iges import is better than in gmsh, and you can also try to create your geometry directly with Salomé. The MESH module includes netgen meshing capabilities. If you don't get satisfying mesh results with the Salomé's MESH module, you can export the geometry as .brep and do the meshing with gmsh.
HTH,
Matthias
you can try Salomé (http://www.salome-platform.org) which has a rather powerful CAD module (GEOM). I would expect that .iges import is better than in gmsh, and you can also try to create your geometry directly with Salomé. The MESH module includes netgen meshing capabilities. If you don't get satisfying mesh results with the Salomé's MESH module, you can export the geometry as .brep and do the meshing with gmsh.
HTH,
Matthias
-
- Site Admin
- Posts: 4832
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Mgdynamics solver - lack of convergence.
Hi Pawel
The problem when using this kind of hierarchical approach may be that the computed current is not exactly divergence free. Unfortunately this should be the case. For this reason there is the possibility to introduce an correction potential introducing a correcting current. So look for "Jfix" in the documentation and test cases.
Further in MgDynamics the matrix does not have an inverse. Thus using "none" as a preconditioner usually is a better idea than to use "ILU" family. Instead you could try to use better iterative solver (BiCGstabl, GCR etc.).
-Peter
The problem when using this kind of hierarchical approach may be that the computed current is not exactly divergence free. Unfortunately this should be the case. For this reason there is the possibility to introduce an correction potential introducing a correcting current. So look for "Jfix" in the documentation and test cases.
Further in MgDynamics the matrix does not have an inverse. Thus using "none" as a preconditioner usually is a better idea than to use "ILU" family. Instead you could try to use better iterative solver (BiCGstabl, GCR etc.).
-Peter
Re: Mgdynamics solver - lack of convergence.
Thanks you Matthias and Peter very muh for your answers.
Firstyly, Matthias, I tried Salome but I had problems with geometry import - I checked online and problem seems to be caused by new Inventor. Anyway I gave up. Later I tried gmsh but due to unusuall shape of the element achieved mesh was... weird and simulations were lacking convergence.
Peter, your answers were extremely usefull and resulted with results convergence. I tried only with Jfix as Mike advised in viewtopic.php?f=16&t=3083#p10214 . Simulation were lacking convergence. Later I added
Automated Source Projection BCs = Logical False
and still hadn't achieved convergence in simulations. Later I removed the "Jfix" from boundary conditions and changed preconditioners (both in MGDynamics and in MGDynamicsCalc solvers) to "none". After that I achieved convergence. Thank you very much for your help!
So, finally here is step by step solution for importing Inventor geometry for utilization in Elmer:
1. Create requiered geometry in Inventor. If external space is needed (in mine example it was requiered to calculate magnetic filed in air around the coil) best results were achieved with free form element (spehere).
2. Save geometry as a .iges file.
3. Load geometry to Netgen. Remember, that OpenCascade is requiered. If the file fails to load simply reinstall Netgen and check "Netgen with OCC" and "Nglib with OCC" during installation.
4. Mesh geometry with Netgen.
5. Export mesh as a .gmsh file.
6. Utilize elmergrid to convert gmsh mesh to ElmerFEM mesh. (elmergrid 14 2 mesh.gmsh -autoclean).
7. Load obtained mesh to ElmerFEM and enjoy!
I also attached finall version of .sif file. Hope it'll be usefull for somebody.
Thanks again,
Paweł
Firstyly, Matthias, I tried Salome but I had problems with geometry import - I checked online and problem seems to be caused by new Inventor. Anyway I gave up. Later I tried gmsh but due to unusuall shape of the element achieved mesh was... weird and simulations were lacking convergence.
Peter, your answers were extremely usefull and resulted with results convergence. I tried only with Jfix as Mike advised in viewtopic.php?f=16&t=3083#p10214 . Simulation were lacking convergence. Later I added
Automated Source Projection BCs = Logical False
and still hadn't achieved convergence in simulations. Later I removed the "Jfix" from boundary conditions and changed preconditioners (both in MGDynamics and in MGDynamicsCalc solvers) to "none". After that I achieved convergence. Thank you very much for your help!
So, finally here is step by step solution for importing Inventor geometry for utilization in Elmer:
1. Create requiered geometry in Inventor. If external space is needed (in mine example it was requiered to calculate magnetic filed in air around the coil) best results were achieved with free form element (spehere).
2. Save geometry as a .iges file.
3. Load geometry to Netgen. Remember, that OpenCascade is requiered. If the file fails to load simply reinstall Netgen and check "Netgen with OCC" and "Nglib with OCC" during installation.
4. Mesh geometry with Netgen.
5. Export mesh as a .gmsh file.
6. Utilize elmergrid to convert gmsh mesh to ElmerFEM mesh. (elmergrid 14 2 mesh.gmsh -autoclean).
7. Load obtained mesh to ElmerFEM and enjoy!
I also attached finall version of .sif file. Hope it'll be usefull for somebody.
Thanks again,
Paweł
- Attachments
-
- current+mg.sif
- (3.95 KiB) Downloaded 325 times