{
"metadata": {
"name": "",
"signature": "sha256:da9a4303c6fc07c594d52c82662dd9ab6e23eae788f020d82b784ed3a6873663"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 4: The Conservation Law for Momentum"
]
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"ILLUSTRATIVE EXAMPLE 4.1, Page number: 39"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"#Variable declaration:\n",
"Vx_in = 420 #Entry Velocity in X direction (m/s)\n",
"Vx_out = 0 #Exit Velocity in X direction (m/s)\n",
"Vy_in = 0 #Entry Velocity in Y direction (m/s)\n",
"Vy_out = 420 #Exit Velocity in Y direction (m/s)\n",
"m = 0.15 #Rate of water entrained by the steam (kg/s)\n",
"lb = 1.0/4.46 #Pound force in a newton force\n",
"\n",
"#Calculations:\n",
"Mx_out = m*Vx_out #Rate of change of momentum at entry in x-direction (kg.m)\n",
"Mx_in = m*Vx_in #Rate of change of momentum at exit in x-direction (kg.m)\n",
"My_out = m*Vy_out #Rate of change of momentum at entry in y-direction (kg.m)\n",
"My_in = m*Vy_in #Rate of change of momentum at exit in y-direction (kg.m)\n",
"Fxgc = (Mx_out - Mx_in)*lb #Force in X direction (lbf)\n",
"Fygc = (My_out - My_in)*lb #Force in X direction (lbf)\n",
"\n",
"#Results:\n",
"if Fxgc < 1:\n",
" print \"The x-direction supporting force acting on the 90\u00b0 elbow is :\",round(-Fxgc,1),\" lbf acting toward the left. \"\n",
"else:\n",
" print \"The x-direction supporting force acting on the 90\u00b0 elbow is :\",round(Fxgc,1),\" lbf acting toward the right. \"\n",
"if Fygc < 1:\n",
" print \"The y-direction supporting force acting on the 90\u00b0 elbow is :\",round(-Fygc,1),\" lbf acting downwards. \" \n",
"else:\n",
" print \"The y-direction supporting force acting on the 90\u00b0 elbow is :\",round(Fygc,1),\" lbf acting upwards. \""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The x-direction supporting force acting on the 90\u00b0 elbow is : 14.1 lbf acting toward the left. \n",
"The y-direction supporting force acting on the 90\u00b0 elbow is : 14.1 lbf acting upwards. \n"
]
}
],
"prompt_number": 6
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"ILLUSTRATIVE EXAMPLE 4.2 Page number: 40"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"from math import sqrt,degrees,atan2\n",
"\n",
"#Variable declaration:\n",
"Fx = -63 #Force component in X direction (N)\n",
"Fy = 63 #Force component in Y direction (N)\n",
"lbf = 0.22481 #Pound-forrce in unit newton (lbf)\n",
"\n",
"#Calculations:\n",
"Fr = sqrt(Fx**2 + Fy**2)*lbf #The resultant supporting force (lbf)\n",
"u = degrees(atan2(Fy,Fx)) #Angle between the positive x axis and the direction of the force (degrees)\n",
"\n",
"#Result: \n",
"if (0