# Discussion Forum

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.

## Differences among 2D and 3D results for electroamgnetic problem

Hi,

I`m doing the same electromagnetic easy problem in 2D axisymmetric and 3D. I want to obtain the values of the magnetic field around a wire. For both cases I`ve modeled a wire and an air. I`ve introduce a external current. In both cases I`ve results. However, for the same point in each simulations the values are differents. Somebody know why exist this difference?

thank u!

Jon

9 Replies Last Post Oct 29, 2010, 11:13 AM EDT

Jon,

there may be several reasons:

- Your mesh is probably different in both cases
- In 2D your wire is infinitely long and you dont see effects from the ends, in 3D it is probably finite.

Are the differences large?

Best regards
Edgar

Hi Edgar,

The difference ara very large. The error is %99.8. Respect your answers:

"- Your mesh is probably different in both cases"
The mesh in both cases are different, true. By the way, I´ve tried to miminize the mesh size as mush as I have been able to do but the error doesn`t decrease.

"- In 2D your wire is infinitely long and you dont see effects from the ends, in 3D it is probably finite"
I`ve done 2D axisymmetric model. So, I don´t think that this is the reason. No?

Thank you very much for answer me.

Best regards,

Jon

Jon,

so you are modeling a circular wire loop. Which way did you define the current in the 3D loop?

Regards
Edgar

Hi,

I introduce the external current density in 2D as:

Je--> r = 0
phi = J0
z = 0

and in 3D as:

Je--> x = J0*y/sqrt(x^2+y^2)
y = J0*x/sqrt(x^2+y^2)
z = 0

regards,

Jon

Hi,

I introduce the external current density in 2D as:

Je--> r = 0
phi = J0
z = 0

and in 3D as:

Je--> x = J0*y/sqrt(x^2+y^2)
y = J0*x/sqrt(x^2+y^2)
z = 0

regards,

Jon

I think it is just a minus that is missing:

Je--> x = -J0*y/sqrt(x^2+y^2)
y = J0*x/sqrt(x^2+y^2)
z = 0

You can check visually by plotting an arrow plot of the current density field.

Best regards
Edgar

Hi Edgar,

I have done that you told me and the error between 2D and 3D has decreased. Nevertheless, I have an error of %49 yet.

Regards,

Jon

Hi

if you are using MEF in V4.0a and you have a factor "2" between external current induced flux obtained by COMSOL and your analytical calculations then try using "MF" instead. (This applies also to the early 4.1.0.74 for me)

I'm waiting for a reply from the COMSOL developers as I suspect a typo behind there, check the equations. There is something I do not catch, and it took me some time to identify what could be wrong.
It's the same with a sign issue on M or Br defined magnets, but this could also be a convention issue that has been changed

--
Good luck
Ivar

Hi Ivar,

Of course, I am using V4.0a. I have done both simulation (2Daxi and 3D) in MF and error for Hz is less than %1. ( I had done 2D axisymmetric simulation in MEF and 3D in MF). Great!

However, now I have a new question. For this 2D axisymmetric problem, if I use either MF or MEF, the differences between them is the %50. Why?

What is the difference between MF and MEF?

Jon