summaryrefslogtreecommitdiff
path: root/Basic_Engineering_Thermodynamics/ch1.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Basic_Engineering_Thermodynamics/ch1.ipynb')
-rwxr-xr-xBasic_Engineering_Thermodynamics/ch1.ipynb287
1 files changed, 287 insertions, 0 deletions
diff --git a/Basic_Engineering_Thermodynamics/ch1.ipynb b/Basic_Engineering_Thermodynamics/ch1.ipynb
new file mode 100755
index 00000000..db200142
--- /dev/null
+++ b/Basic_Engineering_Thermodynamics/ch1.ipynb
@@ -0,0 +1,287 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:2e535cebdbf0df3d8142e86a92fc184d16f528ad1b16b72e6276221e73684820"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1 : Fundamental Concepts and Definitions"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1 Page No : 5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "distanceTravelled = 80. * 1000 \t\t\t#in meters\n",
+ "timeOfTravel = 2 * 3600. \t\t\t#in seconds\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "Velocity = distanceTravelled / timeOfTravel \t\t\t#in meter/second\n",
+ "print \"Velocity = %.1f m/s \"%(Velocity);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity = 11.1 m/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2 Page No : 6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "mass = 120 \t\t\t#in kg\n",
+ "acceleration = 10 \t\t\t#in m/s**2\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "force = mass * acceleration * 0.001 \t\t\t#in kN\n",
+ "print \"Force = %.1f kN \"%(force);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Force = 1.2 kN \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3 Page No : 6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "mass = 60 \t\t\t#in kg\n",
+ "accelerationDueToGravity = 9.8 \t\t\t#in m/s**2\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "weight = mass * accelerationDueToGravity \t\t\t#in N\n",
+ "print \"Weight = %.0f N \"%(weight);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Weight = 588 N \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4 Page No : 10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "Pg = 12E5 \t\t\t#in N/m**2 \t\t\t#inlet gauge pressure\n",
+ "Pvac = 75. / 1000 \t\t\t#in m Hg \t\t\t#exit gauge pressure\n",
+ "atmosphericPressure = 760. / 1000 \t\t\t#in m Hg \t\t\t#atmospheric pressure\n",
+ "density = 13.6 * 10**3 \t\t\t#kg/m**3 \t\t\t#density of mercury\n",
+ "g = 9.805 \t\t\t#in m/s**2 \t\t\t#acceleration due to gravity\n",
+ " \n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "Pvac = density*g*Pvac \t\t\t#Pvac in N/m**2 \n",
+ "atmosphericPressure = density*g*atmosphericPressure \t\t\t#atmospheric pressure in N/m**2\n",
+ "PabsInlet = atmosphericPressure + Pg \t\t\t#in N/m**2 \t\t\t#absolute inlet pressure\n",
+ "PabsExit = atmosphericPressure - Pvac \t\t\t#in N/m**2 \t\t\t#absolute exit pressure\n",
+ "print \"At the inlet, absolute pressure = %.3f kPa \"%(PabsInlet*.001);\n",
+ "print \"At the exit, absolute pressure = %.3f kPa \"%(PabsExit*.001);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "At the inlet, absolute pressure = 1301.344 kPa \n",
+ "At the exit, absolute pressure = 91.343 kPa \n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.5 Page No : 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "mass = 50 * .001 \t\t\t#in kg\n",
+ "volume = 0.04 \t\t\t#in m**3\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "specificVolume = volume / mass \t\t\t#in m**3/kg\n",
+ "density = 1/specificVolume \t\t\t#in kg/m**3\n",
+ "print \"Specific density = %.2f m**3/kg \"%(specificVolume);\n",
+ "print \"Density = %.2f kg/m**3 \"%(density);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific density = 0.80 m**3/kg \n",
+ "Density = 1.25 kg/m**3 \n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.6 Page No : 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "temp = 100; \t\t\t#in degree Celsius\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "TEMP = temp + 273.15;\n",
+ "print \"Temperature in Kelvin = %.2f K\"%(TEMP);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature in Kelvin = 373.15 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.7 Page No : 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "TEMP = 263.15; \t\t\t#in Kelvin\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "temp = TEMP - 273.15;\n",
+ "print \"Temperature in degree Celsius = %.2f degree C\"%(temp);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature in degree Celsius = -10.00 degree C\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file