diff options
Diffstat (limited to 'sample_notebooks/PRAVEENKUMAR C/STATICS_CHAPTER_1.ipynb')
-rw-r--r-- | sample_notebooks/PRAVEENKUMAR C/STATICS_CHAPTER_1.ipynb | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/sample_notebooks/PRAVEENKUMAR C/STATICS_CHAPTER_1.ipynb b/sample_notebooks/PRAVEENKUMAR C/STATICS_CHAPTER_1.ipynb new file mode 100644 index 00000000..d8e5464b --- /dev/null +++ b/sample_notebooks/PRAVEENKUMAR C/STATICS_CHAPTER_1.ipynb @@ -0,0 +1,116 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 1:INTRODUCTION TO FLUID STATICS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## SAMPLE PROBLEM 1/1,PAGE NUMBER:19" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The weight of a car in newton,W= 13734.0 N\n", + "The mass of the car in slugs,m= 95.9 slugs\n", + "The weight of the car in pounds,W= 3089.0 lb(roundoff error)\n", + "The mass of the car in lbm,m= 3086.0 lbm(roundoff error)\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "m=1400; # Mass of car in kg\n", + "\n", + "#Calculation\n", + "g=9.81; # The acceleration due to gravity in m/s^2\n", + "W_1=m*g;# Weight in N\n", + "m_1=m/14.594;# Mass of the car in slugs (1slug=14.594kg)\n", + "g=32.2; # The acceleration due to gravity in ft/s^2\n", + "W_2=m_1*g;# Weight in pounds (lb)\n", + "m_2=m/0.45359; #Mass of the car in lbm\n", + "print \"The weight of a car in newton,W=\",round(W_1,0),\"N\"\n", + "print \"The mass of the car in slugs,m=\",round(m_1,1),\"slugs\"\n", + "print \"The weight of the car in pounds,W=\",round(W_2,0),\"lb\"\"(roundoff error)\"\n", + "print \"The mass of the car in lbm,m=\",round(m_2,0),\"lbm\"\"(roundoff error)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## SAMPLE PROBLEM 1/2,PAGE NUMBER:19" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The weight of a person by using Newton's Law of gravitation,W= 688.0 N\n", + "The weight of a person standing on the surface of the earth,W= 687.0 N\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Variable Declaration\n", + "G=6.673* 10**-11;# m^3/(kg.s^2)\n", + "m_e=5.976* 10**24;# kg\n", + "R=6371*10**3;# m\n", + "m=70;# kg\n", + "g=9.81;# m/s^2\n", + "\n", + "#Calculation\n", + "W_n=(G*m_e*m)/R**2;# N\n", + "W=m*g;# N\n", + "print\"The weight of a person by using Newton's Law of gravitation,W=\",round(W_n,0),\"N\"\n", + "print\"The weight of a person standing on the surface of the earth,W=\",round(W,0),\"N\"\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.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |