{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 3: Temperature and the Ideal gas" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.2: volume_calculatio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\n", "//Initialization of variables\n", "p=14.7 //psia\n", "R0=1545 \n", "t=460 +60 //R\n", "//calculations\n", "v=R0*t/(p*144)\n", "//results\n", "printf('Volume = %.1f ft^3/mol',v)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.3: density_calculation.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\n", "//Initialization of variables\n", "p=20 //psia\n", "R0=1545 \n", "t=460 +100 //R\n", "M=28\n", "//calculations\n", "v=R0*t/(p*144*M)\n", "rho=1/v\n", "//results\n", "printf('density of nitrogen = %.4f lbm/ft^3',rho)" ] } ], "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 }