summaryrefslogtreecommitdiff
path: root/Engineering_Mechanics_by_A._K._Tayal/Chapter18.ipynb
diff options
context:
space:
mode:
authorTrupti Kini2016-09-04 23:30:27 +0600
committerTrupti Kini2016-09-04 23:30:27 +0600
commit27c5702e0236c608bdb1aac8ca4a4e2c70dee088 (patch)
treefb80bb5e76945256eb56f9eb9e6ec3a068b3b981 /Engineering_Mechanics_by_A._K._Tayal/Chapter18.ipynb
parent5f15ee61029068ad350502ad04768d7cd84e4736 (diff)
downloadPython-Textbook-Companions-27c5702e0236c608bdb1aac8ca4a4e2c70dee088.tar.gz
Python-Textbook-Companions-27c5702e0236c608bdb1aac8ca4a4e2c70dee088.tar.bz2
Python-Textbook-Companions-27c5702e0236c608bdb1aac8ca4a4e2c70dee088.zip
Added(A)/Deleted(D) following books
A Basic_Electronics_by_Rakesh_Kumar_Garg,_Ashish_Dixit_&_Paban_Yadav/chapter1.ipynb A Basic_Electronics_by_Rakesh_Kumar_Garg,_Ashish_Dixit_&_Paban_Yadav/chapter2.ipynb A Basic_Electronics_by_Rakesh_Kumar_Garg,_Ashish_Dixit_&_Paban_Yadav/chapter3.ipynb A Basic_Electronics_by_Rakesh_Kumar_Garg,_Ashish_Dixit_&_Paban_Yadav/chapter4.ipynb A Basic_Electronics_by_Rakesh_Kumar_Garg,_Ashish_Dixit_&_Paban_Yadav/chapter5.ipynb A Basic_Electronics_by_Rakesh_Kumar_Garg,_Ashish_Dixit_&_Paban_Yadav/chapter6.ipynb A Basic_Electronics_by_Rakesh_Kumar_Garg,_Ashish_Dixit_&_Paban_Yadav/chapter7.ipynb A Basic_Electronics_by_Rakesh_Kumar_Garg,_Ashish_Dixit_&_Paban_Yadav/chapter8.ipynb A Basic_Electronics_by_Rakesh_Kumar_Garg,_Ashish_Dixit_&_Paban_Yadav/screenshots/DCLOADLINEchapter4.png A Basic_Electronics_by_Rakesh_Kumar_Garg,_Ashish_Dixit_&_Paban_Yadav/screenshots/DCLOADLineCH4.png A Basic_Electronics_by_Rakesh_Kumar_Garg,_Ashish_Dixit_&_Paban_Yadav/screenshots/TransferCharofnchmosfetCH8.png A Engineering_Mechanics_by_A._K._Tayal/Chapter10.ipynb A Engineering_Mechanics_by_A._K._Tayal/Chapter12.ipynb A Engineering_Mechanics_by_A._K._Tayal/Chapter13.ipynb A Engineering_Mechanics_by_A._K._Tayal/Chapter14.ipynb A Engineering_Mechanics_by_A._K._Tayal/Chapter15.ipynb A Engineering_Mechanics_by_A._K._Tayal/Chapter16.ipynb A Engineering_Mechanics_by_A._K._Tayal/Chapter17.ipynb A Engineering_Mechanics_by_A._K._Tayal/Chapter18.ipynb A Engineering_Mechanics_by_A._K._Tayal/Chapter19.ipynb A Engineering_Mechanics_by_A._K._Tayal/Chapter2.ipynb A Engineering_Mechanics_by_A._K._Tayal/Chapter20.ipynb A Engineering_Mechanics_by_A._K._Tayal/Chapter21.ipynb A Engineering_Mechanics_by_A._K._Tayal/Chapter22.ipynb A Engineering_Mechanics_by_A._K._Tayal/Chapter23.ipynb A Engineering_Mechanics_by_A._K._Tayal/Chapter24.ipynb A Engineering_Mechanics_by_A._K._Tayal/Chapter25.ipynb A Engineering_Mechanics_by_A._K._Tayal/Chapter26.ipynb A Engineering_Mechanics_by_A._K._Tayal/Chapter3.ipynb A Engineering_Mechanics_by_A._K._Tayal/Chapter4.ipynb A Engineering_Mechanics_by_A._K._Tayal/Chapter5.ipynb A Engineering_Mechanics_by_A._K._Tayal/Chapter6.ipynb A Engineering_Mechanics_by_A._K._Tayal/Chapter7.ipynb A Engineering_Mechanics_by_A._K._Tayal/Chapter8.ipynb A Engineering_Mechanics_by_A._K._Tayal/Chapter9.ipynb A Engineering_Mechanics_by_A._K._Tayal/screenshots/1.png A Engineering_Mechanics_by_A._K._Tayal/screenshots/2.png A Engineering_Mechanics_by_A._K._Tayal/screenshots/3.png A Semiconductor_circuit_approximations_by_A.P._Malvino/ch10.ipynb A Semiconductor_circuit_approximations_by_A.P._Malvino/ch11.ipynb A Semiconductor_circuit_approximations_by_A.P._Malvino/ch12.ipynb A Semiconductor_circuit_approximations_by_A.P._Malvino/ch14.ipynb A Semiconductor_circuit_approximations_by_A.P._Malvino/ch16.ipynb A Semiconductor_circuit_approximations_by_A.P._Malvino/ch2.ipynb A Semiconductor_circuit_approximations_by_A.P._Malvino/ch3.ipynb A Semiconductor_circuit_approximations_by_A.P._Malvino/ch4.ipynb A Semiconductor_circuit_approximations_by_A.P._Malvino/ch5.ipynb A Semiconductor_circuit_approximations_by_A.P._Malvino/ch6.ipynb A Semiconductor_circuit_approximations_by_A.P._Malvino/ch7.ipynb A Semiconductor_circuit_approximations_by_A.P._Malvino/ch8.ipynb A Semiconductor_circuit_approximations_by_A.P._Malvino/ch9.ipynb A Semiconductor_circuit_approximations_by_A.P._Malvino/screenshots/ACloadLineChapter10.png A Semiconductor_circuit_approximations_by_A.P._Malvino/screenshots/DCandACloadlinechapter9.png A Semiconductor_circuit_approximations_by_A.P._Malvino/screenshots/Powerratingchapter9.png
Diffstat (limited to 'Engineering_Mechanics_by_A._K._Tayal/Chapter18.ipynb')
-rw-r--r--Engineering_Mechanics_by_A._K._Tayal/Chapter18.ipynb532
1 files changed, 532 insertions, 0 deletions
diff --git a/Engineering_Mechanics_by_A._K._Tayal/Chapter18.ipynb b/Engineering_Mechanics_by_A._K._Tayal/Chapter18.ipynb
new file mode 100644
index 00000000..bce7ef40
--- /dev/null
+++ b/Engineering_Mechanics_by_A._K._Tayal/Chapter18.ipynb
@@ -0,0 +1,532 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 18 Impact Collision of Elastic Bodies"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 18.1 Principle of conservation of Momentum"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The velocity of ball A after impact is 0.000000 m/s\n",
+ "The velocity of ball B after impact is 1.000000 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "# Initilization of variables\n",
+ "m_a=1 # kg # mass of the ball A\n",
+ "v_a=2 # m/s # velocity of ball A\n",
+ "m_b=2 # kg # mass of ball B\n",
+ "v_b=0 # m/s # ball B at rest\n",
+ "e=1/2 # coefficient of restitution\n",
+ "# Calculations\n",
+ "# Solving eqn's 1 & 2 using matrix for v'_a & v'_b,\n",
+ "A=numpy.matrix('1 2;-1 1')\n",
+ "B=numpy.matrix('2;1')\n",
+ "C=numpy.linalg.inv(A)*B\n",
+ "# Results\n",
+ "print('The velocity of ball A after impact is %f m/s'%C[0])\n",
+ "print('The velocity of ball B after impact is %f m/s'%C[1])"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 18.2 Principle of conservation of Momentum"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The velocity of ball A after impact on ball B is 0.000000 m/s\n",
+ "The velocity of ball B after getting impacted by ball A is 8.000000 m/s\n",
+ "The final velocity of ball B is 0.000000 m/s\n",
+ "The velocity of ball C after getting impacted by ball B is 6.000000 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "# Initilization of variables\n",
+ "m_a=2 # kg # mass of ball A\n",
+ "m_b=6 # kg # mass of ball B\n",
+ "m_c=12 # kg # mass of ball C\n",
+ "v_a=12 # m/s # velocity of ball A\n",
+ "v_b=4 # m/s # velocity of ball B\n",
+ "v_c=2 # m/s # velocity of ball C\n",
+ "e=1 # coefficient of restitution for perfectly elastic body\n",
+ "# Calculations\n",
+ "# (A)\n",
+ "# Solving eq'n 1 & 2 using matrix for v'_a & v'_b,\n",
+ "A=numpy.matrix('2 6;-1 1')\n",
+ "B=numpy.matrix('48;8')\n",
+ "C=numpy.linalg.inv(A)*B\n",
+ "# Calculations\n",
+ "# (B)\n",
+ "# Solving eq'ns 3 & 4 simultaneously using matrix for v'_b & v'_c\n",
+ "P=numpy.matrix('1 2;-1 1')\n",
+ "Q=numpy.matrix('12;6')\n",
+ "R=numpy.linalg.inv(P)*Q\n",
+ "# Results (A&B)\n",
+ "print('The velocity of ball A after impact on ball B is %f m/s'%C[0]) # here the ball of mass 2 kg is bought to rest\n",
+ "print('The velocity of ball B after getting impacted by ball A is %f m/s'%C[1])\n",
+ "print('The final velocity of ball B is %f m/s'%R[0]) # here the ball of mass 6 kg is bought to rest\n",
+ "print('The velocity of ball C after getting impacted by ball B is %f m/s'%R[1])"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 18.3 Principle of conservation of Momentum"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The ball was dropped from a height of 13.500000 m\n",
+ "The coefficient of restitution between the glass and the floor is 0.816497 \n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Initilization of variables\n",
+ "h_1=9 # m # height of first bounce\n",
+ "h_2=6 # m # height of second bounce\n",
+ "# Calculations\n",
+ "# From eq'n (5) we have, Coefficient of restitution between the glass and the floor is,\n",
+ "e=math.sqrt(h_2/h_1)\n",
+ "# From eq'n 3 we get height of drop as,\n",
+ "h=h_1/e**2 # m\n",
+ "# Results\n",
+ "print('The ball was dropped from a height of %f m'%h)\n",
+ "print('The coefficient of restitution between the glass and the floor is %f '%e)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 18.4 Principle of conservation of Momentum"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The velocity of ball A after impact is 8.353604 m/s\n",
+ "The velocity of ball B after impact is 15.179186 m/s\n",
+ "The direction of ball A after impact is 36.765696 degree\n",
+ "The direction of ball B after impact is 58.848472 degree\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Initilization of variables\n",
+ "e=0.90 # coefficient o restitution\n",
+ "v_a=10 # m/s # velocity of ball A\n",
+ "v_b=15 # m/s # velocity of ball B\n",
+ "alpha_1=30 # degree # angle made by v_a with horizontal\n",
+ "alpha_2=60 # degree # angle made by v_b with horizontal\n",
+ "# Calculations\n",
+ "# The components of initial velocity of ball A:\n",
+ "v_a_x=v_a*math.cos(alpha_1*math.pi/180) # m/s\n",
+ "v_a_y=v_a*math.sin(alpha_1*math.pi/180) # m/s\n",
+ "# The components of initial velocity of ball B:\n",
+ "v_b_x=-v_b*math.cos(alpha_2*math.pi/180) # m/s\n",
+ "v_b_y=v_b*math.sin(alpha_2*math.pi/180) # m/s\n",
+ "# From eq'n 1 & 2 we get,\n",
+ "v_ay=v_a_y # m/s # Here, v_ay=(v'_a)_y\n",
+ "v_by=v_b_y # m/s # Here, v_by=(v'_b)_y\n",
+ "# On adding eq'n 3 & 4 we get,\n",
+ "v_bx=((v_a_x+v_b_x)+(-e*(v_b_x-v_a_x)))/2 # m/s # Here. v_bx=(v'_b)_x\n",
+ "# On substuting the value of v'_b_x in eq'n 3 we get,\n",
+ "v_ax=(v_a_x+v_b_x)-(v_bx) # m/s # here, v_ax=(v'_a)_x\n",
+ "# Now the eq'n for resultant velocities of balls A & B after impact are,\n",
+ "v_A=math.sqrt(v_ax**2+v_ay**2) # m/s\n",
+ "v_B=math.sqrt(v_bx**2+v_by**2) # m/s\n",
+ "# The direction of the ball after Impact is,\n",
+ "theta_1=math.degrees(math.atan(-(v_ay/v_ax))) # degree\n",
+ "theta_2=math.degrees(math.atan(v_by/v_bx)) # degree\n",
+ "# Results\n",
+ "print('The velocity of ball A after impact is %f m/s'%v_A)\n",
+ "print('The velocity of ball B after impact is %f m/s'%v_B)\n",
+ "print('The direction of ball A after impact is %f degree'%theta_1)\n",
+ "print('The direction of ball B after impact is %f degree'%theta_2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 18.5 Motion of ball"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The velocity of the ball is 0.661438 v\n",
+ "The direction of the ball is 49.106605 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initiization of variables\n",
+ "theta=30 # degrees # ange made by the ball against the wall\n",
+ "e=0.50\n",
+ "# Calculations\n",
+ "# The notations have been changed\n",
+ "# Resolving the velocity v as,\n",
+ "v_x=math.cos(theta*math.pi/180)\n",
+ "v_y=math.sin(theta*math.pi/180)\n",
+ "V_y=v_y\n",
+ "# from coefficient of restitution reation\n",
+ "V_x=-e*v_x\n",
+ "# Resultant velocity\n",
+ "V=math.sqrt(V_x**2+V_y**2)\n",
+ "theta=math.degrees(math.atan(V_y/(-V_x))) # taking +ve value for V_x\n",
+ "# NOTE: Here all the terms are multiplied with velocity i.e (v).\n",
+ "# Results\n",
+ "print('The velocity of the ball is %f v'%V)\n",
+ "print('The direction of the ball is %f degrees'%theta)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 18.6 Principle of conservation of Energy"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The height from which the ball A should be released is 0.149705 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initilization of variables\n",
+ "e=0.8 # coefficient of restitution\n",
+ "g=9.81 # m/s**2 # acc due to gravity\n",
+ "# Calcuations\n",
+ "# Squaring eqn's 1 &2 and Solving eqn's 1 & 2 using matrix for the value of h\n",
+ "A=numpy.matrix([[-1,(2*g)],[-1,-(1.28*g)]])\n",
+ "B=numpy.matrix([[0.945**2],[(-0.4*9.81)]])\n",
+ "C=numpy.linalg.inv(A)*B # m\n",
+ "# Results\n",
+ "print('The height from which the ball A should be released is %f m'%C[1])\n",
+ "# The answer given in the book i.e 0.104 is wrong."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 18.7 Principle of conservation of Energy"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The angle through which the sphere B will swing after the impact is 28.955024 degree\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initilization of variables\n",
+ "theta_a=60 # degree # angle made by sphere A with the verticle\n",
+ "e=1 # coefficient of restitution for elastic impact\n",
+ "# Calculations\n",
+ "# theta_b is given by the eq'n cosd*theta_b=0.875, hence theta_b is,\n",
+ "theta_b=math.degrees(math.acos(0.875)) # degree\n",
+ "# Results\n",
+ "print('The angle through which the sphere B will swing after the impact is %f degree'%theta_b)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 18.8 Principle of conservation of Energy"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is 18.188288 degree\n",
+ "(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is 22.088290 degree\n",
+ "(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is 14.674584 degree\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initilization of variables\n",
+ "m_a=0.01 # kg # mass of bullet A\n",
+ "v_a=100 # m/s # velocity of bullet A\n",
+ "m_b=1 # kg # mass of the bob\n",
+ "v_b=0 # m/s # velocity of the bob\n",
+ "l=1 # m # length of the pendulum\n",
+ "v_r=-20 # m/s # velocity at which the bullet rebounds the surface of the bob # here the notation for v'_a is shown by v_r\n",
+ "v_e=20 # m/s # velocity at which the bullet escapes through the surface of the bob # here the notation for v_a is shown by v_e\n",
+ "g=9.81 # m/s**2 # acc due to gravity\n",
+ "# Calculations\n",
+ "# Momentum of the bullet & the bob before impact is,\n",
+ "M=(m_a*v_a)+(m_b*v_b) # kg.m/s......(eq'n 1)\n",
+ "# The common velocity v_c ( we use v_c insted of v' for notation of common velocity) is given by equating eq'n 1 & eq'n 2 as,\n",
+ "# (a) When the bullet gets embedded into the bob\n",
+ "v_c=M/(m_a+m_b) # m/s\n",
+ "# The height h to which the bob rises is given by eq'n 3 as,\n",
+ "h_1=(1/2)*(v_c**2/g) # m\n",
+ "# The angle (theta_1) by which the bob swings corresponding to the value of height h_1 is,\n",
+ "theta_1=math.degrees(math.acos((l-h_1)/l)) # degree\n",
+ "# (b) When the bullet rebounds from the surface of the bob\n",
+ "# The velocity of the bob after the rebound of the bullet from its surface is given by equating eq'n 1 & eq'n 4 as,\n",
+ "v_bob_rebound=M-(m_a*v_r) # m/s # here v_bob_rebound=v'_b\n",
+ "# The equation for the height which the bob attains after impact is,\n",
+ "h_2=(v_bob_rebound**2)/(2*g) # m\n",
+ "# The corresponding angle of swing \n",
+ "theta_2=math.degrees(math.acos((l-h_2)/l)) # degree\n",
+ "# (c) When the bullet pierces and escapes through the bob\n",
+ "# From eq'n 1 & 5 the velocity attained by the bob after impact is given as,\n",
+ "v_b_escape=M-(m_a*v_e) # m/s # here we use, v_b_escape insted of v'_b\n",
+ "# The equation for the height which the bob attains after impact is,\n",
+ "h_3=(v_b_escape**2)/(2*g) # m\n",
+ "# The corresponding angle of swing \n",
+ "theta_3=math.degrees(math.acos((l-h_3)/(l))) # degree\n",
+ "# Results\n",
+ "print('(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is %f degree'%theta_1)\n",
+ "print('(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is %f degree'%theta_2)\n",
+ "print('(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is %f degree'%theta_3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 18.9 Principle of conservation of Momentum"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The compression of the spring over and above caused by the static action of weight W_a is 7.502999 cm \n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initilization of variables\n",
+ "W_a=50 # N # falling weight\n",
+ "W_b=50 # N # weight on which W_a falls\n",
+ "g=9.81 # m/s**2 # acc due to gravity\n",
+ "m_a=W_a/g # kg # mass of W_a\n",
+ "m_b=W_b/g # kg # mass of W_b\n",
+ "k=2*10**3 # N/m # stiffness of spring\n",
+ "h=0.075 # m # height through which W_a falls\n",
+ "# The velocity of weight W_a just before the impact and after falling from a height of h is given from the eq'n, ( Principle of conservation of energy)\n",
+ "v_a=math.sqrt(2*g*h) # m/s\n",
+ "# Let the mutual velocity after the impact be v_m (i.e v_m=v'), (by principle of conservation of momentum)\n",
+ "v_m=(m_a*v_a)/(m_a+m_b) # m/s\n",
+ "# Initial compression of the spring due to weight W_b is given by,\n",
+ "delta_st=(W_b/k)*(10**2) # cm\n",
+ "# Let the total compression of the spring be delta_t, Then delta_t is found by finding the roots from the eq'n:\n",
+ "#delta_t**2-0.1*delta_t-0.000003=0. In this eq'n let,\n",
+ "a=1\n",
+ "b=-0.1\n",
+ "c=-0.000003\n",
+ "delta_t=((-b+(math.sqrt(b**2-(4*a*c))))/2*a)*(10**2) # cm # we consider the -ve value\n",
+ "delta=delta_t-delta_st # cm\n",
+ "# Results\n",
+ "print('The compression of the spring over and above caused by the static action of weight W_a is %f cm \\n'%delta)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 18.10 Principle of conservation of Momentum"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The distance through which the block is displaced from its initial position is 0.908325 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initilization of variables\n",
+ "v_a=600 # m/s # velocity of the bullet before impact\n",
+ "v_b=0 # m/s # velocity of the block before impact\n",
+ "w_b=0.25 # N # weight of the bullet\n",
+ "w_wb=50 # N # weight of wodden block\n",
+ "mu=0.5 # coefficient of friction between the floor and the block\n",
+ "g=9.81 # m/s**2 # acc due to gravity\n",
+ "# Calculations\n",
+ "m_a=w_b/g # kg # mass of the bullet\n",
+ "m_b=w_wb/g # kg # mass of the block\n",
+ "# Let the common velocity be v_c which is given by eq'n (Principle of conservation of momentum)\n",
+ "v_c=(w_b*v_a)/(w_wb+w_b) # m/s\n",
+ "# Let the distance through which the block is displaced be s, Then s is given by eq'n\n",
+ "s=v_c**2/(2*g*mu) # m\n",
+ "# Results\n",
+ "print('The distance through which the block is displaced from its initial position is %f m'%s)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 18.11 Principle of conservation of Energy Momentum and work and energy"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The resistance to penetration to the pile is 79.022132 kN\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Initilization of variables\n",
+ "M=750 # kg # mass of hammer\n",
+ "m=200 # kg # mass of the pile\n",
+ "h=1.2 # m # height of fall of the hammer\n",
+ "delta=0.1 # m # distance upto which the pile is driven into the ground\n",
+ "g=9.81 # m/s**2 # acc due to gravity\n",
+ "# Caculations\n",
+ "# The resistance to penetration to the pile is given by eq'n,\n",
+ "R=(((M+m)*g)+((M**2*g*h)/((M+m)*delta)))*(10**-3) # kN \n",
+ "# Results\n",
+ "print('The resistance to penetration to the pile is %f kN'%R)"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.5.1"
+ },
+ "widgets": {
+ "state": {},
+ "version": "1.1.2"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}