Model induction between two coils
Re: Model induction between two coils
- Attachments
-
- 20TurnCoil_Rough.zip
- (715.75 KiB) Downloaded 14 times
-
- Posts: 2401
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Model induction between two coils
You have no BCs at the ends, only a desired coil current specified in the solver.
I let the solver calculate the coil current, and specify the potential at each end.
! CoilSolver
Solver 1
Exec Solver = Before All
Equation = CoilSolver
Procedure = "CoilSolver" "CoilSolver"
Linear System Solver = Iterative
Linear System Direct Method = Mumps
Linear System Preconditioning = ILU1
Linear System Max Iterations = 2000
Linear System Iterative Method = idrs
Linear System Convergence Tolerance = 1e-9
Linear System Residual Output = 20
Coil Closed = Logical False
Calculate Elemental Fields = True
Fix Input Current Density = True
Normalize Coil Current = True
! Desired Coil Current = 100.0
Calculate Coil Current = True
End
Boundary Condition 1
Name = "bc_surrounding"
Target Boundaries(1) = 1
Temperature = 293.15
AV re {e} = Real 0.0
AV im {e} = Real 0.0
! No BCs needed for scalar potential
End
Boundary Condition 2
Name = "bc_inductor_end_bottom"
Target Boundaries(1) = 2
Coil Start = True
AV re = Real 1.0
AV im = Real 1.0
AV re {e} = Real 1.0
AV im {e} = Real 1.0
End
Boundary Condition 3
Name = "bc_inductor_end_top"
Target Boundaries(1) = 3
Coil End = True
AV re = Real 0.0
AV im = Real 0.0
AV re {e} = Real 0.0
AV im {e} = Real 0.0
End
I let the solver calculate the coil current, and specify the potential at each end.
! CoilSolver
Solver 1
Exec Solver = Before All
Equation = CoilSolver
Procedure = "CoilSolver" "CoilSolver"
Linear System Solver = Iterative
Linear System Direct Method = Mumps
Linear System Preconditioning = ILU1
Linear System Max Iterations = 2000
Linear System Iterative Method = idrs
Linear System Convergence Tolerance = 1e-9
Linear System Residual Output = 20
Coil Closed = Logical False
Calculate Elemental Fields = True
Fix Input Current Density = True
Normalize Coil Current = True
! Desired Coil Current = 100.0
Calculate Coil Current = True
End
Boundary Condition 1
Name = "bc_surrounding"
Target Boundaries(1) = 1
Temperature = 293.15
AV re {e} = Real 0.0
AV im {e} = Real 0.0
! No BCs needed for scalar potential
End
Boundary Condition 2
Name = "bc_inductor_end_bottom"
Target Boundaries(1) = 2
Coil Start = True
AV re = Real 1.0
AV im = Real 1.0
AV re {e} = Real 1.0
AV im {e} = Real 1.0
End
Boundary Condition 3
Name = "bc_inductor_end_top"
Target Boundaries(1) = 3
Coil End = True
AV re = Real 0.0
AV im = Real 0.0
AV re {e} = Real 0.0
AV im {e} = Real 0.0
End
Re: Model induction between two coils
Ok, so when I went and ran a rougher mesh version of the coil, but same sif as before:
Rough Mesh: Finer Mesh:
Rough Mesh: Finer Mesh:
Last edited by mrbearb on 08 May 2024, 17:29, edited 1 time in total.
-
- Posts: 2401
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Model induction between two coils
When i run the mesh you posted with the sif you posted it looks OK to me
What version of Elmer are you running?Re: Model induction between two coils
Thanks again for taking a look at this!kevinarden wrote: ↑08 May 2024, 17:29 When i run the mesh you posted with the sif you posted it looks OK to me
What version of Elmer are you running?
I'm running a version complied February 7 2024.
The only difference between the two is the mesh resolution, which I am changing in Gmsh by changing the "Compute element size from curvature" from 5 (rough mesh) to 10 (finer mesh)
Here is a link to my ElmerGui project containing the finer mesh that gives the strange results:
https://tigermailauburn-my.sharepoint.c ... g?e=ymsnJP
-
- Posts: 2401
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Model induction between two coils
The problem is the more complex one has not converged. One issue with iterative solvers, is every iteration is a solution, but it might not be a converged solution. By default Elmer moves on when the number of specified iterations has taken place, even if convergence is not reached.
If you change to
Linear System Max Iterations = 2500
you get a nice converged solution, it converges at 1884 iterations.
If you change to
Linear System Max Iterations = 2500
you get a nice converged solution, it converges at 1884 iterations.
Re: Model induction between two coils
Wow, thank you! That makes a lot of sense. Is there a way to see whether a solution has converged successfully or not, other than "that don't look right" ?kevinarden wrote: ↑08 May 2024, 19:15 The problem is the more complex one has not converged. One issue with iterative solvers, is every iteration is a solution, but it might not be a converged solution. By default Elmer moves on when the number of specified iterations has taken place, even if convergence is not reached.
If you change to
Linear System Max Iterations = 2500
you get a nice converged solution, it converges at 1884 iterations.
-
- Posts: 2401
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Model induction between two coils
There are two options.
1. You can set the message level such that you see the result for each iteration and compare it to the convergence criteria. Or if it converges prior to to the max iterations set you know it converged to the criteria.
e.g. Elmer out puts
820 0.2350E-06
830 0.2391E-06
840 0.1909E-06
850 0.1909E-06
856 0.1909E-06
ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.57768715 2.0000000 ) :: coilsolver
CoilSolver: Initial coil current for coil 1: 3.0754E+03
CoilSolver: Coil potential multiplier: 3.2516E-03
5 0.3499E-11
5 0.3599E-11
5 0.5075E-11
I had iterations set to 2500 but it converged to the criteria on iteration 856,
2. You can tell Elmer to stop and post an error if it does not met the convergence criteria
Linear System Abort Not Converged = True
If the value of this keyword is set to be True, ElmerSolver aborts the run when the maximum number
of iterations the algorithm is permitted to perform is reached and the approximate solution does not
satisfy the stopping criterion.
1. You can set the message level such that you see the result for each iteration and compare it to the convergence criteria. Or if it converges prior to to the max iterations set you know it converged to the criteria.
e.g. Elmer out puts
820 0.2350E-06
830 0.2391E-06
840 0.1909E-06
850 0.1909E-06
856 0.1909E-06
ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.57768715 2.0000000 ) :: coilsolver
CoilSolver: Initial coil current for coil 1: 3.0754E+03
CoilSolver: Coil potential multiplier: 3.2516E-03
5 0.3499E-11
5 0.3599E-11
5 0.5075E-11
I had iterations set to 2500 but it converged to the criteria on iteration 856,
2. You can tell Elmer to stop and post an error if it does not met the convergence criteria
Linear System Abort Not Converged = True
If the value of this keyword is set to be True, ElmerSolver aborts the run when the maximum number
of iterations the algorithm is permitted to perform is reached and the approximate solution does not
satisfy the stopping criterion.
Re: Model induction between two coils
Thank you for that, I had wondered how to read the message output level.. Is the output explained in any documentation?kevinarden wrote: ↑08 May 2024, 23:02 There are two options.
1. You can set the message level such that you see the result for each iteration and compare it to the convergence criteria. Or if it converges prior to...
Also, here's an update on what I've got so far:
Coil With H field Vectors Drawn:
-
- Posts: 2401
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Model induction between two coils
There is not specific information but the higher the number the more messages are echoed, the lower the number the more important the messages are.
The integer value levelnumber indicates the importance
of the message, starting from 1 (most important). The maximum level of messages being displayed
can be determined in the simulation section of the solver input file
5 is typical for a well executing problem
20 is used for more debugging
The integer value levelnumber indicates the importance
of the message, starting from 1 (most important). The maximum level of messages being displayed
can be determined in the simulation section of the solver input file
5 is typical for a well executing problem
20 is used for more debugging