diff options
Diffstat (limited to 'Thermodynamics:_From_concepts_to_applications/Chapter7.ipynb')
-rwxr-xr-x | Thermodynamics:_From_concepts_to_applications/Chapter7.ipynb | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/Thermodynamics:_From_concepts_to_applications/Chapter7.ipynb b/Thermodynamics:_From_concepts_to_applications/Chapter7.ipynb new file mode 100755 index 00000000..eb4c5f7b --- /dev/null +++ b/Thermodynamics:_From_concepts_to_applications/Chapter7.ipynb @@ -0,0 +1,123 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:d5b975c50e55ebe3a2b199f890473e0371318b3f156613b06dbc3a02621943c9"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter7-Heat engines and the second law of thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example1 pg- 112"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate heat and efficency\n",
+ "##initialisation of variables\n",
+ "m= 0.35 ##kg\n",
+ "u2= 211.785 ##kJ/kg\n",
+ "u1= 182.267 ##kJ/kg\n",
+ "p2= 300. ##kPa\n",
+ "v3= 0.085566 ##kJ/kg\n",
+ "v2= 0.076218 ##kJ/kg\n",
+ "h3= 260.391 ##kJ/kg\n",
+ "h2= 234.650 ##kJ/kg\n",
+ "u4= 199.460 ##kJ/kg\n",
+ "u3= 234.721 ##kJ/kg\n",
+ "p4= 250.##kPa\n",
+ "v1= 0.076218 ##kJ/kg\n",
+ "v4= 0.085566 ##kJ/kg\n",
+ "h1= 201.322 ##kJ/kg\n",
+ "h4= 220.851 ##kJ/kg\n",
+ "##CALCULATIONS\n",
+ "Q12= m*(u2-u1)\n",
+ "W23= m*p2*(v3-v2)\n",
+ "Q23= m*(h3-h2)\n",
+ "W34= 0\n",
+ "Q34= m*(u4-u3)\n",
+ "W41= m*p4*(v1-v4)\n",
+ "Q41= m*(h1-h4)\n",
+ "dW= W23+W41\n",
+ "dQ= Q12+Q23+Q34+Q41\n",
+ "Qh= Q12+Q23\n",
+ "n= dW*100/Qh\n",
+ "##RESULTS\n",
+ "print'%s %.2f %s'%('heat = ',Qh,'kj')\n",
+ "print'%s %.2f %s'%('efficiency =',n, 'percent')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "heat = 19.34 kj\n",
+ "efficiency = 0.85 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example4 pg-123"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate effiecncy of heat engine and efficency\n",
+ "##initialisation of variables\n",
+ "Qc= 9 ##kW\n",
+ "W= 7.5 ##kW\n",
+ "Qh= Qc+W\n",
+ "Tc= 50 ##C\n",
+ "Th= 400 ##C\n",
+ "##CALCULATIONS\n",
+ "n= W/Qh\n",
+ "nrev= 1-((273.15+Tc)/(273.15+Th))\n",
+ "##RESULTS\n",
+ "print'%s %.3f %s'% ('efficiency of heat engine = ',n,'')\n",
+ "print'%s %.3f %s'%('efficiency =',nrev,'')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "efficiency of heat engine = 0.455 \n",
+ "efficiency = 0.520 \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |