diff options
Diffstat (limited to 'sample_notebooks/pramodkumardesu/sample(Chapter6).ipynb')
-rwxr-xr-x | sample_notebooks/pramodkumardesu/sample(Chapter6).ipynb | 307 |
1 files changed, 307 insertions, 0 deletions
diff --git a/sample_notebooks/pramodkumardesu/sample(Chapter6).ipynb b/sample_notebooks/pramodkumardesu/sample(Chapter6).ipynb new file mode 100755 index 00000000..a79c8bcb --- /dev/null +++ b/sample_notebooks/pramodkumardesu/sample(Chapter6).ipynb @@ -0,0 +1,307 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6 Mechanical Properties"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6_1 pgno:151"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The value in psi is= 4992.60678261\n",
+ "The value of epselon 0.0005\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "F=1000#in lb\n",
+ "Ao=(pi/4)*(0.505)**2#in**2\n",
+ "rho=F/Ao\n",
+ "delta_I=0.001#in\n",
+ "I_o=2#in\n",
+ "e=delta_I/I_o\n",
+ "print\"The value in psi is=\",rho\n",
+ "print\"The value of epselon\",e"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6_2 pgno:152"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "1 The required crosssectional area of the rod in in^2:\n",
+ "1.1283791671 Diameter of rod in in:\n",
+ "0.000625 The maximum length of the rod in in:\n",
+ "100.0 The minimum strain allowed on rod:\n",
+ "2 The minimum cross-sectional area in in^2:\n"
+ ]
+ }
+ ],
+ "source": [
+ "#EXAMPLE 6.2\n",
+ "#page 152\n",
+ "# Initialisation of Variables\n",
+ "F=45000;#Force applied on an aluminum rod in lb\n",
+ "e=25000;#the maximum allowable stress on the rod in psi\n",
+ "l2=150;#the minimum length of the rod in in\n",
+ "e1=0.0025;#The strain appiled on rod\n",
+ "sigma=16670;#Stress applied on rod in psi\n",
+ "L=0.25;#The maximum allowable elastic deformation in in\n",
+ "from math import sqrt,pi\n",
+ "#CALCULATIONS\n",
+ "Ao1=F/e;#The required crosssectional area of the rod\n",
+ "d=sqrt((Ao1*4)/pi);#Diameter of rod in in\n",
+ "l1=e1*L;#The maximum length of the rod in in\n",
+ "e2=L/e1;#The minimum strain allowed on rod\n",
+ "Ao2=F/sigma;#The minimum cross-sectional area in in^2\n",
+ "print Ao1,\"The required crosssectional area of the rod in in^2:\"\n",
+ "print d,\"Diameter of rod in in:\"\n",
+ "print l1,\"The maximum length of the rod in in:\"\n",
+ "print e2,\"The minimum strain allowed on rod:\"\n",
+ "print Ao2,\"The minimum cross-sectional area in in^2:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6_3 pgno:154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "10000000.0 Modulus of elasticity of aluminum alloy from table 6-1:\n",
+ "50.15 The length after deformation of bar in in\n",
+ "0.003 Strain applied of aluminum alloy:\n"
+ ]
+ }
+ ],
+ "source": [
+ "#EXAMPLE 6.3\n",
+ "# Initialisation of Variables\n",
+ "sigma1=35000;#Stress applied of aluminum alloy in psi from table 6-1\n",
+ "e1=0.0035;##Strain applied of aluminum alloy from table 6-1\n",
+ "sigma2=30000;#Stress applied of aluminum alloy in psi\n",
+ "Lo=50;#initial length of aluminum alloy\n",
+ "#CALCULATIONS\n",
+ "E=sigma1/e1;#Modulus of elasticity of aluminum alloy\n",
+ "e2=sigma2/E;#Strain applied of aluminum alloy\n",
+ "L=Lo+(e2*Lo);#The length after deformation of bar in in\n",
+ "print E,\"Modulus of elasticity of aluminum alloy from table 6-1:\"\n",
+ "print L,\"The length after deformation of bar in in\"\n",
+ "print e2,\"Strain applied of aluminum alloy:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6_4 pgno:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "9.75 Percentage of Elongation:\n",
+ "37.8868738359 Percentage of Reduction in area:\n",
+ "The final length is less than 2.205 in because, after fracture, the elastic strain is recovered.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#EXAMPLE 6.4\n",
+ "# Initialisation of Variables\n",
+ "Lf=2.195;#Final length after failure\n",
+ "d1=0.505;#Diameter of alluminum alloy in in\n",
+ "d2=0.398;#Final diameter of alluminum alloy in in\n",
+ "Lo=2;#Initial length of alluminum alloy \n",
+ "from math import pi\n",
+ "#CALCULATIONS\n",
+ "A0=(pi/4)*d1**2;#Area of original of alluminum alloy\n",
+ "Af=(pi/4)*d2**2;#Area of final of alluminum alloy\n",
+ "E=((Lf-Lo)/Lo)*100;#Percentage of Elongation \n",
+ "R=((A0-Af)/A0)*100;#Percentage of Reduction in area\n",
+ "print E,\"Percentage of Elongation:\"\n",
+ "print R,\"Percentage of Reduction in area:\"\n",
+ "print\"The final length is less than 2.205 in because, after fracture, the elastic strain is recovered.\" "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6_5 pgno:155"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "39940.8542609 Engineering stress in psiAt the tensile or maximum load\n",
+ "41237.025201 True stress in psi At the tensile or maximum load\n",
+ "0.06 Engineering strain At the tensile or maximum load\n",
+ "0.058268908124 True strain At the tensile or maximum load\n",
+ "37943.8115478 Engineering stress At fracture:\n",
+ "61088.2335041 True stress At fracture\n",
+ "0.1025 Engineering strain At fracture:\n",
+ "0.476212847982 True strain At fracture:\n"
+ ]
+ }
+ ],
+ "source": [
+ "#EXAMPLE 6.5\n",
+ "# Initialisation of Variables\n",
+ "F=8000.;#.......#Load applied for the aluminum alloy in lb\n",
+ "F2=7600.;#......#Load applied for the aluminum alloy in lb at fracture\n",
+ "dt1=0.505;#.......#diameter of for the aluminum alloy in in\n",
+ "dt2=0.497;#.......#The diameter at maximum load\n",
+ "Lt=2.120;#..........#Final length at maxium load\n",
+ "Lot=2.;#.............#Initial length of alluminum alloy\n",
+ "Ff=7600.;#.........#Load applied for the aluminum alloy after fracture in lb\n",
+ "df=0.398;#.......#The diameter at maximum load after fracture\n",
+ "Lf=0.205;#.......#Final length at fracture\n",
+ "from math import pi,log\n",
+ "#CALCULATIONS\n",
+ "Es=F/((pi/4)*dt1**2);#.....#Engineering stress in psiAt the tensile or maximum load\n",
+ "Ts=F/((pi/4)*dt2**2);#.....#True stress in psi At the tensile or maximum load\n",
+ "Ee=(Lt-Lot)/Lot;#........#Engineering strain At the tensile or maximum load\n",
+ "Te=log(Lt/Lot);#........#True strain At the tensile or maximum load\n",
+ "Es2=F2/((pi/4)*dt1**2);#......##Engineering stress At fracture:\n",
+ "Ts2=F2/((pi/4)*df**2);#......#True stress At fracture:\n",
+ "Ee2=Lf/Lot;#..........#Engineering strain At fracture:\n",
+ "Te2=log(((pi/4)*dt1**2)/((pi/4)*df**2));#.......#True strain At fracture:\n",
+ "print Es,\"Engineering stress in psiAt the tensile or maximum load\"\n",
+ "print Ts,\"True stress in psi At the tensile or maximum load\"\n",
+ "print Ee,\"Engineering strain At the tensile or maximum load\"\n",
+ "print Te,\"True strain At the tensile or maximum load\"\n",
+ "print Es2,\"Engineering stress At fracture:\"\n",
+ "print Ts2,\"True stress At fracture\"\n",
+ "print Ee2,\"Engineering strain At fracture:\"\n",
+ "print Te2,\"True strain At fracture:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6_6 pgno:156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "421.875 The force required to fracture the material in lb:\n",
+ "0.0277777777778 The deflection of the sample at fracture in in\n"
+ ]
+ }
+ ],
+ "source": [
+ "#EXAMPLE 6.6\n",
+ "# Initialisation of Variables\n",
+ "Fs=45000;#.......#The flexural strength of a composite material in psi\n",
+ "Fm=18*10**6;#........#The flexural modulus of composite material in psi\n",
+ "w=0.5;#.......#wide of sample in in\n",
+ "h=0.375;#......#Height of sample in in\n",
+ "l=5;#..........#Length of sample in in\n",
+ "#CALCULATIONS\n",
+ "F=Fs*2*w*h**2/(3*l);#......#The force required to fracture the material in lb\n",
+ "delta=(l**3)*F/(Fm*4*w*h**3);#.......#The deflection of the sample at fracture \n",
+ "print F,\"The force required to fracture the material in lb:\"\n",
+ "print delta,\"The deflection of the sample at fracture in in\"\n"
+ ]
+ },
+ {
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
|