summaryrefslogtreecommitdiff
path: root/sample_notebooks/SanaKhanum
diff options
context:
space:
mode:
Diffstat (limited to 'sample_notebooks/SanaKhanum')
-rwxr-xr-xsample_notebooks/SanaKhanum/Chapter3.ipynb76
1 files changed, 76 insertions, 0 deletions
diff --git a/sample_notebooks/SanaKhanum/Chapter3.ipynb b/sample_notebooks/SanaKhanum/Chapter3.ipynb
new file mode 100755
index 00000000..a1ae6b1c
--- /dev/null
+++ b/sample_notebooks/SanaKhanum/Chapter3.ipynb
@@ -0,0 +1,76 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3 : Work and Heat"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 3.1,Page No. 36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Work done is 274.200000 kJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Given values\n",
+ "m=1; # mass of steam in kg\n",
+ "P=200; # Pressure at which process takes place in kPa\n",
+ "Tf=400; #Temperature of final state in C (Celcius)\n",
+ "x=0.2; #Quality factor \n",
+ "\n",
+ "#State 1\n",
+ "#Values from Table C-2\n",
+ "vf=0.001061; #specific volume of saturated liquid in m^3/kg\n",
+ "vg=0.8857; #specific volume of saturated vapor in m^3/kg\n",
+ "\n",
+ "#State 2\n",
+ "#Values from superheat Table at 400C and 0.2 MPa\n",
+ "v2=1.549; #specific volume of steam in m^3/kg\n",
+ "\n",
+ "#Calculation\n",
+ "v1=vf+x*(vg-vf); # specific volume of state 1 in m^3/kg\n",
+ "W=m*P*(v2-v1) #Work done by steam at constant pressure(kPa) in kJ\n",
+ "print'Work done is %f kJ'%round(W,1)\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}