diff options
author | hardythe1 | 2015-06-03 15:27:17 +0530 |
---|---|---|
committer | hardythe1 | 2015-06-03 15:27:17 +0530 |
commit | 47d7279a724246ef7aa0f5359cf417992ed04449 (patch) | |
tree | c613e5e4813d846d24d67f46507a6a69d1a42d87 /sample_notebooks/KAVANA B/CHAPTER.ipynb | |
parent | 435840cef00c596d9e608f9eb2d96f522ea8505a (diff) | |
download | Python-Textbook-Companions-47d7279a724246ef7aa0f5359cf417992ed04449.tar.gz Python-Textbook-Companions-47d7279a724246ef7aa0f5359cf417992ed04449.tar.bz2 Python-Textbook-Companions-47d7279a724246ef7aa0f5359cf417992ed04449.zip |
add books
Diffstat (limited to 'sample_notebooks/KAVANA B/CHAPTER.ipynb')
-rwxr-xr-x | sample_notebooks/KAVANA B/CHAPTER.ipynb | 175 |
1 files changed, 175 insertions, 0 deletions
diff --git a/sample_notebooks/KAVANA B/CHAPTER.ipynb b/sample_notebooks/KAVANA B/CHAPTER.ipynb new file mode 100755 index 00000000..13237c6c --- /dev/null +++ b/sample_notebooks/KAVANA B/CHAPTER.ipynb @@ -0,0 +1,175 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "CHAPTER 2: THERMAL STATIONS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.1, Page number 25-26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "M = 15000.0+10.0 #Water evaporated(kg)\n",
+ "C = 5000.0+5.0 #Coal consumption(kg)\n",
+ "time = 8.0 #Generation shift time(hours)\n",
+ "\n",
+ "#Calculation\n",
+ "#Case(a)\n",
+ "M1 = M-15000.0\n",
+ "C1 = C-5000.0\n",
+ "M_C = M1/C1\n",
+ "#Case(b)\n",
+ "kWh = 0 #Station output at no load\n",
+ "consumption_noload = 5000+5*kWh #Coal consumption at no load(kg)\n",
+ "consumption_noload_hr = consumption_noload/time #Coal consumption per hour(kg)\n",
+ "\n",
+ "#Result\n",
+ "print('Case(a): Limiting value of water evaporation , M/C = %.1f kg' %M_C)\n",
+ "print('Case(b): Coal per hour for running station at no load = %.f kg' %consumption_noload_hr)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Case(a): Limiting value of water evaporation , M/C = 2.0 kg\n",
+ "Case(b): Coal per hour for running station at no load = 625 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2, Page number 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "amount = 25.0*10**5 #Amount spent in 1 year(Rs)\n",
+ "value_heat = 5000.0 #Heating value(kcal/kg)\n",
+ "cost = 500.0 #Cost of coal per ton(Rs)\n",
+ "n_ther = 0.35 #Thermal efficiency\n",
+ "n_elec = 0.9 #Electrical efficiency\n",
+ "\n",
+ "#Calculation\n",
+ "n = n_ther*n_elec #Overall efficiency\n",
+ "consumption = amount+cost*value_heat #Coal consumption i 1 year(kg)\n",
+ "combustion = consumption*value_heat #Heat of combustion(kcal)\n",
+ "output = n*combustion #Heat output(kcal)\n",
+ "kWh = output/860.0 #Annual heat generated(kWh). 1 kWh = 860 kcal\n",
+ "time = 365*24.0 #Total time in a year(hour)\n",
+ "load_average = kWh/time #Average load on the power plant(kW)\n",
+ "\n",
+ "#Result\n",
+ "print('Average load on power plant = %.2f kW' %load_average)\n",
+ "print('\\nNOTE: ERROR: Calculation mistake in the final answer in textbook')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average load on power plant = 1045.32 kW\n",
+ "\n",
+ "NOTE: ERROR: Calculation mistake in the final answer in textbook\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.3, Page number 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "consumption = 0.5 #Coal consumption per kWh output(kg)\n",
+ "cal_value = 5000.0 #Calorific value(kcal/kg)\n",
+ "n_boiler = 0.8 #Boiler efficiency\n",
+ "n_elec = 0.9 #Electrical efficiency\n",
+ "\n",
+ "#Calculation\n",
+ "input_heat = consumption*cal_value #Heat input(kcal)\n",
+ "input_elec = input_heat/860.0 #Equivalent electrical energy(kWh). 1 kWh = 860 kcal\n",
+ "loss_boiler = input_elec*(1-n_boiler) #Boiler loss(kWh)\n",
+ "input_steam = input_elec-loss_boiler #Heat input to steam(kWh)\n",
+ "input_alter = 1/n_elec #Alternator input(kWh)\n",
+ "loss_alter = input_alter*(1-n_elec) #Alternate loss(kWh)\n",
+ "loss_turbine = input_steam-input_alter #Loss in turbine(kWh)\n",
+ "loss_total = loss_boiler+loss_alter+loss_turbine #Total loss(kWh)\n",
+ "output = 1.0 #Output(kWh)\n",
+ "Input = output+loss_total #Input(kWh)\n",
+ "\n",
+ "#Result\n",
+ "print('Heat Balance Sheet')\n",
+ "print('LOSSES: Boiler loss = %.3f kWh' %loss_boiler)\n",
+ "print(' Alternator loss = %.2f kWh' %loss_alter)\n",
+ "print(' Turbine loss = %.3f kWh' %loss_turbine)\n",
+ "print(' Total loss = %.2f kWh' %loss_total)\n",
+ "print('OUTPUT: %.1f kWh' %output)\n",
+ "print('INPUT: %.2f kWh' %Input)\n",
+ "print('\\nNOTE: Changes in the obtained answer from that of textbook is due to precision')"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat Balance Sheet\n",
+ "LOSSES: Boiler loss = 0.581 kWh\n",
+ " Alternator loss = 0.11 kWh\n",
+ " Turbine loss = 1.214 kWh\n",
+ " Total loss = 1.91 kWh\n",
+ "OUTPUT: 1.0 kWh\n",
+ "INPUT: 2.91 kWh\n",
+ "\n",
+ "NOTE: Changes in the obtained answer from that of textbook is due to precision\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |