diff options
Diffstat (limited to 'Engineering_Mechanics_by_A._K._Tayal/Chapter4.ipynb')
-rw-r--r-- | Engineering_Mechanics_by_A._K._Tayal/Chapter4.ipynb | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/Engineering_Mechanics_by_A._K._Tayal/Chapter4.ipynb b/Engineering_Mechanics_by_A._K._Tayal/Chapter4.ipynb new file mode 100644 index 00000000..ad72b04f --- /dev/null +++ b/Engineering_Mechanics_by_A._K._Tayal/Chapter4.ipynb @@ -0,0 +1,133 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4 Centroid Centre of mass and Centre of Gravity" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 4.8 Centroid of a composite plane figure" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The centroid of the un equal I-section is 10.961538 cm \n", + "\n" + ] + } + ], + "source": [ + "# Initilization of variables\n", + "b1=20 #cm # width of top flange\n", + "t1=5 #cm # thickness of top flange\n", + "b2=5 #cm # width of web\n", + "t2=15 #cm # thickness or height of the web\n", + "b3=30 #cm # width of bottom flange\n", + "t3=5 #cm # thickness of bottom flange\n", + "# Calculations\n", + "A1=b1*t1 #cm**2 # area of bottom flange\n", + "A2=b2*t2 #cm**2 # area of the web\n", + "A3=b3*t3 #cm**2 # area of top flange\n", + "y1=t3+t2+(t1/2) #cm # y co-ordinate of the centroid of top flange\n", + "y2=t3+(t2/2) #cm # y co-ordinate of the centroid of the web\n", + "y3=t3/2 #cm # y co-ordinate of the centroid of the bottom flange\n", + "y_c=((A1*y1)+(A2*y2)+(A3*y3))/(A1+A2+A3) #cm # where y_c is the centroid of the un-symmetrical I-section\n", + "# Results\n", + "print('The centroid of the un equal I-section is %f cm \\n'%y_c)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 4.9 Centroid of a composite plane figure" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The centroid of the cross-sectional area of a Z-section about x-axis is 13.557692 cm \n", + "\n", + "The centroid of the cross-sectional area of a Z-section about y-axis is 7.692308 cm \n", + "\n" + ] + } + ], + "source": [ + "# Initilization of variables\n", + "# The given section is Z-section which is un-symmetrycal about both the axis\n", + "b1=20 #cm # width of bottom flange \n", + "t1=5 #cm # thickness of the bottom flange\n", + "b2=2.5 #cm # thickness of the web of the flange\n", + "t2=15 #cm # depth of the web\n", + "b3=10 #cm # width of the top flange\n", + "t3=2.5 #cm # thickness of the top flange\n", + "# Calculations\n", + "# Respective areas\n", + "A1=b1*t1 # cm**2 # area of the bottom flange\n", + "A2=b2*t2 # cm**2 # area of the web\n", + "A3=b3*t3 # cm**2 # area of the top-flange\n", + "# first we calculate the x co-ordinate of the centroid\n", + "x1=b3-b2+(b1/2) #cm # for the bottom flange\n", + "x2=b3-(b2/2) #cm # for the web\n", + "x3=b3/2 #cm # for the top flange\n", + "x_c=((A1*x1)+(A2*x2)+(A3*x3))/(A1+A2+A3) #cm\n", + "# secondly we calculate the y co-ordinate of the centroid\n", + "y1=t1/2 #cm # for the bottom flange\n", + "y2=t1+(t2/2) #cm # for the web\n", + "y3=t1+t2+(t3/2) #cm # for the top flange\n", + "y_c=((A1*y1)+(A2*y2)+(A3*y3))/(A1+A2+A3) # cm\n", + "# Results\n", + "print('The centroid of the cross-sectional area of a Z-section about x-axis is %f cm \\n'%x_c)\n", + "print('The centroid of the cross-sectional area of a Z-section about y-axis is %f cm \\n'%y_c)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.5.1" + }, + "widgets": { + "state": {}, + "version": "1.1.2" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |