Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Modeling an electromagnet in 2D

Please login with a confirmed email address before reporting spam

Hi all

I am currently trying to model an electromagnet with a copper coil wrap around an iron core (relative permeability: 274) in 2D, Comsol Multiphysics, Magneto statics.

I have modeled the copper coil (relative permeability: 0.9999903) as two rectangulars (its effective cross-sections, with length 3 cm and width 1.3 mm) with a positive current density in the upper one (J = 4.074e6 A/m2) and a negative current density (J = -4.074e6 A/m2) in the bottom one.

So this current density is perpendicular to the 2D plane and should generate a H-field to the right with a magnitude of H= 5300 A/m. (H * 3 cm = J * 3 cm* 1.3mm)

However, the simulated H-field inside the coil (at the iron core) is much lower: 120 A/m . I have also simulated one without an iron core and the maximum H-magnitude that I got was in the order of 4600 A/m.

I am wondering why the H-field decreases when an iron core was inserted. Furthermore, how can I prevent the variation of the H-field (at the iron core) in the x-direction. I want the H-field to be constant in the core.

Best Regards
Yang Gao

16 Replies Last Post 2011年1月24日 GMT-5 09:27
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年1月20日 GMT-5 22:34
Hi

I have some problems to understand your geometry, as for me, I normally simualte "coils" in 2D axi, but you have a case with "infinite length" Z depth direction items, so I do not visualise your geoemtry.

But this said I'm not astonished that the field changes over the extended coil area, you start with a uniform current density, but then it will interact with the field and I would expect that you get field and current density gradients/changes over the coil area. For the numbers I cannot comment, as such.

The same when you insert some iron, you change the gradients of the field and the interaction with the current density, and you come to a different steady state. Again for the absolute values, that depends on the geometry and the set-up of your model.

I havnt managed to catch COMSOL calculating wrong, but I have managed to get funny resulst as I missed some BCs. That is why I mostly check my simulations agains simple analytical calculations to have a few lever points to check consistency

Good luck
Ivar
Hi I have some problems to understand your geometry, as for me, I normally simualte "coils" in 2D axi, but you have a case with "infinite length" Z depth direction items, so I do not visualise your geoemtry. But this said I'm not astonished that the field changes over the extended coil area, you start with a uniform current density, but then it will interact with the field and I would expect that you get field and current density gradients/changes over the coil area. For the numbers I cannot comment, as such. The same when you insert some iron, you change the gradients of the field and the interaction with the current density, and you come to a different steady state. Again for the absolute values, that depends on the geometry and the set-up of your model. I havnt managed to catch COMSOL calculating wrong, but I have managed to get funny resulst as I missed some BCs. That is why I mostly check my simulations agains simple analytical calculations to have a few lever points to check consistency Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年1月21日 GMT-5 03:44
Dear Ivar,

I forgot to include the necessary attachment. In the following Comsol file, you will see three rectangulars stacked above each other.

The bottom en the top ones are the coil coress-sections. The center one is air or iron.

Thank you for your help.

Yang
Dear Ivar, I forgot to include the necessary attachment. In the following Comsol file, you will see three rectangulars stacked above each other. The bottom en the top ones are the coil coress-sections. The center one is air or iron. Thank you for your help. Yang

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年1月21日 GMT-5 13:46
Here are the Files:

I model first a coil (with 160 A through its effective cross-section) without an iron core. Here I expected a Magnetic field (H) which equals around 5333 A/m ( H*l=160A, l=3cm) This is also something I get from the simulation.

However, when I put an iron core inside the coil. The magnetic field drops significantly to 100 A/m. I always thought that the H-field is only dependent by the free current right?

Best Regards

Yang Gao
Here are the Files: I model first a coil (with 160 A through its effective cross-section) without an iron core. Here I expected a Magnetic field (H) which equals around 5333 A/m ( H*l=160A, l=3cm) This is also something I get from the simulation. However, when I put an iron core inside the coil. The magnetic field drops significantly to 100 A/m. I always thought that the H-field is only dependent by the free current right? Best Regards Yang Gao


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年1月25日 GMT-5 17:23
It sounds like your iron core is acting as a parallel path and effectively shields the coil. Also, if the iron material is nonlinear, it is possible that the core H will vary with flux density, no? I may be way off in my response since I cant open your files. I am not a user as yet. I just happened to be looking in to this forum as a potential user. Good luck.
Len
It sounds like your iron core is acting as a parallel path and effectively shields the coil. Also, if the iron material is nonlinear, it is possible that the core H will vary with flux density, no? I may be way off in my response since I cant open your files. I am not a user as yet. I just happened to be looking in to this forum as a potential user. Good luck. Len

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年2月18日 GMT-5 05:04
Hi Yang Gao,

