Imagine that you transfer some charge on a wire and you wish to find how that charge is distributed on it (Spoiler Alter; it’s not distributed uniformly along the length of the wire). How would you do that?
First of all, you need to know the potential (or voltage) that it creates. In the real world, this is the cause of the charge transfer (for example, a battery is characterized by its ability to create a voltage difference between its terminals). In our case, let’s assume the wire is alone in space and has a charge distribution such that it produces a voltage difference between the wire and infinity. In other words, we need to spend joules of energy if we were to transfer a point charge from infinity to the wire’s surface.
We now wish to find the potential created by this charged wire in an arbitrary point in space. This is given by the following known formula from electrostatics
where is the distance between the charge density and the observation point given by the following equation
The integration takes place everywhere in space where the charge density is not zero. In other words, if one wishes to find the charge distribution on the wire, equation (1) must be solved. However, this is not an easy task, since is the integrand. An alternative is to seek a numerical solution.
The wire is made out of perfectly conducting metal so it can be regarding as equipotential. Now, let’s assume that its radius is very thin and the charge is located on a line on its surface. The observation point will be the axis of the wire, where we know the potential. In addition, suppose we can write as
where are arbitrary coefficients that need to be determined and is given by the following formula
where is the length of the wire and [/math] N [/math] is the number of segments that we have partitioned the wire.
The careful reader can immediately see the meaning behind equations (3) and (4). The wire has been separated in pieces and gives the charge distribution (in Coulombs per meter) for the k-th segment.
We can align the wire to the x-axis, so equation (2) becomes
where is the radius of the wire.
After all these changes equation (1) becomes
This is a linear equation with unknowns, but for a particular observation point. We can construct an invertible matrix, if we take into account additional observation points, that need to be linearly independent, so they cannot belong to the same segment.
A MATLAB function was written to demonstrate the feasibility of this technique, also known as Method of Moments. It accepts as inputs the length of the wire, the number of segments, the voltage of the wire and its radius. The output is a plot depicting the charge density of the wire along its length.
function charge_on_wire(length, number_of_segments, voltage, wire_radius) l=length; nos=number_of_segments; v=voltage; wr=wire_radius; for m=1:1:nos for k=1:1:nos fun = @(x) 1./sqrt(((l./(2.*nos))+(l.*(m-1)./nos)-x).^2+wr.*wr); Z(k,m)=integral(fun,(k-1)/nos,k*l/nos); end end b=ones(nos,1); b=b*v*4*pi*8.854*10^-12; A=Z\b; for i=0:l/nos:l*(1-1/nos) y(int64(1+i*nos/l))=i; end plot(y,A);
The plot for a wire of unit length, unit voltage, radius of 1 millimeter and partitioned in 50 segments can be seen below. It confirms the widely known rule of thumb, that charge tends to get concentrated at the edges of a structure.