MADNESS
0.10.1
|
The source is here.
We wish to solve Laplaces's equation within a non-homogeneous medium, i.e., in which the permittivity is not constant, with an external electric field.
Expanding and rearranging yields,
We can interpret as the induced surface charge density.
MADNESS's default Coulomb Green's function ( ) corresponds to the free-space Dirichlet boundary condition . But we wish to impose the Neumann condition . Thus, we write our solution as the sum of the asymptotic solution ( ) and a component that goes to zero at infinity so that our MADNESS Green's function can be used. Substituting
our equation becomes
The quantity in parentheses is the total electric field — the sum of the applied field and that due to the induced surface charge.
The exact solution is readily derived by expanding in spherical harmonics and matching the potential and electric displacement at the surface, or by looking inside Jackson, or by a quick google to find this page.
(Note that while the Green's function to Poisson's equation is , MADNESS provides convolution with , so you have to keep track of the yourself.)
(Note that to obtain an accurate solution with you will need to increase the order of the wavelet and decrease the threshold, e.g., .