# Current densities in a 3D object

What is a smart way to calculate current densities in 3D objects with unorthodox boundary conditions?

For example, J(x,y,z) in a cube with constant resistivity with applied voltages Va in a vertex and Vb in a plane? Assuming these are constant voltages, you need to solve Laplace’s equation, $$\nabla^2 \phi = 0,$$ for the potential $$\phi$$, with appropriate boundary conditions. That gives you the electric field, $$\mathbf{E} = -\nabla \phi,$$ from which you get the current density by Ohm’s law in differential form $$\mathbf{J} = \sigma \mathbf{E},$$ where $$\sigma$$ is the conductivity, assumed constant throughout the volume. Boundary conditions may be Dirichlet $$\phi = \phi_0$$ (constant voltage) or Neumann $$\partial \phi/\partial n = c$$, in which the normal derivative of the potential is specified. In particular, when the medium adjacent to the object is non-conductive, no current can flow into it and the corresponding boundary condition is $$\partial \phi/ \partial n = 0$$.
• When the current flow is stationary, you have from the continuity equation div J = 0. Inserting into this equation Ohm’s law and $E =-\nabla \phi$, you obtain $\nabla \cdot (\sigma(r)\nabla \phi) = 0$, which is a generalization of Laplace’s equation. – Amit Hochman Oct 15 at 14:20