{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#  Examples 6 -- Structural Analysis \n",
    "\n",
    "## (Trusses, Frames & Machines)\n",
    "\n",
    "Contents:\n",
    "- [A. Simple 2D Truss](#A)\n",
    "- [B. Building modeled as 2D truss](#B)\n",
    "- [C. 2D Truss (method of sections)](#C)\n",
    "- [D. 2D Truss (sections again)](#D)    \n",
    "- [E. 3D Truss (sections)](#E)             \n",
    "- [F. Simple Frame](#F)               \n",
    "- [G. Another Frame (pulley support)](#G)                           \n",
    "- [H. Yet Another Frame (pulley support)](#H) \n",
    "- [I. Machine (Garbage Truck)](#I) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from numpy import *\n",
    "dtr = pi/180  # degree-to-radian conversion"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<a name=\"A\"></a>\n",
    "\n",
    "## A. Simple 2D Truss\n",
    "\n",
    "<img src=\"images/P6-02.png\" />"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "P = 1020.0      # lb\n",
    "X,Y = 5.7,7.6  # ft"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Analysis of whole structure.\n",
    "\n",
    "$\\sum M_A = 2XE_y-XP = 0$\n",
    "\n",
    "<img src=\"images/P6-02a.png\" width=\"400\" height=\"400\" />"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "answer:\n",
      "   TAB= -510.0 lb\n",
      "   TAC= 0.0 lb\n",
      "   TBC= 637.5 lb\n",
      "   TBD= -382.50000000000006 lb\n",
      "   TCD= 637.5 lb\n",
      "   TCE= 0.0 lb\n",
      "   TDE= -510.0 lb\n"
     ]
    }
   ],
   "source": [
    "# whole structure\n",
    "Ex = 0.\n",
    "Ey = P/2.\n",
    "Ay = P-Ey\n",
    "# point A\n",
    "TAC = 0.  # zero force member\n",
    "TAB = -Ay\n",
    "# point E\n",
    "TCE = Ex  # zero force member\n",
    "TDE = -Ey\n",
    "# point D\n",
    "alpha = arctan(X/Y)\n",
    "TCD = -TDE/cos(alpha)\n",
    "TBD = -TCD*sin(alpha)\n",
    "# point B\n",
    "TBC = -TBD/sin(alpha)\n",
    "# \n",
    "print ('answer:')\n",
    "print ('   TAB=',TAB,'lb')\n",
    "print ('   TAC=',TAC,'lb')\n",
    "print ('   TBC=',TBC,'lb')\n",
    "print ('   TBD=',TBD,'lb')\n",
    "print ('   TCD=',TCD,'lb')\n",
    "print ('   TCE=',TCE,'lb')\n",
    "print ('   TDE=',TDE,'lb')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<a name=\"B\"></a>\n",
    "\n",
    "## B.  Building modeled as 2D truss\n",
    "\n",
    "\n",
    "<img src=\"images/P6-34.png\" />"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "Fy_top = 6.0  # kip\n",
    "Fy_mid = 7.0  # kip\n",
    "Fx_top = 5.0  # kip\n",
    "Fx_mid = 4.0  # kip\n",
    "X,Y = 32.,24. # ft"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<img src=\"images/P6-34a.jpg\" width=\"400\" height=\"400\" />"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "answer:\n",
      "    TAB= -5.0 kip\n",
      "    TBD= -6.0 kip\n",
      "    TAD= 6.25 kip\n",
      "    TAC= -9.75 kip\n",
      "    TCD= -9.0 kip\n",
      "    TDF= -9.25 kip\n",
      "    TCF= 11.25 kip\n",
      "    TCE= -23.5 kip\n"
     ]
    }
   ],
   "source": [
    "F1,F2 = Fy_top,Fy_mid\n",
    "F3,F4 = Fx_top,Fx_mid\n",
    "alpha = arctan(Y/X)\n",
    "TCE = -F1-F2-(2*F3+F4)*tan(alpha)\n",
    "TCF = (F3+F4)/cos(alpha)\n",
    "TDF = -F1-F2+F3*tan(alpha)\n",
    "TCD = -F3-F4\n",
    "TAC = -F1-F3*tan(alpha)\n",
    "TAD = F3/cos(alpha)\n",
    "TAB = -F3\n",
    "TBD = -F1\n",
    "print ('answer:')\n",
    "print ('    TAB=',TAB,'kip')\n",
    "print ('    TBD=',TBD,'kip')\n",
    "print ('    TAD=',TAD,'kip')\n",
    "print ('    TAC=',TAC,'kip')\n",
    "print ('    TCD=',TCD,'kip')\n",
    "print ('    TDF=',TDF,'kip')\n",
    "print ('    TCF=',TCF,'kip')\n",
    "print ('    TCE=',TCE,'kip')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<a name=\"C\"></a>\n",
    "\n",
    "## C. 2D Truss (method of sections)\n",
    "\n",
    "<img src=\"images/P6-42.png\" />"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "F1,F2,F3 = 4.,8.,16.  # kN, top forces (left-to-right)\n",
    "F4 = 12.              # kN, lower forces (both)\n",
    "X,Y = 70.,110.         # cm"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "# whole structure:\n",
    "Ay = F1+F2+F3\n",
    "Bx = ( X*F2 + 3*X*F3 + Y*F4 + 2*Y*F4)/Y\n",
    "Ax = 2*F4 - Bx"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Take the section *ABCD*:\n",
    "\n",
    "<img src=\"images/P6-42a.png\" width=\"400\" height=\"400\" />\n",
    "\n",
    "$\\sum M_D = -YA_x -2X(A_y-F_1)+XF_2-YT_{CE}=0$\n",
    "\n",
    "$\\sum F_y = A_y -F_1-F_2+T_{DE}\\tfrac{Y}{Z}=0$\n",
    "\n",
    "$\\sum F_x = A_x + T_{CE} +B_x+T_{DF}+T_{DE}\\tfrac{X}{Z}=0$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "answer:\n",
      "    TDE= -18.964952451498615 kN\n",
      "    TCE= 22.181818181818183 kN\n",
      "    TDF= -36.00000000000001 kN\n"
     ]
    }
   ],
   "source": [
    "TCE = ( -Y*Ax - 2*X*(Ay-F1) + X*F2 )/Y\n",
    "Z = sqrt(X**2+Y**2)\n",
    "TDE = Z/Y*( -Ay + F1 +F2 )\n",
    "TDF = -Ax -TCE -Bx -TDE*X/Z\n",
    "print ('answer:')\n",
    "print ('    TDE=',TDE,'kN')\n",
    "print ('    TCE=',TCE,'kN')\n",
    "print ('    TDF=',TDF,'kN')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<a name=\"D\"></a>\n",
    "\n",
    "\n",
    "## D. 2D Truss (sections again)\n",
    "\n",
    "<img src=\"images/P6-54.png\" />"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "W = 420. # lb\n",
    "X = 4.   # ft\n",
    "Y = 3.   # ft"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "answer:\n",
      "    TIJ= 0.0 lb\n",
      "    TIL= -2800.0 lb\n",
      "    TIK= -3360.0 lb\n",
      "    THI= 3500.0 lb\n",
      "    TGI= -8400.0 lb\n"
     ]
    }
   ],
   "source": [
    "# whole structure\n",
    "Ay = 8*W\n",
    "Bx = -(8+7+6+5+4+3+2+1)*X*W/Y\n",
    "Ax = -Bx\n",
    "# section ABJI\n",
    "alpha = arctan(Y/X)\n",
    "TIL = (4*W-Ay)/sin(alpha)\n",
    "TJL = ( (3+2+1)*X*W - 4*X*Ay - Y*Bx  )/Y\n",
    "TIK = -Ax - Bx - TJL - TIL*cos(alpha)\n",
    "TIJ = 0.\n",
    "# joint I\n",
    "THI = W/sin(alpha) - TIL\n",
    "TGI = TIK + (TIL-THI)*cos(alpha)\n",
    "print ('answer:')\n",
    "print ('    TIJ=',TIJ,'lb')\n",
    "print ('    TIL=',TIL,'lb')\n",
    "print ('    TIK=',TIK,'lb')\n",
    "print ('    THI=',THI,'lb')\n",
    "print ('    TGI=',TGI,'lb')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<a name=\"E\"></a>\n",
    "\n",
    "## E. 3D Truss (sections)\n",
    "\n",
    "<img src=\"images/lecture_problem_08-3.png\" align='right' style=\"height:300px\">\n",
    "\n",
    "Determine the force in member JG if $P = 16$ kN and  $Q = 0$.\n",
    "\n",
    "Note this problem can be done on paper, as seen in the [solution here](http://madisoncollegephysics.net/232/ipy/images/notes06-5.pdf) (pdf)."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Shown below is another way to solve the problem, letting the code do the cross products and then using [Sympy](https://www.sympy.org/en/index.html) (a symbolic equation solver) to solve for the unknowns.\n",
    "\n",
    "If `sympy` is not installed on your system, you will have to run this:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Defaulting to user installation because normal site-packages is not writeable\n",
      "Requirement already satisfied: sympy in /home/archie/.local/lib/python3.8/site-packages (1.6.2)\n",
      "Requirement already satisfied: mpmath>=0.19 in /home/archie/.local/lib/python3.8/site-packages (from sympy) (1.1.0)\n",
      "\u001b[33mWARNING: You are using pip version 20.1.1; however, version 20.2.3 is available.\n",
      "You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.\u001b[0m\n",
      "Note: you may need to restart the kernel to use updated packages.\n"
     ]
    }
   ],
   "source": [
    "pip install sympy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "import sympy as s"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "P,Q = 16 , 0.  # kN\n",
    "l = 2          # m"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "moment about L=\n",
      "\t 8.0*Azs - 80.0 \n",
      "\t -1.0*Azs - 2.0*Kzs + 16.0 \n",
      "\t -8.0*Axs\n",
      "structure support reactions are \n",
      "\t Lz = 3.00 kN\n",
      "\t Kz = 3.00 kN\n",
      "\t Az = 10.00 kN\n"
     ]
    }
   ],
   "source": [
    "# moment about L for whole structure\n",
    "ihat,jhat,khat = array((1.,0,0)),array((0,1.,0)),array((0,0,1.))\n",
    "rLK = l*ihat\n",
    "rLG = l/2*ihat + 2.5*l*jhat + l*khat\n",
    "rLA = l/2*ihat + 4*l*jhat\n",
    "Kzs,Azs,Axs = s.symbols('Kzs,Azs,Axs')\n",
    "eq =  Kzs*cross(rLK,khat) + P*cross(rLG,-khat) \\\n",
    "    + Azs*cross(rLA,khat) + Axs*cross(rLA,ihat) \n",
    "print ('moment about L=\\n\\t',eq[0],'\\n\\t',eq[1],'\\n\\t',eq[2])\n",
    "ss = s.solve( [eq[0],eq[1],eq[2]], [Kzs,Azs,Axs])\n",
    "Az,Kz = float(ss[Azs]),float(ss[Kzs])\n",
    "Lz = P-Kz-Az\n",
    "print('structure support reactions are ')\n",
    "print ('\\t Lz = {:.2f} kN'.format(Lz))\n",
    "print ('\\t Kz = {:.2f} kN'.format(Kz))\n",
    "print ('\\t Az = {:.2f} kN'.format(Az))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "See the [solution pdf](http://madisoncollegephysics.net/232/ipy/images/notes06-5.pdf) for the section diagram used below."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "member forces are \n",
      "\t FJG = -12.00 kN\n",
      "\t FEG = -3.67 kN\n",
      "\t FEB = 4.50 kN\n",
      "(negative numbers imply compression)\n"
     ]
    }
   ],
   "source": [
    "# moment about F for section\n",
    "rFK = array((   l, -2*l, 0 ))\n",
    "rFL = array((   0, -2*l, 0 ))\n",
    "rFE = array((   l,    0, 0 ))\n",
    "rFJ = array(( l/2, -l/2, l ))\n",
    "rEG = array((-l/2, -l/2, l ))\n",
    "uEG = rEG / sqrt(sum(rEG**2))\n",
    "FJGs,FEGs,FEBs = s.symbols('FJGs,FEGs,FEBs')\n",
    "eq = cross( rFK, Kz*khat ) + cross( rFL, Lz*khat )      \\\n",
    "   + FJGs*cross( rFJ, jhat ) + FEBs*cross( rFE, jhat )  \\\n",
    "   + FEGs*cross( rFE, uEG )\n",
    "ss = s.solve( [eq[0],eq[1],eq[2]], [FJGs,FEGs,FEBs])\n",
    "FJG,FEG,FEB = float(ss[FJGs]), float(ss[FEGs]), float(ss[FEBs])\n",
    "print('member forces are ')\n",
    "print ('\\t FJG = {:.2f} kN'.format(FJG))\n",
    "print ('\\t FEG = {:.2f} kN'.format(FEG))\n",
    "print ('\\t FEB = {:.2f} kN'.format(FEB))\n",
    "print('(negative numbers imply compression)')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<a name=\"F\"></a>\n",
    "\n",
    "\n",
    "## F. Simple Frame\n",
    "\n",
    "<img src=\"images/P6-77.png\" />"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "F1,F2 = 74., 20.  # lb\n",
    "X = 3.0           # in\n",
    "Y1,Y2,Y3=2.,4.,6. # in (bottom to top)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "$\\sum M_C = -XA_y +Y_2B_x - XF_2=0$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "answer:\n",
      "    Gy= 20.0 lb\n",
      "    Ay= 74.0 lb\n",
      "    Bx= 70.5 lb\n",
      "    Cx= -70.5 lb\n",
      "    Cy= -54.0 lb\n"
     ]
    }
   ],
   "source": [
    "Ay,Gy = F1,F2\n",
    "Bx = (X*F2 + X*Ay)/Y2  # moment sum about C\n",
    "Cy = F2 - Ay\n",
    "Cx = -Bx\n",
    "print ('answer:')\n",
    "print ('    Gy=',Gy,'lb')\n",
    "print ('    Ay=',Ay,'lb')\n",
    "print ('    Bx=',Bx,'lb')\n",
    "print ('    Cx=',Cx,'lb')\n",
    "print ('    Cy=',Cy,'lb')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<a name=\"G\"></a>\n",
    "\n",
    "<img src=\"images/P6-91.png\" align='right' />\n",
    "\n",
    "## G. Another Frame (pulley support)\n",
    "\n",
    "In the structure shown, cable segment *ED* and member *ECF* are horizontal. If $W=660$ lb, determine the forces that the pins *C* and *F* exert on member *ECF* and the forces that the pin at *B* exerts on member *GBF*.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "W = 660.           # lb\n",
    "LCE,LCF = 89,16.  # in\n",
    "LCB,LAB = 26,76.  # in\n",
    "LAG = 64.          # in\n",
    "R = 9.             # in  (pulley radius)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<img src=\"images/P6-91a.png\" width=\"600\"  height=\"600\" />\n",
    "\n",
    "Whole body ($A_x=0$):\n",
    "\n",
    "$\\sum M_A= -L_{AG}Gy + (L_{CE}+R)W=0$\n",
    "\n",
    "$\\sum F_y = G_y+A_y-W=0$\n",
    "\n",
    "*ECF*: \n",
    "\n",
    "$\\sum M_C=L_{CE}W + L_{CF}F_y=0$\n",
    "\n",
    "$\\sum F_y = C_y+F_y-W=0$\n",
    "\n",
    "$\\sum F_x = C_x+F_x+W=0$\n",
    "\n",
    "*ABCD*: \n",
    "\n",
    "$\\sum M_B=(L_{CB}+R)W + L_{CB}C_x=0$\n",
    "\n",
    "$\\sum F_x = -W-C_x-B_x+A_x =0$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "answer:\n",
      "    Fy= -3671.25 lb\n",
      "    Cy= 4331.25 lb\n",
      "    Fx= 228.46153846153845 lb\n",
      "    By= -4681.875 lb\n",
      "    Bx= 228.46153846153845 lb\n",
      "    Cx= -888.4615384615385 lb\n"
     ]
    }
   ],
   "source": [
    "# whole body:\n",
    "Gy = (LCE+R)*W / LAG\n",
    "Ay = W - Gy\n",
    "Ax = 0.\n",
    "# ECF:\n",
    "Fy = -LCE*W / LCF\n",
    "Cy = W - Fy\n",
    "# ABCD:\n",
    "Cx = -(LCB+R)*W / LCB\n",
    "Bx = Ax - W - Cx\n",
    "By = Ay - Cy\n",
    "Fx = -W - Cx\n",
    "print ('answer:')\n",
    "print ('    Fy=',Fy,'lb')\n",
    "print ('    Cy=',Cy,'lb')\n",
    "print ('    Fx=',Fx,'lb')\n",
    "print ('    By=',By,'lb')\n",
    "print ('    Bx=',Bx,'lb')\n",
    "print ('    Cx=',Cx,'lb')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<a name=\"H\"></a>\n",
    "\n",
    "## H. Yet Another Frame (pulley support)\n",
    "\n",
    "<img src=\"images/P6-112.png\" />"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "W = 420.                 # lb\n",
    "R = 5.                   # in (pulley radius)\n",
    "X1,X2,X3 = 15.,30.,25.   # in  (right to left)\n",
    "Y = 40.                  # in"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<img src=\"images/P6-112a.png\" width=\"600\" />\n",
    "\n",
    "For member *ABCD*:\n",
    "\n",
    "$\\sum M_A= X_1\\frac{Y}{Z}T_{BG}+(X_1+X_2)\\frac{Y}{Z}T_{CF} + (X_1+X_2+X_3)2W = 0$\n",
    "\n",
    "where $Z=\\sqrt{X_2^2+Y^2}$\n",
    "\n",
    "And for member *EFGH*:\n",
    "\n",
    "$\\sum M_E= -X_1\\frac{Y}{Z}T_{CF}-(X_1+X_2)\\frac{Y}{Z}T_{BG} - (X_1+X_2+X_3-R)W = 0$\n",
    "\n",
    "Solve these two equations simultaneously."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "answer:\n",
      "    TBG= -240.625 lb\n",
      "    TCF= -1553.125 lb\n"
     ]
    }
   ],
   "source": [
    "Z = sqrt(X2**2+Y**2)\n",
    "CC = array(((       X1*Y/Z, (X1+X2)*Y/Z ),\n",
    "            ( -(X1+X2)*Y/Z,   -X1*Y/Z   ) ))\n",
    "SS = array(( -(X1+X2+X3)*2*W, (X1+X2+X3-R)*W ))\n",
    "TBG,TCF = linalg.solve(CC,SS)\n",
    "print ('answer:')\n",
    "print ('    TBG=',TBG,'lb')\n",
    "print ('    TCF=',TCF,'lb')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<a name=\"I\"></a>\n",
    "\n",
    "## H. Machine (Garbage Truck)\n",
    "\n",
    "<img src=\"images/lecture_problem_09-2.png\" width='400' align='right' />\n",
    "\n",
    "The linkage shown is used on a garbage truck to lift a 2000 lb dumpster. Points A–G are pins, and member ABC is horizontal. This linkage has the feature that as the dumpster is lifted, the front edge A is lowered, allowing a more convenient height for emptying.\n",
    "\n",
    "For the position shown, when the dumpster just lifts off the ground, determine the force in hydraulic cylinder CF."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [],
   "source": [
    "W = 2000.                   # lb\n",
    "LAB,LCB,LAHx = 18.,18.,60.  # in\n",
    "LED,LDA,LAG = 12.,24.,24.   # in"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<img src=\"images/P6-100a.png\"  width=\"600\"  height=\"600\" />\n",
    "\n",
    "dumpster:\n",
    "\n",
    "$\\sum M_A = L_{AG}F_G - L_{AHx}W = 0$\n",
    "\n",
    "$\\sum F_y = A_y + \\tfrac{1}{\\sqrt{2}}F_G - W =0$\n",
    "\n",
    "*EDG*:\n",
    "\n",
    "$\\sum M_E = -L_{EG}F_G - L_{ED}F_{CD} = 0$\n",
    "\n",
    "*ABC*:\n",
    "\n",
    "$\\sum M_B = -L_{AB}A_y - L_{CB}\\tfrac{1}{\\sqrt{2}}F_{CD}- L_{CB}\\tfrac{1}{\\sqrt{2}}F_{CF}  = 0$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "answer:\n",
      "    FCF = 27172 lb\n"
     ]
    }
   ],
   "source": [
    "FG = LAHx*W/LAG\n",
    "Ay = W - FG/sqrt(2)\n",
    "LEG = LED + LDA + LAG\n",
    "FCD = -LEG*FG/LED\n",
    "FCF = ( -LAB*Ay*sqrt(2) - LCB*FCD )/LCB\n",
    "print ('answer:')\n",
    "print ('    FCF = {:.0f} lb'.format(FCF))"
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "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.8.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
