Use of Symbolic Mathematics in Structural Analysis Problems CEEN 5849

Date: May 5th, 2010

Prepared by: A.B.M. Mostafizur Rahman & Fisseha Habtewold Games
Graduate Students Dept. of Civil & Environmental Engineering Youngstown State University

This paper demonstrates the use of an open source freely available symbolic mathematics package MAXIMA to solve the problems related to the structural analysis problems. Structural Analysis is one of the basic courses in Civil Engineering dealing with establishing different types of structures and degree of determinacy, calculating reactions, deflections and internal forces (axial force, shear, and bending moment) for determinate and indeterminate structures. The manual way of solving problems in Structural Analysis is thought to Civil Engineering students to improve their understanding of structural analysis basic concepts within a limited time. In professional practice this is conducted with powerful software available nowadays. In this process most software details remain hidden to the user. Assumptions and limitations of the software package are often easy to overlook. The engineer is responsible for assessing the validity of the computer results by conducting independent check. And also the engineer may need to develop custom solutions for research or professional practice. For such cases there are powerful matrix algebra packages like Matlab, MathCAD, Maxima and others which afford the possibility of developing solutions with relative ease. Maxima is free software with a fairly complete computer algebra system written in lisp with an emphasis on symbolic computation. It is based on DOE-MACSYMA and licensed under the GPL. Its abilities include symbolic integration, 3D plotting, and an ODE solver. The Maxima source code can be compiled on many systems, including Windows, Linux, and MacOS X. Maxima yields high precision numeric results by using exact fractions, arbitrary precision integers, and variable precision floating point numbers. Maxima can plot functions and data in two and three dimensions. The calculations involved in analysis of determinate structures is simple and often can be solved by hand calculations or by using simple electronic calculator. But most of the structures in real life are indeterminate, the solution process of which always involved complex calculations, matrix operations, differential and integral calculus etc and same is true for the deflection problems of both determinate and indeterminate structures. Also for learning and teaching purposes its always very time consuming to solve those problems. These structural analysis problem can be devided into two steps, first step is to develop the equations which can be any type such as: matrix equation, differential equation or integral equation depending on the method adopted to solve the problem. Second step is to solve those equations for the unknowns. For teaching & learning purposes first step should always be done by hand calculation with basic concepts of the method adopted in order to have in depth knowledge of the procedure and fluency in structural analysis. But the second step is purely mathematical which only involves mathematical operations. Softwares for doing symbolic algebra like Maxima can easily solve it. We are presenting four problems here to demonstrate how Maxima can be used for mathematical operations to solve structural analysis problems. First & second problem we chose is indeterminate frame problems and we use Castigliano's Method and Virtual Work Method respectively to solve these two problems. Third problem is a plane truss problem with 2 degrees of external indeterminacy. We solved this problem using virtual work and methods of joints. Finally our fourth problem is a gable frame with side sway which is solved using SlopeDeflection Method. The following paragraphs include the brief description of the problems and their solution using symbolic algebraic computation software Package Maxima.

Problem #1: Determine the reactions at the supports for the frame shown below using Castigliano's method.

The Maxima Batch file to solve this Problem is: kill(all); Ay:w*L2/2; Dy:Ay; M1:-Ax*x1+Ma; M2:Ay*x2-(w*x2^2/2)+Ma-Ax*L1; Uab1:integrate(M1*diff(M1,Ax)/EI,x1,0,L1); Ubc1:integrate(M2*diff(M2,Ax)/EI,x2,0,L2); U1:2*Uab1+Ubc1; Uab2:integrate(M1*diff(M1,Ma)/EI,x1,0,L1); Ubc2:integrate(M2*diff(M2,Ma)/EI,x2,0,L2); U2:2*Uab2+Ubc2; eqn1:U1=0; eqn2:U2=0; solve(eqn1,Ma); eqn3:ev(eqn2,%); [eqn1,eqn2]; solve (%, [Ax, Ma]); ev(%,w=1,L1=20,L2=10); float(%);

And the Solution will look like this:

Problem # 2: Determine the reactions at the supports for the frame shown below using Virtual work method.

