diff options
Diffstat (limited to 'Engineering_Physics/chapter8_2.ipynb')
-rw-r--r-- | Engineering_Physics/chapter8_2.ipynb | 156 |
1 files changed, 138 insertions, 18 deletions
diff --git a/Engineering_Physics/chapter8_2.ipynb b/Engineering_Physics/chapter8_2.ipynb index c344140a..2dc13b1f 100644 --- a/Engineering_Physics/chapter8_2.ipynb +++ b/Engineering_Physics/chapter8_2.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "chapter8" + "name": "", + "signature": "sha256:064d55405a5d05f007b28f32cf39a9f99d10f303fc4084e2d14d99aaeb87858c" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,49 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Physics of Nano Materials" + "source": [ + "Physics of Nano Materials" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.1, Page number 320" + "source": [ + "Example number 8.1, Page number 320" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the surface area to volume ratio\n\n#import modules\nimport math\nfrom __future__ import division\n\n#Variable decleration\nr=5; #radius in m\npi=3.14;\n\n#Calculation \nSA=4*pi*r**2; #surface area of sphere in m^2\nV=(4/3)*pi*r**3; #volume of sphere in m^3\nR=SA/V; #ratio\n#surface area to volume ratio can also be given by 3/radius\n\n#Result\nprint(\"surface area to volume ratio of sphere in m-1 is\",R);", + "input": [ + " \n", + "#import modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "r=5; #radius in m\n", + "pi=3.14;\n", + "\n", + "#Calculation \n", + "SA=4*pi*r**2; #surface area of sphere in m^2\n", + "V=(4/3)*pi*r**3; #volume of sphere in m^3\n", + "R=SA/V; #ratio\n", + "#surface area to volume ratio can also be given by 3/radius\n", + "\n", + "#Result\n", + "print(\"surface area to volume ratio of sphere in m-1 is\",R);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('surface area to volume ratio of sphere in m-1 is', 0.6)\n" + "text": [ + "('surface area to volume ratio of sphere in m-1 is', 0.6)\n" + ] } ], "prompt_number": 5 @@ -38,19 +63,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.2, Page number 321" + "source": [ + "Example number 8.2, Page number 321" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the surface area to volume ratio\n\n#import modules\nimport math\nfrom __future__ import division\n\n#Variable decleration\nd=26; #distance in m\nr=d/2; #radius in m\npi=3.14;\n\n#Calculation\nSA=4*pi*r**2; #surface area of sphere in m^2\nV=(4/3)*pi*r**3; #volume of sphere in m^3\nR=SA/V; #ratio\nR=math.ceil(R*10**3)/10**3; #rounding off to 3 decimals\n#surface area to volume ratio can also be given by 3/radius\n\n#Result\nprint(\"surface area to volume ratio of sphere in m-1 is\",R);", + "input": [ + " \n", + "#import modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "d=26; #distance in m\n", + "r=d/2; #radius in m\n", + "pi=3.14;\n", + "\n", + "#Calculation\n", + "SA=4*pi*r**2; #surface area of sphere in m^2\n", + "V=(4/3)*pi*r**3; #volume of sphere in m^3\n", + "R=SA/V; #ratio\n", + "R=math.ceil(R*10**3)/10**3; #rounding off to 3 decimals\n", + "#surface area to volume ratio can also be given by 3/radius\n", + "\n", + "#Result\n", + "print(\"surface area to volume ratio of sphere in m-1 is\",R);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('surface area to volume ratio of sphere in m-1 is', 0.231)\n" + "text": [ + "('surface area to volume ratio of sphere in m-1 is', 0.231)\n" + ] } ], "prompt_number": 7 @@ -59,19 +108,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.3, Page number 321" + "source": [ + "Example number 8.3, Page number 321" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the volume of cone\n\n#import modules\nimport math\nfrom __future__ import division\n\n#Variable decleration\nr=1; #radius in m\nh=1; #height in m\npi=3.14\n\n#Calculation\nV=(1/3)*pi*(r**2)*h;\nV=math.ceil(V*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"volume of cone in m^3 is\",V); ", + "input": [ + " \n", + "#import modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "r=1; #radius in m\n", + "h=1; #height in m\n", + "pi=3.14\n", + "\n", + "#Calculation\n", + "V=(1/3)*pi*(r**2)*h;\n", + "V=math.ceil(V*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"volume of cone in m^3 is\",V); " + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('volume of cone in m^3 is', 1.05)\n" + "text": [ + "('volume of cone in m^3 is', 1.05)\n" + ] } ], "prompt_number": 11 @@ -80,19 +150,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.4, Page number 321" + "source": [ + "Example number 8.4, Page number 321" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the total surface area of cone\n\n#import modules\nimport math\nfrom __future__ import division\n\n#Variable decleration\nr=3; # radius in m\nh=4; # height in m\npi=3.14\n\n#Calculation\nSA=pi*r*math.sqrt((r**2)+(h**2));\nTSA=SA+(pi*r**2);\n\n#Result\nprint(\"total surface area of cone in m^2 is\",TSA);\n", + "input": [ + " \n", + "#import modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "r=3; # radius in m\n", + "h=4; # height in m\n", + "pi=3.14\n", + "\n", + "#Calculation\n", + "SA=pi*r*math.sqrt((r**2)+(h**2));\n", + "TSA=SA+(pi*r**2);\n", + "\n", + "#Result\n", + "print(\"total surface area of cone in m^2 is\",TSA);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('total surface area of cone in m^2 is', 75.36)\n" + "text": [ + "('total surface area of cone in m^2 is', 75.36)\n" + ] } ], "prompt_number": 16 @@ -101,19 +192,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.5, Page number 322" + "source": [ + "Example number 8.5, Page number 322" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the height of cone\n\n#import modules\nimport math\nfrom __future__ import division\n\n#Variable decleration\nV=100; #volume of cone in cubic inches\nr=5; #radius of cone in inches\npi=3.14;\n\n#Calculation\nr_m=r*0.0254; #radius of cone in m\n#volume V=(1/3)*pi*(r**2)*h\n#therefore h = (3*V)/(pi*r**2)\nh=(3*V)/(pi*r**2); #height in inches\nR=3/r_m;\nh=math.ceil(h*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"height of the cone in inches is\",h);\nprint(\"surface area to volume ratio in m-1 is\",R);\n\n#answer for the surface area to volume ratio given in the book is wrong", + "input": [ + " \n", + "#import modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "V=100; #volume of cone in cubic inches\n", + "r=5; #radius of cone in inches\n", + "pi=3.14;\n", + "\n", + "#Calculation\n", + "r_m=r*0.0254; #radius of cone in m\n", + "#volume V=(1/3)*pi*(r**2)*h\n", + "#therefore h = (3*V)/(pi*r**2)\n", + "h=(3*V)/(pi*r**2); #height in inches\n", + "R=3/r_m;\n", + "h=math.ceil(h*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"height of the cone in inches is\",h);\n", + "print(\"surface area to volume ratio in m-1 is\",R);\n", + "\n", + "#answer for the surface area to volume ratio given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('height of the cone in inches is', 3.822)\n('surface area to volume ratio in m-1 is', 23.62204724409449)\n" + "text": [ + "('height of the cone in inches is', 3.822)\n", + "('surface area to volume ratio in m-1 is', 23.62204724409449)\n" + ] } ], "prompt_number": 18 @@ -121,7 +241,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] |