diff options
14 files changed, 4357 insertions, 0 deletions
diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1.ipynb new file mode 100644 index 00000000..feea1a84 --- /dev/null +++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1.ipynb @@ -0,0 +1,124 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 1: Vector Analysis" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16, Page number 28" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the result is 59 /60\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from scipy.integrate import quad\n", + "\n", + "#Calculation\n", + "def zintg(x):\n", + " return x**3\n", + "r1=quad(zintg,0,1)[0]\n", + "def zintg(x):\n", + " return 2*x**4\n", + "r2=quad(zintg,0,1)[0]\n", + "def zintg(x):\n", + " return 3*x**8\n", + "r3=quad(zintg,0,1)[0]\n", + "r=r1+r2+r3; #result\n", + "\n", + "#Result\n", + "print \"the result is\",int(r*60),\"/60\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17, Page number 29" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the result is 2 /3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from scipy.integrate import quad\n", + "from fractions import Fraction\n", + "\n", + "#Calculation\n", + "def zintg(x):\n", + " return (x-(x**2))\n", + "r1=quad(zintg,0,1)[0]\n", + "def zintg(x):\n", + " return 2*((x**2)+(x**3))\n", + "r2=quad(zintg,0,1)[0]\n", + "def zintg(y):\n", + " return 2*((y**3)-(y**2))\n", + "r3=quad(zintg,1,0)[0]\n", + "def zintg(y):\n", + " return (y**2)+y\n", + "r4=quad(zintg,1,0)[0]\n", + "r=r1+r2+r3+r4; #result\n", + "\n", + "#Result\n", + "print \"the result is\",int(r*3),\"/3\"" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10.ipynb new file mode 100644 index 00000000..254b9907 --- /dev/null +++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10.ipynb @@ -0,0 +1,247 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 10: Vibrations in Bars" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 348" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fundamental frequency of longitudinal vibrations is 1780.0 Hz\n", + "fundamental frequency of transverse vibrations is 31.691 Hz\n", + "answer in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "l=1; #bar length(m)\n", + "R=0.01/2; #radius(m)\n", + "V=3560; #wave velocity(m/sec)\n", + "x=3.0112; \n", + "\n", + "#Calculation\n", + "k=R/2; #geometric radius(m)\n", + "fL=V/(2*l); #fundamental frequency of longitudinal vibrations(Hz)\n", + "fT=math.pi*V*k*x**2/(8*(l**2)); #fundamental frequency of transverse vibrations(Hz)\n", + "\n", + "#Result\n", + "print \"fundamental frequency of longitudinal vibrations is\",fL,\"Hz\"\n", + "print \"fundamental frequency of transverse vibrations is\",round(fT,3),\"Hz\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 348" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "youngs modulus is 1.96 *10**11 N/m**2\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "C=5050; #sound velocity(m/sec)\n", + "rho=7700; #steel density(kg/m**3)\n", + "\n", + "#Calculation\n", + "Y=C**2*rho; #youngs modulus(N/m**2)\n", + "\n", + "#Result\n", + "print \"youngs modulus is\",round(Y/10**11,2),\"*10**11 N/m**2\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 349" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fundamental frequency of transverse vibrations is 25.35 Hz\n", + "first overtone of transverse vibrations is 69.9 Hz\n", + "answer for first overtone in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "l=1; #bar length(m)\n", + "R=0.004; #radius(m)\n", + "C=3560; #wave velocity(m/sec)\n", + "x=3.0112; \n", + "\n", + "#Calculation\n", + "k=R/2; #geometric radius(m)\n", + "f1=math.pi*C*k*x**2/(8*(l**2)); #fundamental frequency of transverse mode of vibration(Hz)\n", + "f2=math.pi*C*k*5**2/(8*(l**2)); #first overtone of transverse mode of vibration(Hz)\n", + "\n", + "#Result\n", + "print \"fundamental frequency of transverse vibrations is\",round(f1,2),\"Hz\"\n", + "print \"first overtone of transverse vibrations is\",round(f2,1),\"Hz\"\n", + "print \"answer for first overtone in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 349" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "value of a is 0.00195 m\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "l=0.2; #bar length(m)\n", + "C=4990; #wave velocity(m/sec)\n", + "x=3.0112; \n", + "f1=250; #frequency(Hz)\n", + "\n", + "#Calculation\n", + "a=f1*8*(l**2)*math.sqrt(12)/(math.pi*C*(x**2)); #value of a(m)\n", + "\n", + "#Result\n", + "print \"value of a is\",round(a,5),\"m\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 350" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency is 0.155 MHz\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Y=21*10**10; #youngs modulus(N/m**2) \n", + "rho=8800; #nickel density(kg/m**3)\n", + "R=0.01; #radius(m)\n", + "\n", + "#Calculation\n", + "k=R/2; #geometric radius(m)\n", + "C=math.sqrt(Y/rho); #sound velocity(m/sec)\n", + "f=C/(2*math.pi*k); #frequency(Hz)\n", + "\n", + "#Result\n", + "print \"frequency is\",round(f/10**6,3),\"MHz\"" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11.ipynb new file mode 100644 index 00000000..2722c8a0 --- /dev/null +++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11.ipynb @@ -0,0 +1,403 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 11: Vibrations in Strings" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 371" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "amplitude is 10 cm\n", + "frequency is 1 Hz\n", + "wavelength is 200.0 cm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "#given Y=10sinmath.pi(0.01x-2t)\n", + "#by comparing with Y=Asin(kx-omegat) we get\n", + "A=10; #amplitude(cm)\n", + "omega=2*math.pi;\n", + "k=0.01*math.pi; #wavelength constant\n", + "\n", + "#Calculation\n", + "f=omega/(2*math.pi); #frequency(Hz)\n", + "lamda=2*math.pi/k; #wavelength(cm) \n", + "\n", + "#Result\n", + "print \"amplitude is\",A,\"cm\"\n", + "print \"frequency is\",int(f),\"Hz\"\n", + "print \"wavelength is\",lamda,\"cm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 371" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "along negative axis displacement y= 0.01 sin( 10 *math.pi/3 x + 1100 t)\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "f=550; #frequency(Hz)\n", + "A=0.01; #amplitude(cm)\n", + "v=330; #wave velocity(m/sec)\n", + "\n", + "#Calculation\n", + "omega=2*math.pi*f; #angular frequency\n", + "k=omega/v; #wavelength constant\n", + "#along negative axis displacement y=Asin(kx+omegat) substitute the values\n", + "\n", + "#Result\n", + "print \"along negative axis displacement y=\",A,\"sin(\",int(k*3/math.pi),\"*math.pi/3 x +\",int(omega/math.pi),\"t)\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 371" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wave velocity is 40.82 m/s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "l=2; #length(m)\n", + "m=0.6; #mass(kg)\n", + "T=500; #tension(N)\n", + "\n", + "#Calculation\n", + "mew=m/l; #linear density(kg/m)\n", + "v=math.sqrt(T/mew); #wave velocity(m/s)\n", + "\n", + "#Result\n", + "print \"wave velocity is\",round(v,2),\"m/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 372" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "amplitude is 1.028 units\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "x=10; #stationary wave point\n", + "t=1; #assume\n", + "y1=5*math.sin(((2*math.pi*t)-(2*x))*math.pi/180); #transverse wave\n", + "y2=5*math.sin(((2*math.pi*t)+(2*x))*math.pi/180); #transverse wave\n", + "\n", + "#Calculation\n", + "y=y1+y2; #amplitude(units)\n", + "\n", + "#Result\n", + "print \"amplitude is\",round(y,3),\"units\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 372" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "string linear density is 0.0249 kg/m\n", + "wave velocity is 633.56 m/s\n", + "fundamental frequency is 316.78 Hz\n", + "frequency of 1st overtone is 633.56 Hz\n", + "frequency of 2nd overtone is 950.34 Hz\n", + "fundamental wavelength is 2 m\n", + "1st overtone wavelength is 1 m\n", + "2nd overtone wavelength is 0.667 m\n", + "answers in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r=1*10**-3; #string radius(m)\n", + "l=1; #length(m)\n", + "rho=7930; #density(kg/m**3)\n", + "T=10**4; #tension(N)\n", + "\n", + "#Calculation\n", + "mew=math.pi*r**2*rho/l; #string linear density(kg/m)\n", + "v=math.sqrt(T/mew); #wave velocity(m/s)\n", + "f1=v/(2*l); #fundamental frequency(Hz)\n", + "f2=2*f1; #frequency of 1st overtone(Hz)\n", + "f3=3*f1; #frequency of 2nd overtone(Hz)\n", + "lamda1=2*l/1; #fundamental wavelength(m)\n", + "lamda2=2*l/2; #1st overtone wavelength(m)\n", + "lamda3=2*l/3; #2nd overtone wavelength(m)\n", + "\n", + "#Result\n", + "print \"string linear density is\",round(mew,4),\"kg/m\"\n", + "print \"wave velocity is\",round(v,2),\"m/s\"\n", + "print \"fundamental frequency is\",round(f1,2),\"Hz\"\n", + "print \"frequency of 1st overtone is\",round(f2,2),\"Hz\"\n", + "print \"frequency of 2nd overtone is\",round(f3,2),\"Hz\"\n", + "print \"fundamental wavelength is\",int(lamda1),\"m\"\n", + "print \"1st overtone wavelength is\",int(lamda2),\"m\"\n", + "print \"2nd overtone wavelength is\",round(lamda3,3),\"m\"\n", + "print \"answers in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 6, Page number 373" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "power is 19.74 watts\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mew=0.1; #string linear density(kg/m)\n", + "A=0.1; #amplitude(m)\n", + "f=10; #frequency(Hz)\n", + "T=10; #tension(N)\n", + "\n", + "#Calculation\n", + "v=math.sqrt(T/mew); #wave velocity(m/s)\n", + "P=2*math.pi**2*f**2*A**2*v*mew; #power(watt)\n", + "\n", + "#Result\n", + "print \"power is\",round(P,2),\"watts\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 7, Page number 373" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "tension in string is 524.29 N\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "f=500; #frequency(Hz)\n", + "T=500; #tension(N)\n", + "f1=512; #required frequency(Hz)\n", + "\n", + "#Calculation\n", + "T1=T*f1**2/f**2; #tension in string(N)\n", + "\n", + "#Result\n", + "print \"tension in string is\",round(T1,2),\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 8, Page number 374" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "amplitude at x=5 is 4.0\n", + "first node position is 0.0 m\n", + "second node position is 30.0 m\n", + "third node position is 60.0 m\n", + "wavelength is 60.0 m\n", + "component transverse wave equations are y1= 4.0 sin math.pi((x/30)-(48*t))\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "#given Y=8sin(math.pi*x/30)cos(48*math.pi*t)\n", + "#by comparing with Y=2Asin(kx)cos(omegat) we get\n", + "A=8/2; #amplitude(cm)\n", + "omega=48*math.pi;\n", + "x=5; #stationary wave point\n", + "k=math.pi/30; #wavelength constant\n", + "y1=0;\n", + "y2=math.pi;\n", + "y3=2*math.pi;\n", + "\n", + "#Calculation\n", + "y=2*A*math.sin(math.pi*x/30); #amplitude at x=5\n", + "x1=y1*30/math.pi; #first node position(m) \n", + "x2=y2*30/math.pi; #second node position(m) \n", + "x3=y3*30/math.pi; #third node position(m) \n", + "lamda=2*(x3-x2); #wavelength(m) \n", + "\n", + "#Result\n", + "print \"amplitude at x=5 is\",y\n", + "print \"first node position is\",x1,\"m\"\n", + "print \"second node position is\",x2,\"m\"\n", + "print \"third node position is\",x3,\"m\"\n", + "print \"wavelength is\",lamda,\"m\"\n", + "print \"component transverse wave equations are y1=\",A,\"sin math.pi((x/30)-(48*t))\"" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12.ipynb new file mode 100644 index 00000000..a30f5154 --- /dev/null +++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12.ipynb @@ -0,0 +1,194 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 12: Ultrasonics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 394" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fundamental frequency is 958.33 KHz\n", + "answer in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "v=5750; #velocity(m/s)\n", + "t=3*10**-3; #thickness(m)\n", + "\n", + "#Calculation\n", + "lamda=2*t; #wavelength(m)\n", + "f=v/lamda; #fundamental frequency(Hz)\n", + "\n", + "#Result\n", + "print \"fundamental frequency is\",round(f/10**3,2),\"KHz\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 394" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "natural frequency is 1365.0 KHz\n", + "answer in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Y=7.9*10**10; #youngs modulus(N/m**2)\n", + "rho=2650; #density(Kg/m**3)\n", + "t=2*10**-3; #thickness(m)\n", + "\n", + "#Calculation\n", + "v=math.sqrt(Y/rho); #velocity(m/s)\n", + "lamda=2*t; #wavelength(m)\n", + "f=v/lamda; #natural frequency(Hz)\n", + "\n", + "#Result\n", + "print \"natural frequency is\",round(f/10**3),\"KHz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 395" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "pressure wave amplitude is 13.04 N/m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rho0=1.21; #air density(kg/m**3)\n", + "C=343; #sound velocity(m/sec)\n", + "f=500; #frequency(Hz)\n", + "A=10**-5; #displacement amplitude(m)\n", + "\n", + "#Calculation\n", + "omega=2*math.pi*f; #angular frequency(Hz)\n", + "Pe=rho0*C*omega*A; #pressure wave amplitude(N/m**2)\n", + "\n", + "#Result\n", + "print \"pressure wave amplitude is\",round(Pe,2),\"N/m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 395" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of pressure amplitudes is 58.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Z1=1.43*10**6; #value of constant in water(Rayls)\n", + "Z2=425.7; #value of constant in air(Rayls)\n", + "\n", + "#Calculation\n", + "Pe1byPe2=math.sqrt(Z1/Z2); #ratio of pressure amplitudes\n", + "\n", + "#Result\n", + "print \"ratio of pressure amplitudes is\",round(Pe1byPe2)" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2.ipynb new file mode 100644 index 00000000..68990ae4 --- /dev/null +++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2.ipynb @@ -0,0 +1,532 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 2: Mechanics of Particles" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 75" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "momentum of electron is 5.37 *10**-19 gm cm/sec\n", + "velocity of truck in 1st case is 12 m/sec\n", + "velocity of truck in 2nd case is 18.97 m/sec\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m=9*10**-28; #mass(gram)\n", + "E=100; #kinetic energy(eV)\n", + "e=1.6*10**-12; #kinetic energy(erg)\n", + "mc=4000; #mass of car(kg)\n", + "mt=10000; #mass of truck(kg)\n", + "vc=30; #speed of car(m/s)\n", + "\n", + "#Calculation\n", + "P=math.sqrt(E*e*2*m); #momentum of electron(gm cm/sec)\n", + "vt=mc*vc/mt; #velocity of truck in 1st case(m/sec)\n", + "v1=math.sqrt(mc*vc**2/mt); #velocity of truck in 2nd case(m/sec)\n", + "\n", + "#Result\n", + "print \"momentum of electron is\",round(P*10**19,2),\"*10**-19 gm cm/sec\"\n", + "print \"velocity of truck in 1st case is\",int(vt),\"m/sec\"\n", + "print \"velocity of truck in 2nd case is\",round(v1,2),\"m/sec\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 76" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnitude of velocity is 10 *math.sqrt(2) m/sec\n", + "direction of velocity is 135 degrees or 225 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "v=30; #speed(m/sec)\n", + "P1=30; #momentum of 1st part(i)\n", + "P2=30; #momentum of 2nd part(j)\n", + "P3=3; #momentum of 3rd part(v)\n", + "\n", + "#Calculation\n", + "#from conservation of momentum, 30i+30j+3v=0. from which we get v=-10(i+j)\n", + "i=1; #coordinate of i\n", + "j=1; #coordinate of j\n", + "m=math.sqrt(i**2+j**2); #magnitude\n", + "mv=10*m; #magnitude of velocity(m/sec)\n", + "vbar=math.acos(-10/mv); #direction of velocity(rad) \n", + "vbar1=int(vbar*180/math.pi); #direction of velocity(degrees)\n", + "vbar2=360-vbar1; #direction of velocity(degrees) \n", + "\n", + "#Result\n", + "print \"magnitude of velocity is\",int(mv/math.sqrt(2)),\"*math.sqrt(2) m/sec\"\n", + "print \"direction of velocity is\",vbar1,\"degrees or\",vbar2,\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 77" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of mass of fuel to empty rocket is 1095\n", + "answer given in the book is wrong\n", + "time is 9.99 sec\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "v0=0; #initial velocity of rocket\n", + "vr=1.6; #velocity of gases(km/sec)\n", + "v=11.2; #final velocity(km/sec)\n", + "alphabyM0=1/10; #fuel burnt rate\n", + "\n", + "#Calculation\n", + "#assume x=log(M0/M)\n", + "x=(v-v0)/vr; \n", + "M0byM=math.exp(x); \n", + "MfbyMe=M0byM-1; #ratio of mass of fuel to empty rocket\n", + "t=(1-(1/M0byM))*(1/alphabyM0); #time(sec)\n", + "\n", + "#Result\n", + "print \"ratio of mass of fuel to empty rocket is\",int(MfbyMe)\n", + "print \"answer given in the book is wrong\"\n", + "print \"time is\",round(t,2),\"sec\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 78" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "final velocity of rocket is 7.82 km/sec\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m1=300; #mass in 1st stage(kg)\n", + "m2=30; #mass in 2nd stage(kg)\n", + "m3=2400; #fuel filled(kg)\n", + "m4=270; #fuel filled(kg)\n", + "u=2; #velocity(km/sec)\n", + "\n", + "#Calculation\n", + "M0=m1+m2+m3+m4; #mass(kg)\n", + "M=m1+m2+m4; #mass(kg)\n", + "v0=u*math.log(M0/M); #initial velocity of rocket to the second stage(km/sec)\n", + "M01=m2+m4; #mass(kg)\n", + "V=v0+(u*math.log(M01/m2)); #final velocity of rocket(km/sec)\n", + "\n", + "#Result\n", + "print \"final velocity of rocket is\",round(V,2),\"km/sec\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 79" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "final velocity of rocket is 2.8 km/sec\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mr=40; #mass of rocket(kg)\n", + "mf=360; #mass of fuel(kg)\n", + "g=9.8; #acceleration due to gravity(kg/m**2)\n", + "v=2*10**3; #exhaust velocity(m/sec)\n", + "v0=0; #velocity(m/sec)\n", + "\n", + "#Calculation\n", + "M=mr+mf; #mass(kg)\n", + "dmbydt=M*g/v; #thrust(kg/sec)\n", + "t=mf/dmbydt; #time taken(sec)\n", + "Vmax=v0+(v*math.log(M/mr))-(g*t); #final velocity of rocket(m/sec)\n", + "\n", + "#Result\n", + "print \"final velocity of rocket is\",round(Vmax/10**3,1),\"km/sec\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 6, Page number 80" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "thrust on rocket is 98 kg/sec\n", + "thrust on rocket to give acceleration is 398 kg/sec\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "g=9.8; #acceleration due to gravity(kg/m**2)\n", + "vr=800; #exhaust velocity(m/sec)\n", + "M=8000; #mass(kg)\n", + "a=30; #acceleration(m/s**2)\n", + "\n", + "#Calculation\n", + "dMbydt=M*g/vr; #thrust on rocket(kg/sec)\n", + "dMbydt1=M*(g+a)/vr; #thrust on rocket to give acceleration(kg/sec)\n", + "\n", + "#Result\n", + "print \"thrust on rocket is\",int(dMbydt),\"kg/sec\"\n", + "print \"thrust on rocket to give acceleration is\",int(dMbydt1),\"kg/sec\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 8, Page number 81" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "thrust acting on rocket is 200 N\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "urel=10000; #exhaust velocity(m/s)\n", + "dMbydt=0.02; #rate of fuel burnt(kg/sec)\n", + "\n", + "#Calculation\n", + "Freaction=urel*dMbydt; #thrust acting on rocket(N)\n", + "\n", + "#Result\n", + "print \"thrust acting on rocket is\",int(Freaction),\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 9, Page number 82" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "final velocity of rocket is 4.4 km/sec\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M=5000; #mass of rocket(kg)\n", + "mf=40000; #mass of fuel(kg)\n", + "urel=2*10**3; #exhaust velocity(m/sec)\n", + "v0=0; \n", + "\n", + "#Calculation\n", + "M0=M+mf; #mass(kg)\n", + "V=v0+(urel*math.log(M0/M)); #maximum velocity of rocket(m/sec)\n", + "\n", + "#Result\n", + "print \"final velocity of rocket is\",round(V/10**3,1),\"km/sec\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10, Page number 82" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "recoil velocity of nucleus is 0.27 *10**5 m/s\n", + "direction of momentum of nucleus is 150.0 degrees\n", + "kinetic energy is 0.145 *10**-15 J\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P1=9.22*10**-21; #momentum(kgm/s)\n", + "P2=5.33*10**-21; #momentum(kgm/s)\n", + "m=3.9*10**-25; #mass of nucleus(kg)\n", + "\n", + "#Calculation\n", + "P=math.sqrt(P1**2+P2**2); #momentum(kgm/s)\n", + "V=P/m; #recoil velocity of nucleus(m/s)\n", + "theta=math.atan(P2/P1); #direction of momentum of nucleus(rad)\n", + "theta=180-(theta*180/math.pi); #direction of momentum of nucleus(degrees) \n", + "K=P**2/(2*m); #kinetic energy(J)\n", + "\n", + "#Result\n", + "print \"recoil velocity of nucleus is\",round(V/10**5,2),\"*10**5 m/s\"\n", + "print \"direction of momentum of nucleus is\",round(theta),\"degrees\"\n", + "print \"kinetic energy is\",round(K*10**15,3),\"*10**-15 J\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13, Page number 86" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "recoil velocity of residual is -2.564 *10**5 m/s\n", + "kinetic energy of residual is 0.068 MeV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "malpha=4; #kinetic energy of alpha particle(MeV)\n", + "mth=234; #mass of thorium(kg)\n", + "valpha=1.5*10**7; #velocity(m/s)\n", + "\n", + "#Calculation\n", + "vth=-malpha*valpha/mth; #recoil velocity of residual(m/s)\n", + "Kalpha=malpha; #kinetic energy of alpha(MeV)\n", + "Kth=malpha*Kalpha/mth; #kinetic energy of residual(MeV)\n", + "\n", + "#Result\n", + "print \"recoil velocity of residual is\",round(vth/10**5,3),\"*10**5 m/s\"\n", + "print \"kinetic energy of residual is\",round(Kth,3),\"MeV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14, Page number 86" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity before collision is 5.196\n", + "velocity after collision is 5.196\n", + "kinetic energy before collision is 40.5*m\n", + "kinetic energy before collision is 27.0*m\n", + "energy is not conserved\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from sympy import Symbol\n", + "\n", + "#Variable declaration\n", + "u1=9; #velocity(m/sec)\n", + "theta=30*math.pi/180; #scattering angle(rad)\n", + "u2=0; #velocity(m/sec)\n", + "m=Symbol(\"m\");\n", + "\n", + "#Calculation\n", + "v1plusv2=u1/math.cos(theta); \n", + "v1minusv2=u2/math.cos(180-theta); \n", + "v1=(v1plusv2+v1minusv2)/2; #velocity before collision\n", + "v2=(v1plusv2-v1minusv2)/2; #velocity after collisiovelocity after collision isn,v2\n", + "KE1=(m*(u1**2/2))+(m*(u2**2/2)); #kinetic energy before collision\n", + "KE2=((m*v1**2)/2)+((m*v2**2)/2); #kinetic energy before collision\n", + "\n", + "#Result\n", + "print \"velocity before collision is\",round(v1,3)\n", + "print \"velocity after collision is\",round(v2,3)\n", + "print \"kinetic energy before collision is\",KE1\n", + "print \"kinetic energy before collision is\",KE2\n", + "print \"energy is not conserved\"" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3.ipynb new file mode 100644 index 00000000..37d67888 --- /dev/null +++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3.ipynb @@ -0,0 +1,425 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 3: Rigid Body Dynamics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 116" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "moment of inertia through centre is 5 kg m**2\n", + "moment of inertia through length of rod is 10 kg m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ma=mb=10; #mass(kg)\n", + "ra1=rb1=0.5; #radius(m)\n", + "ra2=1; #radius(m)\n", + "rb2=0; #radius(m)\n", + " \n", + "#Calculation\n", + "I0=(ma*ra1**2)+(mb*rb1**2); #moment of inertia through centre(kg m**2)\n", + "IA=IB=(ma*ra2**2)+(mb*rb2**2); #moment of inertia through length of rod(kg m**2)\n", + "\n", + "#Result\n", + "print \"moment of inertia through centre is\",int(I0),\"kg m**2\"\n", + "print \"moment of inertia through length of rod is\",IA,\"kg m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 117" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "final angular velocity is 3 rev/sec\n", + "increase in kinetic energy 237.0 J\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "I0=6; #initial moment of inertia(Kg m**2)\n", + "omega0=1; #initial angular velocity(rev/sec)\n", + "I=2; #final moment of inertia(Kg m**2)\n", + "\n", + "#Calculation\n", + "omega=I0*omega0/I; #final angular velocity(rev/sec)\n", + "K0=I0*(omega0*2*math.pi)**2/2; #initial kinetic energy(J)\n", + "K=I*(omega*2*math.pi)**2/2; #final kinetic energy(J)\n", + "deltaK=K-K0; #increase in kinetic energy(J)\n", + "\n", + "#Result\n", + "print \"final angular velocity is\",int(omega),\"rev/sec\"\n", + "print \"increase in kinetic energy\",round(deltaK),\"J\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 118" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "precessional angular velocity is 2 rad/sec in clockwise direction\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "I=5*10**-4; #moment of inertia(Kg m**2)\n", + "omega=30*2*math.pi; #angular velocity(rad/sec)\n", + "m=0.5; #mass(Kg) \n", + "g=9.8; #acceleration due to gravity(m/sec**2)\n", + "r=0.04; #radius(m)\n", + "\n", + "#Calculation\n", + "J=I*omega; #angular momentum(Kg m**2/sec)\n", + "tow=m*g*r; #torque(Nm)\n", + "omegap=tow/J; #precessional angular velocity(rad/sec)\n", + "\n", + "#Result\n", + "print \"precessional angular velocity is\",int(omegap),\"rad/sec in clockwise direction\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 118" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "common speed is 250 revolutions/min\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "I1=I2=1; #assume\n", + "omega1=500; #angular velocity(rev/min)\n", + "omega2=0; #angular velocity(rev/min)\n", + "\n", + "#Calculation\n", + "omega=((I1*omega1)+(I2*omega2))/(I1+I2); #common speed(revolutions/minute)\n", + "\n", + "#Result\n", + "print \"common speed is\",int(omega),\"revolutions/min\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 6, Page number 119" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "precessional angular velocity is 12.19 rad/sec\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M=50; #mass of sphere(g)\n", + "g=980; #acceleration due to gravity(gm/sec**2)\n", + "r=0.02; #radius(m)\n", + "l=0.005; #length(m)\n", + "n=20; #number of revolutions\n", + "\n", + "#Calculation\n", + "I=2*M*r**2/5; #moment of inertia of sphere(kg m**2)\n", + "L=r+l; #distance from pivot(m)\n", + "omega=n*2*math.pi; #angular velocity(rad/sec)\n", + "omegap=M*g*L*100/(I*10**4*omega); #precessional angular velocity(rad/sec)\n", + "\n", + "#Result\n", + "print \"precessional angular velocity is\",round(omegap,2),\"rad/sec\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 7, Page number 120" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "moment of inertia of ring is 1 *10**4 gram cm**2\n", + "angular momentum is 6.28 *10**5 erg sec\n", + "torque is 1 *10**4 dyne cm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M=100; #mass(gm)\n", + "R=10; #radius(cm)\n", + "omega=10*2*math.pi; #angular velocity(rad/sec)\n", + "t=10; #time(sec)\n", + "\n", + "#Calculation\n", + "I=M*R**2; #moment of inertia of ring(gram cm**2)\n", + "L=I*omega; #angular momentum(erg sec)\n", + "tow=L/(2*math.pi*t); #torque(dyne cm)\n", + "\n", + "#Result\n", + "print \"moment of inertia of ring is\",int(I/10**4),\"*10**4 gram cm**2\"\n", + "print \"angular momentum is\",round(L/10**5,2),\"*10**5 erg sec\"\n", + "print \"torque is\",int(tow/10**4),\"*10**4 dyne cm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 8, Page number 120" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "precessional angular velocity is 1.2 radians/sec\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "g=980; #acceleration due to gravity(gm/sec**2)\n", + "r=5; #radius(cm)\n", + "k=6; #radius of gyration(cm)\n", + "omega=2*math.pi*18; #angular velocity(revolutions/sec)\n", + "\n", + "#Calculation\n", + "omegap=g*r/(k**2*omega); #precessional angular velocity(radians/sec)\n", + "\n", + "#Result\n", + "print \"precessional angular velocity is\",round(omegap,1),\"radians/sec\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13, Page number 128" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "torque acting on it is ( 9.6 i -7.2 j+ 0.0 k)*10**-4 Nm\n", + "rate of change of kinetic energy is 0\n", + "hence kinetic energy is constant\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M=0.1; #mass(kg)\n", + "R=0.04; #radius(m)\n", + "#omega=3i+4j+6k\n", + "omegax=3; #angular velocity(rad/s)\n", + "omegay=4; #angular velocity(rad/s)\n", + "omegaz=6; #angular velocity(rad/s)\n", + "domegaxbydt=domegaybydt=domegazbydt=0;\n", + "\n", + "#Calculation\n", + "Ixx=M*R**2/4; #principal inertia element(kg m**2)\n", + "Iyy=M*R**2/4; #principal inertia element(kg m**2)\n", + "Izz=M*R**2/2; #principal inertia element(kg m**2)\n", + "towx=(omegax*domegaxbydt)+(omegay*omegaz*(Izz-Iyy)); #torque on x(Nm)\n", + "towy=(omegay*domegaybydt)+(omegaz*omegax*(Ixx-Izz)); #torque on y(Nm)\n", + "towz=(omegaz*domegazbydt)+(omegax*omegay*(Iyy-Ixx)); #torque on x(Nm)\n", + "dTbydt=(omegax*towx)+(omegay*towy)+(omegaz*towz); #rate of change of kinetic energy\n", + "\n", + "#Result\n", + "print \"torque acting on it is (\",towx*10**4,\"i\",towy*10**4,\"j+\",towz,\"k)*10**-4 Nm\"\n", + "print \"rate of change of kinetic energy is\",int(dTbydt)\n", + "print \"hence kinetic energy is constant\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14, Page number 130" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "precessional angular velocity is 40 *math.pi rad/sec or 20 revolutions/sec\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M=1; #assume\n", + "R=1; #assume\n", + "omega=20*2*math.pi; #angular velocity(rad/sec)\n", + "\n", + "#Calculation\n", + "Ixx=Iyy=M*R**2/4; #moment of inertia about diametrical axis\n", + "Izz=M*R**2/2; #moment of inertia about axis normal to plane\n", + "omegap=(Izz-Ixx)*omega/Ixx; #precessional angular velocity(radians/sec)\n", + "\n", + "#Result\n", + "print \"precessional angular velocity is\",int(omegap/math.pi),\"*math.pi rad/sec or\",int(omegap/(2*math.pi)),\"revolutions/sec\"" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4.ipynb new file mode 100644 index 00000000..d7a5d585 --- /dev/null +++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4.ipynb @@ -0,0 +1,446 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 4: Mechanics of Continuous Media" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 162" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "youngs modulus is 4.7 *10**12 N/m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "F=1200*9.8; #tensile force(N)\n", + "A=0.025*10**-4; #area(m**2)\n", + "delta_l=0.003; #extension(m)\n", + "l=3; #length(m)\n", + "\n", + "#Calculation\n", + "Y=F*l/(A*delta_l); #youngs modulus(N/m**2)\n", + "\n", + "#Result\n", + "print \"youngs modulus is\",round(Y/10**12,1),\"*10**12 N/m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 162" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "volume occupied at 25atm is 3499 cm**3\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "v=3500; #volume(cm**3)\n", + "K=10*10**11; #bulk modulus(dyne/cm**2)\n", + "p=24*76*13.6*980; #change in pressure(dyne/cm**2)\n", + "\n", + "#Calculation\n", + "delta_v=p*v/K; #volume occupied(cm**3)\n", + "V=v-delta_v; #volume occupied at 25atm(cm**3)\n", + "\n", + "#Result\n", + "print \"volume occupied at 25atm is\",int(V),\"cm**3\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 163" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "poissons ratio is 0.25\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "eta=1; #assume\n", + "Y=2.5*eta; #youngs modulus\n", + "\n", + "#Calculation\n", + "sigma=Y/(2*eta)-1; #poissons ratio\n", + "\n", + "#Result\n", + "print \"poissons ratio is\",sigma" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 163" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "bulk modulus is 1 *10**11 N/m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "l=0.1; #side of cube(m)\n", + "p=10**6; #static pressure(pa)\n", + "delta_v=10**-8; #change in volume(m**3)\n", + "\n", + "#Calculation\n", + "v=l**3; #volume of cube(m**3)\n", + "K=p*v/delta_v; #bulk modulus(N/m**2)\n", + "\n", + "#Result\n", + "print \"bulk modulus is\",int(K/10**11),\"*10**11 N/m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 163" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "poissons ratio is 0.25\n", + "bulk modulus is 1.33 *10**11 N/m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Y=2*10**11; #youngs modulus(N/m**2)\n", + "eta=8*10**10; #rigidity modulus(N/m**2)\n", + "\n", + "#Calculation\n", + "sigma=Y/(2*eta)-1; #poissons ratio\n", + "K=Y/(3*(1-2*sigma)); #bulk modulus(N/m**2)\n", + "\n", + "#Result\n", + "print \"poissons ratio is\",sigma\n", + "print \"bulk modulus is\",round(K/10**11,2),\"*10**11 N/m**2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 6, Page number 163" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "increase in temperature is 0.01653 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "l=2; #length(m)\n", + "A=2*10**-6; #area(m**2)\n", + "e=5*10**-3; #elongation(m)\n", + "rho=9000; #density(Kg/m**3)\n", + "C=4200; #specific heat(J/Kg/K)\n", + "F=1000; #force(N)\n", + "\n", + "#Calculation\n", + "v=l*A; #volume(m**3)\n", + "W=F*e*v/(2*A*l); #work done(J)\n", + "m=rho*v; #mass(kg)\n", + "delta_t=W/(m*C); #increase in temperature(K)\n", + "\n", + "#Result\n", + "print \"increase in temperature is\",round(delta_t,5),\"K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 7, Page number 164" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "potential energy is 1.125 J\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "l=3; #length(m)\n", + "A=2.5*10**-6; #area(m**2)\n", + "e=3*10**-3; #elongation(m)\n", + "F=750; #force(N)\n", + "\n", + "#Calculation\n", + "v=l*A; #volume(m**3)\n", + "E=F*e*v/(2*A*l); #potential energy(J)\n", + "\n", + "#Result\n", + "print \"potential energy is\",E,\"J\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 8, Page number 164" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "depression of the rod from fixed end is 0.00648 m\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "L=0.5; #length(m)\n", + "x=0.5; #depression(m)\n", + "y=15*10**-3; #depression(m)\n", + "x1=0.3; #depression(m)\n", + "\n", + "#Calculation\n", + "A=(L*x**2/2)-(x**3/6); \n", + "y1=y*((L*x1**2/2)-(x1**3/6))/A; #depression of the rod from fixed end(m)\n", + "\n", + "#Result\n", + "print \"depression of the rod from fixed end is\",y1,\"m\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 9, Page number 165" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "deformation strain is 0.24\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r=0.4; #radius(cm)\n", + "l=100; #length(cm)\n", + "phi=60; #twisting angle(degree)\n", + "\n", + "#Calculation\n", + "theta=r*phi/l #deformation strain\n", + "\n", + "#Result\n", + "print \"deformation strain is\",theta" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10, Page number 165" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "depression at the mid point is 8.124 *10**-5 m\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m=0.1; #mass(kg)\n", + "g=9.8; #acceleration due to gravity(m/sec**2)\n", + "L=1; #length(m)\n", + "Y=10**10; #youngs modulus(N/m**2)\n", + "r=0.02; #radius of wire(m)\n", + "\n", + "#Calculation\n", + "y1=5*m*g*L**3/(12*Y*math.pi*r**4); #depression at the mid point(m)\n", + "\n", + "#Result\n", + "print \"depression at the mid point is\",round(y1*10**5,3),\"*10**-5 m\"\n", + "print \"answer given in the book is wrong\"" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5.ipynb new file mode 100644 index 00000000..3b038d09 --- /dev/null +++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5.ipynb @@ -0,0 +1,664 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 5: Central Forces" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 200" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gravitational energy is 1.6675 *10**-10 J\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m1=m2=0.5; #mass(kg)\n", + "r2=0.1; #distance(m)\n", + "r1=float(\"inf\"); #distance(m)\n", + "G=6.67*10**-11; #gravitational constant\n", + "\n", + "#Calculation\n", + "delta_U=G*m1*m2*((1/r2)-(1/r1)); #gravitational energy(J)\n", + "\n", + "#Result\n", + "print \"gravitational energy is\",delta_U*10**10,\"*10**-10 J\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 201" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "net energy is -146.74 *10**-11 J\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m1=1; #mass(kg)\n", + "m2=2; #mass(kg)\n", + "m3=3; #mass(kg)\n", + "a=0.5; #side(m)\n", + "G=6.67*10**-11; #gravitational constant\n", + "\n", + "#Calculation\n", + "delta_U=-G*((m1*m2)+(m2*m3)+(m3*m1))/a; #net energy(J)\n", + "\n", + "#Result\n", + "print \"net energy is\",round(delta_U*10**11,2),\"*10**-11 J\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 8, Page number 203" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "distance where potential becomes zero is 3.6 *10**8 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r=4*10**8; #distance(m)\n", + "M1=6*10**24; #mass of earth(kg)\n", + "M2=7.5*10**22; #mass of moon(kg)\n", + "\n", + "#Calculation\n", + "x=r/(1+math.sqrt(M2/M1)); #distance where potential becomes zero(m)\n", + "\n", + "#Result\n", + "print \"distance where potential becomes zero is\",round(x/10**8,1),\"*10**8 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10, Page number 204" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "initial velocity is 306.7 km/s\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "g=9.8; #acceleration due to gravity(m/s**2)\n", + "R=6.4*10**3; #radius(km)\n", + "\n", + "#Calculation\n", + "v=math.sqrt(3*g*R/2); #initial velocity(km/s)\n", + "\n", + "#Result\n", + "print \"initial velocity is\",round(v,1),\"km/s\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11, Page number 205" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity of particle is 5.77 *10**-14 m/s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m=10**-26; #mass(kg)\n", + "R=0.5*10**-10; #radius(m)\n", + "G=6.67*10**-11; #gravitational constant\n", + "\n", + "#Calculation\n", + "V=math.sqrt(G*m/(4*R)); #velocity of particle(m/s)\n", + "\n", + "#Result\n", + "print \"velocity of particle is\",round(V*10**14,2),\"*10**-14 m/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13, Page number 206" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gravitational potential is 6.67 *10**-10 J/kg\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m=1; #mass(kg)\n", + "r=0.1; #radius(m)\n", + "G=6.67*10**-11; #gravitational constant\n", + "\n", + "#Calculation\n", + "F=G*m/r**2; #force(N/kg)\n", + "U=F*r; #gravitational potential(J/kg)\n", + "\n", + "#Result\n", + "print \"gravitational potential is\",U*10**10,\"*10**-10 J/kg\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15, Page number 207" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "eccentricity of orbit is 0.9\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rmax=1.2*10**12; #semi minor axis(m)\n", + "rmin=0.06*10**12; #semi major axis(m)\n", + "\n", + "#Calculation\n", + "e=(rmax-rmin)/(rmax+rmin); #eccentricity of orbit\n", + "\n", + "#Result\n", + "print \"eccentricity of orbit is\",round(e,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16, Page number 207" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum velocity is 525 km/sec\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Vmin=21; #minimum velocity(km/sec)\n", + "rmax=4*10**10; #apogee position(m)\n", + "rmin=1.6*10**9; #perigee position(m)\n", + "\n", + "#Calculation\n", + "Vmax=Vmin*rmax/rmin; #maximum velocity(km/sec)\n", + "\n", + "#Result\n", + "print \"maximum velocity is\",int(Vmax),\"km/sec\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17, Page number 208" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "apogee position is 2.76 *10**10 m\n", + "velocity at apogee point is 32.57 km/s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=0.05; #eccentricity of orbit\n", + "Vmin=36; #minimum velocity(km/sec)\n", + "rmin=2.5*10**10; #perigee position(m)\n", + "\n", + "#Calculation\n", + "rmax=rmin*((1+e)/(1-e)); #apogee position(m)\n", + "Vmax=Vmin*rmin/rmax; #velocity at apogee point(km/s) \n", + "\n", + "#Result\n", + "print \"apogee position is\",round(rmax/10**10,2),\"*10**10 m\"\n", + "print \"velocity at apogee point is\",round(Vmax,2),\"km/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 18, Page number 208" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "eccentricity of orbit is 0.0417\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Vmin=23; #minimum velocity(km/sec)\n", + "Vmax=25; #velocity at apogee point(km/s) \n", + "\n", + "#Calculation\n", + "e=(Vmax-Vmin)/(Vmax+Vmin); #eccentricity of orbit\n", + "\n", + "#Result\n", + "print \"eccentricity of orbit is\",round(e,4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 20, Page number 208" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "mass of earth is 5.968 *10**24 kg\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r=3.8*10**8; #radius(m)\n", + "T=27*24*3600; #time period(sec)\n", + "G=6.67*10**-11; #gravitational constant\n", + "\n", + "#Calculation\n", + "M=4*math.pi**2*r**3/(G*T**2); #mass of earth(kg)\n", + "\n", + "#Result\n", + "print \"mass of earth is\",round(M/10**24,3),\"*10**24 kg\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 21, Page number 209" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of semi major axis is 0.724\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T1=225; #time period of venus(days)\n", + "T2=365; #time period of earth(days)\n", + "\n", + "#Calculation\n", + "a1bya2=(T1/T2)**(2/3); #ratio of semi major axis\n", + "\n", + "#Result\n", + "print \"ratio of semi major axis is\",round(a1bya2,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 22, Page number 209" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time period of planet is 510 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a2=1; #assume\n", + "a1=1.25*a2; #axis of planet\n", + "T2=365; #time period of earth(days)\n", + "\n", + "#Calculation\n", + "T1=T2*math.sqrt((a1/a2)**3); #time period of planet(days)\n", + "\n", + "#Result\n", + "print \"time period of planet is\",int(T1),\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 23, Page number 209" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "change in time period is 15.36 hours\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r1=1; #assume\n", + "r2=1-(40/100); #radius of earth\n", + "T1=24; #time period of earth(hours)\n", + "\n", + "#Calculation\n", + "T2=T1-(T1*((r2/r1)**2)); #change in time period(hours)\n", + "\n", + "#Result\n", + "print \"change in time period is\",T2,\"hours\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 24, Page number 210" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time interval to reach sun is 64.5 days\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=1; #assume\n", + "a1=R/2;\n", + "a=R;\n", + "T=365; #time period of earth(days)\n", + "\n", + "#Calculation\n", + "T1=T*math.sqrt((a1/a)**3)/2; #time interval to reach sun(days)\n", + "\n", + "#Result\n", + "print \"time interval to reach sun is\",round(T1,1),\"days\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 25, Page number 210" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "mass of sun is 2 *10**30 kg\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=1.5*10**11; #radius(m)\n", + "T=86400*365; #time period(sec)\n", + "G=6.67*10**-11; #gravitational constant\n", + "\n", + "#Calculation\n", + "M=4*math.pi**2*R**3/(G*T**2); #mass of sun(kg)\n", + "\n", + "#Result\n", + "print \"mass of sun is\",int(M/10**30),\"*10**30 kg\"" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6.ipynb new file mode 100644 index 00000000..495cf888 --- /dev/null +++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6.ipynb @@ -0,0 +1,844 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 6: Special Theory of Relativity" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 235" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fringe shift is 0.2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "l=5; #length(m)\n", + "v=3*10**4; #velocity(m/sec)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "lamda=5000*10**-10; #wavelength(m)\n", + "\n", + "#Calculation\n", + "S=2*l*v**2/(c**2*lamda); #fringe shift\n", + "\n", + "#Result\n", + "print \"fringe shift is\",S" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 235" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "coordinates w.r.t moving observer are (x1,y1,z1,t1)=( 800 100 100 0 )\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "x=1000; #x-coordinate(m)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "t=2*10**-6; #time(s)\n", + "v1=0.6*c;\n", + "y1=y=100; #y-coordinate(m)\n", + "z1=z=100; #z-coordinate(m)\n", + "\n", + "#Calculation\n", + "x1=(x-(v1*t))/math.sqrt(1-((v1/c)**2)); #coordinate along x-axis\n", + "t1=(t-(x*v1/c**2))/math.sqrt(1-((v1/c)**2)); #time\n", + "\n", + "#Result\n", + "print \"coordinates w.r.t moving observer are (x1,y1,z1,t1)=(\",int(x1),int(y1),int(z1),int(t1),\")\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 236" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "decay time is 3.83 micro s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "delta_t=2.3; #time(micro s)\n", + "c=1; #assume\n", + "v=0.8*c; #velocity\n", + "\n", + "#Calculation\n", + "delta_t1=delta_t/math.sqrt(1-(v**2/c**2)); #decay time(micro s)\n", + "\n", + "#Result\n", + "print \"decay time is\",round(delta_t1,2),\"micro s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 6, Page number 236" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "space shuttle velocity is 0.515 c\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "delta_t=24; #time(hours)\n", + "delta_t1=28; #decay time(hours)\n", + "\n", + "#Calculation\n", + "v=math.sqrt(1-(delta_t/delta_t1)**2); #space shuttle velocity(c)\n", + "\n", + "#Result\n", + "print \"space shuttle velocity is\",round(v,3),\"c\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 7, Page number 236" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "observed displacement is 375.0 m\n", + "relative displacement is 433.01 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "delta_t=2.5*10**-6; #time(s)\n", + "c=3*10**8; #velocity of light\n", + "v=c/2; #velocity\n", + "\n", + "#Calculation\n", + "delta_t1=delta_t/math.sqrt(1-(v**2/c**2)); #decay time(s)\n", + "x=v*delta_t; #observed displacement(m)\n", + "x1=v*delta_t1; #relative displacement(m)\n", + "\n", + "#Result\n", + "print \"observed displacement is\",x,\"m\"\n", + "print \"relative displacement is\",round(x1,2),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 8, Page number 237" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative decay in earth diameter is 6.4 *10**-5 m\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=6400; #radius(km)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "v=30*10**3; #orbital velocity(m/sec)\n", + "\n", + "#Calculation\n", + "d=2*R; #diameter(km)\n", + "d1=d*math.sqrt(1-(v**2/c**2)); \n", + "delta_d=d-d1; #relative decay in earth diameter(m)\n", + "\n", + "#Result\n", + "print \"relative decay in earth diameter is\",round(delta_d*10**5,1),\"*10**-5 m\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 9, Page number 237" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity is 0.28 c\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "L=1; #length(m)\n", + "L1=0.96; #recorded length(m)\n", + "\n", + "#Calculation\n", + "v=math.sqrt(1-(L1/L)**2); #velocity(c)\n", + "\n", + "#Result\n", + "print \"velocity is\",v,\"c\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10, Page number 237" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "change in area is 0.0063 sq m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "R=0.1; #radius(m)\n", + "c=1; #assume\n", + "v=0.6*c; #velocity\n", + "\n", + "#Calculation\n", + "A=math.pi*R**2; #area(sq m)\n", + "R1=R*math.sqrt(1-(v**2/c**2)); \n", + "A1=math.pi*R*R1; #plate area in ellipse shape(sq m) \n", + "deltaA=A-A1; #change in area(sq m)\n", + "\n", + "#Result\n", + "print \"change in area is\",round(deltaA,4),\"sq m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11, Page number 238" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "change in length is 28.0 cm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c=1; #assume\n", + "v=0.8*c; #velocity\n", + "theta=30*math.pi/180; #angle(rad)\n", + "L=1; #length(m)\n", + "\n", + "#Calculation\n", + "Ix=L*math.cos(theta)*math.sqrt(1-(v**2/c**2));\n", + "Iy=L*math.sin(theta);\n", + "L1=math.sqrt((Ix**2)+(Iy**2)); #changed length(m)\n", + "delta_L=L-L1; #change in length(m)\n", + "\n", + "#Result\n", + "print \"change in length is\",round(delta_L*100),\"cm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12, Page number 238" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of bacteria grown is 16\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "delta_t=10; #time(days)\n", + "c=1; #assume\n", + "v=0.99*c; #velocity\n", + "d=280; #number of days \n", + "\n", + "#Calculation\n", + "delta_t1=delta_t/math.sqrt(1-(v**2/c**2)); #decay time(days)\n", + "x=d/int(delta_t1); #number of folds\n", + "n=1*2**x; #number of bacteria grown \n", + "\n", + "#Result\n", + "print \"number of bacteria grown is\",int(n)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13, Page number 239" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative velocity of B w.r.t A is 0.538 c\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c=1; #assume\n", + "u1=c/3; #velocity\n", + "v=c/4; #velocity\n", + "\n", + "#Calculation\n", + "u=(u1+v)/(1+(u1*v/c**2)); #relative velocity of B w.r.t A(c)\n", + "\n", + "#Result\n", + "print \"relative velocity of B w.r.t A is\",round(u,3),\"c\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14, Page number 239" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative velocity is 0.9286 c\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c=1; #assume\n", + "u1=0.8*c; #velocity\n", + "v=0.5*c; #velocity\n", + "\n", + "#Calculation\n", + "u=(u1+v)/(1+(u1*v/c**2)); #relative velocity(c)\n", + "\n", + "#Result\n", + "print \"relative velocity is\",round(u,4),\"c\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16, Page number 239" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity is 0.866 c\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m0=1; #assume\n", + "m=2*m0;\n", + "\n", + "#Calculation\n", + "v=math.sqrt(1-(m0/m)**2); #velocity(c)\n", + "\n", + "#Result\n", + "print \"velocity is\",round(v,3),\"c\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17, Page number 240" + ] + }, + { + "cell_type": "code", + "execution_count": 60, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity is 0.9428 c\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m0=1; #assume\n", + "m=3*m0;\n", + "\n", + "#Calculation\n", + "v=math.sqrt(1-(m0/m)**2); #velocity(c)\n", + "\n", + "#Result\n", + "print \"velocity is\",round(v,4),\"c\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 19, Page number 240" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rest energy is 9 *10**17 J\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m0=10; #mass(kg)\n", + "c=3*10**8; #velocity of light(m/s)\n", + "\n", + "#Calculation\n", + "E=m0*c**2; #rest energy(J)\n", + "\n", + "#Result\n", + "print \"rest energy is\",int(E/10**17),\"*10**17 J\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 20, Page number 240" + ] + }, + { + "cell_type": "code", + "execution_count": 68, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "kinetic energy is 0.1266 MeV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m0=9*10**-31; #mass of electron(g)\n", + "c=3*10**8; #velocity of light(m/sec) \n", + "v=0.6*c; #velocity of electron(m/sec)\n", + "e=1.6*10**-19; #conversion factor\n", + "\n", + "#Calculation\n", + "KE=m0*c**2*((1/math.sqrt(1-(v**2/c**2)))-1); #kinetic energy(J)\n", + "KE=KE/e; #kinetic energy(eV) \n", + "\n", + "#Result\n", + "print \"kinetic energy is\",round(KE/10**6,4),\"MeV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 21, Page number 241" + ] + }, + { + "cell_type": "code", + "execution_count": 74, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "loss in mass is 1.8667 *10**-13 kg\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m=50; #mass(gm)\n", + "L=80*4.2; #latent heat(cal/gm)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "\n", + "#Calculation\n", + "Q=m*L; #heat loss(J)\n", + "delta_m=Q/c**2; #loss in mass(kg)\n", + "\n", + "#Result\n", + "print \"loss in mass is\",round(delta_m*10**13,4),\"*10**-13 kg\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 22, Page number 241" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency of photon is 1.237 *10**20 Hz\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m0=9.1*10**-31; #mass of photon(g)\n", + "c=3*10**8; #velocity of light(m/sec) \n", + "h=6.62*10**-34; #planck's constant(Jsec)\n", + "\n", + "#Calculation\n", + "new=m0*c**2/h; #frequency of photon(Hz)\n", + "\n", + "#Result\n", + "print \"frequency of photon is\",round(new/10**20,3),\"*10**20 Hz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 23, Page number 241" + ] + }, + { + "cell_type": "code", + "execution_count": 80, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "kinetic energy of electron is 0.506 MeV\n", + "kinetic energy of positron is 0.394 MeV\n", + "answer for kinetic energy of positron given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m0=9*10**-31; #mass of photon(g)\n", + "c=3*10**8; #velocity of light(m/sec) \n", + "e=1.6*10**-19; #conversion factor\n", + "E=1.8; #energy(MeV)\n", + "\n", + "#Calculation\n", + "E0=m0*c**2/(e*10**6); #kinetic energy of electron(MeV) \n", + "k=(E/2)-E0; #kinetic energy of positron(MeV) \n", + "\n", + "#Result\n", + "print \"kinetic energy of electron is\",round(E0,3),\"MeV\"\n", + "print \"kinetic energy of positron is\",round(k,3),\"MeV\"\n", + "print \"answer for kinetic energy of positron given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 24, Page number 242" + ] + }, + { + "cell_type": "code", + "execution_count": 83, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "binding energy is 106.9 MeV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Z=7; #atomic number of nitrogen\n", + "N=7; \n", + "mp=1.0086; #mass of proton(amu)\n", + "mn=1.0078; #mass of nucleus(amu)\n", + "amu=931.5; #energy(MeV)\n", + "A=14; #atomic mass \n", + "\n", + "#Calculation\n", + "EB=((Z*mp)+(N*mn)-A)*amu; #binding energy(MeV)\n", + "\n", + "#Result\n", + "print \"binding energy is\",round(EB,1),\"MeV\"" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7.ipynb new file mode 100644 index 00000000..13136d2a --- /dev/null +++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7.ipynb @@ -0,0 +1,172 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 7: Vibrations-Fundamental Concepts" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 271" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "force constant is 0.02 N/m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=-0.0176; #acceleration(m/s**2)\n", + "x=0.44; #displacement(m)\n", + "m=0.5; #mass(kg)\n", + "\n", + "#Calculation\n", + "omega0=math.sqrt(-a/x); #frequency\n", + "k=m*omega0**2; #force constant(N/m)\n", + "\n", + "#Result\n", + "print \"force constant is\",k,\"N/m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 271" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency of oscillation is 1.114 Hertz\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "g=9.8; #acceleration(m/s**2)\n", + "x=0.5; #displacement(m)\n", + "m1=5; #mass(kg)\n", + "m2=2; #mass(kg)\n", + "\n", + "#Calculation\n", + "k=m1*g/x; #spring constant(N/m)\n", + "omega=math.sqrt(k/m2)/(2*math.pi); #frequency of oscillation(Hertz)\n", + "\n", + "#Result\n", + "print \"frequency of oscillation is\",round(omega,3),\"Hertz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 272" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "amplitude is 0.3 m\n", + "frequency of oscillation is 1.0 /(2 math.pi) Hertz\n", + "initial phase is -2 *math.pi/6 rad\n", + "answer for initial phase given in the book is wrong\n", + "displacement is 0.3 m\n", + "velocity is -0.26 m/sec\n", + "acceleration is 0.15 m/s**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "#given y=0.3sin(t+pi/6)\n", + "A=0.3; #value of amplitude by comparing with the given equation\n", + "omega=1; #angular freuency(rad/sec)\n", + "theta=math.pi/6; #angle(rad)\n", + "t1=math.pi/3; #time(sec)\n", + "t2=2*math.pi/3; #time(sec)\n", + "t3=math.pi; #time(sec)\n", + "\n", + "#Calculation\n", + "new=omega/(2*math.pi); #frequency of oscillation(Hertz)\n", + "phi=theta-(math.pi/2); #initial phase(rad)\n", + "y=A*math.sin(theta+(math.pi/6)); #displacement(m)\n", + "V=omega*A*math.cos((omega*t2)+theta); #velocity(m/sec)\n", + "a=-A*omega**2*math.sin((omega*t3)+theta); #acceleration(m/s**2)\n", + "\n", + "#Result\n", + "print \"amplitude is\",A,\"m\"\n", + "print \"frequency of oscillation is\",new*2*math.pi,\"/(2 math.pi) Hertz\"\n", + "print \"initial phase is\",int(phi*6/math.pi),\"*math.pi/6 rad\"\n", + "print \"answer for initial phase given in the book is wrong\"\n", + "print \"displacement is\",round(y,1),\"m\"\n", + "print \"velocity is\",round(V,2),\"m/sec\"\n", + "print \"acceleration is\",a,\"m/s**2\"" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8.ipynb new file mode 100644 index 00000000..14a19e18 --- /dev/null +++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8.ipynb @@ -0,0 +1,306 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 8: Damped and Forced Oscillations" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 300" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "restoration energy is 125000 erg\n", + "frequency is 5 /math.pi Hz\n", + "time taken for reduction of amplitude is 3.22 sec\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "k=10**4; #Force constant(dyne/cm)\n", + "x=5; #displacement(cm)\n", + "m=100; #mass(gm)\n", + "R=100; #resistance(dyne/cm)\n", + "At=1; #amplitude(cm)\n", + "A0=5; #amplitude(cm)\n", + "\n", + "#Calculation\n", + "E=(1/2)*k*x**2; #restoration energy(erg)\n", + "v=1/(2*math.pi)*math.sqrt(k/m) #frequency(Hz)\n", + "b=R/(2*m); \n", + "t=math.log(A0/At)/b; #time taken for reduction of amplitude(sec)\n", + "\n", + "#Result\n", + "print \"restoration energy is\",int(E),\"erg\"\n", + "print \"frequency is\",int(v*math.pi),\"/math.pi Hz\"\n", + "print \"time taken for reduction of amplitude is\",round(t,2),\"sec\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 301" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time taken is 61.08 sec\n", + "answer in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "new=300; #frequency(Hz)\n", + "EbyE0=1/10; #ratio of energy\n", + "Q=5*10**4; #Q factor\n", + "\n", + "#Calculation\n", + "tbytow=math.log(1/EbyE0);\n", + "tow=Q/(2*math.pi*new); \n", + "t=tbytow*tow; #time taken(sec)\n", + "\n", + "#Result\n", + "print \"time taken is\",round(t,2),\"sec\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 301" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time taken is 6 sec\n", + "procedure followed in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Q=2.2*10**3; #Q value of sonometer wire\n", + "new=210; #frequency(Hz)\n", + "\n", + "#Calculation\n", + "tow=Q/(2*math.pi*new); #torque(Nm)\n", + "t=4*tow; #time taken(sec)\n", + "\n", + "#Result\n", + "print \"time taken is\",int(t),\"sec\"\n", + "print \"procedure followed in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 302" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "damping factor is 0.0618 N/m\n", + "Q-factor is 113.3\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m=0.5; #mass(kg)\n", + "g=9.8; #acceleration due to gravity(m/sec**2)\n", + "x=0.05; #displacement(m)\n", + "\n", + "#Calculation\n", + "k=m*g/x; \n", + "omega0=math.sqrt(k/m); #angular velocity\n", + "T=50*2*math.pi/omega0; #time taken for 50 oscillations(sec)\n", + "b=math.log(4)/T; #damping factor(N/m)\n", + "R=2*b*m; #resistance(ohm)\n", + "Q=m*omega0/R; #Q-factor\n", + "\n", + "#Result\n", + "print \"damping factor is\",round(b,4),\"N/m\"\n", + "print \"Q-factor is\",round(Q,1)\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 302" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of oscillations is 27.73\n", + "answer in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m=1; #mass(gm)\n", + "R=10; #damping constant\n", + "E=50; #energy(J)\n", + "E0=200; #energy(J)\n", + "new=200; #frequency(Hz)\n", + "\n", + "#Calculation\n", + "b=R/(2*m);\n", + "t=math.log(E0/E)/(2*b); #time taken(sec)\n", + "n=new*t; #number of oscillations\n", + "\n", + "#Result\n", + "print \"number of oscillations is\",round(n,2)\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 6, Page number 303" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "mechanical resistance is 0.0628 m/sec\n", + "damping constant is 0.209\n", + "spring constant 11.84 N/cm\n", + "answer for spring constant given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m=0.3; #mass(kg)\n", + "new=2; #frequency(Hz)\n", + "Q=60; #Q-factor\n", + "\n", + "#Calculation\n", + "omega=2*math.pi*new; #angular velocity\n", + "R=m*omega/Q; #mechanical resistance(m/sec)\n", + "b=R/m; #damping constant\n", + "k=4*(math.pi**2)*m; #spring constant(N/cm)\n", + "\n", + "#Result\n", + "print \"mechanical resistance is\",round(R,4),\"m/sec\"\n", + "print \"damping constant is\",round(b,3)\n", + "print \"spring constant\",round(k,2),\"N/cm\"\n", + "print \"answer for spring constant given in the book is wrong\"" + ] + } + ], + "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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/screenshots/2.png b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/screenshots/2.png Binary files differnew file mode 100644 index 00000000..9bc16e00 --- /dev/null +++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/screenshots/2.png diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/screenshots/3.png b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/screenshots/3.png Binary files differnew file mode 100644 index 00000000..a71d53ab --- /dev/null +++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/screenshots/3.png diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/screenshots/4.png b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/screenshots/4.png Binary files differnew file mode 100644 index 00000000..09ee365c --- /dev/null +++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/screenshots/4.png |