1

I am working on a program that can essentially determine the electrostatic field of some arbitrarily shaped mesh with some surface charge. To test my program I make use of a cube whose left and right faces are oppositely charged.

I use a finite element method (FEM) that discretizes the object's surface into triangles and gives to each triangle 3 integration points (see below figure, bottom-left and -right). To obtain the field I then simply sum over all these points, whilst taking into account some weight factor (because not all triangles have the same size).

In principle this works all fine, until I get too close to a triangle. Since three individual points are not the same as a triangular surface, the program breaks and gives these weird dots. (block spots precisely between two integration points).

Below you see a figure showing the simulation of the field (top left), the discretized surface mesh (bottom left). The picture in the middle depicts what you see when you zoom in on the surface of the cube. The right-most picture shows qualitatively how the integration points are distributed on a triangle.

enter image description here

Because the electric field of one integration point always points away from that point, two neighbouring points will cancel each other out since their vectors aim in the exact opposite direction. Of course what I need instead is that both vectors point away from the surface instead.

I have tried many solutions, mostly around the following points:

  • Patching the regions near an integration point with a theoretically correct uniform field pointing away from the surface.
  • Reorienting the vectors only nearby the integration point to manually put them in the right direction.
  • Apply a sigmoid or other decay function to make the above look more smooth.

Though, none of the methods above allow me to properly connect the nearby and faraway regions.

I guess what might work is some method to extrapolate the correct value from the surroundings. Though, because of the large number of computations, I moved the simulation the my GPU, which means that I have to be careful allowing two pixels to write to each other.

Either way, my question here is as follows:

What would be a good way to smooth out my results? That is, I need a more accurate description of my model when I get closer to a triangle.

As a final note I want to add that it is not my goal to simply obtain a smooth image. Later in the program I need this data to determine the response of a conducting material, which is where these black dots internally become a real pain...

Thank you for your help !!!

jeussa
  • 45
  • 4
  • Why can't you get the field value at each node, including the contribution of each element, instead of the integration points? Is it because voltage is the node degree of freedom, and electric field is derived at integration points from gradients, similar to displacements at nodes and stress/strain at integration points for mechanical problems? Why not calculate average field values at nodes from surrounding elements? – duffymo Mar 14 '22 at 19:02
  • I this a higher-order triangular element? Why three integration points? I would have guessed a linear element would mean a constant gradient, necessitating only a single Gauss point at the centroid. – duffymo Mar 14 '22 at 19:07
  • @duffymo the problem to solve is only mathematically identical to an electrostatic problem involving only surface charge densities. (In reality this is a magnetic field problem, but nevermind about that..) This allows me to avoid derivatives, making the problem to solve much simpler. For integrating in FEM I can choose to make use of either 3 or 6 points per triangle. Though, both give the same problem. – jeussa Mar 16 '22 at 08:24

0 Answers0