Gotcha..
I'm working through a multiple coil version of what I showed earlier, but am having some divergence issues.
Here's what I've been able to get so far:
I increased the resolution of the mesh and am currently running the solvers, which as of right now is looking like it should converge (hopefully!)
However, and this is probably a newb-y question, but I would like to be able to know what the optimal resolution size that will be needed for a given mesh. How can I calculate the required mesh size that will lead to a converging solution? Is it better to just guess and check?
What are some other factors to consider in order to ensure that a solution converges..
Thanks again for all your help!
Model induction between two coils
-
- Posts: 2366
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Model induction between two coils
I do not know how to do that for coil solver and MagDyn. I do know how to for StressSolver, displacement, elastic response, etc.
Typically a convergence study works, keep refining, is the answer getting better or unchanging. Eventually it will make no appreciable difference and then the mesh is as fine as it needs to be.
This is an example of multiple coils
https://github.com/ElmerCSC/elmer-elmag ... /FiveCoils
Typically a convergence study works, keep refining, is the answer getting better or unchanging. Eventually it will make no appreciable difference and then the mesh is as fine as it needs to be.
This is an example of multiple coils
https://github.com/ElmerCSC/elmer-elmag ... /FiveCoils
Re: Model induction between two coils
I see.. thank you for your help.
I'm now having issues with what I think may be a non-conformal mesh or my sif being not setup correctly..
This is what I am seeing with a closed coil:
As you might be able to see, the stream tracer (top picture) is contained solely within the coil itself despite changing the position of the reference.
Also, the Magnetic field strength (bottom) drops off to nearly zero just outside of the coil..
I used gmsh to create the mesh and set the size very small around the coil, CoilSolver to generate the current, and MagDyn and MagDynPost to generate the mag field vectors. I was expecting to see the fields continue strongly through the area surrounding the coil, but that is not what I'm getting.
Any help would be greatly appreciated!
I'm now having issues with what I think may be a non-conformal mesh or my sif being not setup correctly..
This is what I am seeing with a closed coil:
As you might be able to see, the stream tracer (top picture) is contained solely within the coil itself despite changing the position of the reference.
Also, the Magnetic field strength (bottom) drops off to nearly zero just outside of the coil..
I used gmsh to create the mesh and set the size very small around the coil, CoilSolver to generate the current, and MagDyn and MagDynPost to generate the mag field vectors. I was expecting to see the fields continue strongly through the area surrounding the coil, but that is not what I'm getting.
Any help would be greatly appreciated!
-
- Posts: 2366
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Model induction between two coils
Can you post the geo file
Re: Model induction between two coils
Here's my geo file.. I build the cad model and import it into gmsh to create the mesh
- Attachments
-
- BasicCylinder.STEP
- (31.35 KiB) Downloaded 3 times
-
- BasicCylinder.geo
- (933 Bytes) Downloaded 3 times
Re: Model induction between two coils
Hello,
To check for a conforming mesh, add this statement to the simulation section of a sif:
To check for a conforming mesh, add this statement to the simulation section of a sif:
then running with your mesh, ElmerSolver reports an error and exits:Desired Mesh Pieces = 1
Next, edit your geo file to add this statement at the end:CalculateMeshPieces: Number of separate pieces in mesh is 2
ERROR:: CalculateMeshPieces: Number of pieces differ from the requested 1
Run ElmerSolver again and now there is one mesh piece://+
Coherence;
Rich.CalculateMeshPieces: Number of separate pieces in mesh is 1
Re: Model induction between two coils
Hi Rich,
thanks for the tip. I tried this, but it seems like the coherence command has removed the distinction between the two volumes that I would like to have in my mesh. It gave what looks like a coherent mesh, but I am no longer able to assign different material properties to my coil and to the surrounding area.. Any thoughts?
thanks for the tip. I tried this, but it seems like the coherence command has removed the distinction between the two volumes that I would like to have in my mesh. It gave what looks like a coherent mesh, but I am no longer able to assign different material properties to my coil and to the surrounding area.. Any thoughts?
Re: Model induction between two coils
Hello,
Just a guess, maybe try commenting out the 'Physical' commands, and use the body and boundary numbers in the sif. Loading the mesh in ElmerGUI after commenting out the 'Physicals' gave two bodies and 12 boundaries.
Rich.
Just a guess, maybe try commenting out the 'Physical' commands, and use the body and boundary numbers in the sif. Loading the mesh in ElmerGUI after commenting out the 'Physicals' gave two bodies and 12 boundaries.
Rich.
Re: Model induction between two coils
Liftoff!
Removing the physical commands, while making it a bit more tedious within ElmerGui, I now have a coherent mesh and successful test case for a cylindrical coil..
Now, on to two coils and the induction
Stay tuned
Removing the physical commands, while making it a bit more tedious within ElmerGui, I now have a coherent mesh and successful test case for a cylindrical coil..
Now, on to two coils and the induction
Stay tuned
Re: Model induction between two coils
Ok, update time..
I have both coils in the simulation, but am not able to any current being induced onto the second non-driven coil..
Here's my sif:
I have compared my sif to the TEAM7 example here: https://github.com/ElmerCSC/elmer-elmag ... /README.md
But, I don't see any induced current as I would expect there to be.
I have both coils in the simulation, but am not able to any current being induced onto the second non-driven coil..
Here's my sif:
Code: Select all
Header
CHECK KEYWORDS Warn
Mesh DB "." "."
Include Path ""
Results Directory ""
End
Simulation
Max Output Level = 5
Coordinate System = Cartesian
Coordinate Mapping(3) = 1 2 3
Simulation Type = Steady state
Steady State Max Iterations = 1
Output Intervals(1) = 1
Solver Input File = case.sif
Post File = case.vtu
Calculate Mesh Pieces = True
Desired Mesh Pieces = 1
End
Constants
Gravity(4) = 0 -1 0 9.82
Stefan Boltzmann = 5.670374419e-08
Permittivity of Vacuum = 8.85418781e-12
Permeability of Vacuum = 1.25663706e-6
Boltzmann Constant = 1.380649e-23
Unit Charge = 1.6021766e-19
End
Body 1
Target Bodies(1) = 1
Name = "CoilBody1"
Equation = 1
Material = 1
Body Force = 1
End
Body 2
Target Bodies(1) = 2
Name = "CoilBody2"
Equation = 2
Material = 1
Initial condition = 1
End
Body 3
Target Bodies(1) = 3
Name = "Body Property 3"
Equation = 2
Material = 2
End
Solver 3
Equation = MgDynPost
Calculate Electric Field = True
Procedure = "MagnetoDynamics" "MagnetoDynamicsCalcFields"
Calculate Magnetic Field Strength = True
Calculate Current Density = True
Skip Nodal Fields = False
Exec Solver = Always
Stabilize = True
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-7
Nonlinear System Max Iterations = 20
Nonlinear System Newton After Iterations = 3
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Relaxation Factor = 1
Linear System Solver = Iterative
Linear System Iterative Method = BiCGStab
Linear System Max Iterations = 500
Linear System Convergence Tolerance = 1.0e-10
BiCGstabl polynomial degree = 2
Linear System Preconditioning = ILU0
Linear System ILUT Tolerance = 1.0e-3
Linear System Abort Not Converged = False
Linear System Residual Output = 10
Linear System Precondition Recompute = 1
End
Solver 1
Equation = CoilSolver
Desired Current Density = 1
Coil Center(3) = 0 0 0
Coil Normal(3) = 1 0 0
Procedure = "CoilSolver" "CoilSolver"
Fix Input Current Density = True
Calculate Nodal Fields = True
Coil Closed = True
Normalize Coil Current = True
Desired Coil Current = 10000
Narrow Interface = True
Exec Solver = Always
Stabilize = True
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-7
Nonlinear System Max Iterations = 20
Nonlinear System Newton After Iterations = 3
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Relaxation Factor = 1
Linear System Solver = Iterative
Linear System Iterative Method = BiCGStab
Linear System Max Iterations = 2000
Linear System Convergence Tolerance = 1.0e-10
BiCGstabl polynomial degree = 2
Linear System Preconditioning = ILU0
Linear System ILUT Tolerance = 1.0e-3
Linear System Abort Not Converged = False
Linear System Residual Output = 10
Linear System Precondition Recompute = 1
End
Solver 2
Equation = MgDyn
Fix Input Current Density = True
Use Elemental CoilCurrent = True
Procedure = "MagnetoDynamics" "WhitneyAVSolver"
Exec Solver = Always
Stabilize = True
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-6
Nonlinear System Convergence Tolerance = 1.0e-7
Nonlinear System Max Iterations = 20
Nonlinear System Newton After Iterations = 3
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Relaxation Factor = 1
Linear System Solver = Iterative
Linear System Iterative Method = BiCGStab
Linear System Max Iterations = 10000
Linear System Convergence Tolerance = 1.0e-10
BiCGstabl polynomial degree = 6
Linear System Preconditioning = ILU0
Linear System ILUT Tolerance = 1.0e-3
Linear System Abort Not Converged = False
Linear System Residual Output = 10
Linear System Precondition Recompute = 1
End
Equation 1
Name = "ActiveEquation"
Active Solvers(3) = 3 1 2
End
Equation 2
Name = "PassiveEquation"
Active Solvers(2) = 2 3
End
Material 1
Name = "Copper (generic)"
Sound speed = 3810.0
Relative Permeability = 0.999994
Heat Conductivity = 401.0
Heat Capacity = 385.0
Density = 8960.0
Youngs modulus = 115.0e9
Heat expansion Coefficient = 16.5e-6
Electric Conductivity = 59.59e6
Poisson ratio = 0.34
End
Material 2
Name = "Air (room temperature)"
Relative Permittivity = 1.00059
Heat Capacity = 1005.0
Heat Conductivity = 0.0257
Sound speed = 343.0
Viscosity = 1.983e-5
Relative Permeability = 1.00000037
Density = 1.205
Heat expansion Coefficient = 3.43e-3
End
Material 3
Name = "Iron (generic)"
Sound speed = 5000.0
Heat Capacity = 449.0
Heat expansion Coefficient = 11.8e-6
Poisson ratio = 0.29
Electric Conductivity = 10.30e6
Youngs modulus = 193.053e9
Density = 7870.0
Heat Conductivity = 80.2
Relative Permeability = 6000
End
Body Force 1
Name = "Source"
Current Density 2 = Equals "CoilCurrent e 2"
Current Density 3 = Equals "CoilCurrent e 3"
Current Density 1 = Equals "CoilCurrent e 1"
End
Initial Condition 1
Name = "InitialCondition 2"
AV {e} = 0
AV = 0
End
Boundary Condition 1
Target Boundaries(6) = 13 14 15 16 17 18
Name = "BoxCondition"
AV = 0
AV {e} = 0
End
But, I don't see any induced current as I would expect there to be.