summaryrefslogtreecommitdiff
path: root/Engineering_Mechanics_by_A_K_Tayal/19-Relative_Motion.ipynb
diff options
context:
space:
mode:
authorPrashant S2020-04-14 10:25:32 +0530
committerGitHub2020-04-14 10:25:32 +0530
commit06b09e7d29d252fb2f5a056eeb8bd1264ff6a333 (patch)
tree2b1df110e24ff0174830d7f825f43ff1c134d1af /Engineering_Mechanics_by_A_K_Tayal/19-Relative_Motion.ipynb
parentabb52650288b08a680335531742a7126ad0fb846 (diff)
parent476705d693c7122d34f9b049fa79b935405c9b49 (diff)
downloadall-scilab-tbc-books-ipynb-06b09e7d29d252fb2f5a056eeb8bd1264ff6a333.tar.gz
all-scilab-tbc-books-ipynb-06b09e7d29d252fb2f5a056eeb8bd1264ff6a333.tar.bz2
all-scilab-tbc-books-ipynb-06b09e7d29d252fb2f5a056eeb8bd1264ff6a333.zip
Merge pull request #1 from prashantsinalkar/masterHEADmaster
Initial commit
Diffstat (limited to 'Engineering_Mechanics_by_A_K_Tayal/19-Relative_Motion.ipynb')
-rw-r--r--Engineering_Mechanics_by_A_K_Tayal/19-Relative_Motion.ipynb191
1 files changed, 191 insertions, 0 deletions
diff --git a/Engineering_Mechanics_by_A_K_Tayal/19-Relative_Motion.ipynb b/Engineering_Mechanics_by_A_K_Tayal/19-Relative_Motion.ipynb
new file mode 100644
index 0000000..650d4cb
--- /dev/null
+++ b/Engineering_Mechanics_by_A_K_Tayal/19-Relative_Motion.ipynb
@@ -0,0 +1,191 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 19: Relative Motion"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 19.1: Relative_Velocity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Initilization of variables\n",
+"v_t=10 // m/s // velocity of the train\n",
+"v_s=5 // m/s // velocity of the stone\n",
+"// Calculations\n",
+"// Let v_r be the relative velocity, which is given as, (from triangle law)\n",
+"v_r=sqrt(v_t^2+v_s^2) // m/s\n",
+"// The direction ofthe stone is,\n",
+"theta=atand(v_s/v_t) // degree\n",
+"// Results\n",
+"clc\n",
+"printf('The velocity at which the stone appears to hit the person travelling in the train is %f m/s \n',v_r)\n",
+"printf('The direction of the stone is %f degree \n',theta)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 19.2: Relative_Velocity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Initilization of variables\n",
+"v_A=5 // m/s // speed of ship A\n",
+"v_B=2.5 // m/s // speed of ship B\n",
+"theta=135 // degree // angle between the two ships\n",
+"// Calculations\n",
+"// Here,\n",
+"OA=v_A // m/s\n",
+"OB=v_B // m/s\n",
+"// The magnitude of relative velocity is given by cosine law as,\n",
+"AB=sqrt((OA^2)+(OB^2)-(2*OA*OB*cosd(theta))) // m/s\n",
+"// where AB gives the relative velocity of ship B with respect to ship A\n",
+"// Applying sine law to find the direction, Let alpha be the direction of the reative velocity, then\n",
+"alpha=asind((OB*sind(theta))/(AB)) // degree\n",
+"// Results\n",
+"clc\n",
+"printf('The magnitude of relative velocity of ship B with respect to ship A is %f m/s \n',AB)\n",
+"printf('The direction of the relative velocity is %f degree \n',alpha)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 19.3: Relative_Velocity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Initilization of variables\n",
+"v_c=20 // km/hr // speed at which the cyclist is riding to west\n",
+"theta_1=45 // degree // angle made by rain with the cyclist when he rides at 20 km/hr\n",
+"V_c=12 // km/hr // changed speed\n",
+"theta_2=30 // degree // changed angle when the cyclist rides at 12 km/hr\n",
+"// Calculations\n",
+"// Solving eq'ns 1 & 2 simultaneously to get the values of components(v_R_x & v_R_y) of absolute velocity v_R. We use matrix to solve eqn's 1 & 2.\n",
+"A=[1 1;1 0.577]\n",
+"B=[20;12]\n",
+"C=inv(A)*B // km/hr\n",
+"// The X component of relative velocity (v_R_x) is C(1)\n",
+"// The Y component of relative velocity (v_R_y) is C(2)\n",
+"// Calculations\n",
+"// Relative velocity (v_R) is given as,\n",
+"v_R=sqrt((C(1))^2+(C(2))^2) // km/hr\n",
+"// And the direction of absolute velocity of rain is theta, is given as\n",
+"theta=atand(C(2)/C(1)) // degree\n",
+"// Results \n",
+"clc\n",
+"printf('The magnitude of absolute velocity is %f km/hr \n',v_R)\n",
+"printf('The direction of absolute velocity is %f degree \n',theta)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 19.4: Relative_Velocity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Initiization of variables\n",
+"a=1 // m/s^2 // acceleration of car A\n",
+"u_B=36*(1000/3600) // m/s // velocity of car B\n",
+"u=0 // m/s // initial velocity of car A\n",
+"d=32.5 // m // position of car A from north of crossing\n",
+"t=5 // seconds\n",
+"// Calculations\n",
+"// CAR A: Absolute motion using eq'n v=u+at we have,\n",
+"v=u+(a*t) // m/s\n",
+"// Now distance travelled by car A after 5 seconds is given by, s_A=u*t+(1/2)*a*t^2\n",
+"s_A=(u*t)+((1/2)*a*t^2)\n",
+"// Now, let the position of car A after 5 seconds be y_A\n",
+"y_A=d-s_A // m // \n",
+"// CAR B:\n",
+"// let a_B be the acceleration of car B\n",
+"a_B=0 // m/s\n",
+"// Now position of car B is s_B\n",
+"s_B=(u_B*t)+((1/2)*a_B*t^2) // m\n",
+"x_B=s_B // m\n",
+"// Let the Relative position of car A with respect to car B be BA & its direction be theta, then from fig. 19.9(b)\n",
+"OA=y_A\n",
+"OB=x_B\n",
+"BA=sqrt(OA^2+OB^2) // m\n",
+"theta=atand(OA/OB) // degree\n",
+"// Let the relative velocity of car A w.r.t. the car B be v_AB & the angle be phi. Then from fig 19.9(c). Consider small alphabets\n",
+"oa=v\n",
+"ob=u_B\n",
+"v_AB=sqrt(oa^2+ob^2) // m/s\n",
+"phi=atand(oa/ob) // degree\n",
+"// Let the relative acceleration of car A w.r.t. car B be a_A/B.Then,\n",
+"a_AB=a-a_B // m/s^2\n",
+"// Results\n",
+"clc\n",
+"printf('The relative position of car A relative to car B is %f m \n',BA)\n",
+"printf('The direction of car A w.r.t car B is %f degree \n',theta)\n",
+"printf('The velocity of car A relative to car B is %f m/s \n',v_AB)\n",
+"printf('The direction of car A w.r.t (for relative velocity)is %f degree \n',phi)\n",
+"printf('The acceleration of car A relative to car B is %f m/s^2 \n',a_AB)"
+ ]
+ }
+],
+"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
+}