summaryrefslogtreecommitdiff
path: root/Engineering_Physics_by_D_C_Ghosh/1-Classical_Mechanics.ipynb
blob: 26940df0654b1f41d2c36f36f5b17720ac6cf927 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
{
"cells": [
 {
		   "cell_type": "markdown",
	   "metadata": {},
	   "source": [
       "# Chapter 1: Classical Mechanics"
	   ]
	},
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.10: Common_velocity_of_a_car_truck_system.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.10: : Page-14 (2008)\n",
"clc; clear;\n",
"m1 = 1200;    // Mass of the car, kg\n",
"m2 = 3600;    // Mass of the truck, kg\n",
"u1 = 30;    // Speed of the car, m/s\n",
"u2 = 20;    // Speed of the truck, m/s\n",
"theta = 60;    // Direction of motion of the truck w.r.t. that of car, degree\n",
"// As m1*u1 + m2*u2 = (m1 + m2)*v, solving for v along x and y directions\n",
"v_x = (m1*u1 + m2*u2*cosd(theta))/(m1 + m2);    // Common speed along x-direction, m/s\n",
"u1 = 0;    // The speed of the car after interlocking with the truck, m/s\n",
"v_y = (m1*u1 + m2*u2*sind(theta))/(m1 + m2);    // Common speed along y-direction, m/s\n",
"v = sqrt(v_x^2 + v_y^2);    // Common speed of the car-truck system, m/s\n",
"theta = atand(v_y/v_x);    // Direction of common velocity w.r.t. that of car, degree\n",
"printf('\nThe common speed of the car-truck system = %4.1f m/s', v);\n",
"printf('\nThe direction of common velocity = %4.1f degree north of east', theta);\n",
"// Result \n",
"// The common speed of the car-truck system = 19.8 m/s"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.11: Velocity_of_third_piece_of_the_exploded_object.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.11: Page-14 (2008)\n",
"clc; clear;\n",
"v1 = 20;    // Velocity of first piece, m/s\n",
"v2 = 30;    // Velocity of second piece, m/s\n",
"// From conservation of momentum, in x-direction \n",
"// m*v1*cosd(0)+m*v2*cosd(45)+m*v3*cosd(theta) = 0, solving for v3*cosd(theta)\n",
"v3_cos_theta = -(v1*cosd(0)+v2*cosd(45));    // x-component of v3 along theta, m/s\n",
"// From conservation of momentum, in y-direction \n",
"// m*v1*sind(0)-m*v2*sind(45)+m*v3*sind(theta) = 0, solving for v3*sind(theta)\n",
"v3_sin_theta = -(v1*sind(0)-v2*sind(45));    // y-component of v3 along theta, m/s\n",
"theta = atand(v3_sin_theta/v3_cos_theta);    // Direction of velocity of third piece, degree\n",
"v3 = -(v1*cosd(0)+v2*cosd(45))/cosd(theta+180);    // Velocity of third piece, m/s\n",
"printf('\nThe velocity of third piece is %4.1f m/s towards %d degree north of west', v3, ceil(theta+180));\n",
"// Result \n",
"// The velocity of third piece is 46.4 m/s towards 153 degree north of west "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.5: Force_of_contact_between_two_masses.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.5: Page-11 (2008)\n",
"clc; clear;\n",
"m1 = 2;    // Mass of first body, kg\n",
"m2 = 1;    // Mass of second body, kg\n",
"F = 3;    // The horizontal force applied to the mass m1, N\n",
"F_prime = m2/(m1 + m2)*F;    // Force of contact between m1 and m2, N\n",
"printf('\nThe force of contact between m1 and m2 = %3.1f N', F_prime);\n",
"F_prime = m1/(m1 + m2)*F;    // Force of contact when F is applied to m2, N\n",
"printf('\nThe force of contact when F is applied to m2 = %3.1f N', F_prime);\n",
"// Result \n",
"// The force of contact between m1 and m2 = 1.0 N\n",
"// The force of contact when F is applied to m2 = 2.0 N "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.6: Direction_of_motion_of_a_ball_after_momentum_conservation_during_collision.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.6: Page-12 (2008)\n",
"clc; clear;\n",
"v = 1;    // Let the speed of the ball B be unity, unit\n",
"v_prime = v/2;    // Speed of the ball after the collision, unit\n",
"theta = atand(v_prime/v);    // The direction of motion of the ball A after collision, degree\n",
"printf('\nThe direction of motion of the ball after collision = %2.0f degree', theta);\n",
"// Result \n",
"// The direction of motion of the ball after collision = 27 degree "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 1.9: Angular_velocity_of_the_combination_of_two_wheels.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Scilab Code Ex1.9: Page-14 (2008)\n",
"clc; clear;\n",
"omega1 = 500;    // Angular speed of rotating shaft, r.p.m.\n",
"omega2 = 0;    // Initial angular speed of the second wheel, r.p.m.\n",
"I = 1;    // For simplicity assume moment of ineria of the wheels to be unity\n",
"I1 = I, I2 = I;    // Moment of inertia of wheels A and B, kg-Sq.m\n",
"// As I1*omega1 + I2*omega2 = (I1 + I2)*omega, solving for omega\n",
"omega = (I1*omega1 + I2*omega2)/(I1 + I2);    // Angular speed of the combination of two wheels, r.p.m.\n",
"printf('\nThe angular speed of the combination of two wheels = %3.0f r.p.m.', omega);\n",
"// Result \n",
"// The angular speed of the combination of two wheels = 250 r.p.m. "
   ]
   }
],
"metadata": {
		  "kernelspec": {
		   "display_name": "Scilab",
		   "language": "scilab",
		   "name": "scilab"
		  },
		  "language_info": {
		   "file_extension": ".sce",
		   "help_links": [
			{
			 "text": "MetaKernel Magics",
			 "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
			}
		   ],
		   "mimetype": "text/x-octave",
		   "name": "scilab",
		   "version": "0.7.1"
		  }
		 },
		 "nbformat": 4,
		 "nbformat_minor": 0
}