ElmerCSC / elmer-elmag

Development repository for electromagnetics tutorial and verification cases
50 stars 20 forks source link

Induction Heating example #5

Closed arvedes closed 2 years ago

arvedes commented 2 years ago

I'd like to contribute an induction heating example, however, the results seem not to be correct.

The potential calculated by the CoilSolver looks reasonable, even though the actual values don't fit the boundary conditions: image

The applied potential is only visible at the coil ends: image It looks similar in a simulation without CoilSolver, therefore, I think that there is an issue with the initialization.

Do you have any suggestions how to get the case working?

raback commented 2 years ago

Hi Arved, There are two way to go around. If your coil is massive the frequency the current would tend to concentrate on the surface. Eventually you need a very fine mesh to resolve the profile at the skin. Often this is, however, not what you want in induction heating case. The induced magnetic field is not really that sensitive to the exact profile in the coil. Also, the coil could be stranded (consisting of numerous thin wires) and then by construction we know the current density to be uniform. The it would make sense to use the CoilSolver.

CoilSolver basically only solves for a suitable vector fields. You can ask a "desired coil current" from it and it will generate the vector field. In these cases it makes sense to omit the coil in the AV equation setting electric conductivities to zero and AV re/im BCs at the wire ends to zero.

So either solve the current density a priori (CoilSolver) or really resolve the current profile consistent with the magnetic field.

arvedes commented 2 years ago

Hi Peter, thanks for the quick reply!

I definitely don't want to resolve the skin layer. Another option I was thinking about is to use Layer Electric Conductivity in the coil. Unfortunately, I also couldn't get any useful results there. I just added the corresponding sif.

Is it worth to continue with that approach? It'd be also interesting for other applications in our field.

raback commented 2 years ago

I don't see why the "layer electric conductivity" would not work. It has not been used too much but there is a verification/consistency test for that. It would provide a 3rd strategy suitable for massive coils when you know your skin depth is small compared to the radius without ridiculous meshes. If you coil is stranded the CoilSolver would be the best way to go.

arvedes commented 2 years ago

In crystal growth application we usually have massive coils, often with even higher frequencies than here. In these cases, a layer electric conductivity has already been successfully used for modeling. I'll try to get the case working with it!

I'm facing still the problem of a significant drop in potential right after the power supplies, the oscillation seems to take place only in the first few centimeters: image image

Do you have an idea how this could be solved?

jvela018 commented 2 years ago

Hi @arvedes ,

I'm not sure how the problem is set up, however, under the assumption that you're using the CoilSolver along with the "Desired Coil Current" (Net Current) condition, it's natural that you'll get basically zero potential in most of the coil, and only see the potential defined on the terminals. You're basically modeling a coil with infinite conductivity, hence, there's barely any voltage drop (negligible). You need to treat each terminal independently, let's say you know the current (which is unlikely but let's go with that), then apply the current value to terminal 1A, and a v=0V (ground) on the other one (terminal 2). If you're just telling the solver "here's the current", all it'll do is find the direction by applying some automatic voltage drop values until the correct current value is found (@raback correct me if I'm wrong).

I suggest using circuits to set up these type of coil models. This example might help: https://github.com/ElmerCSC/elmer-elmag/tree/main/CircuitBuilder/3D/massive/open . You can test it on the same circuit file just change the names to match your domains. These models are set up using Voltage though. The "high" terminal is set up with the circuit and I apply a zero electric potential condition on the other terminal.

I hope this information makes sense and is of use. I haven't used Elmer in a couple of months but I can give you a hand if you need it.

BR,

Jon

arvedes commented 2 years ago

Hi Jon, thanks for your comment!

I was hoping to get along using only the WhitneyAVHarmonicSolver to keep the complexity of the model as low as possible. I just added the CoilSolver because I found it in almost all examples provided in this repository (without completely understanding how it works, though, I'm still learning how to use all that). I was hoping to get a good initial guess for the potential in the coil from it and then compute the solution with the WhitneyAVHarmonicSolver - apparently I was wrong.

Using a fixed current density / stranded coil approach would be reasonable for this setup, however, it might limit the applicability to the mid-frequency range (where the current distribution in the coil is not relevant). Nevertheless it's an interesting approach for me. In your 3D/massive/open example you use the WPotentialSolver - what is the difference to the CoilSolver?

raback commented 2 years ago

Thanks Jon! There are indeed many ways to solve this problem. One motivation for the CoilSolver was that there really wasn't any way to resolve closed stranded coils of generic shape before. There it is difficult to be without. But given that you case is neither stranded nor closed it might no be needed. A second question is whether you know the voltage or only the total current. And even if you just know the current if your material laws are sufficiently linear you could do to scaling afterwords using the smart heater control of the HeatSolver.

jvela018 commented 2 years ago

@arvedes,

The WPotentialSolver, simply solves the direction of the wire by using the keyword W in the boundary condition part. It basically solves the gradient between the two terminals defined in the boundary conditions block.

Screen Shot 2022-09-26 at 6 48 04 PM

As you see in the image above, the magnetic vector potential is zeroed at Infinity (outer domain surface if you will). Then W=1 and W=0, specify the high and the low terminals. Then the voltage is actually applied as a global quantity through the circuit file under Body Force 1.

Screen Shot 2022-09-26 at 6 50 22 PM

For the coupling between the FEM model and the lumped circuit parameters you'll need the Component block, which is the one that tells Elmer that it will calculate the current density from the solution of the W vector.

Screen Shot 2022-09-26 at 6 51 55 PM

You, however don't need to know by heart anything specified in the circuit file. You can just create your circuit as show in this video: https://www.youtube.com/watch?v=Z_MBIt1pApU&t=907s

I hope this helps.

BR,

Jon

arvedes commented 2 years ago

Thanks Jon! There are indeed many ways to solve this problem. One motivation for the CoilSolver was that there really wasn't any way to resolve closed stranded coils of generic shape before. There it is difficult to be without. But given that you case is neither stranded nor closed it might no be needed. A second question is whether you know the voltage or only the total current. And even if you just know the current if your material laws are sufficiently linear you could do to scaling afterwords using the smart heater control of the HeatSolver.

Scaling is an option in some applications but unfortunately not in all. I ran a test using a similar scaling with an electrical conductivity of 1 in combination with a scaled voltage - the results look reasonable (see case_scaled-conductivity-voltage.sif) : image

What I'd like to do as a next step is to reproduce this results with high conductivity / low voltage - if possible using layer electric conductivity. Do you have any suggestions how to get that converging?

I just checked the penetration depth, its 0.7mm. The diameter of the inductor pipe is 10 mm, so the layer approach seems to be reasonable to me.

jvela018 commented 2 years ago

@arvedes,

I've never used the layer electric conductivity feature so I'll let Peter give you pointers on that if he knows how to set it up for these type of problems.

I just noticed that you're not closing the circuit path on your mesh. That makes this model not too reliable or just plain unphysical. I'd either connect it to the "Infinity surface" or make the terminals closer to each other and create a gap in between. On another note, the depth of penetration is not that bad at all (note this is still low frequency). Considering that you're using gmsh for the mesh, I'd just use boundary layers in the conductor and make sure you have around 5 elements per skin depth.

If you end up using the layer electric conductivity, you should remove the coil volume. Meshing it won't give you any useful information, so why compute it. I'm not sure if you can apply the electric potential on the edges of the coil though, and that might be another issue to deal with.

Jon

arvedes commented 2 years ago

Hi Jon, thanks for your remarks!

I improved the geometry and put the terminals on the infinity surface - I'm still facing the same problems. I will try if it works with a resolved skin layer, I'm just fighting with some meshing issues...

For the setup of the layer electric conductivity setup I followed the respective test case. There, the potential is defined on the terminal surface and it works well. It would be a great feature to use for cases with MHz frequencies where resolving the skin layer is not an option.

raback commented 2 years ago

Thanx Arved! Merging while some issues still remain.

raback commented 2 years ago

I think I got some cases to work but there seems to be something missing in the layer models as the Joule heat there is zero. The CoilSolver model and the scaled down version seem to work realistically. One issue with the setup was that the scalar potential was set also for the outer surface and there was a conflict with the potential of the coil ends that shared some nodes. Also, the Jfix for the CoilSolver had not been prepared for the open coil case. There the fixing potential should be by construction set to zero at the ends. Now there is a fix in "devel" branch of "elmerfem".