I'm trying to solve a problem like yours.

did you find a solution to why the magnetic field drops when iron is inserted?

Best Regards

Ole
Hi Yang Gao, I'm trying to solve a problem like yours. did you find a solution to why the magnetic field drops when iron is inserted? Best Regards Ole

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年2月18日 GMT-5 05:06
Hi,

Actually I didn't go furthur with that, since I am modeling everything as a magnetic circuit. Then the field magnitude does make any sense.
Hi, Actually I didn't go furthur with that, since I am modeling everything as a magnetic circuit. Then the field magnitude does make any sense.

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年2月19日 GMT-5 14:34
Hi

First of all you are in 2D and not 2D axisymmetry, so you do not really have a coil there, but two parallel infinitely (actually 1(m) long) wires.

Try the one below and compare the fields, this is a true "coil" (half of in 2D axisymmetry)

When you calcuate your fields and boundary variables do not forget to use the 2*pi*r multiplier to get true areas or volumes from single, or double integrations

Then why do you say the manetic field drops, it increases: 5E4 is greater than 5000=5e3, no ?

Good luck
Ivar
Hi First of all you are in 2D and not 2D axisymmetry, so you do not really have a coil there, but two parallel infinitely (actually 1(m) long) wires. Try the one below and compare the fields, this is a true "coil" (half of in 2D axisymmetry) When you calcuate your fields and boundary variables do not forget to use the 2*pi*r multiplier to get true areas or volumes from single, or double integrations Then why do you say the manetic field drops, it increases: 5E4 is greater than 5000=5e3, no ? Good luck Ivar


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年7月1日 GMT-4 08:36
Hi!

I'm new to Comsol and I have some problem. I'm trying to model choke with three coils. I would like to do this in 2D. There is a problem where I have not coil but parallel wires as Ivar described it above. In my case I can't use 2D axisymmetry mode. Is there any possibility to create model in simple 2D mode?

Best Regards,
Przemek
Hi! I'm new to Comsol and I have some problem. I'm trying to model choke with three coils. I would like to do this in 2D. There is a problem where I have not coil but parallel wires as Ivar described it above. In my case I can't use 2D axisymmetry mode. Is there any possibility to create model in simple 2D mode? Best Regards, Przemek

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年1月14日 GMT-5 08:26
Hi,

I am pretty new to comsol and simulation in general. I have a question regarding 2d axisymmetric simulation of coils. If I do this simulation and I want to use an iron core. Do I define iron as material of the inner rectangle close to the r-axis? (I used as a starting model the file posetd above... single_coil.mph). I think I do not really understand where the turns are simulated and how the simulated coil really looks like.

Thanks very much,
Monica
Hi, I am pretty new to comsol and simulation in general. I have a question regarding 2d axisymmetric simulation of coils. If I do this simulation and I want to use an iron core. Do I define iron as material of the inner rectangle close to the r-axis? (I used as a starting model the file posetd above... single_coil.mph). I think I do not really understand where the turns are simulated and how the simulated coil really looks like. Thanks very much, Monica

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年1月14日 GMT-5 09:17
Hi

How do you represent a coil in 2D (X,Y) ?

As a circle, current in the plane J(X,Y), or out of the plane J(Z) ?

If it is out of the plane you need to "loop it around" and then it's = 2D axi !

if you current is looping in a circle J(Z,Y), in the plane X,Y, the B(Z) field is going out of the plane and needs to loop back, that is you need the 3D to find the B full field.

results for me: a "coil" in 2D need a radius tending to infinite (Inf) hence it's a straight wire, with the B(X,Y) field looping around in the plane X,Y, and being invariant along Z.

So for me thisshould give you some replies, no ?
or have I missed a point ? Which is quickly done

--
Good luck
Ivar
Hi How do you represent a coil in 2D (X,Y) ? As a circle, current in the plane J(X,Y), or out of the plane J(Z) ? If it is out of the plane you need to "loop it around" and then it's = 2D axi ! if you current is looping in a circle J(Z,Y), in the plane X,Y, the B(Z) field is going out of the plane and needs to loop back, that is you need the 3D to find the B full field. results for me: a "coil" in 2D need a radius tending to infinite (Inf) hence it's a straight wire, with the B(X,Y) field looping around in the plane X,Y, and being invariant along Z. So for me thisshould give you some replies, no ? or have I missed a point ? Which is quickly done -- Good luck Ivar

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年1月14日 GMT-5 09:22
Hi

if you have an iron core (cylinder centred on the axis) this is viewed as a rectangle in a 2D-Axi cut, with one edge on the axis, and one slightly to the right (+X) of the axis.

Most coils have a hollow cylindrical part in the middle, so in 2D-axi view its a rectangle further away from the axis (always in +X side if the axis for COMSOL). That is where you apply a current density going out of the papaer, hence in 2D-axi running along the angular phi direction, making a doghnut shape or a thoroidal shaped coil

do we agree, so far ?

there is a nice image/scetch in one of the 3.5a ACDC docs about 3D, 2D, and 2D-axi views

--
Good luck
Ivar
Hi if you have an iron core (cylinder centred on the axis) this is viewed as a rectangle in a 2D-Axi cut, with one edge on the axis, and one slightly to the right (+X) of the axis. Most coils have a hollow cylindrical part in the middle, so in 2D-axi view its a rectangle further away from the axis (always in +X side if the axis for COMSOL). That is where you apply a current density going out of the papaer, hence in 2D-axi running along the angular phi direction, making a doghnut shape or a thoroidal shaped coil do we agree, so far ? there is a nice image/scetch in one of the 3.5a ACDC docs about 3D, 2D, and 2D-axi views -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年1月14日 GMT-5 09:44
Hi,

thanks for the fast answer. I am also pretty new to the physics terms. (at least in enlgish)

I think it is best if I attach the file I have used. Maybe this would shed some light on my problem. I do not know how the coil is beign simulated. I thought that the windings would be in the part that I defined as a multi-turn coil domain, but from left to right. And now when I want to insert an iron core I believe that I thought wrong and that the multi turn coil domain is only a cross-section of the 3d representation of the coil. As built up in the mph file attached. I thought that all the N windings will influence the width of the coil, while now I think that with the symmetry and all the coil is actually between the rectangle 1 and its symmetric part and that the rectangle 2 is the core of the coil.

Please understand that I am _very_ new at this :)

Thanks a lot,
Monica
Hi, thanks for the fast answer. I am also pretty new to the physics terms. (at least in enlgish) I think it is best if I attach the file I have used. Maybe this would shed some light on my problem. I do not know how the coil is beign simulated. I thought that the windings would be in the part that I defined as a multi-turn coil domain, but from left to right. And now when I want to insert an iron core I believe that I thought wrong and that the multi turn coil domain is only a cross-section of the 3d representation of the coil. As built up in the mph file attached. I thought that all the N windings will influence the width of the coil, while now I think that with the symmetry and all the coil is actually between the rectangle 1 and its symmetric part and that the rectangle 2 is the core of the coil. Please understand that I am _very_ new at this :) Thanks a lot, Monica


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年1月14日 GMT-5 09:45
PS. I do not know where I can find these documents you talk about. I have only COMSOL 4.1 here...
PS. I do not know where I can find these documents you talk about. I have only COMSOL 4.1 here...

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年1月14日 GMT-5 15:52
Hi

if you have 4.1 then your doc is about at same level as 3.5, and anyhow more specific for the new version.

Concerning your model I have several comments and suggestons:

0) turn on a contour plot and use uniform color, as well as add the streamlines to see the general field lines. notice how they fill the air volume, as well as their value away from the coil area

1) try to use a smaller "air domain" and why not make it as a half a circle, with an external ring of "infinite elements", at most 1/10 of total radius, set to "cylindrical".

2) if you intend to perform a parametric sweep you need to define the parameter to sweep too, try using the "+" underneath the parameter block and select one of the parameters, it will be scanned over the rage you have defined.
It is correct that you should use the "parametrical sweep" if you intend to change the geometry. The stationary "continuation" does not loop around the geometry and would not update it.

