Model induction between two coils

The graphical user interface of Elmer
mrbearb
Posts: 20
Joined: 07 May 2024, 20:41
Antispam: Yes

Model induction between two coils

Post by mrbearb »

Hello all,

I am new to Elmer and have been working through examples in the tutorial and on the GitHub here: https://github.com/ElmerCSC/elmer-elmag/blob/main

My end goal is to model the induced current in a second coil due to a given sinusoidal current in the first coil in 3D. The purpose is to be able to model the effective range of induction (voltage level across the second coil) for various coil models operating at a set frequency.

I'm not sure if I should use transient vs steady state, but am leaning more towards steady state. I'm also not sure if I should use CoilSolver or just use a sinusoidal boundary condition. Additionally, I would prefer to use an open coil, but have only been able to use CoilSolver with a closed coil. Ultimately I would like to be able to integrate this into Circuit Builder.

Any and all advice would be most welcome as to what next steps I should take, as I have realized that Elmer has a fairly steep learning curve and I am trying to approach this in the most time efficient manner.

Thanks
kevinarden
Posts: 2366
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Model induction between two coils

Post by kevinarden »

take a look at these cases
https://github.com/ElmerCSC/elmer-elmag
mrbearb
Posts: 20
Joined: 07 May 2024, 20:41
Antispam: Yes

Re: Model induction between two coils

Post by mrbearb »

Thank you for the reply.

I've been looking at this one mainly: https://github.com/ElmerCSC/elmer-elmag ... ionHeating

Is CoilSolver required to use in a coil like the ones I am thinking of:
coil.png
(103.2 KiB) Not downloaded yet
kevinarden
Posts: 2366
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Model induction between two coils

Post by kevinarden »

It is not required, but is an option. Coil solver saves resources, time, etc. A large coil can be represented with known coil equations.

Or you can model all of the elements and physics, and numerically solve for what the coil equations provide.
mrbearb
Posts: 20
Joined: 07 May 2024, 20:41
Antispam: Yes

Re: Model induction between two coils

Post by mrbearb »

Thank you again for a quick reply.

In using CoilSolver, is it then not necessary to define the boundary conditions for that coil? I.e. the desired current would be set in CoilSolver, which would then pass data to MagHarm in order to calculate the resulting fields?
mrbearb
Posts: 20
Joined: 07 May 2024, 20:41
Antispam: Yes

Re: Model induction between two coils

Post by mrbearb »

Update:

I got a single turn open coil working successfully, displaying potential, current, and H field throughout volume.

However, when trying to replicate these results with a more complex coil, I get the following potential distribution on my coil. I am expecting the potential to begin high on one end of the coil and evenly distribute throughout the coil, as seen in the single turn coil example.

Single Turn:
potentail.png
potentail.png (31.71 KiB) Viewed 142 times
Multi Turn:
potential_multi.png
(85.27 KiB) Not downloaded yet
kevinarden
Posts: 2366
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Model induction between two coils

Post by kevinarden »

Are you sure the BCs are at each end of the coil?
coilpot.png
coilpot.png (89.27 KiB) Viewed 115 times
raback
Site Admin
Posts: 4841
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Model induction between two coils

Post by raback »

Hi

CoilSolver is merely a static current conduction solver with some special hacks that make life easier for coils, e.g.
1) You can define currents for closed coils without having to create an extra cut on it
2) You can normalize the current density automatically to have desired total current
3) You can fix the current density so that its divergence vanishes
4) You can use "component" section to define many coils, not just one, and these are solved at the same time.
etc.

-Peter
mrbearb
Posts: 20
Joined: 07 May 2024, 20:41
Antispam: Yes

Re: Model induction between two coils

Post by mrbearb »

kevinarden wrote: 08 May 2024, 13:13 Are you sure the BCs are at each end of the coil?
coilpot.png
Yes, I went back and checked to make sure. The boundary conditions for the coil start and end are in the correct locations. I've also played with changing the Coil Normal and Coil Center to see if that would get it right, but not successful as of yet.

Here is 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 = moreComplex.sif
  Post File = moreComplex.vtu
End

Constants
  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 = "Body 1"
  Equation = 1
  Material = 1
End

Solver 1
  Equation = CoilSolver
  Procedure = "CoilSolver" "CoilSolver"
  Normalize Coil Current = True
  Calculate Nodal Fields = True
  Narrow Interface = True
  Desired Coil Current = 10
  Coil Normal(3) = 1 0 0
  Coil Center(3) = 0 0 0
  Exec Solver = Always
  Stabilize = True
  Optimize Bandwidth = True
  Steady State Convergence Tolerance = 1.0e-5
  Nonlinear System Convergence Tolerance = 1.0e-9
  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 = 4
  Linear System Preconditioning = ILU0
  Linear System ILUT Tolerance = 1.0e-6
  Linear System Abort Not Converged = False
  Linear System Residual Output = 10
  Linear System Precondition Recompute = 1
End

Equation 1
  Name = "CoilEquation"
  Active Solvers(1) = 1
End

Material 1
  Name = "Copper (generic)"
  Heat expansion Coefficient = 16.5e-6
  Sound speed = 3810.0
  Heat Capacity = 385.0
  Electric Conductivity = 59.59e6
  Heat Conductivity = 401.0
  Relative Permeability = 0.999994
  Density = 8960.0
  Relative Permeability = 0.999994
  Poisson ratio = 0.34
  Youngs modulus = 115.0e9
  Relative Permittivity = 1e-8
End

Boundary Condition 1
  Target Boundaries(1) = 1 
  Name = "CoilStart"
  Coil Start = True
End

Boundary Condition 2
  Target Boundaries(1) = 2 
  Name = "CoilEnd"
  Coil End = True
End
Also, my geometry file (SolidWorks->Gmsh):

Code: Select all

SetFactory("OpenCASCADE");
Merge "20TurnCoil.STEP";
//+
Physical Surface("CoilStart",20) = {2};
//+
Physical Surface("CoilEnd",21) = {3};
//+
Physical Surface("CoilSkin",22) = {1, 4};
//+
Physical Surface("AirSurface",23) = {5, 6, 7, 8, 9, 10};
//+
Physical Volume("Coil",24) = {1};
//+
Physical Volume("Air",25) = {2};
The numbering for the boundary conditions gets changed from GMSH to Elmer when I import the mesh into ElmerGUI. They show up correctly in the GUI so I'm guessing they're ok.
Last edited by mrbearb on 08 May 2024, 17:05, edited 1 time in total.
kevinarden
Posts: 2366
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Model induction between two coils

Post by kevinarden »

Is it possible to zip and post the mesh?
Post Reply