diff options
105 files changed, 38823 insertions, 0 deletions
diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_EAg6827.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_EAg6827.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_EAg6827.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/Chapter10_FWFi3lU.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_FWFi3lU.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_FWFi3lU.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/Chapter10_Goix5H9.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_Goix5H9.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_Goix5H9.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/Chapter10_VriTfiQ.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_VriTfiQ.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_VriTfiQ.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/Chapter10_Yq1Psz2.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_Yq1Psz2.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_Yq1Psz2.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/Chapter10_l9H0tzb.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_l9H0tzb.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_l9H0tzb.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/Chapter10_pYSKzNA.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_pYSKzNA.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_pYSKzNA.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/Chapter10_zs7Ebyd.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_zs7Ebyd.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_zs7Ebyd.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_27AWa1S.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_27AWa1S.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_27AWa1S.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/Chapter11_47129pd.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_47129pd.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_47129pd.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/Chapter11_CGVC5S7.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_CGVC5S7.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_CGVC5S7.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/Chapter11_aM6HbOJ.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_aM6HbOJ.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_aM6HbOJ.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/Chapter11_elTomjM.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_elTomjM.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_elTomjM.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/Chapter11_hIH40hA.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_hIH40hA.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_hIH40hA.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/Chapter11_hfcwfMy.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_hfcwfMy.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_hfcwfMy.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/Chapter11_rDaXznv.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_rDaXznv.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_rDaXznv.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_4CIoGBj.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_4CIoGBj.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_4CIoGBj.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/Chapter12_8Ha6SRC.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_8Ha6SRC.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_8Ha6SRC.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/Chapter12_BV4qq7W.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_BV4qq7W.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_BV4qq7W.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/Chapter12_DcqNS3a.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_DcqNS3a.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_DcqNS3a.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/Chapter12_GaxQomY.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_GaxQomY.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_GaxQomY.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/Chapter12_TWDQmEU.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_TWDQmEU.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_TWDQmEU.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/Chapter12_gYL8x2U.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_gYL8x2U.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_gYL8x2U.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/Chapter12_pwlIEac.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_pwlIEac.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_pwlIEac.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/Chapter1_9Ph1wQl.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_9Ph1wQl.ipynb new file mode 100644 index 00000000..dfa6106f --- /dev/null +++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_9Ph1wQl.ipynb @@ -0,0 +1,164 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 1: Vector Analysis" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13, Page number 25" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "divergence of force vector is 3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from scipy.integrate import tplquad\n", + "\n", + "#Calculation\n", + "func = lambda x,y,z: 2*(x+y+z)\n", + "x1,x2 = 0,1\n", + "y1,y2 = lambda x: 0, lambda x: 1\n", + "z1,z2 = lambda x,y: 0, lambda x,y: 1\n", + "r1,r2=tplquad(func,x1,x2,y1,y2,z1,z2) \n", + "r=r1-r2; #divergence of force vector\n", + "\n", + "#Result\n", + "print \"divergence of force vector is\",int(round(r))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16, Page number 28" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "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": 3, + "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/Chapter1_H4ZXqG6.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_H4ZXqG6.ipynb new file mode 100644 index 00000000..dfa6106f --- /dev/null +++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_H4ZXqG6.ipynb @@ -0,0 +1,164 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 1: Vector Analysis" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13, Page number 25" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "divergence of force vector is 3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from scipy.integrate import tplquad\n", + "\n", + "#Calculation\n", + "func = lambda x,y,z: 2*(x+y+z)\n", + "x1,x2 = 0,1\n", + "y1,y2 = lambda x: 0, lambda x: 1\n", + "z1,z2 = lambda x,y: 0, lambda x,y: 1\n", + "r1,r2=tplquad(func,x1,x2,y1,y2,z1,z2) \n", + "r=r1-r2; #divergence of force vector\n", + "\n", + "#Result\n", + "print \"divergence of force vector is\",int(round(r))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16, Page number 28" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "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": 3, + "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/Chapter1_R7vvA9U.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_R7vvA9U.ipynb new file mode 100644 index 00000000..dfa6106f --- /dev/null +++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_R7vvA9U.ipynb @@ -0,0 +1,164 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 1: Vector Analysis" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13, Page number 25" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "divergence of force vector is 3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from scipy.integrate import tplquad\n", + "\n", + "#Calculation\n", + "func = lambda x,y,z: 2*(x+y+z)\n", + "x1,x2 = 0,1\n", + "y1,y2 = lambda x: 0, lambda x: 1\n", + "z1,z2 = lambda x,y: 0, lambda x,y: 1\n", + "r1,r2=tplquad(func,x1,x2,y1,y2,z1,z2) \n", + "r=r1-r2; #divergence of force vector\n", + "\n", + "#Result\n", + "print \"divergence of force vector is\",int(round(r))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16, Page number 28" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "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": 3, + "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/Chapter1_RJFpm9n.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_RJFpm9n.ipynb new file mode 100644 index 00000000..dfa6106f --- /dev/null +++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_RJFpm9n.ipynb @@ -0,0 +1,164 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 1: Vector Analysis" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13, Page number 25" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "divergence of force vector is 3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from scipy.integrate import tplquad\n", + "\n", + "#Calculation\n", + "func = lambda x,y,z: 2*(x+y+z)\n", + "x1,x2 = 0,1\n", + "y1,y2 = lambda x: 0, lambda x: 1\n", + "z1,z2 = lambda x,y: 0, lambda x,y: 1\n", + "r1,r2=tplquad(func,x1,x2,y1,y2,z1,z2) \n", + "r=r1-r2; #divergence of force vector\n", + "\n", + "#Result\n", + "print \"divergence of force vector is\",int(round(r))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16, Page number 28" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "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": 3, + "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/Chapter1_hdpf5pv.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_hdpf5pv.ipynb new file mode 100644 index 00000000..dfa6106f --- /dev/null +++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_hdpf5pv.ipynb @@ -0,0 +1,164 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 1: Vector Analysis" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13, Page number 25" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "divergence of force vector is 3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from scipy.integrate import tplquad\n", + "\n", + "#Calculation\n", + "func = lambda x,y,z: 2*(x+y+z)\n", + "x1,x2 = 0,1\n", + "y1,y2 = lambda x: 0, lambda x: 1\n", + "z1,z2 = lambda x,y: 0, lambda x,y: 1\n", + "r1,r2=tplquad(func,x1,x2,y1,y2,z1,z2) \n", + "r=r1-r2; #divergence of force vector\n", + "\n", + "#Result\n", + "print \"divergence of force vector is\",int(round(r))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16, Page number 28" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "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": 3, + "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/Chapter1_s7mmHTE.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_s7mmHTE.ipynb new file mode 100644 index 00000000..dfa6106f --- /dev/null +++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_s7mmHTE.ipynb @@ -0,0 +1,164 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 1: Vector Analysis" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13, Page number 25" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "divergence of force vector is 3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from scipy.integrate import tplquad\n", + "\n", + "#Calculation\n", + "func = lambda x,y,z: 2*(x+y+z)\n", + "x1,x2 = 0,1\n", + "y1,y2 = lambda x: 0, lambda x: 1\n", + "z1,z2 = lambda x,y: 0, lambda x,y: 1\n", + "r1,r2=tplquad(func,x1,x2,y1,y2,z1,z2) \n", + "r=r1-r2; #divergence of force vector\n", + "\n", + "#Result\n", + "print \"divergence of force vector is\",int(round(r))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16, Page number 28" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "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": 3, + "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/Chapter1_svi606z.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_svi606z.ipynb new file mode 100644 index 00000000..dfa6106f --- /dev/null +++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_svi606z.ipynb @@ -0,0 +1,164 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 1: Vector Analysis" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13, Page number 25" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "divergence of force vector is 3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from scipy.integrate import tplquad\n", + "\n", + "#Calculation\n", + "func = lambda x,y,z: 2*(x+y+z)\n", + "x1,x2 = 0,1\n", + "y1,y2 = lambda x: 0, lambda x: 1\n", + "z1,z2 = lambda x,y: 0, lambda x,y: 1\n", + "r1,r2=tplquad(func,x1,x2,y1,y2,z1,z2) \n", + "r=r1-r2; #divergence of force vector\n", + "\n", + "#Result\n", + "print \"divergence of force vector is\",int(round(r))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16, Page number 28" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "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": 3, + "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/Chapter1_yZrBrGW.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_yZrBrGW.ipynb new file mode 100644 index 00000000..dfa6106f --- /dev/null +++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_yZrBrGW.ipynb @@ -0,0 +1,164 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 1: Vector Analysis" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13, Page number 25" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "divergence of force vector is 3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from scipy.integrate import tplquad\n", + "\n", + "#Calculation\n", + "func = lambda x,y,z: 2*(x+y+z)\n", + "x1,x2 = 0,1\n", + "y1,y2 = lambda x: 0, lambda x: 1\n", + "z1,z2 = lambda x,y: 0, lambda x,y: 1\n", + "r1,r2=tplquad(func,x1,x2,y1,y2,z1,z2) \n", + "r=r1-r2; #divergence of force vector\n", + "\n", + "#Result\n", + "print \"divergence of force vector is\",int(round(r))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16, Page number 28" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "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": 3, + "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/Chapter2_1u2hkaL.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_1u2hkaL.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_1u2hkaL.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/Chapter2_4iVYyIH.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_4iVYyIH.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_4iVYyIH.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/Chapter2_96qogp8.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_96qogp8.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_96qogp8.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/Chapter2_97bKbrn.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_97bKbrn.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_97bKbrn.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/Chapter2_KU6DQxX.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_KU6DQxX.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_KU6DQxX.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/Chapter2_WQAFWBB.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_WQAFWBB.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_WQAFWBB.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/Chapter2_kXmkQiI.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_kXmkQiI.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_kXmkQiI.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/Chapter2_rMDgBlb.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_rMDgBlb.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_rMDgBlb.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_0Gpo8ij.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_0Gpo8ij.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_0Gpo8ij.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/Chapter3_1HFLVW3.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_1HFLVW3.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_1HFLVW3.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/Chapter3_Kef4wQi.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_Kef4wQi.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_Kef4wQi.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/Chapter3_MWqVgIK.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_MWqVgIK.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_MWqVgIK.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/Chapter3_QiNYdnt.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_QiNYdnt.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_QiNYdnt.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/Chapter3_ZOEnqWz.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_ZOEnqWz.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_ZOEnqWz.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/Chapter3_t8ZxgMJ.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_t8ZxgMJ.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_t8ZxgMJ.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/Chapter3_yX7jRTL.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_yX7jRTL.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_yX7jRTL.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_12jIRAa.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_12jIRAa.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_12jIRAa.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/Chapter4_7TlydJM.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_7TlydJM.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_7TlydJM.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/Chapter4_9F6nz40.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_9F6nz40.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_9F6nz40.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/Chapter4_Iv6UqxF.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_Iv6UqxF.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_Iv6UqxF.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/Chapter4_QznuUog.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_QznuUog.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_QznuUog.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/Chapter4_Tlme4Nt.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_Tlme4Nt.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_Tlme4Nt.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/Chapter4_kKbunDz.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_kKbunDz.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_kKbunDz.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/Chapter4_kj2kQSj.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_kj2kQSj.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_kj2kQSj.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_ELZ4gfb.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_ELZ4gfb.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_ELZ4gfb.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/Chapter5_HmzPXBx.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_HmzPXBx.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_HmzPXBx.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/Chapter5_NsyjFuf.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_NsyjFuf.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_NsyjFuf.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/Chapter5_dQcqRqy.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_dQcqRqy.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_dQcqRqy.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/Chapter5_fpjVXLa.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_fpjVXLa.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_fpjVXLa.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/Chapter5_qEtyNEB.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_qEtyNEB.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_qEtyNEB.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/Chapter5_wOjIeEX.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_wOjIeEX.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_wOjIeEX.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/Chapter5_zpdMjKp.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_zpdMjKp.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_zpdMjKp.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_4sTMSct.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_4sTMSct.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_4sTMSct.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/Chapter6_OaXeXza.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_OaXeXza.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_OaXeXza.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/Chapter6_OzarWlo.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_OzarWlo.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_OzarWlo.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/Chapter6_ZcykI2A.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_ZcykI2A.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_ZcykI2A.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/Chapter6_Ztedvce.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_Ztedvce.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_Ztedvce.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/Chapter6_hp8AaKa.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_hp8AaKa.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_hp8AaKa.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/Chapter6_j1y0oTK.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_j1y0oTK.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_j1y0oTK.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/Chapter6_srj5dHs.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_srj5dHs.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_srj5dHs.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_7s2tMTN.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_7s2tMTN.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_7s2tMTN.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/Chapter7_9XJ7DgO.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_9XJ7DgO.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_9XJ7DgO.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/Chapter7_Kxvh43O.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_Kxvh43O.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_Kxvh43O.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/Chapter7_St5Khwo.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_St5Khwo.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_St5Khwo.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/Chapter7_XgCkEpd.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_XgCkEpd.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_XgCkEpd.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/Chapter7_YxJXxam.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_YxJXxam.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_YxJXxam.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/Chapter7_cYbOBPv.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_cYbOBPv.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_cYbOBPv.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/Chapter7_wdE8t89.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_wdE8t89.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_wdE8t89.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_3OxJHIx.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_3OxJHIx.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_3OxJHIx.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/Chapter8_Bj4FcI7.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_Bj4FcI7.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_Bj4FcI7.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/Chapter8_GBeiA21.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_GBeiA21.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_GBeiA21.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/Chapter8_QSOQgt9.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_QSOQgt9.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_QSOQgt9.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/Chapter8_lwCA1i3.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_lwCA1i3.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_lwCA1i3.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/Chapter8_m8vzt2q.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_m8vzt2q.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_m8vzt2q.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/Chapter8_pYLCIKK.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_pYLCIKK.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_pYLCIKK.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/Chapter8_yBBd5FI.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_yBBd5FI.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_yBBd5FI.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/11.png b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/screenshots/11.png Binary files differnew file mode 100644 index 00000000..fe54d658 --- /dev/null +++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/screenshots/11.png diff --git a/Solid_State_Physics_by_Dr._M._Arumugam/Chapter10_uTyvarI.ipynb b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter10_uTyvarI.ipynb new file mode 100644 index 00000000..76c25efb --- /dev/null +++ b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter10_uTyvarI.ipynb @@ -0,0 +1,212 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 10: Dielectric Properties" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 10.26" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "insulation resistance is 0.85 *10**18 ohm\n", + "answer varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rho=5*10**16; #resistivity(ohm m)\n", + "l=5*10**-2; #thickness(m)\n", + "b=8*10**-2; #length(m)\n", + "w=3*10**-2; #width(m)\n", + "\n", + "#Calculation\n", + "A=b*w; #area(m**2)\n", + "Rv=rho*l/A; \n", + "X=l+b; #length(m)\n", + "Y=w; #perpendicular(m)\n", + "Rs=Rv*X/Y; \n", + "Ri=Rs*Rv/(Rs+Rv); #insulation resistance(ohm)\n", + "\n", + "#Result\n", + "print \"insulation resistance is\",round(Ri/10**18,2),\"*10**18 ohm\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 10.26" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "polarisability of He is 0.185 *10**-40 farad m**2\n", + "relative permittivity is 1.0000564\n", + "answer varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "epsilon0=8.84*10**-12;\n", + "R=0.55*10**-10; #radius(m)\n", + "N=2.7*10**25; #number of atoms\n", + "\n", + "#Calculation\n", + "alpha_e=4*math.pi*epsilon0*R**3; #polarisability of He(farad m**2)\n", + "epsilonr=1+(N*alpha_e/epsilon0); #relative permittivity\n", + "\n", + "#Result\n", + "print \"polarisability of He is\",round(alpha_e*10**40,3),\"*10**-40 farad m**2\"\n", + "print \"relative permittivity is\",round(epsilonr,7)\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 10.27" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "field strength is 3.535 *10**7 V/m\n", + "total dipole moment is 33.4 *10**-12 Cm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "A=360*10**-4; #area(m**2)\n", + "V=15; #voltage(V)\n", + "C=6*10**-6; #capacitance(farad)\n", + "epsilonr=8;\n", + "epsilon0=8.84*10**-12;\n", + "\n", + "#Calculation\n", + "E=V*C/(epsilon0*epsilonr*A); #field strength(V/m)\n", + "dm=epsilon0*(epsilonr-1)*V*A; #total dipole moment(Cm)\n", + "\n", + "#Result\n", + "print \"field strength is\",round(E/10**7,3),\"*10**7 V/m\"\n", + "print \"total dipole moment is\",round(dm*10**12,1),\"*10**-12 Cm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 10.27" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the complex polarizability is (3.50379335033-0.0600074383321j) *10**-40 F-m**2\n", + "answer cant be rouned off to 2 decimals as given in the textbook. Since it is a complex number and complex numbers cant be converted to float\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "epsilonr=4.36; #dielectric constant\n", + "t=2.8*10**-2; #loss tangent(t)\n", + "N=4*10**28; #number of electrons\n", + "epsilon0=8.84*10**-12; \n", + "\n", + "#Calculation\n", + "epsilon_r = epsilonr*t;\n", + "epsilonstar = (complex(epsilonr,-epsilon_r));\n", + "alphastar = (epsilonstar-1)/(epsilonstar+2);\n", + "alpha_star = 3*epsilon0*alphastar/N; #complex polarizability(Fm**2)\n", + "\n", + "#Result\n", + "print \"the complex polarizability is\",alpha_star*10**40,\"*10**-40 F-m**2\"\n", + "print \"answer cant be rouned off to 2 decimals as given in the textbook. Since it is a complex number and complex numbers cant be converted to float\"" + ] + } + ], + "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/Solid_State_Physics_by_Dr._M._Arumugam/Chapter11_j1rU3Z4.ipynb b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter11_j1rU3Z4.ipynb new file mode 100644 index 00000000..617a2a18 --- /dev/null +++ b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter11_j1rU3Z4.ipynb @@ -0,0 +1,327 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 11: Magnetic Properties" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 11.31" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature rise is 8.43 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "El=10**-2*50; #energy loss(J)\n", + "H=El*60; #heat produced(J)\n", + "d=7.7*10**3; #iron rod(kg/m**3)\n", + "s=0.462*10**-3; #specific heat(J/kg K)\n", + "\n", + "#Calculation\n", + "theta=H/(d*s); #temperature rise(K)\n", + "\n", + "#Result\n", + "print \"temperature rise is\",round(theta,2),\"K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 11.31" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetic field at the centre is 14 weber/m**2\n", + "dipole moment is 9 *10**-24 ampere/m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "new=6.8*10**15; #frequency(revolutions per second)\n", + "mew0=4*math.pi*10**-7;\n", + "R=5.1*10**-11; #radius(m)\n", + "\n", + "#Calculation\n", + "i=round(e*new,4); #current(ampere)\n", + "B=mew0*i/(2*R); #magnetic field at the centre(weber/m**2)\n", + "A=math.pi*R**2;\n", + "d=i*A; #dipole moment(ampere/m**2)\n", + "\n", + "#Result\n", + "print \"magnetic field at the centre is\",int(round(B)),\"weber/m**2\"\n", + "print \"dipole moment is\",int(round(d*10**24)),\"*10**-24 ampere/m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 11.31" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "intensity of magnetisation is 5 ampere/m\n", + "flux density in material is 1.257 weber/m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "chi=0.5*10**-5; #magnetic susceptibility\n", + "H=10**6; #field strength(ampere/m)\n", + "mew0=4*math.pi*10**-7;\n", + "\n", + "#Calculation\n", + "I=chi*H; #intensity of magnetisation(ampere/m)\n", + "B=mew0*(I+H); #flux density in material(weber/m**2)\n", + "\n", + "#Result\n", + "print \"intensity of magnetisation is\",int(I),\"ampere/m\"\n", + "print \"flux density in material is\",round(B,3),\"weber/m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 11.31" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of Bohr magnetons is 2.22 bohr magneon/atom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "B=9.27*10**-24; #bohr magneton(ampere m**2)\n", + "a=2.86*10**-10; #edge(m)\n", + "Is=1.76*10**6; #saturation value of magnetisation(ampere/m)\n", + "\n", + "#Calculation\n", + "N=2/a**3;\n", + "mew_bar=Is/N; #number of Bohr magnetons(ampere m**2)\n", + "mew_bar=mew_bar/B; #number of Bohr magnetons(bohr magneon/atom)\n", + "\n", + "#Result\n", + "print \"number of Bohr magnetons is\",round(mew_bar,2),\"bohr magneon/atom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 11.32" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average magnetic moment is 2.79 *10**-3 bohr magneton/spin\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mew0=4*math.pi*10**-7;\n", + "H=9.27*10**-24; #bohr magneton(ampere m**2)\n", + "beta=10**6; #field(ampere/m)\n", + "k=1.38*10**-23; #boltzmann constant\n", + "T=303; #temperature(K)\n", + "\n", + "#Calculation\n", + "mm=mew0*H*beta/(k*T); #average magnetic moment(bohr magneton/spin)\n", + "\n", + "#Result\n", + "print \"average magnetic moment is\",round(mm*10**3,2),\"*10**-3 bohr magneton/spin\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 6, Page number 11.32" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "hysteresis loss per cycle is 188 J/m**3\n", + "hysteresis loss per second is 9400 watt/m**3\n", + "power loss is 1.23 watt/kg\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "A=94; #area(m**2)\n", + "vy=0.1; #value of length(weber/m**2)\n", + "vx=20; #value of unit length\n", + "n=50; #number of magnetization cycles\n", + "d=7650; #density(kg/m**3)\n", + "\n", + "#Calculation\n", + "h=A*vy*vx; #hysteresis loss per cycle(J/m**3)\n", + "hs=h*n; #hysteresis loss per second(watt/m**3)\n", + "pl=hs/d; #power loss(watt/kg)\n", + "\n", + "#Result\n", + "print \"hysteresis loss per cycle is\",int(h),\"J/m**3\"\n", + "print \"hysteresis loss per second is\",int(hs),\"watt/m**3\"\n", + "print \"power loss is\",round(pl,2),\"watt/kg\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 8, Page number 11.33" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical field is 33.64 *10**3 ampere/m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "H0=64*10**3; #initial field(ampere/m)\n", + "T=5; #temperature(K)\n", + "Tc=7.26; #critical temperature(K)\n", + "\n", + "#Calculation\n", + "H=H0*(1-(T/Tc)**2); #critical field(ampere/m)\n", + "\n", + "#Result\n", + "print \"critical field is\",round(H/10**3,2),\"*10**3 ampere/m\"" + ] + } + ], + "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/Solid_State_Physics_by_Dr._M._Arumugam/Chapter12_MsiPuok.ipynb b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter12_MsiPuok.ipynb new file mode 100644 index 00000000..af17168c --- /dev/null +++ b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter12_MsiPuok.ipynb @@ -0,0 +1,160 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 12: Lasers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 12.30" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative population in laser transition levels is 1.081 *10**30\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", + "h=6.626*10**-34; #plancks constant(J s)\n", + "c=3*10**8; #velocity of light(m/s)\n", + "lamda=6943*10**-10; #wavelength of emission(m)\n", + "k=1.38*10**-23; #boltzmann constant\n", + "T=300; #temperature(K)\n", + "\n", + "#Calculation\n", + "new=c/lamda; #frequency(Hz)\n", + "x=h*new/(k*T);\n", + "N1byN2=math.exp(x); #relative population in laser transition levels\n", + "\n", + "#Result\n", + "print \"relative population in laser transition levels is\",round(N1byN2/10**30,3),\"*10**30\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 12.31" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of photons emitted is 7.323 *10**15 photons/second\n", + "power density is 2.3 kW/m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34; #plancks constant(J s)\n", + "P=2.3*10**-3; #output power(W)\n", + "t=1; #time(sec)\n", + "new=4.74*10**14; #frequency(Hz)\n", + "s=1*10**-6; #spot area(m**2)\n", + "\n", + "#Calculation\n", + "n=P*t/(h*new); #number of photons emitted in each second \n", + "Pd=P/s; #power density(W/m**2)\n", + "\n", + "#Result\n", + "print \"number of photons emitted is\",round(n/10**15,3),\"*10**15 photons/second\"\n", + "print \"power density is\",Pd/10**3,\"kW/m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 12.31" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of emission is 8628 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34; #plancks constant(J s)\n", + "c=3*10**8; #velocity of light(m/s)\n", + "Eg=1.44*1.6*10**-19; #band gap(J)\n", + "\n", + "#Calculation\n", + "lamda=h*c/Eg; #wavelength of emission(m)\n", + "\n", + "#Result\n", + "print \"wavelength of emission is\",int(round(lamda*10**10)),\"angstrom\"" + ] + } + ], + "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/Solid_State_Physics_by_Dr._M._Arumugam/Chapter13_Nvp3wKs.ipynb b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter13_Nvp3wKs.ipynb new file mode 100644 index 00000000..558f6667 --- /dev/null +++ b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter13_Nvp3wKs.ipynb @@ -0,0 +1,665 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 13: Fiber Optics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 13.19" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical angle is 78.5 degrees\n", + "numerical aperture is 0.3\n", + "acceptance angle is 17.4 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n2=1.47; #refractive index of cladding\n", + "n1=1.5; #refractive index of core\n", + "\n", + "#Calculation\n", + "phi_c=math.asin(n2/n1); #critical angle(radian)\n", + "phi_c=phi_c*180/math.pi; #critical angle(degrees)\n", + "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n", + "phi_max=math.asin(NA); #acceptance angle(radian)\n", + "phi_max=phi_max*180/math.pi; #acceptance angle(degrees)\n", + "\n", + "#Result\n", + "print \"critical angle is\",round(phi_c,1),\"degrees\"\n", + "print \"numerical aperture is\",round(NA,1)\n", + "print \"acceptance angle is\",round(phi_max,1),\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 13.19" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total number of guided modes is 490\n", + "number of modes propagated inside fibre is 245\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=50*10**-6; #diameter(m)\n", + "NA=0.2; #numerical aperture(m)\n", + "lamda=1*10**-6; #wavelength(m)\n", + "\n", + "#Calculation\n", + "N=4.9*(d*NA/lamda)**2; #total number of guided modes\n", + "Nf=N/2; #number of modes propagated inside fibre\n", + "\n", + "#Result\n", + "print \"total number of guided modes is\",int(N)\n", + "print \"number of modes propagated inside fibre is\",int(Nf)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 13.19" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total number of guided modes is 1\n", + "it is a single mode propagation\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=5*10**-6; #diameter(m)\n", + "n2=1.447; #refractive index of cladding\n", + "n1=1.45; #refractive index of core\n", + "lamda=1*10**-6; #wavelength(m)\n", + "\n", + "#Calculation\n", + "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n", + "N=4.9*(d*NA/lamda)**2; #total number of guided modes\n", + "\n", + "#Result\n", + "print \"total number of guided modes is\",int(N)\n", + "print \"it is a single mode propagation\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 13.19" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "numerical aperture is 0.46\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1=1.46; #refractive index of core\n", + "delta=0.05; #refractive index difference\n", + "\n", + "#Calculation\n", + "NA=n1*math.sqrt(2*delta); #numerical aperture\n", + "\n", + "#Result\n", + "print \"numerical aperture is\",round(NA,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 13.20" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "V number is 94.72\n", + "maximum number of modes is 4486\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=50;\n", + "n2=1.5; #refractive index of cladding\n", + "n1=1.53; #refractive index of core\n", + "lamda0=1; #wavelength(micro m)\n", + "\n", + "#Calculation\n", + "V_number=round(2*math.pi*a*math.sqrt(n1**2-n2**2)/lamda0,2); #V number\n", + "n=V_number**2/2; #maximum number of modes\n", + "\n", + "#Result\n", + "print \"V number is\",V_number\n", + "print \"maximum number of modes is\",int(round(n))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 6, Page number 13.20" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total number of modes is 49178\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=100*10**-6;\n", + "NA=0.3; #numerical aperture(m)\n", + "lamda=850*10**-9; #wavelength(m)\n", + "\n", + "#Calculation\n", + "V_number=round(2*math.pi**2*a**2*NA**2/lamda**2); #number of modes\n", + "\n", + "#Result\n", + "print \"total number of modes is\",int(2*V_number)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 7, Page number 13.20" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cutoff wavelength is 1.315 micro m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=25*10**-6;\n", + "n1=1.48; #refractive index of core\n", + "delta=0.01; #refractive index difference\n", + "V=25; #Vnumber\n", + "\n", + "#Calculation\n", + "lamda=2*math.pi*a*n1*math.sqrt(2*delta)/V; #cutoff wavelength(m)\n", + "\n", + "#Result\n", + "print \"cutoff wavelength is\",round(lamda*10**6,3),\"micro m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 8, Page number 13.20" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum value of core radius is 9.95 micro m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=2.405; #Vnumber\n", + "lamda=1.3; #wavelength(micro m)\n", + "NA=0.05; #numerical aperture(m)\n", + "\n", + "#Calculation\n", + "amax=V*lamda/(2*math.pi*NA); #maximum value of core radius(micro m)\n", + "\n", + "#Result\n", + "print \"maximum value of core radius is\",round(amax,2),\"micro m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 9, Page number 13.21" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "acceptance angle for meridional rays is 17.46 degrees\n", + "acceptance angle for skew rays is 25.104 degrees\n", + "answer for acceptance angle for skew rays given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "NA=0.3; #numerical aperture(m)\n", + "gama=45*math.pi/180; #angle(radian)\n", + "\n", + "#Calculation\n", + "thetaa=math.asin(NA); #acceptance angle for meridional rays(radian)\n", + "thetaa=thetaa*180/math.pi; #acceptance angle for meridional rays(degrees)\n", + "thetaas=math.asin(NA/math.cos(gama)); #acceptance angle for skew rays(radian)\n", + "thetaas=thetaas*180/math.pi; #acceptance angle for skew rays(degrees)\n", + "\n", + "#Result\n", + "print \"acceptance angle for meridional rays is\",round(thetaa,2),\"degrees\"\n", + "print \"acceptance angle for skew rays is\",round(thetaas,3),\"degrees\"\n", + "print \"answer for acceptance angle for skew rays given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10, Page number 13.21" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "numerical aperture is 0.303\n", + "acceptance angle is 17.633 degrees\n", + "answer for angle given 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", + "delta=0.0196; #relative refractive index difference\n", + "n1=1.53; #refractive index of core\n", + "\n", + "#Calculation\n", + "NA=n1*math.sqrt(2*delta); #numerical aperture\n", + "theta=math.asin(NA); #acceptance angle(radian)\n", + "theta=theta*180/math.pi; #acceptance angle(degrees)\n", + "\n", + "#Result\n", + "print \"numerical aperture is\",round(NA,3)\n", + "print \"acceptance angle is\",round(theta,3),\"degrees\"\n", + "print \"answer for angle given in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11, Page number 13.21" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "core radius is 1.548 micro 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", + "n2=1.465; #refractive index of cladding\n", + "n1=1.480; #refractive index of core\n", + "lamda=850*10**-9; #wavelength(m)\n", + "\n", + "#Calculation\n", + "delta=(n1**2-n2**2)/(2*n1**2); #relative refractive index difference\n", + "a=2.405*lamda*10**6/(2*math.pi*n1*math.sqrt(2*delta)); #core radius(micro m)\n", + "\n", + "#Result\n", + "print \"core radius is\",round(a,3),\"micro m\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12, Page number 13.21" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total number of reflections per metre is 2321\n", + "total distance travelled by light is 1.0067 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n2=1.49; #refractive index of cladding\n", + "n1=1.5; #refractive index of core\n", + "a=25; #core radius(micro m)\n", + "\n", + "#Calculation\n", + "phic=math.asin(n2/n1); #angle(degrees)\n", + "l=2*a*math.tan(phic); #fibre length covered in 1 reflection(micro m)\n", + "n=10**6/l; #total number of reflections per metre\n", + "d=1/math.sin(phic); #total distance travelled by light(m)\n", + "\n", + "#Result\n", + "print \"total number of reflections per metre is\",int(n)\n", + "print \"total distance travelled by light is\",round(d,4),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13, Page number 13.22" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total number of modes is 309\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "alpha=1.85; #index profile\n", + "a=25; #core radius(micro m)\n", + "NA=0.21; #numerical aperture\n", + "lamda=1.3; #wavelength(micro m)\n", + "\n", + "#Calculation\n", + "n=(alpha*2*math.pi**2*a**2*NA**2)/(lamda**2*(alpha+2)); #number of modes\n", + "N=2*n; #total number of modes\n", + "\n", + "#Result\n", + "print \"total number of modes is\",int(N)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14, Page number 13.22" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "signal attenuation per unit length is 1.7 dB km-1\n", + "overall signal attenuation is 17 dB\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "L=10; #transmission distance(km)\n", + "Pi=100; #optical power(micro W)\n", + "Po=2; #optical power output(micro W)\n", + "\n", + "#Calculation\n", + "sa=round(10*math.log10(Pi/Po)/L,1); #signal attenuation per unit length(dB km-1)\n", + "osa=sa*L; #overall signal attenuation(dB)\n", + "\n", + "#Result\n", + "print \"signal attenuation per unit length is\",sa,\"dB km-1\"\n", + "print \"overall signal attenuation is\",int(osa),\"dB\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15, Page number 13.23" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dispersion is 1343.3 ns\n", + "bandwidth length product is 7.44 *10**6 Hz-km\n", + "answer for bandwidth given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "L=10; #transmission distance(km)\n", + "n1=1.55; #refractive index of core\n", + "delta=0.026; #relative refractive index difference\n", + "C=3*10**5; \n", + "\n", + "#Calculation\n", + "deltaT=L*n1*delta/C; #dispersion(s)\n", + "blp=L/deltaT; #bandwidth length product(Hz-km)\n", + "\n", + "#Result\n", + "print \"dispersion is\",round(deltaT*10**9,1),\"ns\"\n", + "print \"bandwidth length product is\",round(blp/10**6,2),\"*10**6 Hz-km\"\n", + "print \"answer for bandwidth 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/Solid_State_Physics_by_Dr._M._Arumugam/Chapter14_EldnQKR.ipynb b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter14_EldnQKR.ipynb new file mode 100644 index 00000000..92fbeef0 --- /dev/null +++ b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter14_EldnQKR.ipynb @@ -0,0 +1,205 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 14: Acoustics of Buildings and Acoustic Quieting" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 14.18" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "reverbration time is 3.9 s\n", + "reverbration time when audience fill the hall is 1.95 s\n", + "reverbration time is reduced to one-half\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=2265; #volume(m**3)\n", + "a=92.9; #absorption(m**2)\n", + "\n", + "#Calculation\n", + "T=0.16*V/a; #reverbration time(s)\n", + "T2=T/2; #reverbration time when audience fill the hall(s)\n", + "\n", + "#Result\n", + "print \"reverbration time is\",round(T,1),\"s\"\n", + "print \"reverbration time when audience fill the hall is\",round(T2,2),\"s\"\n", + "print \"reverbration time is reduced to one-half\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 14.18" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "reverbration time is 0.8 second\n", + "reverbration time when hall is empty is 1.6 second\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=12*30*6; #volume(m**3)\n", + "A1=450; #area of plastered wall(m**2)\n", + "a1=0.03; #coefficient of absorption(m**2)\n", + "A2=360; #area of wooden floor(m**2)\n", + "a2=0.06; #coefficient of absorption(m**2)\n", + "A3=24; #area of glass(m**2)\n", + "a3=0.25; #coefficient of absorption(m**2)\n", + "A4=600; #area of seats(m**2)\n", + "a4=0.3; #coefficient of absorption(m**2)\n", + "A5=500; #area of hall with audience(m**2)\n", + "a5=0.43; #coefficient of absorption(m**2)\n", + "\n", + "#Calculation\n", + "A=(A1*a1)+(A2*a2)+(A3*a3)+(A4*a4)+(A5*a5); #total absorption(m**2)\n", + "Ae=A-(A5*a5); #absorption when hall is empty(m**2) \n", + "T=0.16*V/A; #reverbration time(second)\n", + "Te=0.16*V/Ae; #reverbration time when hall is empty(second)\n", + "\n", + "#Result\n", + "print \"reverbration time is\",round(T,1),\"second\"\n", + "print \"reverbration time when hall is empty is\",round(Te,1),\"second\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 14.19" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total absorption is 1000 m**2 or OWU\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=7500; #volume(m**3)\n", + "T=1.2; #reverbration time(second)\n", + "\n", + "#Calculation\n", + "A=0.16*V/T; #total absorption(OWU)\n", + "\n", + "#Result\n", + "print \"total absorption is\",int(A),\"m**2 or OWU\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 14.19" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "change in reverbration time is 0.727 second\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=12*10**4; #volume(m**3)\n", + "a=13200; #absorption(m**2)\n", + "\n", + "#Calculation\n", + "T1=0.16*V/a; #reverbration time(s)\n", + "T2=T1/2; #reverbration time when audience fill the hall(s)\n", + "T=T1-T2; #change in reverbration time(second)\n", + "\n", + "#Result\n", + "print \"change in reverbration time is\",round(T,3),\"second\"" + ] + } + ], + "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/Solid_State_Physics_by_Dr._M._Arumugam/Chapter1_wnjphci.ipynb b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter1_wnjphci.ipynb new file mode 100644 index 00000000..0faa0cad --- /dev/null +++ b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter1_wnjphci.ipynb @@ -0,0 +1,139 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 1: Bonding in Solids" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 1.21" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "-2*a/r**3 + 90*b/r**11\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from sympy import diff\n", + "import numpy as np\n", + "\n", + "#Variable declaration\n", + "n=1;\n", + "m=9;\n", + "a=Symbol('a')\n", + "b=Symbol('b')\n", + "r=Symbol('r')\n", + "\n", + "#Calculation\n", + "y=(-a/(r**n))+(b/(r**m));\n", + "y=diff(y,r);\n", + "y=diff(y,r);\n", + "\n", + "#Result\n", + "print y" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "young's modulus is 157 GPa\n" + ] + } + ], + "source": [ + "#since the values of a,b,r are declared as symbols in the above cell, it cannot be solved there. hence it is being solved here with the given variable declaration\n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=7.68*10**-29; \n", + "r0=2.5*10**-10; #radius(m)\n", + "\n", + "#Calculation\n", + "b=a*(r0**8)/9;\n", + "y=((-2*a*r0**8)+(90*b))/r0**11; \n", + "E=y/r0; #young's modulus(Pa)\n", + "\n", + "#Result\n", + "print \"young's modulus is\",int(E/10**9),\"GPa\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 1.22" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "effective charge is 0.72 *10**-19 coulomb\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", + "dm=1.98*10**-29/3; #dipole moment\n", + "l=0.92*10**-10; #bond length(m)\n", + "\n", + "#Calculation\n", + "ec=dm/l; #effective charge(coulomb)\n", + "\n", + "#Result\n", + "print \"effective charge is\",round(ec*10**19,2),\"*10**-19 coulomb\"\n", + "print \"answer given in the book is wrong\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Solid_State_Physics_by_Dr._M._Arumugam/Chapter2_MymLk0N.ipynb b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter2_MymLk0N.ipynb new file mode 100644 index 00000000..51d55e0b --- /dev/null +++ b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter2_MymLk0N.ipynb @@ -0,0 +1,319 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 2: Crystallography and Crystal Structures" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 2.21" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "spacing between (100) plane is 5.64 angstrom\n", + "spacing between (110) plane is 3.99 angstrom\n", + "answer for spacing between (110) plane given in the book is wrong\n", + "spacing between (111) plane is 3.26 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=5.64; #lattice constant(angstrom)\n", + "h1=1;\n", + "k1=0;\n", + "l1=0;\n", + "h2=1;\n", + "k2=1;\n", + "l2=0;\n", + "h3=1;\n", + "k3=1;\n", + "l3=1;\n", + "\n", + "#Calculation\n", + "d100=a/math.sqrt(h1**2+k1**2+l1**2); #spacing between (100) plane\n", + "d110=a/math.sqrt(h2**2+k2**2+l2**2); #spacing between (110) plane\n", + "d111=a/math.sqrt(h3**2+k3**2+l3**2); #spacing between (111) plane\n", + "\n", + "#Result\n", + "print \"spacing between (100) plane is\",d100,\"angstrom\"\n", + "print \"spacing between (110) plane is\",round(d110,2),\"angstrom\"\n", + "print \"answer for spacing between (110) plane given in the book is wrong\"\n", + "print \"spacing between (111) plane is\",round(d111,2),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 2.22" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of atoms in (100) is 1.535 *10**13 atoms/mm**2\n", + "number of atoms in (110) is 1.085 *10**13 atoms/mm**2\n", + "number of atoms in (111) is 1.772 *10**13 atoms/mm**2\n", + "answers given in the book vary due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=3.61*10**-7; #lattice constant(mm)\n", + "\n", + "#Calculation\n", + "A100=a**2; #surface area(mm**2)\n", + "n=1+(4*(1/4));\n", + "N1=n/A100; #number of atoms in (100)(per mm**2)\n", + "A110=math.sqrt(2)*a**2; #surface area(mm**2)\n", + "N2=n/A110; #number of atoms in (110)(per mm**2)\n", + "A111=math.sqrt(3)*a**2/2; #surface area(mm**2)\n", + "N3=n/A111; #number of atoms in (110)(per mm**2)\n", + "\n", + "#Result\n", + "print \"number of atoms in (100) is\",round(N1/10**13,3),\"*10**13 atoms/mm**2\"\n", + "print \"number of atoms in (110) is\",round(N2/10**13,3),\"*10**13 atoms/mm**2\"\n", + "print \"number of atoms in (111) is\",round(N3/10**13,3),\"*10**13 atoms/mm**2\"\n", + "print \"answers given in the book vary due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 2.23" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of x rays is 1.552 angstrom\n", + "answer varies due to rounding off errors\n", + "energy of x rays is 8 *10**3 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=4; \n", + "A=107.87; #atomic weight\n", + "rho=10500; #density(kg/m**3)\n", + "N=6.02*10**26; #number of molecules\n", + "theta=19+(12/60); #angle(degrees)\n", + "h=1;\n", + "k=1;\n", + "l=1;\n", + "h0=6.625*10**-34; #planck constant\n", + "c=3*10**8; #velocity of light(m/s)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "a=(n*A/(N*rho))**(1/3);\n", + "d=a*10**10/math.sqrt(h**2+k**2+l**2); \n", + "lamda=2*d*math.sin(theta); #wavelength of x rays(angstrom)\n", + "E=h0*c/(lamda*10**-10*e); #energy of x rays(eV)\n", + "\n", + "#Result\n", + "print \"wavelength of x rays is\",round(lamda,3),\"angstrom\"\n", + "print \"answer varies due to rounding off errors\"\n", + "print \"energy of x rays is\",int(E/10**3),\"*10**3 eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 2.23" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density is 2332 kg/m**3\n", + "answer varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=8; #number of atoms\n", + "r=2.351*10**-10; #bond length(angstrom)\n", + "A=28.09; #Atomic wt. of NaCl\n", + "N=6.02*10**26 #Avagadro number\n", + "\n", + "#Calculation\n", + "a=4*r/math.sqrt(3); \n", + "rho=n*A/(N*a**3); #density(kg/m**3)\n", + "\n", + "#Result\n", + "print \"density is\",int(rho),\"kg/m**3\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 6, Page number 2.24" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "radius of largest sphere is 0.1547 r\n", + "maximum radius of sphere is 0.414 r\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from sympy import Symbol\n", + "\n", + "#Variable declaration\n", + "r=Symbol('r')\n", + "\n", + "#Calculation\n", + "a1=4*r/math.sqrt(3);\n", + "R1=(a1/2)-r; #radius of largest sphere\n", + "a2=4*r/math.sqrt(2);\n", + "R2=(a2/2)-r; #maximum radius of sphere\n", + "\n", + "#Result\n", + "print \"radius of largest sphere is\",round(R1/r,4),\"r\"\n", + "print \"maximum radius of sphere is\",round(R2/r,3),\"r\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 7, Page number 2.25" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percent volume change is 0.5 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r1=1.258*10**-10; #radius(m)\n", + "r2=1.292*10**-10; #radius(m)\n", + "\n", + "#Calculation\n", + "a_bcc=4*r1/math.sqrt(3);\n", + "v=a_bcc**3;\n", + "V1=v/2;\n", + "a_fcc=2*math.sqrt(2)*r2;\n", + "V2=a_fcc**3/4;\n", + "V=(V1-V2)*100/V1; #percent volume change is\",V,\"%\"\n", + "\n", + "#Result\n", + "print \"percent volume change is\",round(V,1),\"%\"" + ] + } + ], + "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/Solid_State_Physics_by_Dr._M._Arumugam/Chapter3_rTdfw6Q.ipynb b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter3_rTdfw6Q.ipynb new file mode 100644 index 00000000..a9d0fcd4 --- /dev/null +++ b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter3_rTdfw6Q.ipynb @@ -0,0 +1,303 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 3: X-Ray Diffraction" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 3.9" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum order of diffraction is 1.53\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=1.181; #lattice spacing(angstrom)\n", + "theta=90*math.pi/180; #glancing angle(radian)\n", + "lamda=1.540; #wavelength of X-rays(angstrom)\n", + "\n", + "#Calculation\n", + "n=2*d*math.sin(theta)/lamda; #maximum order of diffraction \n", + "\n", + "#Result\n", + "print \"maximum order of diffraction is\",round(n,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 3.9" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cube edge of unit cell is 3.514 angstrom\n", + "answer given 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", + "n=1; #order\n", + "theta=9.5*math.pi/180; #glancing angle(radian)\n", + "lamda=0.58; #wavelength(angstrom)\n", + "h=2;\n", + "k=0;\n", + "l=0;\n", + "\n", + "#Calculation\n", + "d=n*lamda/(2*math.sin(theta)); #lattice parameter(angstrom)\n", + "a=d*math.sqrt(h**2+k**2+l**2); #cube edge of unit cell(angstrom)\n", + "\n", + "#Result\n", + "print \"cube edge of unit cell is\",round(a,3),\"angstrom\"\n", + "print \"answer given in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 3.10" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "glancing angle for 3rd order is 26 degrees 35 minutes\n", + "answer for minutes given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "theta=(8+(35/60))*math.pi/180; #glancing angle(radian)\n", + "lamda=0.842; #wavelength of X-rays(angstrom)\n", + "n1=1; #order\n", + "n3=3; #order \n", + "\n", + "#Calculation\n", + "theta3=math.asin(n3*lamda*math.sin(theta)/(n1*lamda))*180/math.pi; #glancing angle for 3rd order(degrees)\n", + "theta3d=int(theta3); #glancing angle for 3rd order(degrees) \n", + "theta3m=(theta3-theta3d)*60; #glancing angle for 3rd order(minutes)\n", + "\n", + "#Result\n", + "print \"glancing angle for 3rd order is\",theta3d,\"degrees\",int(theta3m),\"minutes\"\n", + "print \"answer for minutes given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 3.10" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar spacing is 2.22 angstrom\n", + "value of h**2+k**2+l**2 is 2\n", + "miller indices are (110) or (011) or (101)\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "theta=20.3*math.pi/180; #glancing angle(radian)\n", + "lamda=1.54; #wavelength of X-rays(angstrom)\n", + "n=1; #order\n", + "a=3.16; #lattice parameter(angstrom)\n", + "\n", + "#Calculation\n", + "d=n*lamda/(2*math.sin(theta)); #interplanar spacing(angstrom)\n", + "x=(a/d)**2; #assume x=(h**2+k**2+l**2)\n", + "\n", + "#Result\n", + "print \"interplanar spacing is\",round(d,2),\"angstrom\"\n", + "print \"value of h**2+k**2+l**2 is\",int(x)\n", + "print \"miller indices are (110) or (011) or (101)\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 3.11" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 1.553 angstrom\n", + "energy of X-rays is 8 *10**3 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=4; #order\n", + "A=107.87; #atomic weight(kg)\n", + "theta=(19+(12/60))*math.pi/180; #glancing angle(radian)\n", + "h=1;\n", + "k=1;\n", + "l=1;\n", + "N=6.02*10**26; #avagadro number\n", + "rho=10500; #density(kg/m**3)\n", + "H=6.625*10**-34; #plancks constant(Js)\n", + "c=3*10**8; #velocity of light(m/s)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculation\n", + "a=round(((n*A/(N*rho))**(1/3))*10**10,2); #lattice parameter(angstrom)\n", + "d=a/math.sqrt((h**2)+(k**2)+(l**2)); #lattice parameter(angstrom)\n", + "lamda=2*d*math.sin(theta); #wavelength(angstrom)\n", + "E=H*c/(lamda*10**-10*e); #energy of X-rays(eV)\n", + "\n", + "#Result\n", + "print \"wavelength is\",round(lamda,3),\"angstrom\"\n", + "print \"energy of X-rays is\",int(round(E/10**3)),\"*10**3 eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 6, Page number 3.12" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "specimen distance is 7.559 cm\n", + "answer given 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", + "h=1;\n", + "k=1;\n", + "l=1;\n", + "a=4.57; #lattice parameter(angstrom)\n", + "lamda=1.52; #wavelength(angstrom)\n", + "r=5; #radius(cm)\n", + "\n", + "#Calculation\n", + "d=a/math.sqrt(h**2+k**2+l**2); #lattice parameter(angstrom)\n", + "theta=math.asin(lamda/(2*d)); #glancing angle(degrees)\n", + "X=r/math.tan(2*theta); #specimen distance(cm)\n", + "\n", + "#Result\n", + "print \"specimen distance is\",round(X,3),\"cm\"\n", + "print \"answer given in the book varies due to rounding off errors\"" + ] + } + ], + "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/Solid_State_Physics_by_Dr._M._Arumugam/Chapter4_OPOooLb.ipynb b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter4_OPOooLb.ipynb new file mode 100644 index 00000000..e9783bbb --- /dev/null +++ b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter4_OPOooLb.ipynb @@ -0,0 +1,211 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 4: Defects in Crystals" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 4.14" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "equilibrium concentration of vacancy at 300K is 7.577 *10**5\n", + "equilibrium concentration of vacancy at 900K is 6.502 *10**19\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N=6.023*10**26; #avagadro number\n", + "T1=1/float('inf'); #temperature 0K(K)\n", + "T2=300;\n", + "T3=900; #temperature(K)\n", + "k=1.38*10**-23; #boltzmann constant \n", + "deltaHv=120*10**3*10**3/N; #enthalpy(J/vacancy)\n", + "\n", + "#Calculation\n", + "#n1=N*math.exp(-deltaHv/(k*T1)); #equilibrium concentration of vacancy at 0K\n", + "#value of n1 cant be calculated in python, as the denominator is 0 and it shows float division error\n", + "n2=N*math.exp(-deltaHv/(k*T2)); #equilibrium concentration of vacancy at 300K \n", + "n3=N*math.exp(-deltaHv/(k*T3)); #equilibrium concentration of vacancy at 900K \n", + "\n", + "#Result\n", + "#print \"equilibrium concentration of vacancy at 0K is\",n1\n", + "print \"equilibrium concentration of vacancy at 300K is\",round(n2/10**5,3),\"*10**5\"\n", + "print \"equilibrium concentration of vacancy at 900K is\",round(n3/10**19,3),\"*10**19\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 4.15" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fraction of vacancies at 1000 is 8.5 *10**-7\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "nbyN1=1*10**-10; #fraction of vacancies\n", + "T1=500+273;\n", + "T2=1000+273;\n", + "\n", + "#Calculation\n", + "lnx=T1*math.log(nbyN1)/T2;\n", + "x=math.exp(lnx); #fraction of vacancies at 1000\n", + "\n", + "#Result\n", + "print \"fraction of vacancies at 1000 is\",round(x*10**7,1),\"*10**-7\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 4.16" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "concentration of schottky defects is 6.42 *10**11 per m**3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=2.82*10**-10; #interionic distance(m)\n", + "T=300; #temperature(K)\n", + "k=1.38*10**-23; #boltzmann constant \n", + "e=1.6*10**-19; #charge(coulomb)\n", + "n=4; #number of molecules\n", + "deltaHs=1.971*e; #enthalpy(J)\n", + "\n", + "#Calculation\n", + "V=(2*d)**3; #volume of unit cell(m**3)\n", + "N=n/V; #number of ion pairs\n", + "x=deltaHs/(2*k*T);\n", + "n=N*math.exp(-x); #concentration of schottky defects(per m**3)\n", + "\n", + "#Result\n", + "print \"concentration of schottky defects is\",round(n*10**-11,2),\"*10**11 per m**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 4.17" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "concentration of schottky defects is 9.23 *10**12 per cm**3\n", + "amount of climb down by the dislocations is 0.1846 step or 0.3692 *10**-8 cm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N=6.026*10**23; #avagadro number \n", + "T=500; #temperature(K)\n", + "k=1.38*10**-23; #boltzmann constant \n", + "deltaHv=1.6*10**-19; #charge(coulomb)\n", + "V=5.55; #molar volume(cm**3)\n", + "nv=5*10**7*10**6; #number of vacancies\n", + "\n", + "#Calculation\n", + "n=N*math.exp(-deltaHv/(k*T))/V; #concentration of schottky defects(per m**3)\n", + "x=round(n/nv,4); #amount of climb down by the dislocations(step)\n", + "xcm=2*x*10**-8; #amount of climb down by the dislocations(cm)\n", + "\n", + "#Result\n", + "print \"concentration of schottky defects is\",round(n/10**12,2),\"*10**12 per cm**3\"\n", + "print \"amount of climb down by the dislocations is\",x,\"step or\",xcm*10**8,\"*10**-8 cm\" " + ] + } + ], + "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/Solid_State_Physics_by_Dr._M._Arumugam/Chapter5_YkzzeVY.ipynb b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter5_YkzzeVY.ipynb new file mode 100644 index 00000000..be92b558 --- /dev/null +++ b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter5_YkzzeVY.ipynb @@ -0,0 +1,121 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 5: Elements of Statistical Mechanics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 5.32" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature is 1261.6 K\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", + "E=5.5; #energy(eV)\n", + "Ef=5; #fermi energy(eV)\n", + "p=1/100; #probability\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "k=1.38*10**-23; #boltzmann constant \n", + "\n", + "#Calculation\n", + "x=E-Ef; #difference in energy(eV)\n", + "y=math.log((1/p)-1);\n", + "T=x*e/(k*y); #temperature(K)\n", + "\n", + "#Result\n", + "print \"temperature is\",round(T,1),\"K\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 5.32" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi energy is 3.15 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rho=970; #density(kg/m**3)\n", + "N=6.02*10**26; #avagadro number\n", + "A=23; #atomic weight(kg)\n", + "h=6.62*10**-34; #planks constant(Js)\n", + "m=9.1*10**-31; #mass(kg)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculation\n", + "n=rho*N/A; #number of atoms per m**3\n", + "EF=(h**2/(8*m))*((3*n/math.pi)**(2/3)); #fermi energy(J)\n", + "EF=EF/e; #fermi energy(eV)\n", + "\n", + "#Result\n", + "print \"fermi energy is\",round(EF,2),\"eV\"" + ] + } + ], + "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/Solid_State_Physics_by_Dr._M._Arumugam/Chapter6_wKefPQQ.ipynb b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter6_wKefPQQ.ipynb new file mode 100644 index 00000000..ab8cdc23 --- /dev/null +++ b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter6_wKefPQQ.ipynb @@ -0,0 +1,331 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 6: Principles of Quantum Mechanics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 6.22" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "deBroglie wavelength is 0.66 angstrom\n", + "spacing between planes is 0.35 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=344; #voltage(V)\n", + "theta=40; #angle(degrees)\n", + "n=1; \n", + "\n", + "#Calculation\n", + "lamda=12.26/math.sqrt(V); #deBroglie wavelength(angstrom)\n", + "theta=((180-theta)/2)*math.pi/180; #angle(radian)\n", + "d=n*lamda/(2*math.sin(theta)); #spacing between planes(angstrom)\n", + "\n", + "#Result\n", + "print \"deBroglie wavelength is\",round(lamda,2),\"angstrom\"\n", + "print \"spacing between planes is\",round(d,2),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 6.22" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "deBroglie wavelength is 0.00286 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "m=1.675*10**-27; #mass(kg)\n", + "E=10*10**3*e; #kinetic energy(J)\n", + "h=6.625*10**-34; #planks constant(Js)\n", + "\n", + "#Calculation\n", + "v=math.sqrt(2*E/m); #velocity(m/sec)\n", + "lamda=h*10**10/(m*v); #deBroglie wavelength(angstrom)\n", + "\n", + "#Result\n", + "print \"deBroglie wavelength is\",round(lamda,5),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 6.22" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy difference is 1.81 *10**-37 J\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m=9.1*10**-31; #mass(kg)\n", + "h=6.63*10**-34; #planks constant(Js)\n", + "a=1; #length(m)\n", + "nx1=1;\n", + "ny1=1;\n", + "nz1=1;\n", + "nx2=1;\n", + "ny2=1;\n", + "nz2=2;\n", + "\n", + "#Calculation\n", + "E1=h**2*(nx1**2+ny1**2+nz1**2)/(8*m*a**2); #energy of 1st quantum state(J)\n", + "E2=h**2*(nx2**2+ny2**2+nz2**2)/(8*m*a**2); #energy of 2nd quantum state(J)\n", + "E=E2-E1; #energy difference(J)\n", + "\n", + "#Result\n", + "print \"energy difference is\",round(E*10**37,2),\"*10**-37 J\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 6.23" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "uncertainity in position of electron is 0.002 m\n", + "uncertainity in position of bullet is 0.4 *10**-31 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "m1=9.1*10**-31; #mass(kg)\n", + "m2=0.05; #mass(kg)\n", + "v=300; #velocity(m/sec)\n", + "p=0.01/100; #probability\n", + "h=6.6*10**-34; #planks constant(Js)\n", + "\n", + "#Calculation\n", + "p1=m1*v; #momentum of electron(kg m/s)\n", + "deltap1=p*p1; \n", + "deltax1=h/(deltap1*4*math.pi); #uncertainity in position of electron(m)\n", + "p2=m2*v; #momentum of bullet(kg m/s)\n", + "deltap2=p*p2; \n", + "deltax2=h/(deltap2*4*math.pi); #uncertainity in position of bullet(m)\n", + "\n", + "#Result\n", + "print \"uncertainity in position of electron is\",round(deltax1,3),\"m\"\n", + "print \"uncertainity in position of bullet is\",round(deltax2*10**31,1),\"*10**-31 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 6.24" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "probability of finding the particle is 0.2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "deltax=10**-10; #uncertainity in position(m)\n", + "L=10*10**-10; #width(m)\n", + "\n", + "#Calculation\n", + "p=2*deltax/L; #probability of finding the particle\n", + "\n", + "#Result\n", + "print \"probability of finding the particle is\",p" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 6, Page number 6.24" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "deBroglie wavelength is 2.73 *10**-11 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "m=9.1*10**-31; #mass(kg)\n", + "E=2*10**3*e; #kinetic energy(J)\n", + "h=6.6*10**-34; #planks constant(Js)\n", + "\n", + "#Calculation\n", + "p=math.sqrt(2*E*m); #momentum(kg m/s)\n", + "lamda=h/p; #deBroglie wavelength(m)\n", + "\n", + "#Result\n", + "print \"deBroglie wavelength is\",round(lamda*10**11,2),\"*10**-11 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 7, Page number 6.24" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "deBroglie wavelength is 1.807 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.602*10**-19; #charge(coulomb)\n", + "m=1.676*10**-27; #mass(kg)\n", + "h=6.62*10**-34; #planks constant(Js)\n", + "E=0.025*e; #kinetic energy(J)\n", + "\n", + "#Calculation\n", + "mv=math.sqrt(2*E*m); #velocity(m/s)\n", + "lamda=h*10**10/mv; #deBroglie wavelength(angstrom)\n", + "\n", + "#Result\n", + "print \"deBroglie wavelength is\",round(lamda,3),\"angstrom\"" + ] + } + ], + "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/Solid_State_Physics_by_Dr._M._Arumugam/Chapter8_B0hDPyA.ipynb b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter8_B0hDPyA.ipynb new file mode 100644 index 00000000..8d27e900 --- /dev/null +++ b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter8_B0hDPyA.ipynb @@ -0,0 +1,280 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 8: Semiconductor Physics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 8.19" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of electron hole pairs is 2.32 *10**16 per cubic metre\n", + "answer varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ni1=2.5*10**19; #number of electron hole pairs\n", + "T1=300; #temperature(K)\n", + "Eg1=0.72*1.6*10**-19; #energy gap(J)\n", + "k=1.38*10**-23; #boltzmann constant\n", + "T2=310; #temperature(K)\n", + "Eg2=1.12*1.6*10**-19; #energy gap(J)\n", + "\n", + "#Calculation\n", + "x1=-Eg1/(2*k*T1);\n", + "y1=(T1**(3/2))*math.exp(x1);\n", + "x2=-Eg2/(2*k*T2);\n", + "y2=(T2**(3/2))*math.exp(x2);\n", + "ni=ni1*(y2/y1); #number of electron hole pairs\n", + "\n", + "#Result\n", + "print \"number of electron hole pairs is\",round(ni/10**16,2),\"*10**16 per cubic metre\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 8.20" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "intrinsic conductivity is 2.016 ohm-1 metre-1\n", + "intrinsic resistivity is 0.496 ohm metre\n", + "number of germanium atoms per m**3 is 4.5 *10**28\n", + "new value of conductivity is 1.434 *10**4 ohm-1 metre-1\n", + "new value of resistivity is 0.697 *10**-4 ohm metre\n", + "answer for new values given 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", + "w=72.6; #atomic weight\n", + "d=5400; #density(kg/m**3)\n", + "Na=6.025*10**26; #avagadro number\n", + "mew_e=0.4; #mobility of electron(m**2/Vs)\n", + "mew_h=0.2; #mobility of holes(m**2/Vs)\n", + "e=1.6*10**-19;\n", + "m=9.108*10**-31; #mass(kg)\n", + "ni=2.1*10**19; #number of electron hole pairs\n", + "Eg=0.7; #band gap(eV)\n", + "k=1.38*10**-23; #boltzmann constant\n", + "h=6.625*10**-34; #plancks constant\n", + "T=300; #temperature(K)\n", + "\n", + "#Calculation\n", + "sigma=ni*e*(mew_e+mew_h); #intrinsic conductivity(ohm-1 m-1)\n", + "rho=1/sigma; #resistivity(ohm m)\n", + "n=Na*d/w; #number of germanium atoms per m**3\n", + "p=n/10**5; #boron density\n", + "sigman=p*e*mew_h; #new value of conductivity(ohm-1 metre-1)\n", + "rhon=1/sigman; #new value of resistivity(ohm metre)\n", + "\n", + "#Result\n", + "print \"intrinsic conductivity is\",sigma,\"ohm-1 metre-1\"\n", + "print \"intrinsic resistivity is\",round(rho,3),\"ohm metre\"\n", + "print \"number of germanium atoms per m**3 is\",round(n/10**28,1),\"*10**28\"\n", + "print \"new value of conductivity is\",round(sigman/10**4,3),\"*10**4 ohm-1 metre-1\"\n", + "print \"new value of resistivity is\",round(rhon*10**4,3),\"*10**-4 ohm metre\"\n", + "print \"answer for new values given in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 8.21" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "charge carrier density is 2 *10**22 per m**3\n", + "electron mobility is 0.035 m**2/Vs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.6*10**-19;\n", + "RH=3.66*10**-4; #hall coefficient(m**3/coulomb)\n", + "sigma=112; #conductivity(ohm-1 m-1)\n", + "\n", + "#Calculation\n", + "ne=3*math.pi/(8*RH*e); #charge carrier density(per m**3)\n", + "mew_e=sigma/(e*ne); #electron mobility(m**2/Vs)\n", + "\n", + "#Result\n", + "print \"charge carrier density is\",int(ne/10**22),\"*10**22 per m**3\"\n", + "print \"electron mobility is\",round(mew_e,3),\"m**2/Vs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 8.21" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "intrinsic conductivity is 0.432 *10**-3 ohm-1 m-1\n", + "conductivity during donor impurity is 10.4 ohm-1 m-1\n", + "conductivity during acceptor impurity is 4 ohm-1 m-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mew_e=0.13; #mobility of electron(m**2/Vs)\n", + "mew_h=0.05; #mobility of holes(m**2/Vs)\n", + "e=1.6*10**-19;\n", + "ni=1.5*10**16; #number of electron hole pairs\n", + "N=5*10**28;\n", + "\n", + "#Calculation\n", + "sigma1=ni*e*(mew_e+mew_h); #intrinsic conductivity(ohm-1 m-1)\n", + "ND=N/10**8;\n", + "n=ni**2/ND;\n", + "sigma2=ND*e*mew_e; #conductivity(ohm-1 m-1)\n", + "sigma3=ND*e*mew_h; #conductivity(ohm-1 m-1)\n", + "\n", + "#Result\n", + "print \"intrinsic conductivity is\",round(sigma1*10**3,3),\"*10**-3 ohm-1 m-1\"\n", + "print \"conductivity during donor impurity is\",sigma2,\"ohm-1 m-1\"\n", + "print \"conductivity during acceptor impurity is\",int(sigma3),\"ohm-1 m-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 8.22" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "conductivity is 4.97 mho m-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.6*10**-19;\n", + "Eg=0.72; #band gap(eV)\n", + "k=1.38*10**-23; #boltzmann constant\n", + "T1=293; #temperature(K)\n", + "T2=313; #temperature(K)\n", + "sigma1=2; #conductivity(mho m-1)\n", + "\n", + "#Calculation\n", + "x=(Eg*e/(2*k))*((1/T1)-(1/T2));\n", + "y=round(x/2.303,3);\n", + "z=round(math.log10(sigma1),3);\n", + "log_sigma2=y+z;\n", + "sigma2=10**log_sigma2; #conductivity(mho m-1)\n", + "\n", + "#Result\n", + "print \"conductivity is\",round(sigma2,2),\"mho m-1\"" + ] + } + ], + "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/Solid_State_Physics_by_Dr._M._Arumugam/screenshots/22_X7ip5yw.png b/Solid_State_Physics_by_Dr._M._Arumugam/screenshots/22_X7ip5yw.png Binary files differnew file mode 100644 index 00000000..ac80af45 --- /dev/null +++ b/Solid_State_Physics_by_Dr._M._Arumugam/screenshots/22_X7ip5yw.png diff --git a/Solid_State_Physics_by_Dr._M._Arumugam/screenshots/33_mVM81ix.png b/Solid_State_Physics_by_Dr._M._Arumugam/screenshots/33_mVM81ix.png Binary files differnew file mode 100644 index 00000000..8e2a6386 --- /dev/null +++ b/Solid_State_Physics_by_Dr._M._Arumugam/screenshots/33_mVM81ix.png diff --git a/Solid_State_Physics_by_Dr._M._Arumugam/screenshots/44_gepd6Lu.png b/Solid_State_Physics_by_Dr._M._Arumugam/screenshots/44_gepd6Lu.png Binary files differnew file mode 100644 index 00000000..680e2742 --- /dev/null +++ b/Solid_State_Physics_by_Dr._M._Arumugam/screenshots/44_gepd6Lu.png diff --git a/sample_notebooks/nitinkumar/Chapter2.ipynb b/sample_notebooks/nitinkumar/Chapter2.ipynb new file mode 100644 index 00000000..9711ae14 --- /dev/null +++ b/sample_notebooks/nitinkumar/Chapter2.ipynb @@ -0,0 +1,374 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:4ffa24abd34ea1d807c13e9c49ee68a5b2044c03e6300e8fc08c3e8ef3625eac"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter2-Water and its Treatment"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2_18_1-pg no 23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##water and its treatment##\n",
+ "##example 2.18.1##\n",
+ "import math\n",
+ "W1=12.5;##CaCO3 in water in mg/lit##\n",
+ "W2=8.4;##MgCO3 in water in mg/lit##\n",
+ "W3=22.2;##CaCl2 in water in mg/lit##\n",
+ "W4=9.5;##MgCl2 in water in mg/lit##\n",
+ "W5=33.;##CO2 in water in mg/lit##\n",
+ "W6=6.68;##NaHCO3 in water in mg/lit##\n",
+ "M1=100./100.;##multiplication factor of CaCO3##\n",
+ "M2=100./84.;##multiplication factor of MgCO3##\n",
+ "M3=100./111.;##multiplication factor of CaCl2##\n",
+ "M4=100./95.;##multiplication factor of MgCl2##\n",
+ "M6=100./84.;##multiplication factor of NaHCO3##\n",
+ "P1=W1*M1;##CaCO3 in terms of CaCO3##\n",
+ "P2=W2*M2;##MgCO3 in terms of CaCO3##\n",
+ "P3=W3*M3;##CaCl2 in terms of CaCO3##\n",
+ "P4=W4*M4;##MgCl2 in terms of CaCO3##\n",
+ "P6=W6*M6;##NaHCO3 in terms of CaCO3##\n",
+ "print (\"We do not take CO2 since it does not contribute to hardness \");\n",
+ "C=P1+P2+P6;\n",
+ "print'%s %.2f %s'%(\"\\nCarbonate hardness is \",C,\" mg/l or ppm\");\n",
+ "NC=P3+P4;\n",
+ "print'%s %.2f %s'%(\"\\nNon Carbonate hardness is \",NC,\" mg/l or ppm\");"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "We do not take CO2 since it does not contribute to hardness \n",
+ "\n",
+ "Carbonate hardness is 30.45 mg/l or ppm\n",
+ "\n",
+ "Non Carbonate hardness is 30.00 mg/l or ppm\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2_18_2-pg no 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##water and its treatment##\n",
+ "##example 2.18.2##\n",
+ "import math\n",
+ "W1=40.5;##Ca(HCO3)2 in water in mg/lit##\n",
+ "W2=33.3;##CaCl2 in water in mg/lit##\n",
+ "W3=41.;##Ca(NO3)2 in water in mg/lit##\n",
+ "W4=101.;##KNO3 in water in mg/lit##\n",
+ "W5=33.6;##MgCO3 in water in mg/lit##\n",
+ "M1=100./162.;##multiplication factor of Ca(HCO3)2##\n",
+ "M2=100./111.;##multiplication factor of CaCl2##\n",
+ "M3=100./164.;##multiplication factor of Ca(NO3)2##\n",
+ "M5=100./84.;##multiplication factor of MgCO3##\n",
+ "P1=W1*M1;##Ca(HCO3)2 in terms of CaCO3##\n",
+ "P2=W2*M2;##CaCl2 in terms of CaCO3##\n",
+ "P3=W3*M3;##Ca(NO3)2 in terms of CaCO3##\n",
+ "P5=W5*M5;##MgCO3 in terms of CaCO3##\n",
+ "print (\"We do not take KNO3 since it does not contribute to hardness \");\n",
+ "C=P1+P5;\n",
+ "print'%s %.2f %s'%(\"\\nCarbonate hardness is \",C,\" mg/l or ppm\");\n",
+ "NC=P2+P3;\n",
+ "print'%s %.2f %s'%(\"\\nNon Carbonate hardness is \",NC,\" mg/l or ppm\");"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "We do not take KNO3 since it does not contribute to hardness \n",
+ "\n",
+ "Carbonate hardness is 65.00 mg/l or ppm\n",
+ "\n",
+ "Non Carbonate hardness is 55.00 mg/l or ppm\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2_18_3-pg no 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##water and its treatment##\n",
+ "##example 2.18.3##\n",
+ "import math\n",
+ "W1=29.1;##Mg(HCO3)2 in water in mg/lit##\n",
+ "W2=40.5;##Ca(HCO3)2 in water in mg/lit##\n",
+ "W3=11.1;##CaCl2 in water in mg/lit##\n",
+ "W4=15.82;##MgCl2 in water in mg/lit##\n",
+ "W5=28.5;##NaCl in water in mg/lit##\n",
+ "W6=22.0;##CO2 in water in mg/lit##\n",
+ "M1=100./146.007;##multiplication factor of Mg(HCO3)2##\n",
+ "M2=100./162.;##multiplication factor of Ca(HCO3)2##\n",
+ "M3=100./111.;##multiplication factor of CaCl2##\n",
+ "M4=100./95.005;##multiplication factor of MgCl2##\n",
+ "P1=W1*M1;##Mg(HCO3)2 in terms of CaCO3##\n",
+ "P2=W2*M2;##Ca(HCO3)2 in terms of CaCO3##\n",
+ "P3=W3*M3;##CaCl2 in terms of CaCO3##\n",
+ "P4=W4*M4;##MgCl2 in terms of CaCO3##\n",
+ "print(\"We do not take NaCl and CO2 since they do not contribute to hardness \");\n",
+ "C=P1+P2;\n",
+ "print'%s %.2f %s'%(\"\\nCarbonate hardness is \",C,\" mg/l or ppm\");\n",
+ "NC=P3+P4;\n",
+ "print'%s %.2f %s'%(\"\\nNon Carbonate hardness is \",NC,\" mg/l or ppm\");"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "We do not take NaCl and CO2 since they do not contribute to hardness \n",
+ "\n",
+ "Carbonate hardness is 44.93 mg/l or ppm\n",
+ "\n",
+ "Non Carbonate hardness is 26.65 mg/l or ppm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2_18_4-pg no 28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##water and its treatment##\n",
+ "##example 2.18.4##\n",
+ "import math\n",
+ "W1=16.2;##Ca(HCO3)2 in water in mg/lit##\n",
+ "W2=14.6;##Mg(HCO3)2 in water in mg/lit##\n",
+ "W3=9.5;##MgCl2 in water in mg/lit##\n",
+ "W4=48.;##MgSO4 in water in mg/lit##\n",
+ "W5=12.;##KCl in water in mg/lit##\n",
+ "M1=100./162.;##multiplication factor of Ca(HCO3)2##\n",
+ "M2=100./146.;##multiplication factor of Mg(HCO3)2 ##\n",
+ "M3=100./95.;##multiplication factor of MgCl2##\n",
+ "M4=100./120.;##multiplication factor of MgSO4##\n",
+ "P1=W1*M1;##Ca(HCO3)2 in terms of CaCO3##\n",
+ "P2=W2*M2;##Mg(HCO3)2 in terms of CaCO3##\n",
+ "P3=W3*M3;##MgCl2 in terms of CaCO3##\n",
+ "P4=W4*M4;##MgSO4 in terms of CaCO3##\n",
+ "print (\"We do not take KCl since it does not contribute to hardness \");\n",
+ "C=P1+P2;\n",
+ "print'%s %.2f %s'%(\"\\nCarbonate hardness is \",C,\" mg/l or ppm\");\n",
+ "NC=P3+P4;\n",
+ "print'%s %.2f %s'%(\"\\nNon Carbonate hardness is \",NC,\" mg/l or ppm\");"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "We do not take KCl since it does not contribute to hardness \n",
+ "\n",
+ "Carbonate hardness is 20.00 mg/l or ppm\n",
+ "\n",
+ "Non Carbonate hardness is 50.00 mg/l or ppm\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2_18_5-pg no30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##water and its treatment##\n",
+ "##example 2.18.5##\n",
+ "import math\n",
+ "W1=81;##Ca(HCO3)2 in water in mg/lit##\n",
+ "W2=84;##MgCO3 in water in mg/lit##\n",
+ "W3=22.2;##CaCl2 in water in mg/lit##\n",
+ "W4=60;##MgSO4 in water in mg/lit##\n",
+ "W5=30;##KCl in water in mg/lit##\n",
+ "M1=100/162;##multiplication factor of Ca(HCO3)2##\n",
+ "M2=100/84;##multiplication factor of MgCO3##\n",
+ "M3=100/111;##multiplication factor of CaCl2##\n",
+ "M4=100/120;##multiplication factor of MgSO4##\n",
+ "P1=W1*M1;##Ca(HCO3)2 in terms of CaCO3##\n",
+ "P2=W2*M2;##MgCO3 in terms of CaCO3##\n",
+ "P3=W3*M3;##CaCl2 in terms of CaCO3##\n",
+ "P4=W4*M4;##MgSO4 in terms of CaCO3##\n",
+ "print (\"We do not take KCl since it does not contribute to hardness \");\n",
+ "T=P1+P2;\n",
+ "print'%s %.2f %s'%(\"\\nTemporary hardness is \",T,\" mg/l or ppm\");\n",
+ "P=P3+P4;\n",
+ "print'%s %.f %s'%(\"\\nPermanant hardness is \",P,\" mg/l or ppm\");\n",
+ "To=T+P;\n",
+ "print'%s %.2f %s'%(\"\\nTotal hardness is \",To,\" mg/l or ppm\");"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "We do not take KCl since it does not contribute to hardness \n",
+ "\n",
+ "Temporary hardness is 84.00 mg/l or ppm\n",
+ "\n",
+ "Permanant hardness is 0 mg/l or ppm\n",
+ "\n",
+ "Total hardness is 84.00 mg/l or ppm\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2_18_6-pg no 33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##water and its treatment##\n",
+ "##example 2.18.6##\n",
+ "import math\n",
+ "W1=29.2;##MgCO3 in water in mg/lit##\n",
+ "W2=36.;##MgSO4 in water in mg/lit##\n",
+ "W3=22.2;##CaCl2 in water in mg/lit##\n",
+ "W4=142.5;##MgCl2 in water in mg/lit##\n",
+ "M1=100./84.;##multiplication factor of MgCO3##\n",
+ "M2=100./120.;##multiplication factor of MgSO4##\n",
+ "M3=100./111.;##multiplication factor of CaCl2##\n",
+ "M4=100./95.;##multiplication factor of MgCl2##\n",
+ "P1=W1*M1;##MgCO3 in terms of CaCO3##\n",
+ "P2=W2*M2;##MgSO4 in terms of CaCO3##\n",
+ "P3=W3*M3;##CaCl2 in terms of CaCO3##\n",
+ "P4=W4*M4;##MgCl2 in terms of CaCO3##\n",
+ "T=P1;\n",
+ "print'%s %.2f %s'%(\"\\nCarbonate hardness is \",T,\" mg/l or ppm\");\n",
+ "P=P2+P3+P4;\n",
+ "print'%s %.2f %s'%(\"\\nNon Carbonate hardness is \",P,\" mg/l or ppm\");"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Carbonate hardness is 34.76 mg/l or ppm\n",
+ "\n",
+ "Non Carbonate hardness is 200.00 mg/l or ppm\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2_18_7-pg no 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##water and its treatment##\n",
+ "##example 2.18.7##\n",
+ "import math\n",
+ "Hardness_ppm=304.##ppm in terms of CaCO3##\n",
+ "Cl=0.07*Hardness_ppm##0.07 Clarke =1 ppm##\n",
+ "Fr=0.1*Hardness_ppm##0.1 French =1 ppm##\n",
+ "mgperlit=Hardness_ppm\n",
+ "print'%s %.2f %s'%(\"Hardness in terms of Clarke \",Cl,\" Cl\");\n",
+ "print'%s %.2f %s'%(\"\\nHardness in terms of French \",Fr,\" Fr\");\n",
+ "print'%s %.2f %s'%(\"\\nHardness in terms of mg/lit \",mgperlit,\" mg/l\");"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hardness in terms of Clarke 21.28 Cl\n",
+ "\n",
+ "Hardness in terms of French 30.40 Fr\n",
+ "\n",
+ "Hardness in terms of mg/lit 304.00 mg/l\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |