summaryrefslogtreecommitdiff
path: root/Engineering_Physics_by_Dr._K._Vijaya_Kumar/chapter8_2.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Engineering_Physics_by_Dr._K._Vijaya_Kumar/chapter8_2.ipynb')
-rwxr-xr-xEngineering_Physics_by_Dr._K._Vijaya_Kumar/chapter8_2.ipynb253
1 files changed, 253 insertions, 0 deletions
diff --git a/Engineering_Physics_by_Dr._K._Vijaya_Kumar/chapter8_2.ipynb b/Engineering_Physics_by_Dr._K._Vijaya_Kumar/chapter8_2.ipynb
new file mode 100755
index 00000000..2dc13b1f
--- /dev/null
+++ b/Engineering_Physics_by_Dr._K._Vijaya_Kumar/chapter8_2.ipynb
@@ -0,0 +1,253 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:064d55405a5d05f007b28f32cf39a9f99d10f303fc4084e2d14d99aaeb87858c"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Physics of Nano Materials"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.1, Page number 320"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "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"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.2, Page number 321"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "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"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.3, Page number 321"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "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"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.4, Page number 321"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "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"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.5, Page number 322"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "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"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file