This cpp code gives the end reaction, shear and bending moment values (latter two at user-defined locations) generated in a single-span simply support...
This cpp code gives the end reaction, shear and bending moment values (latter two at user-defined locations) generated in a single-span simply supported beam for any combination of concentra…Full description
Design of Composite Beams to BS 5950. This is a excel based calculation sheet.
Deflection of a Simply Supported BeamFull description
10 ejercicios comunes sobre visual studio c#Descripción completa
Learn the basics of Visual C# programming. Easy to learn and read tutorial for beginners.
Descripción completa
Descrição completa
VisDescrição completa
Google Android supported devices
beamFull description
analisis
Beam
Full description
Full description
Full description
SBTS Supported Configurations
مقدمة مُبسطة عن تطوير النظم المدمجة Embedded System بداية من تشغيل دايود ضوئي وإنتهائاً بأنظمة الوقت الحقيقي Real Time Systems، يتناول الكتاب شرح المتحكمات الدقيقة من عائلةAVR وكيفية برمجتها بلغة ا...
Analysis of a single span simply supported beam Computation of end reactions, shear and bending moment Underlying Concept: Principle of superposition Environment: Visual C++ 2008 Express Edition Programmer: Prof. S A Vasanwala Debugger: Prakash Agarwal Date: 05/02/2010
#include #include #include
// cin, cout objects // setw(), setprecision() function // exit() function
using namespace std; const int elements = 102;
// maximum number of sections under... // ...which user can split the beam
Reactions at left and right support Reactions at left and right support... ...for individual load Span of beam Distance from left support Cover for UDL loading Total weight of load under consideration Weight of UDL load used in moment... ...calculation at a section Distance of section from left support Temporary variables Moment at a section Shear at a section
Number of loads on span Number of sections Load type Loop control variables
cout << "\nEnter span of beam [m]: "; cin >> l; cout << "\nEnter number of sections into which\n" << "the span is to be divided [max. 100]: "; cin >> no_section; cout << "\nEnter number of loads on the span [integer]: "; cin >> no_load; for (k = 1; k <= no_load; k++) { // Load information cout << << << << <<
"\nLoad number: " << k << endl << endl "Load Type 1: Concentrated Load " << endl " Type 2: Uniformly Distributed Load " << endl " Type 3: Triangular Load - Left to Right " << endl " Type 4: Triangular Load - Right to Left " << endl;
cout << "\nEnter type of load [integer]: "; cin >> type; cout << "\nEnter total weight of the load [kN]: "; cin >> W; cout << "\nEnter distance from left support [m]: "; cin >> a; if (type != 1) { cout << "\nEnter load cover [m]: "; cin >> c;
1
f:\Simply Supported Beam\Simply Supported Beam\Simply Supported Beam.cpp } else c = 0; // Computation of reactions switch(type) { case 1: s = a; break; case 2: s = a + (c / 2.0); break; case 3: s = a + (2 * c / 3.0); break; case 4: s = a + (c / 3.0); break; default: cout << "\nInvalid Load Type " << "\nTerminating..." << endl; exit(0); } t = l - s; R1 = W * t / l; R2 = W - R1; RL = RL + R1; RR = RR + R2; // Computation of moments for (j = 2; j <= (no_section+1); j++) { // Moment outside load cover dist = (j - 1) * (l / no_section); if (dist <= a) { moment[j] = moment[j] + (R1 * dist); shear[j] = shear[j] + R1; } else if (dist >= (a + c)) { moment[j] = moment[j] + R2 * (l - dist); shear[j] = shear[j] - R2; } else { // Moment within load cover b1 = dist - a; if (type == 2) { W1 = W * b1 / c; moment[j] = moment[j] + R1 * (a + b1) - W1 * b1 / 2.0; shear[j] = shear[j] + R1 - W1; } else if (type == 3) { W1 = W * (b1 / c) * (b1 / c); // Hint: Similar triangles moment[j] = moment[j] + R1 * (a + b1) - W1 * b1 / 3.0; shear[j] = shear[j] + R1 - W1;
2
f:\Simply Supported Beam\Simply Supported Beam\Simply Supported Beam.cpp } else if (type ==4) { // Note: Computations from right side unlike in... // ...previous cases b1 = c - b1; W1 = W * (b1 / c) * (b1 / c); moment[j] = moment[j] + R2 * (1 - a - c + b1) - W1 * b1 / 3.0; shear[j] = shear[j] - R2 + W1; } } } }
// End of j loop // End of k loop
// Display of results in tabular format char press; cout.setf(ios::fixed | ios::showpoint); cout.precision(2); cout << // << << // cout <<
"\n\nAnalysis Results\n" Drawing of ~ character below the above title setw(17) << setfill('~') << "" endl; Resetting fill character as blank setfill(' ');
cout << "\nLeft hand reaction [kN]: " << RL << endl << "\nRight hand reaction [kN]: " << RR << endl; cin.ignore(100, '\n'); // Cursor set after '\n' character... // ...in input stream moment[0] = moment[1] = 0.0; shear[1] = RL; cout << "\nLocation[m]" << setw(15) << "Moment[kN.m]" << setw(14) << "Shear[kN]\n" << endl; for (j = 1; j <= (no_section+1); j++) { if (j ==1) dist = 0.0; else dist = (j - 1) * (l / no_section); if (j == 10) { cout << "\nPress enter to continue...\n\n"; cin.get(press); } cout << setw(8) << setprecision(2) << dist << setw(15) << setprecision(3) << moment[j] << setw(14) << shear[j] << endl; } // Finding maximum moment and its location double max_moment = moment[0], dist_x; for (j = 1; j <= (no_section+1); j++) if (moment[j] > max_moment) { max_moment = moment[j]; dist_x = (j - 1) * (l / no_section); }
3
f:\Simply Supported Beam\Simply Supported Beam\Simply Supported Beam.cpp cout << "\nMaximum moment [kN.m]: " << max_moment << endl << "At a distance " << dist_x << " m from left support " << endl; }