summaryrefslogtreecommitdiff
path: root/Basic_Fluid_Mechanics_by_Peerless/5-Control_Volume_Analysis.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Basic_Fluid_Mechanics_by_Peerless/5-Control_Volume_Analysis.ipynb')
-rw-r--r--Basic_Fluid_Mechanics_by_Peerless/5-Control_Volume_Analysis.ipynb170
1 files changed, 170 insertions, 0 deletions
diff --git a/Basic_Fluid_Mechanics_by_Peerless/5-Control_Volume_Analysis.ipynb b/Basic_Fluid_Mechanics_by_Peerless/5-Control_Volume_Analysis.ipynb
new file mode 100644
index 0000000..b82ea2e
--- /dev/null
+++ b/Basic_Fluid_Mechanics_by_Peerless/5-Control_Volume_Analysis.ipynb
@@ -0,0 +1,170 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5: Control Volume Analysis"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.1: ex_1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//initialisation of variables\n",
+"clear\n",
+"w= 20 //lbm/sec\n",
+"sh= 0.004\n",
+"m1= 0.12 //lbm/sec\n",
+"m2= 12.2 //lbm/sec\n",
+"m3= 0.130 //lbm/sec\n",
+"//CALCULATIONS\n",
+"mw1= w/((1/sh)+1)\n",
+"ma1= w-mw1\n",
+"ma4= ma1-m2\n",
+"mw4= mw1+m1-m3\n",
+"mr= ma4+mw4\n",
+"sh1= mw4/ma4\n",
+"//RESULTS\n",
+"printf ('mw1 = %.4f lbm/sec',mw1)\n",
+"printf ('\n ma1 = %.2f lbm/sec',ma1)\n",
+"printf ('\n ma4 = %.2f lbm/sec',ma4)\n",
+"printf ('\n mw4 = %.2f lbm/sec',mw4)\n",
+"printf ('\n mr = %.2f lbm/sec',mr)\n",
+"printf ('\n specific humidity = %.5f lbm/sec',sh1)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.2: ex_2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//initialisation of variables\n",
+"clear\n",
+"w= 62.4 //lbf/ft^3\n",
+"g= 32.2 //ft/sec^2\n",
+"v= 86.5 //ft/sec\n",
+"d2= 3 //in\n",
+"d1= 6 //in\n",
+"dp= 50 //lbf/in^2\n",
+"//CALCULATIONS\n",
+"Fb= -((%pi*(w/g)*v^2*(1/d1)^2*(1-(d2/d1)^2)*0.25)-dp*144*(%pi/4)*(1/d2)^2)\n",
+"//RESULTS\n",
+"printf ('Load on the bolts = %.f lbf',Fb)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.3: ex_3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//initialisation of variables\n",
+"clear\n",
+"F1= 237 //lb\n",
+"dp= 50 //lbf/in^2\n",
+"D= 6 //in\n",
+"//CALCULATIONS\n",
+"F2= dp*144*(%pi/4)*(D/12)^2\n",
+"Fb= F1-F2\n",
+"//RESULTS\n",
+"printf ('Load on the bolts = %.f lbf',Fb)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.5: ex_5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//initialisation of variables\n",
+"clear\n",
+"w1= 0.0286 //lbm/ft^3\n",
+"v= 2500 //ft/sec\n",
+"A= 2.5 //ft^3\n",
+"k= 0.015\n",
+"p2= 700 //lbf/ft^2\n",
+"p1= 628 //lbf/ft^2\n",
+"v2= 3500 //ft/sec\n",
+"g= 32.17 //ft/sec^2\n",
+"//CALCULATIONS\n",
+"ma= w1*v*A\n",
+"mf= k*ma\n",
+"mt= ma+mf\n",
+"F= (p2-p1)*A+(mt*v2/g)-(ma*v/g)\n",
+"//RESULTS\n",
+"printf ('air mass flow rate = %.2f lbm/sec',ma)\n",
+"printf ('\n Fuel flow rate = %.2f lbm/sec',mf)\n",
+"printf ('\n Fuel flow rate at station 2 = %.2f lbm/sec',mt)\n",
+"printf ('\n Thrust force = %.f lbf',F)"
+ ]
+ }
+],
+"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
+}