Created
June 28, 2016 23:54
-
-
Save mhogg/d1eb2c8c0afd50e22e8fc15a60fe0869 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "cells": [ | |
| { | |
| "cell_type": "code", | |
| "execution_count": 1, | |
| "metadata": { | |
| "collapsed": true | |
| }, | |
| "outputs": [], | |
| "source": [ | |
| "from numpy import *" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "# Natural convective heat loss from sphere" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 179, | |
| "metadata": { | |
| "collapsed": false | |
| }, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "Lc = 0.196350 m\n", | |
| "beta = 0.002309 \n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "d = 0.125 # Sphere diameter (m)\n", | |
| "Lc = 0.5*d*pi # Characteristic length (m) (from textbook version of Cengel)\n", | |
| "#Lc = d # Characteristic length (m) (from online version of Cengel)\n", | |
| "Ts = 160 # Surface temperature (deg C)\n", | |
| "Tinf = 30 # Air temperature (deg C)\n", | |
| "vis = 1.8645e-5 # Air viscosity\n", | |
| "beta = 1.0/(Ts+273.15) # Expansion coefficient of air\n", | |
| "Pr = 0.712 # Prandtl number\n", | |
| "g = 9.8 # Gravity (m/s2)\n", | |
| "k = 0.0263 # Thermal conductivity of air (W/m-K)\n", | |
| "print \"Lc = %f m\" % Lc\n", | |
| "print \"beta = %f \" % beta" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 180, | |
| "metadata": { | |
| "collapsed": false | |
| }, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "Gr = 6.405e+07\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "Gr = (g*beta*(Ts-Tinf)*(Lc**3.0))/(vis**2.0)\n", | |
| "print \"Gr = %.3e\" % Gr " | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 181, | |
| "metadata": { | |
| "collapsed": false | |
| }, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "Ra = 4.560e+07\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "Ra = Gr*Pr\n", | |
| "print \"Ra = %.3e\" % Ra" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 182, | |
| "metadata": { | |
| "collapsed": false | |
| }, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "Nu = 39.36\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "Nu = 2 + (0.589*Ra**0.25)/((1+(0.469/Pr)**(9./16.))**(4./9.))\n", | |
| "print \"Nu = %.2f\" % Nu" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 183, | |
| "metadata": { | |
| "collapsed": false | |
| }, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "5.27 W/m-K\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "h = k/Lc*Nu\n", | |
| "print \"%.2f W/m-K\" % h" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 184, | |
| "metadata": { | |
| "collapsed": false | |
| }, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "33.64 W\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "A = 4*pi*(d/2.)**2\n", | |
| "Q = h*A*(Ts-Tinf)\n", | |
| "print \"%.2f W\" % Q" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": null, | |
| "metadata": { | |
| "collapsed": true | |
| }, | |
| "outputs": [], | |
| "source": [] | |
| } | |
| ], | |
| "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.11" | |
| } | |
| }, | |
| "nbformat": 4, | |
| "nbformat_minor": 0 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment