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.

Boolean Operations in electrostatics with electric field

Please login with a confirmed email address before reporting spam

Hej guys:

I am little bit confused about Boolean Operations.

Example: 2 metal spheres in transformer oil, one with voltage, the other is grounded. calculate the electric field.

A. Set up 2 metal spheres and a cylinder as oil--> Form union(last step of geometry)
B. Set up 2 metal spheres and a cylinder as oil--> Boolean Operation(Union) --> Form union(last step of geometry)
C. Set up 2 metal spheres and a cylinder as oil--> Boolean Operation(Differences 2 spheres from Oil) --> Form union(last step of geometry)

In 2D calculations, A,B,C almost the same result.
In 3D calculations, A,B have the same result, C is almost double than A,B

Which one is correct in 3D ?


7 Replies Last Post 13 gen 2012, 07:20 GMT-5
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 12 gen 2012, 15:05 GMT-5
Hi

have you counted how many elements (domains) you have for A,B,C ? (check in the selection view) you might end up with 4or mode items instead of 3, then you might "double a domain" hence get different results

This depends also on the "keep original" options if it's checked or not in the difference

--
Good luck
Ivar
Hi have you counted how many elements (domains) you have for A,B,C ? (check in the selection view) you might end up with 4or mode items instead of 3, then you might "double a domain" hence get different results This depends also on the "keep original" options if it's checked or not in the difference -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 13 gen 2012, 02:34 GMT-5
hej Ivar:

Follow your suggestion, then I tried case D. Because in case C, i made the differences without keep input objects.
D. Set up 2 metal spheres and a cylinder as oil--> Boolean Operation(Differences 2 spheres from Oil keep input objects) --> Form union(last step of geometry)

Domains: A ,B, D has 3 domains. C has only 1 domain.

And in my opinion, In case C, even we have just 1 domain(oil), but this domain include the boundary condition of 2 metal spheres. Since i don't care about the electric filed inside metal. I just set voltage and grounded for these boundary. Then why the result for C is double than A,B,D ?



hej Ivar: Follow your suggestion, then I tried case D. Because in case C, i made the differences without keep input objects. D. Set up 2 metal spheres and a cylinder as oil--> Boolean Operation(Differences 2 spheres from Oil keep input objects) --> Form union(last step of geometry) Domains: A ,B, D has 3 domains. C has only 1 domain. And in my opinion, In case C, even we have just 1 domain(oil), but this domain include the boundary condition of 2 metal spheres. Since i don't care about the electric filed inside metal. I just set voltage and grounded for these boundary. Then why the result for C is double than A,B,D ?

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 13 gen 2012, 02:46 GMT-5
Hi

good question it's puzzeling (ask support ;)
Anyhow I'm not by my COMSOL WS today so I cannot test it out

--
Good luck
Ivar
Hi good question it's puzzeling (ask support ;) Anyhow I'm not by my COMSOL WS today so I cannot test it out -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 13 gen 2012, 02:50 GMT-5
still thank you anyway.
still thank you anyway.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 13 gen 2012, 03:18 GMT-5
I couldn't reproduce what you observed. I get the same result in all cases. Not surprisingly so: This is a very simple example (that even has an analytic solution, if I'm not mistaken), so there's no way that Comsol gets it wrong.

The model you posted doesn't really demonstrate the problem, it's only one of the three cases. (By the way, you can remove the mesh and solution before posting if you need to reduce the file size.) You didn't specify what "almost double" means. Where do you measure the electric field?

Without specifics, I can think of only one possible scenario. If you solve for the electric field only in the medium, without the metal, then the surface plot of the field shows the electric field at the surface, but in the medium. If you include the metal domains in the solving process and then plot the field on the surface, Comsol will display the average of the field on the boundary, which is then half of the earlier value because of the discontinuity from the actual value in the medium to zero field strength in the metal.
I couldn't reproduce what you observed. I get the same result in all cases. Not surprisingly so: This is a very simple example (that even has an analytic solution, if I'm not mistaken), so there's no way that Comsol gets it wrong. The model you posted doesn't really demonstrate the problem, it's only one of the three cases. (By the way, you can remove the mesh and solution before posting if you need to reduce the file size.) You didn't specify what "almost double" means. Where do you measure the electric field? Without specifics, I can think of only one possible scenario. If you solve for the electric field only in the medium, without the metal, then the surface plot of the field shows the electric field at the surface, but in the medium. If you include the metal domains in the solving process and then plot the field on the surface, Comsol will display the average of the field on the boundary, which is then half of the earlier value because of the discontinuity from the actual value in the medium to zero field strength in the metal.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 13 gen 2012, 07:18 GMT-5
Hej John:

Your answer :
If you include the metal domains in the solving process and then plot the field on the surface, Comsol will display the average of the field on the boundary, which is then half of the earlier value because of the discontinuity from the actual value in the medium to zero field strength in the metal.
seems reasonable.

And if we want keep metal domain, how can we show the result in the medium correctly ? Should we always double the final result?

Hej John: Your answer : If you include the metal domains in the solving process and then plot the field on the surface, Comsol will display the average of the field on the boundary, which is then half of the earlier value because of the discontinuity from the actual value in the medium to zero field strength in the metal. seems reasonable. And if we want keep metal domain, how can we show the result in the medium correctly ? Should we always double the final result?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 13 gen 2012, 07:20 GMT-5
You should use the up(...) or down(...) operator to tell Comsol which side of the boundary you're interested in. You'll find details in the documentation.
You should use the up(...) or down(...) operator to tell Comsol which side of the boundary you're interested in. You'll find details in the documentation.

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.