Dear all,
I am trying to simulate a 3-D radial magnetic field with the WhitneyAVsolver, as a first step of a more complex model.
The geometry and meshing was done in Salome and was imported in Elmer as a unv-file.
Everything goes well but the solver doesn't find a solution (the log file shows mesh-problems).
What is also not so clear to me is the correct application of the body-forces in the WhitneyAVsolver module.
In attachment all the files related to the model.
(OS = Windows 7 Pro)
3-D radial field of ring magnet
-
- Posts: 3
- Joined: 16 Aug 2013, 20:13
- Antispam: Yes
3-D radial field of ring magnet
- Attachments
-
- 3d-ring magnet.zip
- (1.93 MiB) Downloaded 368 times
-
- 3d-ring magnet.rar
- (341.79 KiB) Downloaded 353 times
Re: 3-D radial field of ring magnet
You should replace
Linear System Preconditioning = ILU0
with
Linear System Preconditioning = None
in solver 1. Preconditioners are apparently not supposed to be used with WhitneyAV solver.
Also I think how it is setup, the ring has a magnetization in the radial direction. Is this really what you want? I think it would be difficult to make such a thing. Maybe you want a solenoid?
I have gotten a solenoid working by using Cartesian coordinates and setting the body force like so, so that there is a time varying current in the solenoid in the phi direction (linear time dependence in this case):
Body Force 1
Name = "Solenoid Current Density"
! tx(0) - x
! tx(1) - y
! tx(2) - z
! tx(3) - t
Current Density 1 = Variable coordinate, time
Real MATC "-1.0*tx(1)/sqrt(tx(0)*tx(0)+tx(1)*tx(1))*tx(3)"
Current Density 2 = Variable coordinate, time
Real MATC "1.0*tx(0)/sqrt(tx(0)*tx(0)+tx(1)*tx(1))*tx(3)"
End
(see attached for whole sif file)
edit: Also, I've done my meshing with gmsh (and freecad for more complex stuff). Then I convert to elmer format from gmsh format using elmergrid, giving it the -autoclean option. I can give you a "solenoid surrounded by conducting ring" geometry, mesh and sif files if you like.
Linear System Preconditioning = ILU0
with
Linear System Preconditioning = None
in solver 1. Preconditioners are apparently not supposed to be used with WhitneyAV solver.
Also I think how it is setup, the ring has a magnetization in the radial direction. Is this really what you want? I think it would be difficult to make such a thing. Maybe you want a solenoid?
I have gotten a solenoid working by using Cartesian coordinates and setting the body force like so, so that there is a time varying current in the solenoid in the phi direction (linear time dependence in this case):
Body Force 1
Name = "Solenoid Current Density"
! tx(0) - x
! tx(1) - y
! tx(2) - z
! tx(3) - t
Current Density 1 = Variable coordinate, time
Real MATC "-1.0*tx(1)/sqrt(tx(0)*tx(0)+tx(1)*tx(1))*tx(3)"
Current Density 2 = Variable coordinate, time
Real MATC "1.0*tx(0)/sqrt(tx(0)*tx(0)+tx(1)*tx(1))*tx(3)"
End
(see attached for whole sif file)
edit: Also, I've done my meshing with gmsh (and freecad for more complex stuff). Then I convert to elmer format from gmsh format using elmergrid, giving it the -autoclean option. I can give you a "solenoid surrounded by conducting ring" geometry, mesh and sif files if you like.
- Attachments
-
- simple_hcf.sif
- (3.31 KiB) Downloaded 344 times
-
- Site Admin
- Posts: 4832
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: 3-D radial field of ring magnet
Hi
Just a note an the ILU part: Yes, Nick is right it should not be used in conjunction with this solver. The problem is that the the matrix is indefinite and doesn't have an inverse. Therefore the incomplete LU as a preconditioner also fails. Generally suitable preconditioners would be useful. For example there are tailored Hcurl multigrid methods in Hypre and Trilinos packages that could be ideal for this solver - at least for the A block. This still requires some work though.
-Peter
Just a note an the ILU part: Yes, Nick is right it should not be used in conjunction with this solver. The problem is that the the matrix is indefinite and doesn't have an inverse. Therefore the incomplete LU as a preconditioner also fails. Generally suitable preconditioners would be useful. For example there are tailored Hcurl multigrid methods in Hypre and Trilinos packages that could be ideal for this solver - at least for the A block. This still requires some work though.
-Peter
-
- Posts: 3
- Joined: 16 Aug 2013, 20:13
- Antispam: Yes
Re: 3-D radial field of ring magnet
@NickR7,
-Thank you for the tip. I changed the setting of the "Lineair System Preconditioning" to "none" but still no convergence.
-Yes, I am interested in all the project files of your "solenoid surrounded by conducting ring" .
@Peter Raback,
What is the meaning of the following lines in the solver.log:
ElementMetric: Element dim larger than meshdim: 3 vs. 2
ERROR:: ElementMetric: Degenerate 3D element: 138
Werner
-Thank you for the tip. I changed the setting of the "Lineair System Preconditioning" to "none" but still no convergence.
-Yes, I am interested in all the project files of your "solenoid surrounded by conducting ring" .
@Peter Raback,
What is the meaning of the following lines in the solver.log:
ElementMetric: Element dim larger than meshdim: 3 vs. 2
ERROR:: ElementMetric: Degenerate 3D element: 138
Werner
Re: 3-D radial field of ring magnet
This solenoids.zip file contains two folders:
solenoid has just a solenoid by itself, no time changing currents.
solenoid_eddy has a solenoid with a time varying current surrounded by a conducting ring.
solenoid has just a solenoid by itself, no time changing currents.
solenoid_eddy has a solenoid with a time varying current surrounded by a conducting ring.
- Attachments
-
- solenoids.zip
- (1.45 MiB) Downloaded 391 times
-
- Posts: 27
- Joined: 13 Aug 2013, 16:50
- Antispam: Yes
Re: 3-D radial field of ring magnet
@NickR7,
Thank you so much.
Do you have any problem if I use your sif file as a starting point for my bachelor thesis?
Thank you so much.
Do you have any problem if I use your sif file as a starting point for my bachelor thesis?
Re: 3-D radial field of ring magnet
I have no problem with that.
-
- Posts: 3
- Joined: 16 Aug 2013, 20:13
- Antispam: Yes
Re: 3-D radial field of ring magnet
@NickR7,
Thank you for the model... now I have a 3d-model with the WhitneyAVSolver to compare with and to use it to find out why mine is not working...
Probably I will have more questions for you.... I hope you don't mind.
Werner
Thank you for the model... now I have a 3d-model with the WhitneyAVSolver to compare with and to use it to find out why mine is not working...
Probably I will have more questions for you.... I hope you don't mind.
Werner