diff options
Diffstat (limited to 'Elements_of_Electromagnetics/chapter_6.ipynb')
-rw-r--r-- | Elements_of_Electromagnetics/chapter_6.ipynb | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/Elements_of_Electromagnetics/chapter_6.ipynb b/Elements_of_Electromagnetics/chapter_6.ipynb new file mode 100644 index 00000000..21f353b6 --- /dev/null +++ b/Elements_of_Electromagnetics/chapter_6.ipynb @@ -0,0 +1,80 @@ +{
+ "metadata": {
+ "name": "chapter_6.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 6: Electrostatic Boundary Value Problems<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.12, Page number: 238<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Determine the capacitance of each of the capacitors in Figure 6.20.\n",
+ "Take epsilon_r1 = 4, epsilon_r2 = 6, d = 5 mm, S = 30 cm^2 '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "e0=10**-9/(36*scipy.pi) #Permittivity of free space in Farad/m\n",
+ "er1=4 #Relative permittivity of material 1 (dimensionless)\n",
+ "er2=6 #Relative permittivity of material 2 (dimensionless)\n",
+ "d=5*10** -3 #The spacing between the capacitor plates in m\n",
+ "S=30*10** -4 #The surface area of the plates\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Calculation for Capacitor 1\n",
+ "\n",
+ "C1=e0*er1*S*2/d #Capacitance in Farads\n",
+ "C2=e0*er2*S*2/d #Capacitance in Farads\n",
+ "Ca=C1*C2/(C1+C2) #Total capacitance in Farads\n",
+ "\n",
+ "#Calculation for Capacitor 2\n",
+ "\n",
+ "C1= e0*er1*S/(2*d) #Capacitance in Farads\n",
+ "C2= e0*er2*S/(2*d) #Capacitance in Farads\n",
+ "Cb= C1+C2 #Total capacitance in Farads\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'The capacitance of capacitor 1 =',round(Ca*10**12,2),'pF'\n",
+ "print 'The capacitance of capacitor 2 =',round(Cb*10**12,2),'pF'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The capacitance of capacitor 1 = 25.46 pF\n",
+ "The capacitance of capacitor 2 = 26.53 pF\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |