{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 1: Basic Principles" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.2: kinetic_energy.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "// solution\n", "\n", "// initialization of variables\n", "m=10 // mass in Kg\n", "V=5 // velocity in m/s\n", "\n", "KE=m*V**2/2 // kinetic energy in N-m \n", "printf('The Kinetic Energy is '+string(KE)+' N.m')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.3: density_and_specific_volume_is_asked.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "// solution\n", "\n", "// initialization of variables\n", "V=3*5*20 // Volume of air in m^3 from dimensions\n", "m=350 // mass in kg\n", "g=9.81 // gavitational acceleration in m/s^2\n", "rho=m/V // density\n", "printf('The Density is %.3f kg/m^3 \n',rho)\n", "\n", "v=1/rho // specific volume of air\n", "printf(' The specific volume is %.3f m^3/kg \n',v)\n", "\n", "gama=rho*g // specific weight of air\n", "printf(' The specific weight is %.2f N/m^3',gama)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.4: absolute_pressure.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "// solution\n", "\n", "// initialization of variables\n", "h=0.020 // height of mercury in m\n", "gammawater=9810 // specific weight of water in N/m^3\n", "Patm=0.7846*101.3 // atmospheric pressure in kPa from table B.1\n", "\n", "Pgauge=13.6*gammawater*h/1000 // pressure in Pascal from condition gammaHg=13.6*gammawater\n", "\n", "P=(Pgauge+Patm)// absolute pressure in KPa\n", "printf('The Pressure is %.2f kPa',P)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.5: Compression_in_spring.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "// solution\n", "\n", "// initialization of variables\n", "d=10/100 // diameter of cylinder in 'm'\n", "P=600 // pressure in KPa\n", "Patm=100 // atmospheric pressure in Kpa\n", "K=4.8*1000 // spring constant in N/m \n", "\n", "deltax=(P-Patm)*(%pi*1000*d**2)/(4*K) // by balancing forces on piston\n", "printf('The Compression in spring is %.3f m',deltax)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.6: increase_in_kinetic_energy.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "// solution\n", "\n", "// initialization of variables\n", "ma=2200 // mass of Automobile 'a' in kg\n", "va=25 //velocity of Automobile 'a' in m/s before collision\n", "va1=13.89 // velocity of Automobile 'a' after collision in m/s\n", "mb=1000 // mass of Automobile 'b' in kg\n", "vb=24.44 //velocity of Automobile 'b' after collision in m/s\n", "\n", "KE1=(ma*va**2)/2 // kinetic energy before collision\n", "KE2=(ma*va1**2)/2+(mb*vb**2)/2 // kinetic energy after collision\n", "U=(KE1-KE2)/1000 // internal energy from conservation of energy principle in kJ\n", "printf('The increase in kinetic energy is of %.1f kJ',U)" ] } ], "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 }