summaryrefslogtreecommitdiff
path: root/sample_notebooks/kartiksankhla/Chapter2_WEIco2c.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'sample_notebooks/kartiksankhla/Chapter2_WEIco2c.ipynb')
-rw-r--r--sample_notebooks/kartiksankhla/Chapter2_WEIco2c.ipynb250
1 files changed, 0 insertions, 250 deletions
diff --git a/sample_notebooks/kartiksankhla/Chapter2_WEIco2c.ipynb b/sample_notebooks/kartiksankhla/Chapter2_WEIco2c.ipynb
deleted file mode 100644
index f12ee152..00000000
--- a/sample_notebooks/kartiksankhla/Chapter2_WEIco2c.ipynb
+++ /dev/null
@@ -1,250 +0,0 @@
-{
- "metadata": {
- "name": "",
- "signature": "sha256:44c6b2962e60454059ed8ab0f850fa5cf7fde8b83f0146551b8d869bf0ff197f"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter2-Basic Thermodynamics, Fluid\n",
- "Mechanics: Definitions\n",
- "of Efficiency"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1-pg39"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#calculate the polyefficency and overall total to total efficiency\n",
- "\n",
- "##given data\n",
- "gamma = 1.4;\n",
- "pi = 8.;##pressure ratio\n",
- "T01 = 300.;##inlet temperature in K\n",
- "T02 = 586.4;##outlet temperature in K\n",
- "\n",
- "##Calculations\n",
- "##Calculation of Overall Total to Total efficiency\n",
- "Tot_eff = ((pi**((gamma-1.)/gamma))-1.)/((T02/T01)-1.);\n",
- "\n",
- "##Calculation of polytropic efficiency\n",
- "Poly_eff = ((gamma-1.)/gamma)*((math.log(pi))/math.log(T02/T01));\n",
- "\n",
- "##Results\n",
- "print'%s %.2f %s'%('The Overall total-to-total efficiency is ',Tot_eff,'');\n",
- "print'%s %.2f %s'%('The polytropic efficiency is ',Poly_eff,'');\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The Overall total-to-total efficiency is 0.85 \n",
- "The polytropic efficiency is 0.89 \n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex2-pg44"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#calculate the\n",
- "\n",
- "##given data\n",
- "T01 = 1200.;##Stagnation temperature at which gas enters in K\n",
- "p01 = 4.;##Stagnation pressure at which gas enters in bar\n",
- "c2 = 572.;##exit velocity in m/s\n",
- "p2 = 2.36;##exit pressure in bar\n",
- "Cp = 1.160*1000.;##in J/kgK\n",
- "gamma = 1.33\n",
- "\n",
- "##calculations\n",
- "T2 = T01 - 0.5*(c2**2)/Cp;##Calculation of exit temperature in K\n",
- "Noz_eff = ((1.-(T2/T01))/(1.-(p2/p01)**((gamma-1.)/gamma)));##Nozzle efficiency\n",
- "\n",
- "##Results\n",
- "print'%s %.2f %s'%('Nozzle efficiency is ',Noz_eff,'');\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Nozzle efficiency is 0.96 \n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3-pg51"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#calculate the\n",
- "\n",
- "##given data\n",
- "cp = 0.6;##coefficient of pressure\n",
- "AR = 2.13;##Area ratio\n",
- "N_R1 = 4.66;\n",
- "\n",
- "##calculations\n",
- "cpi = 1. - (1./(AR**2));\n",
- "Diff_eff = cp/cpi;##diffuser efficiency\n",
- "theta = 2.*(180./math.pi)*math.atan((AR**0.5 - 1.)/(N_R1));##included cone angle\n",
- "\n",
- "##Results\n",
- "print'%s %.2f %s'%('cpi = \\n',cpi,'');\n",
- "print'%s %.2f %s'%('The included cone angle can be found = ',theta,' deg.');\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "cpi = \n",
- " 0.78 \n",
- "The included cone angle can be found = 11.26 deg.\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4-pg52"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#calculate the\n",
- "\n",
- "##given data\n",
- "AR = 1.8;##Area ratio\n",
- "cp = 0.6;##coefficient of pressure\n",
- "N_R1 = 7.85;\n",
- "\n",
- "##calculations\n",
- "Theta = 2.*(180./math.pi)*math.atan((AR**0.5 - 1.)/(N_R1));##included cone angle\n",
- "cpi = 1.-(1./(AR**2));\n",
- "Diff_eff = cp/cpi;##diffuser efficeincy\n",
- "\n",
- "##Results\n",
- "print'%s %.2f %s'%('The included cone angle can be found = ',Theta,' deg.\\n');\n",
- "print'%s %.2f %s'%('cpi = \\n',cpi,'');\n",
- "print'%s %.2f %s'%('Diffuser efficiency = ',Diff_eff,'');\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The included cone angle can be found = 4.98 deg.\n",
- "\n",
- "cpi = \n",
- " 0.69 \n",
- "Diffuser efficiency = 0.87 \n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5-pg53"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#calculate the\n",
- "\n",
- "##given data\n",
- "AR = 2.0;##Area ratio\n",
- "alpha1 = 1.059;\n",
- "B1 = 0.109;\n",
- "alpha2 = 1.543;\n",
- "B2 = 0.364;\n",
- "cp = 0.577;##coefficient of pressure\n",
- "\n",
- "##calculations\n",
- "cp = (alpha1 - (alpha2/(AR**2))) - 0.09;\n",
- "Diff_eff = cp/(1.-(1./(AR**2)));##Diffuser efficiency\n",
- "\n",
- "##Results\n",
- "print'%s %.2f %s'%('The diffuser efficiency = ',Diff_eff,'');\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The diffuser efficiency = 0.78 \n"
- ]
- }
- ],
- "prompt_number": 5
- }
- ],
- "metadata": {}
- }
- ]
-} \ No newline at end of file