How to calculate electric field of arbitrary tetrahedron with uniform charge density at arbitrary point?

enter image description here

I got:

  • 4 tetrahedron vertices
  • total charge in Coulombs
  • point at which I want to compute E field vector

The point can be outside or inside the tetrahedron. The charge density is uniform across tetrahedron volume (not surface!).


This is not a homework. I'm writing a simulation program to simulate electric fields around and inside an object defined by its 3D mesh. The field to calculate is of all the protons in an object. It is assumed they are uniformly spread across entire volume. Imagine protons field only as if you removed all valence electrons from the metal, so each atom would have +1e charge. I was thinking about subdividing the mesh to smaller chunks (tetrahedrons) and adding each tetrahedron fields at particular point.


I came up with a solution for the inner field part if outside field equation is known. The idea is to check if the point at which we want compute the field is inside the tetrahedron. If it's not then we compute field regularly, if it's inside then we choose a plane containing one tetrahedron's edge (or any two vertices) and that point. This plane will split the tetrahedron into two smaller ones. We then compute and add fields of both of them. In this case point can be considered to be outside of each smaller tetrahedron, or lying on their surfaces.

  • $\begingroup$ This sounds like a nasty problem. The locations of the verticies are arbitrary? The observation point is arbitrary? It might help a little to know why you want to calculate this. $\endgroup$ – garyp Apr 28 '17 at 22:12
  • $\begingroup$ The answer I'm thinking of involves a triple integral. With integration variables inside a square root. And the bounds aren't that great either. I don't fancy solving it right now, sorry. $\endgroup$ – John Dvorak Apr 28 '17 at 22:15
  • $\begingroup$ For outside, you can do multipole expansion. If you keep sufficient order (octopole and beyond), you can get good approximation, even surprisingly close to the charge. $\endgroup$ – AHusain Apr 28 '17 at 22:24

Thanks for the edit. Now that we know that you are doing this numerically, the situation changes.

Your approach is fine. Subdivide the tetrahedron into small volume elements, calculate the field for each, and add vectorially. However, there is no need to actually make subdivisions, and they don't have to be tiny tetrahedra. Instead you can traverse a three-dimensional cubical grid within the volume of the tetrahedron. I'm not sure, but I think that would be much easier than trying to decimate the tetrahedron into smaller ones, unless you already have code that does that.

Start with a relatively coarse grid. Then make it finer by say, a factor of two, and compare the field generated by those two calculations. If your grid really was coarse, the two answers should be uncomfortably different. Continue making the grid finer and finer each time comparing to the previous grid. When the resulting grid stops changing to within some tolerable slop, stop. Your grid is fine enough; there will be no further gain by continuing, but computation time would go up.

  • $\begingroup$ Many thanks for the answer, but I think it won't be suitable for near real-time simulation. Another problem with that approach is that the grid will miss sharp corners or spikes unless we make it very fine. I found a solution for line segment (physicstasks.eu/659/charged-line-segment) and I think it is possible to derive solutions for finite surface and finite volume like tetrahedron, even if this will be a complex task. I just don't know how to start, or where to look. $\endgroup$ – Piotr Szturmaj Apr 30 '17 at 12:58
  • 1
    $\begingroup$ A closed-form solution, which is probably what you need for speed, will be difficult to come up with. The general case does not allow for the use of simplifying symmetries and approximations. Another option might be to set up the integrals, and find fast-converging series expressions for the integrals. This might be harder than finding closed form solutions. (@AHusain's idea is somewhat like that; consider it seriously). You could try to set up the complete integral, and look in a good table of integrals for ideas. Or try a CAS (Computer Algebra System). Sounds like a tough problem. $\endgroup$ – garyp Apr 30 '17 at 18:43
  • $\begingroup$ Thanks. I have one more idea. Is it possible to calculate electric potentials at each vertex and then derive the field from them? At least I will be able to precompute them because vertices are fixed. $\endgroup$ – Piotr Szturmaj Apr 30 '17 at 20:52
  • $\begingroup$ Yes, but I don't yet see what you have in mind. You will have the potential at each of the four verticies. What will you do with that information? $\endgroup$ – garyp Apr 30 '17 at 21:11
  • $\begingroup$ I know it is possible to compute E field vector at any point given potentials only. The question is if that potentials will give good result. $\endgroup$ – Piotr Szturmaj Apr 30 '17 at 21:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.