summaryrefslogtreecommitdiff
path: root/Electrical_Network_by_R._Singh/Chapter8_1_1.ipynb
diff options
context:
space:
mode:
authorTrupti Kini2016-06-19 23:30:31 +0600
committerTrupti Kini2016-06-19 23:30:31 +0600
commitbcfdba28ef6597f80f5cac083492c27daac80b35 (patch)
treec90924d5f2850aac781d9034fa197f8276f0d35a /Electrical_Network_by_R._Singh/Chapter8_1_1.ipynb
parentd8aa31632d10cab5a599115290a6c702512a3cd5 (diff)
downloadPython-Textbook-Companions-bcfdba28ef6597f80f5cac083492c27daac80b35.tar.gz
Python-Textbook-Companions-bcfdba28ef6597f80f5cac083492c27daac80b35.tar.bz2
Python-Textbook-Companions-bcfdba28ef6597f80f5cac083492c27daac80b35.zip
Added(A)/Deleted(D) following books
A Electrical_Network_by_R._Singh/Chapter10_1_1.ipynb A Electrical_Network_by_R._Singh/Chapter11_1_1.ipynb A Electrical_Network_by_R._Singh/Chapter12_1_1.ipynb A Electrical_Network_by_R._Singh/Chapter1_1_1.ipynb A Electrical_Network_by_R._Singh/Chapter2_1_1.ipynb A Electrical_Network_by_R._Singh/Chapter3_1_1.ipynb A Electrical_Network_by_R._Singh/Chapter4_1_1.ipynb A Electrical_Network_by_R._Singh/Chapter6_1_1.ipynb A Electrical_Network_by_R._Singh/Chapter7_1_1.ipynb A Electrical_Network_by_R._Singh/Chapter8_1_1.ipynb A Electrical_Network_by_R._Singh/screenshots/Chapter4.png A Electrical_Network_by_R._Singh/screenshots/Chapter6.png A Electrical_Network_by_R._Singh/screenshots/Chapter7.png A sample_notebooks/VinayBadhan/sample.ipynb
Diffstat (limited to 'Electrical_Network_by_R._Singh/Chapter8_1_1.ipynb')
-rw-r--r--Electrical_Network_by_R._Singh/Chapter8_1_1.ipynb124
1 files changed, 124 insertions, 0 deletions
diff --git a/Electrical_Network_by_R._Singh/Chapter8_1_1.ipynb b/Electrical_Network_by_R._Singh/Chapter8_1_1.ipynb
new file mode 100644
index 00000000..f72a22fd
--- /dev/null
+++ b/Electrical_Network_by_R._Singh/Chapter8_1_1.ipynb
@@ -0,0 +1,124 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:443594b95e4699aa829647ef6201862e165405ad0d20cad94e2fc280e9a33ca5"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter8-Transient Analysis"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex13-pg8.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##Transient analysis\n",
+ "##pg no - 8.17\n",
+ "##example no - 8.13\n",
+ "import math\n",
+ "import numpy\n",
+ "a=((10.*30.)/(10.+30.));\n",
+ "d=5./a;\n",
+ "b=0.;\n",
+ "c=5.*(20./30.);\n",
+ "print\"%s %.2f %s\"%(\"iL(0-) = \",d,\" A\");\n",
+ "print\"%s %.2f %s\"%(\"\\nvb(0-) = \", b,\"\");\n",
+ "print\"%s %.2f %s\"%(\"\\nva(0-) = \",c,\" V\");\n",
+ "print(\"Applying Kcl equations at t=0+\");\n",
+ "print(\"((va(0+)-5)/10)+(va(0+)/10)+(va(0+)-vb(0+))/20 = 0\"); ##equation 1\n",
+ "print(\"((vb(0+)-va(0+))/20)+((vb(0+)-5)/10)+(2/3) = 0\"); ##equation 2\n",
+ "##solving 1 and 2\n",
+ "M=numpy.matrix([[0.25, -0.05],[-0.05, 0.15]]);\n",
+ "N=numpy.matrix([[0.5], [-0.167]]);\n",
+ "\n",
+ "X=numpy.dot(numpy.linalg.inv(M),N);\n",
+ "print[X]\n",
+ "print(\"va(0+)= 1.9 A\");\n",
+ "print(\"vb(0+)= -0.477 A\");\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "iL(0-) = 0.67 A\n",
+ "\n",
+ "vb(0-) = 0.00 \n",
+ "\n",
+ "va(0-) = 3.33 V\n",
+ "Applying Kcl equations at t=0+\n",
+ "((va(0+)-5)/10)+(va(0+)/10)+(va(0+)-vb(0+))/20 = 0\n",
+ "((vb(0+)-va(0+))/20)+((vb(0+)-5)/10)+(2/3) = 0\n",
+ "[matrix([[ 1.90428571],\n",
+ " [-0.47857143]])]\n",
+ "va(0+)= 1.9 A\n",
+ "vb(0+)= -0.477 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex14-pg8.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##Transient analysis\n",
+ "##pg no - 8.17\n",
+ "##example no - 8.13\n",
+ "print(\"va(0+) = 5V\");\n",
+ "print(\"vb(0+) = 5V\");\n",
+ "print(\"vb(0+) = 5V\");\n",
+ "print(\"Writing KCL Equation at t=0+\");\n",
+ "print(\"0.25*va(0+) = 0.75\");\n",
+ "x=(0.75)/(0.25);\n",
+ "print\"%s %.2f %s\"%(\"va(0+) = \",x,\" V\");"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "va(0+) = 5V\n",
+ "vb(0+) = 5V\n",
+ "vb(0+) = 5V\n",
+ "Writing KCL Equation at t=0+\n",
+ "0.25*va(0+) = 0.75\n",
+ "va(0+) = 3.00 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file