3) I'm not sure I would use the multiturn coil to start with, at least not if you are purely in stationary. Why not "just" use external current source. In anycase take care that (and COMSOl does not check for you) that N times the wire diameter times the fill factor (probably your "air" parameter) is coherent with the total coil section. Then that the total current is correctly set (total current density = wire current * N turns / total coil area

The single and multiturn coild BC's use advanced thechniques particularly for simulating correctly the skin effect, also for higher frequencies (i.e. frequecy scans). If you constant "externl current" case works, then you could try to see the "improvements" with these advanced BC's, and you should understand how they work, see the doc, it's somewhat subtile, but absolutely worth the time to study and to understand

--
Good luck
Ivar
Hi if you have 4.1 then your doc is about at same level as 3.5, and anyhow more specific for the new version. Concerning your model I have several comments and suggestons: 0) turn on a contour plot and use uniform color, as well as add the streamlines to see the general field lines. notice how they fill the air volume, as well as their value away from the coil area 1) try to use a smaller "air domain" and why not make it as a half a circle, with an external ring of "infinite elements", at most 1/10 of total radius, set to "cylindrical". 2) if you intend to perform a parametric sweep you need to define the parameter to sweep too, try using the "+" underneath the parameter block and select one of the parameters, it will be scanned over the rage you have defined. It is correct that you should use the "parametrical sweep" if you intend to change the geometry. The stationary "continuation" does not loop around the geometry and would not update it. 3) I'm not sure I would use the multiturn coil to start with, at least not if you are purely in stationary. Why not "just" use external current source. In anycase take care that (and COMSOl does not check for you) that N times the wire diameter times the fill factor (probably your "air" parameter) is coherent with the total coil section. Then that the total current is correctly set (total current density = wire current * N turns / total coil area The single and multiturn coild BC's use advanced thechniques particularly for simulating correctly the skin effect, also for higher frequencies (i.e. frequecy scans). If you constant "externl current" case works, then you could try to see the "improvements" with these advanced BC's, and you should understand how they work, see the doc, it's somewhat subtile, but absolutely worth the time to study and to understand -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年1月24日 GMT-5 08:21
Thank you for your prompt answer. I haven't had time till now to resume the work. I have a few questions about your suggestion.

1. how do I set up this "external ring of "infinite elements""?

2. some question that I still do not understand. If I want to use the same model but have an iron core for my coil. How do I do that? Do I set the rectangle 2 to iron? or do I have to spcify it elsewhere?


Thanks again for your responses.
Best,
Monica
Thank you for your prompt answer. I haven't had time till now to resume the work. I have a few questions about your suggestion. 1. how do I set up this "external ring of "infinite elements""? 2. some question that I still do not understand. If I want to use the same model but have an iron core for my coil. How do I do that? Do I set the rectangle 2 to iron? or do I have to spcify it elsewhere? Thanks again for your responses. Best, Monica

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年1月24日 GMT-5 09:27
Hi

1) use a circle/sphere instead of a rectangle/cube shape, and add an "onion" shell of same type around (for the PML/infinite el) defined as cylindrical/spherical shape

2) adding an iron core is "just" to define the material properties. however, if your iron is anisotropic and/or nonlinear such as defined with a B-H curve, you need to add a new node for the physics for that material only, leaving the default node for the "standard" materials.

You can add several identical model nodes/subnodes, some are adding up, some are unique and will override a previously defined one, that depends on the physics, and they are distinguished by the small green/red arrows in th icon.
For the DOC see "Physics Interface Exclusive and Contributing Feature Node Types" page 293 v4.1 COMSOLMultiPhysicsUsersGuide.pdf

--
Good luck
Ivar
Hi 1) use a circle/sphere instead of a rectangle/cube shape, and add an "onion" shell of same type around (for the PML/infinite el) defined as cylindrical/spherical shape 2) adding an iron core is "just" to define the material properties. however, if your iron is anisotropic and/or nonlinear such as defined with a B-H curve, you need to add a new node for the physics for that material only, leaving the default node for the "standard" materials. You can add several identical model nodes/subnodes, some are adding up, some are unique and will override a previously defined one, that depends on the physics, and they are distinguished by the small green/red arrows in th icon. For the DOC see "Physics Interface Exclusive and Contributing Feature Node Types" page 293 v4.1 COMSOLMultiPhysicsUsersGuide.pdf -- Good luck Ivar

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.