Вы находитесь на странице: 1из 6

# Civil Engineering 303 Project 2

## Max Austin Kondrath Section 001 2/12/12

Introduction:
In this lab there will be an analysis of a 2nd order differential equation that models the deflection of a beam. This is a boundary value problem that involves different methods than we have used before to computationally solve. We use a special algorithm called Thomas algorithm. This involves the reworking of a system of linear equations with coefficients that form a tri-diagonal matrix. The purpose of this lab is to approximate deflections of a beam modeled by a boundary value differential equation problem. We will increase our accuracy and pinpoint amounts of precision by adjusting values such as (dx) and (b) for the beam.

Program Description:
This program will compute approximations for the deflection of a beam. We will create several arrays that will represent coefficients of the linear system of equations. This system of equations can be represented by coefficients in a tri-diagnol matrix. This tri-diagnol matrix is converted to a set of arrays. We will use Thomas algorithm (equations listed below) to solve for three uknown arrays alpha, beta and gamma. In this program original arrays are rewritten using new values that put us closer to the solution. Arrays are written over to save computational space of the program. This is why matrices are not used (they would contain too many unnecessary zeros). Thomas algorithm has three main steps that are done using the equations below. We first decompose our original coefficient arrays. These original arrays are made up of 1s and -2s. Using the solution of the right hand side of the equation (8) we decompose the arrays and create new arrays (or rewrite existing arrays). Next is forward substitution to a dummy array that will hold many of our intermediate values. This is done by creating forward iteration do loops that fill each array with necessary values. Next we have a reverse iterating do loop that performs backwards substitution to obtain our solution (deflected values). A reverse iteration loop is one that starts at (n-1) and ends at 1 opposed to starting at 1 or 2 and ending at (n) or (n-1). Allocation of several arrays takes place so we can make the arrays have (n or other) amount of spaces. In certain cases we deallocate arrays so when we change step size (n also changes) we can resize the arrays to the proper dimensions. Once an array of solutions is obtained, we output the solution array as well as others to several text files for further analysis. For accuracy examination a do loop is created that repeats itself unless percentage accuracy is less than 0.1%. This is simple and done by using equation (10) in the do loop condition. For part 4 we split the computation into three parts. A subprogram is created for (I) that we will place into the computations. For the mysterious middle section we adjust (b) values until the accuracy is again within 0.1%.

Equations: 1.) 2.) 3.) 4.) 5.) 6.) 7.) 8.) Beta(1) = b(1) Gamma(1) = c(1)/Beta(10 Alpha(j) = a(j) Beta(j) = b(j) alpha(j)*gamma(j-1) Gamma(j) = c(j)/beta(j) Z(1) = r(1)/beta(1) Z(j) = [ r(j) alpha(j)*z(j-1)]/beta(j) Y(i-1) 2Y(i) + Y(i+1) = -(M=EI)*(dx2) 9.) X(n-j) = z(n-j) gamma(n-j)*X(n-j+1) 10.) ((actual-approx)/actual)*100 11.) I = bh3/12

Results:

## Deflection vs. Length (delta x = 10)

1 0.9 0.8 0.7 Deflection (m) 0.6 0.5 0.4 0.3 0.2 0.1 0 0 10 20 Length (m) 30 40

40

## Deflection vs. Length

4.5 0.8 4 0.7 3.5 0 1 2 3 4 5 1.2 1 0.8 0.6 0.4 0.2 0 0 2 4 16 18 20 22 24 260.11 28 30 32 34 36 38 40 0 6 8 10 12 14 0.056 0.169 Length (m) 0.22 delta x = 1 delta x = 10 Deflection red line (m)

Deflection (m)

## 0.6 3 0.5 2.5 0.4 2 0.3 1.5 0.2 1 0.1 0.5 00

The maximum deflection from part 2 is 0.937. The location of the max deflection is 20m. Delta x 10 5 2.5 1.25 .625 .3125 .15625 General analysis: The plot shows that as delta x increases the accuracy of the model increases. Using delta x = 10 is trivial which a total length of 40. This is nowhere near enough data points to make an accurate approximation. Each time we slice delta x in half the model becomes more accurate. B ~ = 1.5m. Max Deflection .937 .830 .740 .710 .701 .700 .699 Error % 11.1 8.30 7.77 4.70 3.01 1.10 0.40

Conclusion:
This project computed approximations using the Thomas algorithm of a 2nd order differential equation for the deflection of a beam. This problem had boundary conditions where moment and deflection equal zero at the beginning and the end points of the beam. This equation can be set up in a large tri-diagonal matrix of coefficients. However, so many blank spaces containing zeros in the matrix will be present, which is a waste of time, money and space for the computer. Instead we covert this special type of matrix to several arrays. Once this is achieved we used the extremely efficient Thomas algorithm to computer the solution and the deflection of the beam. Using a delta x of 10 is not very accurate because only a few computations are made. To get an accuracy of less than 0.1% a delta x smaller than 1 was used. When delta x is small, the number of computations increases greatly, along with accuracy. It is this reason that we strive to use computational power to solve engineering problems. In the future we could be solving a boundary value problem such as the deflection of a semi-truck axle under extreme loading. The boundary values would be the moment or deflection at the wheel bases and the max deflection would most likely be at the center of the axle. We could use Thomas algorithm to compute accurate approximations of the actual deflection of the semi-trucks axle. Creating stronger axles could increase safety of drivers while increasing the load that could be carried per truck. This in result would increase efficiency, energy usage, and productivity. It has been learned that by using the Thomas algorithm in unison with computer coding, a great number of calculations can be accomplished in a minimal amount of time with minimal effort when compared to using all hand computations. This is the key to excellent engineering and problem solving. However, no method is perfect. The Thomas algorithm will continue to be used in future engineering applications involving complicated systems of differential equations.

Appendix
Contents:
a.) Fortran Code b.) Output files/data c.) Hand Calculations/equation development