@lastchance/@kemort
There seems to be some confusion about how deflections are being calculated. Double Integration is one of the many ways to calculate deflection. Using Simpson's Rule is another.
The method of analysis uses the flexibility equations and a process of numerical integration applying Simpson's Rule.
At any point along the beam
deflection = Integral (ms.mx/EI) dx
(sorry I couldn't see how to show integral figure properly)
where
ms (in the program ms[]) is the bending moment along the span due to the applied loads
mx is the corresponding bending moment due to a unit load applied at the point where the deflection is being calculated.
Applying Simpson's Rule to the numerical integration to achieve greater accuracy gives
Integral ydx = s/3[(sum of end ordinates)+4(sum of even ordinates)+2(sum of odd ordinates)]
where s = the length of each increment (e.g. in a 20m span with 21 sections being considered), s = span/20 = 1m.
The accuracy of the method can be easily checked.
For a point load, deflection at mid-span = WL^3/48EI, and
for a full span udl, deflection at mid-span = 5WL^3/384EI
For the following criteria for a point load, using the formula:
No of Section = 21
Span = 20m, W= 30kN, Distance from left reaction to load = span/2 = 10m
E = 25000. Beam size 400mm x 600mm deep.
Deflection = 27 .78mm
The program gives a deflection of 27.78mm
For the following criteria for a full span UDL, using the formula:
No of Section = 21
Span = 20m, W= 50kN, Distance from left reaction to start of load = 0m
Length of load = 20m
E = 25000. Beam size 400mm x 600mm deep.
Deflection = 28.94mm
The program gives a deflection of 28.94mm
The deflections calculated will not always be exactly equal, but will always be very close, within acceptable tolerances.
The reason that Simpson's Rule has been used rather than a more mathematical system is that it is easily demonstrated by hand and also semi-graphically.
When I wrote my first beam analysis many years ago (using an Amstrad CPC computer and Amstrad BASIC) the output of the program onto a calculation sheet was readily accepted by every local authority without having to submit the computer program for local authority approval before allowing its use. The Architect I worked for used the program long after I moved on, until adoption of Limit State design prevented its continued use. This is why it is important to me to be able to direct output to both screen and printer. With BASIC it was easy. Not so easy with C++.
Below is s snippet from the program relating to deflection calculation, to which I have added further comments to try to clarify.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
//-----------------------------------------------
// CALCULATE DEFLECTIONS AT SECTIONS ALONG BEAM
//-----------------------------------------------
// Deflection = Integral (ms[k1].mx)/EI dx
// Simpson's Rule:
// Integral ydx = (s/3).[(Sum of end ordinates +
// 4(sum of even ordinates) + 2(sum of odd ordinates)]
// where s = length of increment between sections considered.
// i.e. for 20m span with 21 sections s = 20/(21-1) = 1.
//SET UP SIMPSONS' ORDINATES AS SIMPSON'S RULE
// Must be an even number of spaces (21 sections: 20 spaces)
// If section is an even number then multiplier s[k1] of
// BM due to Unit Load is 4. If it is odd number
// multiplier is 2.
s1[1] = 0;
s1[ns] = 0;
for (int k = 2;k<=ns;++k) {
if(k % 2 == 0) { // check for even number
s1[k] = 4;
}
else {
s1[k] = 2; // if not even number, it is odd number
}
}
//NUMERICAL INTEGRATION
for (int k=1; k <= ns; ++k) {
dk = 0;
zd = (k-1) * L/(ns-1);
for(int k1 = 1; k1 <= ns; ++k1) {
// UNIT LOAD MOMENTS
// Set up and calculate moments due to
// Unit Loads at relevant sections
// along the beam
z = (k1 - 1) * L/(ns-1);
if(z<=zd) {
mx = z * (L - zd)/L;
}
else {
if(z>zd) {
mx = zd * (L - z)/L;
}
}
// SUMMING MOMENT PRODUCTS AND SIMPSONS' ORDINATES
// Multiply BM at sections by BM due to Unit Load
// at each section
dk = dk + ms[k1] * mx * s1[k1];
} // end of scope for loop k1
ds[k] = dk * L * pow(10,12)/(ns-1)/3/i2/ec;
} // end of scope for loop k
//SORT FOR MAXIMUM DEFLECTION AND ITS LOCATION
for(int k = 1; k <= ns; ++k) {
if (ds[k] > dm) {
dm = ds[k];
sd = L * (k - 1)/(ns-1);
}
} // end of scope for loop k for sort max deflection
|
I hope this clears up some of the background to the program design.