The Maxima commands for solving this problem: kill(all);
Dvp:integrate((P*(x-l))*(2*l-x)/EI,x,0,l); Dvrv:integrate((Rav*x)*(x)/EI,x,0,2*l); Dvrh:integrate((Rah*3*l)*(x)/EI,x,0,2*l); /*Compatibility eqn 1*/ eqn1:Dvp+Dvrv+Dvrh=0; Dhp:integrate((P*(x-l))*(3*l)/EI,x,0,l); Dhrv:integrate((Rav*x)*(3*l)/EI,x,0,2*l); Dhrh:integrate((Rah*x)*x/EI,x,0,3*l)+integrate((Rah*3*l)*(3*l)/EI,x,0,2*l); /*Compatibility eqn 2*/ eqn2:Dhp+Dhrv+Dhrh=0; b:solve([eqn1,eqn2],[Rav, Rah]); Rav:rhs(b[1][1]); Rah:rhs(b[1][2]); /*summation of horizontal forces in the x-direction is zero*/ eqn3:Rah+Rbh=0; solve(%,Rbh); /*summation of vertical forces in the x-direction is zero*/ eqn4:Rav+Rbv-P=0; solve(%,Rbv); /*summation of moment at B is zero*/ eqn5:Mb+Rav*(2*l)+Rah*(3*l)-P*l=0; solve(%,Mb);

The Maxima Output will look like this:

Problem # 3: Determine the reactions at the supports for the frame shown below using Virtual work method. The support at 8 settles 0.5 in. AE is constant for all members.AE=150,000K.

The Maxima commands for solving this problem:
kill(all)$ L:read("Enter the Lentgh of each panel,L = ?"); H:read("Enter the Height of the Truss, H = ?"); EA:read("Enter the value of EA = ?"); delta[2]:read("Enter the value of support 2 displacement = ?"); delta[3]:read("Enter the value of support 3 displacement = ?"); theta:atan(2*H/L); S:sin(theta); C:cos(theta); L[1]:l/S; L[2]:l; L[3]:l/S; L[4]:l;

L[5]:l/S; L[6]:l; L[7]:l/S; L[8]:l; L[9]:l/S; L[10]:l; L[11]:l/S; L[12]:l; L[13]:l; L[14]:l/S; L[15]:l/S; L:12; EA:150000; delta[2]:0; delta[3]:0.5; R[5]:rhs(R[5]=0); e1:R[2]+2*R[3]+3*R[4]=0; R[4]:rhs(solve(e1,R[4])[1]); e2:R[1]+R[2]+R[3]+R[4]=0; R[1]:rhs(solve(e2,R[1])[1]); R[1]; f[1]:rhs(f[1]=0); f[2]:rhs(f[2]=0); e3:f[3]*S+R[1]=0; f[3]:rhs(solve(e3,f[3])[1]); e4:f[3]*C+f[4]=0; f[4]:rhs(solve(e4,f[4])[1]); e5:f[3]*S+f[5]*S=0;

f[5]:rhs(solve(e5,f[5])[1]); e6:f[6]+f[5]*C-f[3]*C=0; f[6]:rhs(solve(e6,f[6])[1]); e7:f[7]*S+f[5]*S+R[2]=0; f[7]:rhs(solve(e7,f[7])[1]); e8:f[4]+f[5]*C-f[7]*C-f[8]=0; f[8]:rhs(solve(e8,f[8])[1]); e9:f[7]*S+f[9]*S=0; f[9]:rhs(solve(e9,f[9])[1]); e10:f[6]+f[7]*C-f[9]*C-f[10]=0; f[10]:rhs(solve(e10,f[10])[1]); f[13]:rhs(f[13]=0); f[15]:rhs(f[15]=0); e11:f[14]*S+f[15]*S+R[4]=0; f[14]:rhs(solve(e11,f[14])[1]); e12:f[12]+f[14]*C=0; f[12]:rhs(solve(e12,f[12])[1]); e13:f[11]*S+f[14]*S=0; f[11]:rhs(solve(e13,f[11])[1]); for i:1 while i<=15 do display(f[i])$ for i:1 while i<=15 do f2[i]:print('f[i],"=",ev(f[i],R[2]=-1,R[3]=0))$ for i:1 while i<=15 do f3[i]:print('f[i],"=",ev(f[i],R[2]=0,R[3]=-1))$ S1:0; for i:1 while i<=15 do S1:print(S1+L[i]*f[i]*f2[i])$ E1:ratsimp(S1=delta[2]*EA); S2:0; for i:1 while i<=15 do S2:print(S2+L[i]*f[i]*f3[i])$ E2:ratsimp(S2=delta[3]*EA);

sol:ev(solve([E1,E2],[R[2],R[3]]),l=L*12),numer; R[2]:rhs(sol[1][1]); R[3]:rhs(sol[1][2]); for i:1 while i<=15 do f[i]:float(ev(f[i]))$ for i:1 while i<=15 do display(f[i])$

And The Output will be:

Problem # 4: Determine the reactions at the supports for the gable frame shown below using slope deflection method.

The Maxima Commands for this problem is as follows: kill(all)$ print("Please enter all the inputs in term of 'L' or 'l'")$ Lab:read("Enter the length of AB,Lab="); Lc:read("Enter the vertical distance from joint B to C="); Lae:read("Enter the Horizontal distance from joint A to E,Lae="); assume(L>0)$ assume(l>0)$ Lde:Lab; Lbc:sqrt((Lae/2)^2+Lc^2); Lcd:Lbc; FEM[AB]:0; FEM[BA]:0; FEM[BC]:-w*Lbc^2/12; FEM[CB]:w*Lbc^2/12;

FEM[CD]:0; FEM[DC]:0; FEM[DE]:0; FEM[ED]:0; delta[1]:Rab*Lab; delta[2]:Rde*Lde; CC:(Lbc/Lc)*0.5*(delta[1]-delta[2]); Rbc:-CC/Lbc; Rcd:CC/Lbc; theta[A]:0; theta[E]:0; Mab:FEM[AB]+(2*E*I/Lab)*(2*theta[A]+theta[B]-3*Rab); Mba:FEM[BA]+(2*E*I/Lab)*(theta[A]+2*theta[B]-3*Rab); Mbc:FEM[BC]+(2*E*I/Lbc)*(2*theta[B]+theta[C]-3*Rbc); Mcb:FEM[CB]+(2*E*I/Lbc)*(theta[B]+2*theta[C]-3*Rbc); Mcd:FEM[CD]+(2*E*I/Lcd)*(2*theta[C]+theta[D]-3*Rcd); Mdc:FEM[DC]+(2*E*I/Lcd)*(theta[C]+2*theta[D]-3*Rcd); Mde:FEM[DE]+(2*E*I/Lde)*(2*theta[D]+theta[E]-3*Rde); Med:FEM[ED]+(2*E*I/Lde)*(theta[D]+2*theta[E]-3*Rde); wH:w*Lc; wV:w*Lae/2; eqn1:(Mab+Mba)/Lab+wH-Hcb=0; Hcb:rhs(solve(eqn1,Hcb)[1]); eqn2:Hcd+(Med+Mde)/Lde=0; Hcd:rhs(solve(eqn2,Hcd)[1]); eqn3:Vcb*(Lae/2)+Hcb*Lc-(wV*Lae/4)-(wH*Lc/2)-Mcb-Mbc=0; Vcb:rhs(solve(eqn3,Vcb)[1]); eqn4:-Hcd*Lc-Mcd-Mdc+Vcd*(Lae/2)=0;

Vcd:rhs(solve(eqn4,Vcd)[1]); eqn5:Hcb-Hcd=0; eqn6:Vcb-Vcd=0; eqn7:Mba+Mbc=0; eqn8:Mcb+Mcd=0; eqn9:Mdc+Mde=0; b:solve([eqn5,eqn6,eqn7,eqn8,eqn9],[theta[B],theta[C],theta[D],Rab,Rde]),numer; theta[B]:rhs(b[1][1]); theta[C]:rhs(b[1][2]); theta[D]:rhs(b[1][3]); Rab:rhs(b[1][4]); Rde:rhs(b[1][5]); 'Mab=ev(Mab,float); 'Mba=ev(Mba,float); 'Mbc=ev(Mbc,float); 'Mcb=ev(Mcb,float); 'Mcd=ev(Mcd,float); 'Mdc=ev(Mdc,float); 'Mde=ev(Mde,float); 'Med=ev(Med,float); The Maxima Solution:

The four Structural analysis problems presented here demonstrates that Maxima handles the mathematical part of the solution well giving output with high precision. As computing these problems manually requires large efforts and time it is a better approach to make use of free matrix algebra packages like maxima.

References:

1. Hibbeler R. C., Structural Analysis, 7th edition. 2. Maxima website: http://maxima.sourceforge.net/ 3. MAXIMA reference Manual: http://maxima.sourceforge.net/docs.shtml

Sign up to vote on this title
UsefulNot useful