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.

3D vs. Axial 2D Symmetry

Please login with a confirmed email address before reporting spam

Hello,

I want to find the magnetic field from a magnet that has the shape of a cylinder. Can I do this using 2D Axial Symmetry instead of 3D? If so, how? Does the Axial Symmetry just mean I only need to draw half of the cylinder, or can it be used to represent a 3D figure with ony 2 dimensions?

Thank you,
Kevin

14 Replies Last Post 25.03.2016, 05:07 GMT-4
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 21.02.2010, 05:02 GMT-5
Hi

first of all there are a few images in the doc showing the 2D, 2D axi and what the workplane represents, if you understand quicker by images take a look.

In words (if I can manage): 2D as 2D-axi is a simplified representation of the 3D world.

2D means that you are looking at the x-y (work)plane (x horizontal, y vertical) and you assume nothing is changing along "z" (the depth). And by default you define z=1[m] and this simplifies all your equations as you replace all "z" by "1", including units as z is replaced by an implicit [m] length unit (i.e. an edge in 2D is in fact a surface equal to the edge "length" in [m] times * z=1[m])

2D-axi means you have cut your cylindrical symmetry cases along a (work)plane of dimension by default "r" (radial or horizonal) and z (height parallel to the axis). Your "depth" now "loops" around the axis of symmetry which is efined as the vertical axis at r=0, and the loop length is "2*pi*r". When you define your cut view of your object you work ONLY in the positive r (or r>=0) quadrants (z might be negative or positive).
Once you have made your 2d-axi geometry, if you want to see how it looks in 3D, try a draw-extrude (over full 360°), this will create a new 3D geometry with your full 3D representation, this works also in 2D to get the 3D representation, there you must define the depth distance.

Only caveat in 2D-axi, as the depth is 2*pi*r the perifery of a circle, you must integrate over this value, that you should define EXPLICITELY in the coupling variables but that can be included by a "click" in the postprocessing. This applies also to boundary condition definitions, you can define your values in 1/length or 1/surface based on depth (in 2D), respectively 2*pi*r loop length in 2D-axi

So I hope my explanations are correct and complete now, in anycase try it out
Good luck
Ivar
Hi first of all there are a few images in the doc showing the 2D, 2D axi and what the workplane represents, if you understand quicker by images take a look. In words (if I can manage): 2D as 2D-axi is a simplified representation of the 3D world. 2D means that you are looking at the x-y (work)plane (x horizontal, y vertical) and you assume nothing is changing along "z" (the depth). And by default you define z=1[m] and this simplifies all your equations as you replace all "z" by "1", including units as z is replaced by an implicit [m] length unit (i.e. an edge in 2D is in fact a surface equal to the edge "length" in [m] times * z=1[m]) 2D-axi means you have cut your cylindrical symmetry cases along a (work)plane of dimension by default "r" (radial or horizonal) and z (height parallel to the axis). Your "depth" now "loops" around the axis of symmetry which is efined as the vertical axis at r=0, and the loop length is "2*pi*r". When you define your cut view of your object you work ONLY in the positive r (or r>=0) quadrants (z might be negative or positive). Once you have made your 2d-axi geometry, if you want to see how it looks in 3D, try a draw-extrude (over full 360°), this will create a new 3D geometry with your full 3D representation, this works also in 2D to get the 3D representation, there you must define the depth distance. Only caveat in 2D-axi, as the depth is 2*pi*r the perifery of a circle, you must integrate over this value, that you should define EXPLICITELY in the coupling variables but that can be included by a "click" in the postprocessing. This applies also to boundary condition definitions, you can define your values in 1/length or 1/surface based on depth (in 2D), respectively 2*pi*r loop length in 2D-axi So I hope my explanations are correct and complete now, in anycase try it out Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21.02.2010, 13:58 GMT-5
Hi Ivar,

Thanks for your help. It was really helpful. I still have a few more questions.

1. You said, "there are a few images in the doc showing the 2D, 2D axi and what the workplane represents, if you understand quicker by images take a look." Which document is this?

2. You said, "When you define your cut view of your object you work ONLY in the positive r (or r>=0) quadrants (z might be negative or positive)." What does this mean, and how do you define a cut view?

3. You said to try a draw extrude over the full 360 degrees. When I choose extrude it only gives me the following options: Distance, Scale R, Scale Z, Displacement R, Displacement Z, and Twist. When I have drawn a circle and extruded a distance, then it becomes a cylinder in 3D. So isn't the variable not shown in the 2D Axial the height (the z-direction) instead of the depth (the theta direction) as you were saying?.

4. What I am trying to do is model a cylinder with magnetization in the positive radial direction. In Physics, Subdomain Settings, I can specify a Magnetization 'M'. However when I solve the problem in Comsol for the circle I drew (from question 3), and I use an arrow plot, I see that the magnetization is always pointing to the right (instead of pointing to the right for r>0 and to the left for r<0 as I want). Do you have any suggestions for how I can do this?

Thanks again for your help,
Kevin
Hi Ivar, Thanks for your help. It was really helpful. I still have a few more questions. 1. You said, "there are a few images in the doc showing the 2D, 2D axi and what the workplane represents, if you understand quicker by images take a look." Which document is this? 2. You said, "When you define your cut view of your object you work ONLY in the positive r (or r>=0) quadrants (z might be negative or positive)." What does this mean, and how do you define a cut view? 3. You said to try a draw extrude over the full 360 degrees. When I choose extrude it only gives me the following options: Distance, Scale R, Scale Z, Displacement R, Displacement Z, and Twist. When I have drawn a circle and extruded a distance, then it becomes a cylinder in 3D. So isn't the variable not shown in the 2D Axial the height (the z-direction) instead of the depth (the theta direction) as you were saying?. 4. What I am trying to do is model a cylinder with magnetization in the positive radial direction. In Physics, Subdomain Settings, I can specify a Magnetization 'M'. However when I solve the problem in Comsol for the circle I drew (from question 3), and I use an arrow plot, I see that the magnetization is always pointing to the right (instead of pointing to the right for r>0 and to the left for r

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 21.02.2010, 15:10 GMT-5
Hi

well first of all it would help if you state (preferrence in the first subject field of a question) the version and application mode that you are using, this helps us out here to identify better how to reply.

I'm using V3.5a, the latest operational version in the "old" Gui approach, with V4 we have been promised a little revolution, and what we were shown at the conference last Autumn did indeed go in that direction.

So in my doc (guide, smeug, acdcug.pdf and help files) I have images like the one attached below, I hope this replies better your point 1) and 2)

3) I should have been more precise, "extrude" is for 2D=>3D, "revolve" is 2D-axis => 3D, sorry for that

4) below a 2D-axi model of a hollow tube magnet with radial magnetisation, the 3D geomemtry obtained by revolution is in GEOM2 (you need to run the model once to get the H&B fields)

As you say the arrows do not go to the left in the negative quadrant, because in 2D axi we have just a simplified view in the "positive r>0 quandrant, but for me this means that you are in 3D (x,y,z, cartesian coordiantes), and you have defined your magnetisation as a function of "x". In 3D by default you do no have r, z and theta as cylindrical coordinates, you have to define them yourself, and then define the M vector accordingly.
There is a couple of discussions on cylindrical and spherical coordiantes and there are a few entries in the knowledge base, see the search feature on the main COMSOL web site, as well as juste above here on the forum.

Another way to learn about calindrical coordinates in 3D is to study the torque load case in structural (if you have the structural module) see smeug.pdf and search for torque load.

Hope this helps
Ivar
Hi well first of all it would help if you state (preferrence in the first subject field of a question) the version and application mode that you are using, this helps us out here to identify better how to reply. I'm using V3.5a, the latest operational version in the "old" Gui approach, with V4 we have been promised a little revolution, and what we were shown at the conference last Autumn did indeed go in that direction. So in my doc (guide, smeug, acdcug.pdf and help files) I have images like the one attached below, I hope this replies better your point 1) and 2) 3) I should have been more precise, "extrude" is for 2D=>3D, "revolve" is 2D-axis => 3D, sorry for that 4) below a 2D-axi model of a hollow tube magnet with radial magnetisation, the 3D geomemtry obtained by revolution is in GEOM2 (you need to run the model once to get the H&B fields) As you say the arrows do not go to the left in the negative quadrant, because in 2D axi we have just a simplified view in the "positive r>0 quandrant, but for me this means that you are in 3D (x,y,z, cartesian coordiantes), and you have defined your magnetisation as a function of "x". In 3D by default you do no have r, z and theta as cylindrical coordinates, you have to define them yourself, and then define the M vector accordingly. There is a couple of discussions on cylindrical and spherical coordiantes and there are a few entries in the knowledge base, see the search feature on the main COMSOL web site, as well as juste above here on the forum. Another way to learn about calindrical coordinates in 3D is to study the torque load case in structural (if you have the structural module) see smeug.pdf and search for torque load. Hope this helps Ivar


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21.02.2010, 17:38 GMT-5
Hi Ivar,

Thanks again for your help. I also have V3.5A. The model was very helpful, and I think I understand the basics of what is happening with 2D Axial Symmetry.

In your model, you included a 2nd rectangular R2, which is much bigger. Is this rectangle's purpose to simulate air (with ur = 1)? Is it true then that area which is not covered by a rectangle will not be air?

I have noticed that as I change the dimensions of R2, the plots for the magnetic field change, which is a problem.

Thank you,
Kevin
Hi Ivar, Thanks again for your help. I also have V3.5A. The model was very helpful, and I think I understand the basics of what is happening with 2D Axial Symmetry. In your model, you included a 2nd rectangular R2, which is much bigger. Is this rectangle's purpose to simulate air (with ur = 1)? Is it true then that area which is not covered by a rectangle will not be air? I have noticed that as I change the dimensions of R2, the plots for the magnetic field change, which is a problem. Thank you, Kevin

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 22.02.2010, 01:38 GMT-5
Hi

Indeed the idea with the larger area is to have some air/vacuum to allow the field to propagate and loop around. normally it should be much bigger than the object (10-50x) but this takes up too many nodes/elements and computational power. Therefore, if you have the ACDC module, you can use more advanced features such as PML (Perfectly Matched Layers), which are in fact a mathematical artefact to get the volume to expand to infinitiy by a exponential conversion, within a finite limited area, in this way you do not need a very large "air" surrounding.

This demands quite some equation tweaking if you do not have the ACDC module (which I can only recommend if you are doing a lot of ACDC).

I can also recommend to play and to go systematically through the examples in the documentation, as well as models from the Model Exchange and the Model Gallery on the main COMSOL web page. Advanced Multiphyics modelling, what COMSOL allows, require a few weeks introduction and testing to catch the principles, even if you are a (classical) FEM specialist, as the approach is somewhat different.

There are also the excellent training courses organised by COMSOL in each country, I have followed several, and even a few several times with a 2 years intervalle, you always learn new things, new ways.

Good luck
Ivar
Hi Indeed the idea with the larger area is to have some air/vacuum to allow the field to propagate and loop around. normally it should be much bigger than the object (10-50x) but this takes up too many nodes/elements and computational power. Therefore, if you have the ACDC module, you can use more advanced features such as PML (Perfectly Matched Layers), which are in fact a mathematical artefact to get the volume to expand to infinitiy by a exponential conversion, within a finite limited area, in this way you do not need a very large "air" surrounding. This demands quite some equation tweaking if you do not have the ACDC module (which I can only recommend if you are doing a lot of ACDC). I can also recommend to play and to go systematically through the examples in the documentation, as well as models from the Model Exchange and the Model Gallery on the main COMSOL web page. Advanced Multiphyics modelling, what COMSOL allows, require a few weeks introduction and testing to catch the principles, even if you are a (classical) FEM specialist, as the approach is somewhat different. There are also the excellent training courses organised by COMSOL in each country, I have followed several, and even a few several times with a 2 years intervalle, you always learn new things, new ways. Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 22.02.2010, 11:15 GMT-5
Hi Ivar,

I do have the AC/DC Module, but for 2D Axial Symmetry, I don't see any options to create a PML or even to make an infinite element.

I have attached the Comsol file I'm using. This design has 9 cylindrical magnets in which the direction of the magnetization rotates for each magnet (similar to a Halbach array).

Each magnet is very small: 0.00625 m by 0.00625 m. Currently the rectangle for air is comparatively much much larger: 1 m x 1 m. However when I increase the dimensions of the larger rectangle to 3 m x 3 m, I get values for the field that are different by a factor of 10.

This doesn't make any sense to me. When the dimensions for the air rectangle are already much much larger than the magnets, I would think that increasing the dimensions of the air rectangle should not have much of an effect on the solution for the fields. If you had any ideas on what is wrong, I would greatly appreciate it.

Thank you,
Kevin
Hi Ivar, I do have the AC/DC Module, but for 2D Axial Symmetry, I don't see any options to create a PML or even to make an infinite element. I have attached the Comsol file I'm using. This design has 9 cylindrical magnets in which the direction of the magnetization rotates for each magnet (similar to a Halbach array). Each magnet is very small: 0.00625 m by 0.00625 m. Currently the rectangle for air is comparatively much much larger: 1 m x 1 m. However when I increase the dimensions of the larger rectangle to 3 m x 3 m, I get values for the field that are different by a factor of 10. This doesn't make any sense to me. When the dimensions for the air rectangle are already much much larger than the magnets, I would think that increasing the dimensions of the air rectangle should not have much of an effect on the solution for the fields. If you had any ideas on what is wrong, I would greatly appreciate it. Thank you, Kevin


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 23.02.2010, 22:14 GMT-5
Hi Ivar,

I do have the AC/DC Module, but for 2D Axial Symmetry, I don't see any options to create a PML or even to make an infinite element.

I have attached the Comsol file I'm using. This design has 9 cylindrical magnets in which the direction of the magnetization rotates for each magnet (similar to a Halbach array).

Each magnet is very small: 0.00625 m by 0.00625 m. Currently the rectangle for air is comparatively much much larger: 1 m x 1 m. However when I increase the dimensions of the larger rectangle to 3 m x 3 m, I get values for the field that are different by a factor of 10.

This doesn't make any sense to me. When the dimensions for the air rectangle are already much much larger than the magnets, I would think that increasing the dimensions of the air rectangle should not have much of an effect on the solution for the fields. If you had any ideas on what is wrong, I would greatly appreciate it.

Thank you,
Kevin
Hi Ivar, I do have the AC/DC Module, but for 2D Axial Symmetry, I don't see any options to create a PML or even to make an infinite element. I have attached the Comsol file I'm using. This design has 9 cylindrical magnets in which the direction of the magnetization rotates for each magnet (similar to a Halbach array). Each magnet is very small: 0.00625 m by 0.00625 m. Currently the rectangle for air is comparatively much much larger: 1 m x 1 m. However when I increase the dimensions of the larger rectangle to 3 m x 3 m, I get values for the field that are different by a factor of 10. This doesn't make any sense to me. When the dimensions for the air rectangle are already much much larger than the magnets, I would think that increasing the dimensions of the air rectangle should not have much of an effect on the solution for the fields. If you had any ideas on what is wrong, I would greatly appreciate it. Thank you, Kevin


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 24.02.2010, 03:33 GMT-5
Hi

I believe your problem is that you have defined M0 as a "subdoman integration" and not as a constant, which means that the larger you make your "air surrounding" the more magnetised are your magnets.

And you are using the COMSOL standard AC "qa" application mode, while the PML are only dfined in the "emqa" ACDC add-on application mode

So if you correct your M0 definition and reduces the air to some 20-30 cm around your magnets it should do, even without the PML as with the orientation of yoursmall magnets, the loss flux is very low and loop around very locally.

I have joined a model with PML, its not fully yours, I continued to play a little, and I'm noting that as you are in 2D axi, your true magnets loop around with different areas, and their total volume to is different related to "r", so the filed lines are not 100% what my intuition would say, I guess (haven't tried) that if you go for a 2D model with equally sized magnets your field pattern will be more symmetric

I hope you can continue to have fun with this example
Ivar
Hi I believe your problem is that you have defined M0 as a "subdoman integration" and not as a constant, which means that the larger you make your "air surrounding" the more magnetised are your magnets. And you are using the COMSOL standard AC "qa" application mode, while the PML are only dfined in the "emqa" ACDC add-on application mode So if you correct your M0 definition and reduces the air to some 20-30 cm around your magnets it should do, even without the PML as with the orientation of yoursmall magnets, the loss flux is very low and loop around very locally. I have joined a model with PML, its not fully yours, I continued to play a little, and I'm noting that as you are in 2D axi, your true magnets loop around with different areas, and their total volume to is different related to "r", so the filed lines are not 100% what my intuition would say, I guess (haven't tried) that if you go for a 2D model with equally sized magnets your field pattern will be more symmetric I hope you can continue to have fun with this example Ivar


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 25.02.2010, 01:10 GMT-5
Hi Ivar,

Thanks for your help again. If possible, I would also like to test this example in 3D to confirm these calculations.

The problem I am running into in 3D is that the magnetization must be specified in Cartesian coordinates (x,y,z). Thus for magnets with magnetization in the radial direction, the magnetization in the x-direction and y-direction need to be functions of theta (where theta is the angle on the x-y axis). Do you know if there is a way I can define magnetizations as a function of theta?

Thanks for your all of your help,
Kevin
Hi Ivar, Thanks for your help again. If possible, I would also like to test this example in 3D to confirm these calculations. The problem I am running into in 3D is that the magnetization must be specified in Cartesian coordinates (x,y,z). Thus for magnets with magnetization in the radial direction, the magnetization in the x-direction and y-direction need to be functions of theta (where theta is the angle on the x-y axis). Do you know if there is a way I can define magnetizations as a function of theta? Thanks for your all of your help, Kevin

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 25.02.2010, 02:00 GMT-5
Hi

You need to define a local "cylindrical coordinates" and then you define along "r", there are different discussion on this search for "torque load" and "torsional moment" on the forum and "spherical coordinates" in the knoweledge base and the forum. The structural torque load is a good example of setting up local cylindrical coordinates. (basically r=sqrt(x^2+y^2)) but then youneed to be sure you get the sign correct too.

be aware that your model will become "heavy" when you go to 3D

Good luck
Ivar
Hi You need to define a local "cylindrical coordinates" and then you define along "r", there are different discussion on this search for "torque load" and "torsional moment" on the forum and "spherical coordinates" in the knoweledge base and the forum. The structural torque load is a good example of setting up local cylindrical coordinates. (basically r=sqrt(x^2+y^2)) but then youneed to be sure you get the sign correct too. be aware that your model will become "heavy" when you go to 3D Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 08.03.2010, 11:34 GMT-5

Hi Ivar,

Just a quick question since you seem to know a lot about axisymmetric models. Is there a way to rotate the coordinate plane so that the axis is horizontal instead of vertical? ie - r is the horizontal axis and z is the vertical axis?

Thanks,
Jeff
Hi Ivar, Just a quick question since you seem to know a lot about axisymmetric models. Is there a way to rotate the coordinate plane so that the axis is horizontal instead of vertical? ie - r is the horizontal axis and z is the vertical axis? Thanks, Jeff

Mohammed Noorul Hussain

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 29.04.2015, 05:44 GMT-4
I have the same question as Jeffrey C. Boulware, Ivar can you please reply?
I have the same question as Jeffrey C. Boulware, Ivar can you please reply?

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: 9 years ago 29.04.2015, 15:12 GMT-4
Hi

no not from my knowledge, COMSOL is "hard wired" with the axis of the 2D-axi aligned vertically r,phi,z (with phi into the paper/screen) r, horizontal, z vertical.

but why is that so important ?
It's just a question of rotating your mind/vision by 90°, our brain is malleable enough to accept that, no ?

--
Good luck
Ivar
Hi no not from my knowledge, COMSOL is "hard wired" with the axis of the 2D-axi aligned vertically r,phi,z (with phi into the paper/screen) r, horizontal, z vertical. but why is that so important ? It's just a question of rotating your mind/vision by 90°, our brain is malleable enough to accept that, no ? -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 25.03.2016, 05:07 GMT-4
Hello Ivar,
I want to model two magnets in Comsol. I'd want one of these magnets to have radial magnetization, and the other one to have azimuthal magnetization. Pls could you explain to me how to go about it.

I tried using cylindrical axis and putting the values of B, i.e remanence, at the r and phi boxes for the radial and azimuthal magnetizations, respecrively, but it didn't work.

Pls I'd appreciate it if you could speeedily help me out; I've been battling with this issue for weeks now....

Thanks

Adah
Hello Ivar, I want to model two magnets in Comsol. I'd want one of these magnets to have radial magnetization, and the other one to have azimuthal magnetization. Pls could you explain to me how to go about it. I tried using cylindrical axis and putting the values of B, i.e remanence, at the r and phi boxes for the radial and azimuthal magnetizations, respecrively, but it didn't work. Pls I'd appreciate it if you could speeedily help me out; I've been battling with this issue for weeks now.... Thanks Adah

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.