Jan 17, 2011

Mathematica Fun"s":Solving Electromagnetic HW4 Prob2

Question:
Write a program, based on finite difference method, to find the Capacitance per unit length of the following structure, accurately to three significant digits. The conductor at the center has a width of 2w. The conducting enclosure is 9w in width and 5w in height, as shown in the figure. The structure is infinite in extension perpendicular to the page.

pictures in my report:





This is the 2nd program I wrote this semester, since I became more familiar with writing Mathematica code then so the efficiency is much better despite the fact that the 2nd program was more complicated than the 1st one. I still remember that I spent days writing this program&document and felt exhausted afterwards XD!
Here is my main idea of the program: Assume that there will be 0.04 nano Coul on inner conductor and -0.04nC on outer conductor, using the concept of superposition
(1)Take out -0.04nC on outer conductor, using moment method to calculate the voltage(Vin1) induced by +0.04nC on inner conductor. After that, use finite difference method to calculate the voltage(Vout1) induced by +0.04nC on outer conductor.
(2)Similarly, take out +0.04nC on inner conductor and use moment method+finite difference method to find out the voltage(Vin2) on inner conductor and voltage(Vout2) on outer conductor, both produced by -0.04nC.
(3)The real value of voltage of inner conductor Vin=Vin1+Vin2, and the true voltage of outer conductor is Vout=Vout1+Vout2
(4)Capacitance per unit length=(0.04nC/cm)/(Vin-Vout)

The main question I had for this program is that I'm not 100% sure that I can use superposition to calculate the voltage(i.e. Vin1,Vin2,Vout1,Vout2), since the steady-state charge distribution on either inner or outer conductor will be affected by charges on both of inner&outer conductor. But I tried to present this effect by step (3), so it should be ok(it should be Okay!?).

Note: Be ware!! The result I got from this program was 2 times what one of my friend got, so I'm not really sure which one of us got the correct result since we use 2 totally different methods.


The report in Mathematica:
http://www.megaupload.com/?d=GJA8CELZ
The report in pdf:
http://www.megaupload.com/?d=K7IBHMR6