{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 21: Elecromagnetics" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Ex21.1:pg-1037" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The Wavelength of the Electromagnetic wave is lamda= 294.0 meters\n" ] } ], "source": [ " #Example 21_1\n", "import math \n", " \n", " #To find the wavelength of the electromagnetic wave\n", "v=3*10.0**8 #Units in meters/sec\n", "f=1.02*10**6 #Units in Hz\n", "lamda=v/f #Units in Meters\n", "print \"The Wavelength of the Electromagnetic wave is lamda=\",round(lamda),\" meters\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Ex21.2:pg-1038" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The value of the magnetic field is Bo=\n", "1.4e-11\n", "T\n" ] } ], "source": [ " #Example 21_2\n", "import math \n", " \n", " #To find the value of magnetic field\n", "eo=4.2*10**-3 #units in V/m\n", "c=3*10**8 #Units in meters/sec\n", "bo=eo/c #Units in T\n", "print \"The value of the magnetic field is Bo=\"\n", "print bo\n", "print \"T\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Ex21.3:pg-1039" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The value of Eo= 0.02448 N/C\n", " The value of Bo= 8.16124749653e-11\n", "T\n" ] } ], "source": [ " #Example 21_3\n", "import math \n", " #To find the values of Eo and Bo in the wave\n", "power=1000 #Units in W\n", "r=10000 #units in meters\n", "area=4*math.pi*r**2 #units in meter**2\n", "P_a=power/area #unts in W/meter**2\n", "c=3*10**8 #units in meters/sec\n", "eeo=8.85*10**-12 #units in C**2/N*meter**2\",round( ,5),\" \n", "eo=math.sqrt((2*P_a)/(c*eeo)) #units in N/C\n", "bo=eo/c #Units in T\n", "print \"The value of Eo=\",round(eo,5),\" N/C\\n The value of Bo=\",\n", "print bo\n", "print \"T\"\n" ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.11" } }, "nbformat": 4, "nbformat_minor": 0 }