diff options
Diffstat (limited to 'Fundamental_Of_Physics_by_D_Haliday/28-Circuits.ipynb')
-rw-r--r-- | Fundamental_Of_Physics_by_D_Haliday/28-Circuits.ipynb | 218 |
1 files changed, 218 insertions, 0 deletions
diff --git a/Fundamental_Of_Physics_by_D_Haliday/28-Circuits.ipynb b/Fundamental_Of_Physics_by_D_Haliday/28-Circuits.ipynb new file mode 100644 index 0000000..dde1bf5 --- /dev/null +++ b/Fundamental_Of_Physics_by_D_Haliday/28-Circuits.ipynb @@ -0,0 +1,218 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 28: Circuits" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 28.1: Sample_Problem_1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Given that\n", +"E1 = 4.4 //in Volts\n", +"E2 = 2.1 //in olts\n", +"r1 = 2.3 //in Ohm\n", +"r2 = 1.8 //in Ohm\n", +"R = 5.5 //in Ohm\n", +"\n", +"//Sample Problem 28-1a\n", +"printf('**Sample Problem 28-1a**\n')\n", +"i = poly(0, 'i')\n", +"p = E1 - E2 - i*r2 - i*R - i*r1\n", +"i = roots(p)\n", +"printf('The current in the circuit is equal to %fA\n', i)\n", +"\n", +"//Sample Problem 28-1b\n", +"printf('\n**Sample Problem 28-1b**\n')\n", +"Ve1 = E1 - i*r1\n", +"printf('The potential difference between the terminal of the battery is equal to %fV', Ve1)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 28.2: Sample_Problem_2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Given that\n", +"R1 = 20 //in Ohm\n", +"R2 = 20 //in Ohm\n", +"R3 = 30 //in Ohm\n", +"R4 = 8 //in Ohm\n", +"E = 12 //in Volts\n", +"\n", +"//Sample Problem 28-2a\n", +"printf('**Sample Problem 28-2a**\n')\n", +"R23 = R2*R3/(R2+R3)\n", +"Req = R1 + R23 + R4\n", +"i = poly(0, 'i')\n", +"i = E/Req\n", +"printf('The current through the battery is %fA\n', i)\n", +"\n", +"//Sample Problem 28-2b\n", +"printf('\n**Sample Problem 28-2b**\n')\n", +"i2 = i*R23/R2\n", +"printf('The current through R2 is %fA\n', i2)\n", +"\n", +"//Sample Problem 28-2c\n", +"printf('\n**Sample Problem 28-2c**\n')\n", +"i3 = i2*R2/R3\n", +"printf('The current through R3 is %fA', i3)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 28.3: Sample_Problem_3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Given that\n", +"E1 = 3.0 //in Volts\n", +"E2 = 6.0 //in Volts\n", +"R1 = 2.0 //in Ohm\n", +"R2 = 4.0 //in Ohm\n", +"\n", +"//Sample Problem 28-3\n", +"printf('**Sample Problem 28-3**\n')\n", +"function [f] = circuit(i)\n", +" f = zeros(2, 1)\n", +" //Using KVL in both the loops\n", +" f(1) = -i(1)*R1 - E1 - i(1)*R1 + E2 + i(2)*R2\n", +" f(2) = E2 + i(2)*R2 + (i(1)+i(2))*R1 - E2 + (i(1)+i(2))*R1\n", +"endfunction\n", +"i = fsolve([0,0], circuit)\n", +"printf('i1 = %fA\n', i(1))\n", +"printf('i2 = %fA\n', i(2))\n", +"printf('i3 = %fA', sum(i))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 28.4: Sample_Problem_4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Given that\n", +"rows = 140\n", +"n = 5000\n", +"E = 0.15 //in Volts\n", +"r = 0.25 //in Ohm\n", +"Rw = 800 //in Ohm\n", +"\n", +"//Sample Problem 28-4a\n", +"printf('**Sample Problem 28-4a**\n')\n", +"Rrow = n*r\n", +"Req = Rrow/rows\n", +"Erow = n*E\n", +"Eeq = (Erow/Rrow * rows)/(rows/Rrow)\n", +"I = Eeq/(Rw + Req)\n", +"printf('The magnitude of current produced in the water is %fA\n', i(1))\n", +"\n", +"//Sample Problem 28-4b\n", +"printf('\n**Sample Problem 28-4b**\n')\n", +"Irow = I/rows\n", +"printf('Current in each row is equal to %fA', Irow)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 28.5: Sample_Problem_5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Given that\n", +"C = 1 //(say)\n", +"R = 1 //(say)\n", +"\n", +"//Sample Problem 28-5a\n", +"printf('**Sample Problem 28-5a**\n')\n", +"//q = qo*e^(-t/(R*C))\n", +"//q = qo/2 when t = Tq\n", +"Tq = log(2)*R*C\n", +"printf('At t=%fT, the capacitor will be half charged\n', Tq)\n", +"\n", +"//Sample Problem 28-5b\n", +"printf('\n**Sample Problem 28-5b**\n')\n", +"//U = Uo*e^(-2*t(R*C))\n", +"//U = Uo/2 When t = Tu\n", +"Tu = log(2)/2*R*C\n", +"printf('At t=%fT, the enrgy stored will be half of its MAX value', Tu)" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |