summaryrefslogtreecommitdiff
path: root/sample_notebooks/AkshayPatil/chapter1.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'sample_notebooks/AkshayPatil/chapter1.ipynb')
-rwxr-xr-xsample_notebooks/AkshayPatil/chapter1.ipynb190
1 files changed, 190 insertions, 0 deletions
diff --git a/sample_notebooks/AkshayPatil/chapter1.ipynb b/sample_notebooks/AkshayPatil/chapter1.ipynb
new file mode 100755
index 00000000..8411e8ec
--- /dev/null
+++ b/sample_notebooks/AkshayPatil/chapter1.ipynb
@@ -0,0 +1,190 @@
+{
+ "metadata": {
+ "name": "chapter1.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1:Introduction and Basic Concepts"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1-2,Page No:19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "UnitCostOfEnergy=0.09 #Unit cost of Energy in $/kWh\n",
+ "TimeInterval=2200 # Time Interval in hours\n",
+ "EnergyperUnitTime=30 # Rated Power kW\n",
+ "\n",
+ "#Calculation\n",
+ "TotalEnergy=EnergyperUnitTime*TimeInterval # Total Energy in kWh\n",
+ " \n",
+ "#Money Saved\n",
+ "MoneySaved=TotalEnergy*UnitCostOfEnergy # Money Saved in $\n",
+ "\n",
+ "#Calculations in Joules\n",
+ "Tot=EnergyperUnitTime*TimeInterval*(3600) #Total Energy in kJ\n",
+ "\n",
+ "#Result\n",
+ "print\"The Total Energy Generated is\",round(TotalEnergy),\"kWh\"\n",
+ "print\"The Total Money Saved is\",round(MoneySaved),\"$\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Total Energy Generated is 66000.0 kWh\n",
+ "The Total Money Saved is 5940.0 $\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1-3,Page No:20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Decleration\n",
+ "rho=850 #density of oil in kg/m^3\n",
+ "V=2 #Volume of tank in m^3\n",
+ "\n",
+ "#Calculations\n",
+ "#We intend to find m\n",
+ "m=rho*V #mass in the tank in kg\n",
+ "\n",
+ "#Result\n",
+ "print\"The mass in the tank is\", round(m),\"kg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass in the tank is 1700.0 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1-4,Page No:21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Decleration\n",
+ "m=1 #mass in lbm\n",
+ "g=32.174 #Gravatational Acceleration in ft/s^2\n",
+ "\n",
+ "#Calculations\n",
+ "W=(m*g)*(1/g) #weight in lbf\n",
+ "\n",
+ "#Result\n",
+ "print\"The weight in lbf is \",round(W),\"lbf\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The weight in lbf is 1.0 lbf\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1-6, Page No:30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Decleration\n",
+ "V=1.1 #Volume of water collected in gal \n",
+ "delt=45.62 # time required in s\n",
+ "gal_conv=3.785*10**-3 #Gal conversion constant\n",
+ "mi=60 #1 minute equals 60 seconds \n",
+ "\n",
+ "#Calculations\n",
+ "V_dot=(V/delt)*(gal_conv/1)*(mi/1) #Volume flow rate in m^3/min\n",
+ "\n",
+ "#Result\n",
+ "print\"The volume flow rate is \",round(V_dot,4), \"m^3/min\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The volume flow rate is 0.0055 m^3/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file