summaryrefslogtreecommitdiff
path: root/sample_notebooks/AnkitKumar
diff options
context:
space:
mode:
Diffstat (limited to 'sample_notebooks/AnkitKumar')
-rw-r--r--sample_notebooks/AnkitKumar/Ch16.ipynb364
1 files changed, 364 insertions, 0 deletions
diff --git a/sample_notebooks/AnkitKumar/Ch16.ipynb b/sample_notebooks/AnkitKumar/Ch16.ipynb
new file mode 100644
index 00000000..86539c04
--- /dev/null
+++ b/sample_notebooks/AnkitKumar/Ch16.ipynb
@@ -0,0 +1,364 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 16 : Electrical Energy & Capacitance"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.1 Page No : 533"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The value of E = 4000.00 v/m\n"
+ ]
+ }
+ ],
+ "source": [
+ "v_bminusv_a=-12\n",
+ "d=0.3*10**-2#in m\n",
+ "E=-(v_bminusv_a)/d\n",
+ "print \"The value of E = %0.2f v/m\"%E"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.2 Page No : 533"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "solution a\n",
+ "Electric potential from A to B = -40000.00 V\n",
+ "solution b\n",
+ "Change in electric potential = -0.00 joules\n",
+ "velocity = 2768514.16 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "print \"solution a\"\n",
+ "E=8*10**4#in V/m\n",
+ "d=0.5#in m\n",
+ "delta_V=-E*d\n",
+ "print \"Electric potential from A to B = %0.2f V\"%delta_V\n",
+ "print \"solution b\"\n",
+ "q=1.6*10**-19#in C\n",
+ "delta_PE=q*delta_V\n",
+ "print \"Change in electric potential = %0.2f joules\"%delta_PE\n",
+ "m_p=1.67*10**-27#in kg\n",
+ "vf=sqrt((2*-delta_PE)/m_p)\n",
+ "print \"velocity = %0.2f m/s\"%vf"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.3 Page No: 534"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Solution a\n",
+ "Magnitude of V1 = 112375.00 v\n",
+ "Magnitude of V2 = -35960.00 v\n",
+ "solution b\n",
+ "Magnitude of Vp = 76415.00 v\n",
+ "work done = 0.31 Joule\n"
+ ]
+ }
+ ],
+ "source": [
+ "k_e=8.99*10**9 #N.m**2/c**2\n",
+ "q1=5*10**-6# in C\n",
+ "q2=-2*10**-6#in C\n",
+ "r1=0.4\n",
+ "r2=0.5\n",
+ "V1=(k_e*q1)/(r1)\n",
+ "V2=(k_e*q2)/(r2)\n",
+ "print \"Solution a\"\n",
+ "print \"Magnitude of V1 = %0.2f v\"%V1\n",
+ "print \"Magnitude of V2 = %0.2f v\"%V2\n",
+ "print \"solution b\"\n",
+ "vp=V1+V2\n",
+ "print \"Magnitude of Vp = %0.2f v\"%vp\n",
+ "q3=4*10**-6#in C\n",
+ "w=vp*q3\n",
+ "print \"work done = %0.2f Joule\"%w"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.4 Page No: 535"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Capacitance = 1.77e-12 farad\n"
+ ]
+ }
+ ],
+ "source": [
+ "e0=8.85*10**-12#in c2/N.m2\n",
+ "A=2*10**-4#in m2\n",
+ "d=1*10**-3#in m\n",
+ "c=(e0*A)/d\n",
+ "print \"Capacitance = %0.2e farad\"%c"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.5 Page No : 535"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "capacitance = 4.50e-05 farad\n",
+ "voltage between battery = 2.16e-04 c\n"
+ ]
+ }
+ ],
+ "source": [
+ "c1=3*10**-6\n",
+ "c2=6*10**-6\n",
+ "c3=12*10**-6\n",
+ "c4=24*10**-6\n",
+ "delta_v=18\n",
+ "c_eq=c1+c2+c3+c4\n",
+ "print \"capacitance = %0.2e farad\"%c_eq\n",
+ "q=delta_v*c3\n",
+ "print \"voltage between battery = %0.2e c\"%q"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.6 Page No : 536"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "solution a\n",
+ "capacitance = 1.60e-06 farad\n",
+ "solution b\n",
+ "voltage between battery = 2.88e-05 c\n"
+ ]
+ }
+ ],
+ "source": [
+ "c1=3*10**-6\n",
+ "c2=6*10**-6\n",
+ "c3=12*10**-6\n",
+ "c4=24*10**-6\n",
+ "delta_v=18\n",
+ "print \"solution a\"\n",
+ "c_eq=1/((1/c1)+(1/c2)+(1/c3)+(1/c4))\n",
+ "print \"capacitance = %0.2e farad\"%c_eq\n",
+ "q=delta_v*c_eq\n",
+ "print \"solution b\"\n",
+ "print \"voltage between battery = %0.2e c\"%q"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.7 Page No: 536"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "solution a\n",
+ "capacitance = 2.00e-06 farad\n"
+ ]
+ }
+ ],
+ "source": [
+ "c1=4*10**-6\n",
+ "c2=4*10**-6\n",
+ "print \"solution a\"\n",
+ "c_eq=1/((1/c1)+(1/c2))\n",
+ "print \"capacitance = %0.2e farad\"%c_eq"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.8 Page No: 537"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "solution a\n",
+ "Energy stored = 4671 volt\n",
+ "solution b\n",
+ "power = 240000 watt\n"
+ ]
+ }
+ ],
+ "source": [
+ "Energy=1.2*10**3#in J\n",
+ "c=1.1*10**-4#in f\n",
+ "delta_v=sqrt((2*Energy)/c)\n",
+ "print \"solution a\"\n",
+ "print \"Energy stored = %0.f volt\"%delta_v\n",
+ "print \"solution b\"\n",
+ "Energy_deliverd=600#in j\n",
+ "delta_t=2.5*10**-3#in s\n",
+ "p=(Energy_deliverd)/delta_t\n",
+ "print \"power = %0.f watt\"%p"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.9 Page No: 538"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "solution a\n",
+ "Capacitance = 1.96e-11 farad\n",
+ "solution b\n",
+ "Voltage = 16000.0 volt\n",
+ "Maximum charge = 3.14e-07 columb\n"
+ ]
+ }
+ ],
+ "source": [
+ "k=3.7\n",
+ "e0=8.85*10**-12#in c2/N.m2\n",
+ "A=6*10**-4#in m2\n",
+ "d=1*10**-3#in m\n",
+ "c=(k*e0*A)/d\n",
+ "print \"solution a\"\n",
+ "print \"Capacitance = %0.2e farad\"%c\n",
+ "print \"solution b\"\n",
+ "E_max=16*10**6#in v/m\n",
+ "delta_v_max=E_max*d\n",
+ "print \"Voltage = %0.1f volt\"%delta_v_max\n",
+ "Q_max=delta_v_max*c\n",
+ "print \"Maximum charge = %0.2e columb\"%Q_max"
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}