{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 2: Operations With Forces" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.11: OPF.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Initilization of variables\n", "C1=20 //N-m\n", "C2=40 //N-m\n", "C3=-55 //N-m\n", "//Calculations\n", "C=sqrt(C1^2+C2^2+C3^2) //N-m\n", "thetax=C2/C \n", "thetay=C3/C\n", "thetaz=C1/C\n", "Cx=C*thetax //N-m\n", "Cy=C*thetay //N-m\n", "Cz=C*thetaz //N-m\n", "//Result\n", "clc\n", "printf('Couple in vector notation:%fi%fj+%fk N.m',Cx,Cy,Cz) //N-m" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.12: OPF.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Initilization of variables\n", "F1=25 //lb\n", "F2=25 //lb\n", "L1=14 //in\n", "L2=20 //in\n", "//Calculations\n", "C=F1*L1 //lb-in\n", "M=-F2*L2 //lb-in\n", "//Result\n", "clc\n", "printf('The twisting couple is:%f lb-in\n',C) //lb-in\n", "printf('The bending moment is:%f lb-in',M) //lb-in" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.13: OPF.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Initilization of variables\n", "rx=20 //in\n", "ry=0 //in\n", "rz=14 //in\n", "Fx=0 //lb\n", "Fy=-25 //lb\n", "Fz=0 //lb\n", "//Calculation\n", "Mx=ry*Fz-rz*Fy //lb-in\n", "My=rx*Fz-rz*Fx //lb-in\n", "Mz=rx*Fy-ry*Fx //lb-in\n", "//Result\n", "clc\n", "printf('The moment of the 25-lb force is:%fi+%fj%fk lb.in',Mx,My,Mz) //lb-in\n", "\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.14: OPF.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Initilization of variables\n", "//Co-ordinates with respect to point O\n", "x=17.9 //ft\n", "y=6.91 //ft\n", "z=46.3 //ft\n", "Fz=-4000 //lb\n", "Fy=0 //lb\n", "//Calculation\n", "Mx=y*Fz-z*Fy //lb-ft\n", "//Result\n", "clc\n", "printf('The scalar coefficient of the i term is the moment about the X-Axis Mx:%f lb-ft lb-ft',Mx) //lb-ft\n", "//The answer in the text book is incorrect due to decimal point accuracy in scilab" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.1: OPF.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Initilization of variables\n", "F=20 //lb\n", "L=4.33 //ft\n", "//Calculation\n", "M=-F*L //lb-ft\n", "//Result\n", "clc\n", "printf('The moment of force F about O is:%f lb-ft',M) " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.2: OPF.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Initilization of variables\n", "F=20 //lb\n", "theta=((60*%pi)/180) //radians\n", "L=5 //ft\n", "//Calculations\n", "F_x=F*cos(theta) //Resloving the vector\n", "F_y=F*sin(theta) //Resloving the vector\n", "M=-F_y*L //Appling Varignon's theorem\n", "//Negative sign tells that moment is clockwise\n", "//Result\n", "clc\n", "printf('The moment of the force about O is:%f lb-ft',M) \n", " " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.3: OPF.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Initilization of variables\n", "F=100 //N\n", "x1=2 //m\n", "x2=5 //m\n", "y1=0 //m\n", "y2=1 //m\n", "z1=4 //m\n", "z2=1 //m\n", "//Calculations\n", "xside=(x2-x1) //m\n", "yside=(y2-y1) //m\n", "zside=(z2-z1) //m\n", "LD=sqrt(xside^2+yside^2+zside^2)\n", "Fx=(xside/LD)*F //N\n", "Fy=(yside/LD)*F //N\n", "Fz=(zside/LD)*F //N\n", "Mx=-Fy*z1 //N-m\n", "My=Fx*x1-Fz*z1 //N-m\n", "Mz=Fy*x1 //N-m\n", "//Result\n", "clc\n", "printf('Fx is:%f N\n',Fx) //N\n", "printf('Fy if:%f N\n',Fy) //N\n", "printf('Fz is:%f N\n',Fz) //N\n", "printf('Moment about X-Axis is:%f N.m\n',Mx) //N-m\n", "printf('Moment about Y-Axis is:%f N.m\n',My) //N-m\n", "printf('Moment about Z-Axis is:%f N.m',Mz) //N-m\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.4: OPF.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Initilization of variables\n", "Fx=68.7 //N\n", "Fy=22.9 //N\n", "Fz=-68.7 //N\n", "rx=2 //m\n", "ry=0 //m\n", "rz=4 //m\n", "rx1=5 //m\n", "ry1=1 //m\n", "rz1=1 //m\n", "//Calculation\n", "Mx=Fz*ry-Fy*rz //N-m\n", "My=-(Fz*rx-Fx*rz) //N-m\n", "Mz=Fy*rx-Fx*ry //N-m\n", "Mx1=Fz*ry1-Fy*rz1 //N-m\n", "My1=-(Fz*rx1-Fx*rz1) //N-m\n", "Mz1=Fy*rx1-Fx*ry1 //N-m\n", "//Result\n", "clc\n", "printf('Moment with respect to origin using point(2,0,4):%fi+%fj+%fk N.m\n',Mx,My,Mz) //N-m\n", "printf('Moment with respect to origin using point (5,1,1):%fi+%fj+%fk N.m \n',Mx1,My1,Mz1) //N-m" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.5: OPF.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Initilization of variables\n", "Fx=2 //lb\n", "Fy=3 //lb\n", "Fz=-1 //lb\n", "rx=1 //ft\n", "ry=-4 //ft\n", "rz=3 //ft\n", "//Coordinates of points\n", "ax=3 //ft\n", "ay=1 //ft\n", "az=1 //ft\n", "bx=3 //ft\n", "by=-1 //ft\n", "bz=1 //ft\n", "cx=2 //ft\n", "cy=5 //ft\n", "cz=-2 //ft\n", "//Calculations\n", "Rx=ax-cx //ft\n", "Ry=ay-cy //ft\n", "Rz=az-cz //ft\n", "Mx=(Ry*Fz)-(Rz*Fy) //lb-ft\n", "My=-((Rx*Fz)-(Rz*Fx)) //lb-ft\n", "Mz=(Rx*Fy)-(Ry*Fx) //lb-ft\n", "E_u=sqrt((bx-cx)^2+(by-cy)^2+(bz-cz)^2) //ft\n", "ex=(bx-cx)/E_u //ft\n", "ey=(by-cy)/E_u //ft\n", "ez=(bz-cz)/E_u //ft\n", "M_lx=Mx*ex //lb-ft\n", "M_ly=My*ey //lb-ft\n", "M_lz=Mz*ez //lb-ft\n", "M_l=M_lx+M_ly+M_lz //lb-ft\n", "//Result]\n", "clc\n", "printf('Hence the moment about line is %f lb-ft \n',M_l)\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.6: OPF.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Initilization of variables\n", "P_x=22 //N\n", "P_y=23 //N\n", "P_z=7 //N\n", "p1=1 //m\n", "p2=-1 //m\n", "p3=-2 //m\n", "//Calculations\n", "Mx=(p2*P_z)-(p3*P_y) //N-m\n", "My=-((p1*P_z)-(p3*P_x)) //N-m\n", "Mz=(p1*P_y)-(p2*P_x) //N-m\n", "//Result\n", "clc\n", "printf('The moment about the line from the origin is:%fi%fj+%fk N.m',Mx,My,Mz) //N-m" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.8: OPF.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Initilization of variables\n", "F=10 //N Force couple\n", "a=3 //m Moment arm\n", "//Calculations\n", "C=-F*a //N-m\n", "//Result\n", "clc\n", "printf('The resultant couple is: %fN.m \n',C) " ] } ], "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 }