{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 17 Composites :Teamwork and Synergy in Materials"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 17_1 pgno:655"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Concentration of ThO2 in particles/cm**3: 4.68538254249e+13\n"
     ]
    }
   ],
   "source": [
    "from math import pi\n",
    "# Initialisation of Variables\n",
    "per1=2.;#Percent weight of ThO2\n",
    "per2=98.;#Percentage weight of Nickle\n",
    "rho1=9.69;#Density of ThO2 in g/cm**3\n",
    "rho2=8.9;#Density of Nickel in g/cm**3\n",
    "r=0.5*10**-5;#Radius of ThO2 particle in cm\n",
    "#calculations\n",
    "f=(2/rho1)/((per1/rho1)+(per2/rho2));#Volume fraction of ThO2 per cm**3 of composite\n",
    "v=(4/3)*(pi)*r**3;#Volume of ech ThO2 sphere in cm**3\n",
    "c=f/v;#Concentration of ThO2 particles in particles/cm**3\n",
    "print \"Concentration of ThO2 in particles/cm**3:\",c\n",
    "\n",
    "#the difference in answer is due to round off error\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 17_2 pgno:656"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Density of composite in g/cm**3: 11.5\n"
     ]
    }
   ],
   "source": [
    "# Initialisation of Variables\n",
    "per1=75.;#Percent Weight of WC \n",
    "per2=15.;#Percent Weight of TiC\n",
    "per3=5.;#Percent Weight of TaC\n",
    "per4=5.;#Percent Weight of Co\n",
    "rho1=15.77;#Density of WC in g/cm**3\n",
    "rho2=4.94;#Density of TiC in g/cm**3\n",
    "rho3=14.5;#Density of TaC in g/cm**3\n",
    "rho4=8.90;#Density of Co in g/cm**3\n",
    "#Calculations\n",
    "f1=(per1/rho1)/((per1/rho1)+(per2/rho2)+(per3/rho3)+(per4/rho4));#Volume fraction of WC \n",
    "f2=(per2/rho2)/((per1/rho1)+(per2/rho2)+(per3/rho3)+(per4/rho4));#Volume fraction of Tic\n",
    "f3=(per3/rho3)/((per1/rho1)+(per2/rho2)+(per3/rho3)+(per4/rho4));#Volume fraction of Tac\n",
    "f4=(per4/rho4)/((per1/rho1)+(per2/rho2)+(per3/rho3)+(per4/rho4));#Volume fraction of Co\n",
    "rho=(f1*rho1)+(f2*rho2)+(f3*rho3)+(f4*rho4);#Density of composite in g/cm**3\n",
    "print \"Density of composite in g/cm**3:\",round(rho,1)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 17_3 pgno:658"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "15.0 Percentage Weight of Silver:\n"
     ]
    }
   ],
   "source": [
    "# Initialisation of Variables\n",
    "rho1=19.3;#Density of pure Tungsten in g/cm^3\n",
    "rho2=10.49;#Density of pure Silver in g/cm^3\n",
    "f1=0.75;#Volume fraction of Tungsten \n",
    "f2=0.25;#Volume fraction of Silver and pores\n",
    "#Calculations\n",
    "per=((f2*rho2)/((f2*rho2)+(f1*rho1)))*100;#Percentage weight of silver \n",
    "print \"Percentage Weight of Silver:\",round(per)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 17_4 pgno:659"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Composite density in g/cm^3: 1.46\n",
      "Composite densityafter saving in g/cm^3: 1.24\n"
     ]
    }
   ],
   "source": [
    "# Initialisation of Variables\n",
    "rho1=0.95;#Density of polyethylene in g/cm^3\n",
    "rho2=2.4;#Density of clay in g/cm^3\n",
    "f1=0.65;#Volume fraction of Polyethylene \n",
    "f2=0.35;#Volume fraction of Clay \n",
    "f3=1.67;#Volume fraction of polyethylene after sacrifice\n",
    "f4=1.06;#Volume fraction of Clay after sacrifice\n",
    "pa1=650;# No. of parts of polyethylene in 1000cm^3 composite  in cm^3\n",
    "pa2=350;# No. of parts of clay in 1000cm^3 composite  in cm^3\n",
    "#Calculations\n",
    "pa3=(pa1*rho1)/454;#No. of parts of Polyethylene in 1000cm^3 composite  in lb\n",
    "pa4=(pa2*rho2)/454;#No. of parts of clay in 1000cm^3 composite  in lb\n",
    "co1=pa3* 0.05;#Cost of material Polyethylenein Dollars\n",
    "co2=pa4* 0.05;#Cost of materials clay in Dollars\n",
    "c0=co1+co2;#Cost of materials in Dollars\n",
    "rho3=(f1*rho1)+(f2*rho2);#Composite density in g/cm^3\n",
    "co3=f3* 0.05;#Cost of material polyethylene after savings in Dollars\n",
    "co4=f4* 0.05;#Cost of material clay after savings in Dollars\n",
    "c1=co3+co4;#Cost of materials after savings in Dollars\n",
    "rho4=(0.8*rho1)+(0.2*rho2);#Density of composite after saving in g/cm^3\n",
    "print \"Composite density in g/cm^3:\",round(rho3,2)\n",
    "print \"Composite densityafter saving in g/cm^3:\",rho4\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 17_7 pgno:664"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Density of mixture in g/cm**3: 2.564\n",
      "Modulus of elasticity of mixture in psi: 28000000.0\n",
      "Tensile Strength of mixture in psi: 163000.0\n",
      "Modulus of elasticity  perpendicular to fibers in psi: 14864864.8649\n"
     ]
    }
   ],
   "source": [
    "f1=0.4;#Volume fraction of Fiber  \n",
    "f2=0.6;#Volume fraction of Aluminium \n",
    "rho1=2.36;#Density of Fibers in g/cm**3\n",
    "rho2=2.70;#Density of Aluminium in g/cm**3\n",
    "psi1=55*10**6;#Modulus of elasticity of Fiber in psi\n",
    "psi2=10*10**6;#Modulus of elasticity of Aluminium in psi\n",
    "ts1=400000;#Tensile strength of fiber in psi\n",
    "ts2=5000;#Tensile strength of Aluminium in psi\n",
    "#Calculations\n",
    "rho=(f1*rho1)+(f2*rho2);#Density of mixture in g/cm**3\n",
    "Ec1=(f1*psi1)+(f2*psi2);#Modulus of elasticity of mixture in psi\n",
    "TSc=(f1*ts1)+(f2*ts2);#Tensile Strength of mixture in psi\n",
    "Ec2=1/((f1/psi1)+(f2/psi2));#Modulus of elasticity  perpendicular to fibers in psi\n",
    "print \"Density of mixture in g/cm**3:\",rho\n",
    "print \"Modulus of elasticity of mixture in psi:\",Ec1\n",
    "print \"Tensile Strength of mixture in psi:\",TSc\n",
    "print \"Modulus of elasticity  perpendicular to fibers in psi:\",Ec2\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 17_8 pgno:665"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fraction of applied force carried by Glass fiber : 0.92\n",
      "Almost all of the load is carried by the glass fibers.\n"
     ]
    }
   ],
   "source": [
    "# Initialisation of Variables\n",
    "psi1=10.5*10**6;#Modulus of elasticity of Glass in psi\n",
    "psi2=0.4*10**6;#Modulus of elasticity of Nylon in psi\n",
    "a1=0.3;#area of glass in cm**3\n",
    "a2=0.7;#area of Nylon in cm**3\n",
    "#Calculations\n",
    "psi=psi1/psi2;#Fraction of elasticity\n",
    "fo=a1/(a1+(a2*(1/psi)));#Fraction of applied force carried by Glass fiber \n",
    "print\"Fraction of applied force carried by Glass fiber :\",round(fo,2)\n",
    "print\"Almost all of the load is carried by the glass fibers.\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 17_9 pgno:670"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Specific Modulus of current alloy in in.: 102610295.626\n",
      "Density of composite in lb/in**3: 0.087\n",
      "Modulus of elasticity of mixture in psi: 37400000.0\n",
      "Specific Modulus of composite in 10**8 in.: 4.3\n"
     ]
    }
   ],
   "source": [
    "# Initialisation of Variables\n",
    "psi=10*10**6;#Modulus of elasticity of 7075-T6 in psi\n",
    "psi1=55*10**6;#Modulus of elasticity of Boron fiber in psi\n",
    "psi2=11*10**6;#Modulus of elasticity of Typical AL-LI in psi\n",
    "f1=0.6;#Volume fraction of Boron Fiber\n",
    "f2=0.4;#Volume fraction of typical AL-LI\n",
    "rho1=0.085;#Density of  Boron Fibers in lb/in*3\n",
    "rho2=0.09;#Density of typical AL-LI in lb/in**3\n",
    "#Calculations\n",
    "sm1=psi/(((2.7*(2.54)**3))/454);#Specific Modulus of current alloy in in.\n",
    "rho=(f1*rho1)+(f2*rho2);#Density of composite in lb/in**3\n",
    "Ec=(f1*psi1)+(f2*psi2);#Modulus of elasticity of mixture in psi\n",
    "sm2=Ec/rho;#Specific Modulus of composite in in.\n",
    "print \"Specific Modulus of current alloy in in.:\",sm1\n",
    "print \"Density of composite in lb/in**3:\",rho\n",
    "print \"Modulus of elasticity of mixture in psi:\",Ec\n",
    "print \"Specific Modulus of composite in 10**8 in.:\",round(sm2/10**8,1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 17_10 pgno:683"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Cost of Each Struct.: 2.48\n"
     ]
    }
   ],
   "source": [
    "from math import pi\n",
    "# Initialisation of Variables\n",
    "psi=500000.;#Modulus Elasticity of Epoxyin psi\n",
    "f=500.;#Force applied on Epoxy in pounds\n",
    "q=0.10;#Stretchable distence in in.\n",
    "rho=0.0451;#Density of Epoxy in lb/in**3\n",
    "d=1.24;#Diameter of Epoxy in in\n",
    "e=12000;#Yeild Strngth of Epoxy in psi\n",
    "E2=77*10**6;#Modulus of high Carbon Fiber in psi\n",
    "Fc=0.817;#Volume fraction of Epoxy remaining\n",
    "Fc2=0.183;#Min volume Faction of Epoxy \n",
    "rho2=0.0686;#Density of high Carbon Fiber in lb/in**3\n",
    "emax=q/120;#MAX. Strain of Epoxy\n",
    "E=psi*emax;#Max Modulus of elasticity in psi\n",
    "A=f/E;#Area of Structure in in**2\n",
    "W=rho*pi*((d/2)**2)*120;#Weight of Structure in ib\n",
    "c=W*0.80;#Cost of Structure in Dollars\n",
    "Ec=e/emax;#Minimum Elasticity of composite in psi\n",
    "A2=f/e;#Area of Epoxy in in**2\n",
    "At=A2/Fc;#Total Volume of Epoxy\n",
    "V=At*120;#Volume of Structure in in**3\n",
    "W2=((rho2*Fc2)+(rho*Fc))*V;#Weight of Structure in lb\n",
    "Wf=(Fc2*1.9)/((Fc2*1.9)+(Fc*1.25));#Weight Fraction of Carbon \n",
    "Wc=Wf*W2;#Weight of Carbon\n",
    "We=0.746*W2;#Weight of Epoxy\n",
    "c2=(Wc*30)+(We*0.80);#Cost of Each Struct.\n",
    "print \"Cost of Each Struct.:\",round(c2,2)\n",
    "#the diffrence in answer is due to erronous calculations\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.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
