0% found this document useful (0 votes)
6 views41 pages

Final Project

The document outlines a final project for a 2D truss analysis program developed in Dev C++ as part of the Engineering 1035 course at Central Philippine University. It details the project's objectives, methodologies (method of joints and method of sections), and includes sample computations and a flowchart. The project aims to provide a digital tool for structural analysis, enabling the calculation of internal forces in truss members under specified loads.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views41 pages

Final Project

The document outlines a final project for a 2D truss analysis program developed in Dev C++ as part of the Engineering 1035 course at Central Philippine University. It details the project's objectives, methodologies (method of joints and method of sections), and includes sample computations and a flowchart. The project aims to provide a digital tool for structural analysis, enabling the calculation of internal forces in truss members under specified loads.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

[

FINAL PROJECT
CENTRAL PHILIPPINE UNIVERSITY
ENGG 1035
COLLEGE OF ENGINEERING
COMPUTER PROGRAMMING
Jaro, Iloilo City, Philippines

2D TRUSS ANALYSIS
Criteria Engg 1035 Final Project Rubric Score
1. Documentation Formatting is Requirements are Requirements are Requirements are
followed. partially satisfied. partially satisfied. partially satisfied. No
Requirements are Steps in solving the Steps in solving step in solving the
satisfied. Steps in problems are the problems are problem is written.
solving the problems difficult to follow. difficult to follow. Lacks more than 2
are easy to follow. Lacks 1 or 2 aspects Lacks 3-4 aspects aspects (i.e. blurred
Answers are all (i.e. blurred (i.e. blurred pictures and small
correct. Pictures are pictures and small pictures and small text)
readable and clear. text) text) (10 points)
(30 points) (20 points) (15 points)
2. Complexity The program was The program can The program can The program can only
able to solve a solve an above solve an average solve a simple
complex engineering average engineering engineering problem
problem engineering problem (10 points)
(30 points) problem (15points)
(20points)
3. Programming The code is The code is fairly
The code is fairly
Skills exceptionally well easy to read. The The code is poorly
easy to read. The
organized and very program organized and very
program produces
easy to follow. produces correct difficult to read.
correct results but
The program works results but does The program is
not did not meet
and meets all of the not display them producing incorrect
some specifications.
specifications. correctly. results. Sloppy layout
Fair lay-outing of
Exceptional lay- Disordered layout of output.
output.
outing of output. of output. (10 points)
(20 points)
(30 points) (15 points)
4. Application The program is The program is The program is The program is not
applicable to the somewhat somewhat applicable to the field
field of engineering applicable to the applicable to the of engineering
(10 points) field of engineering field of (3 points)
(7 points) engineering
(5 points)
5. Timeliness More than 5days 4-5 days late 2-3 days late 1 day late submission
late submission submission submission (-10 points)
(-50 points) (-40 points) (-30 points)

TOTAL SCORE

Submitted by:
Name: Anne Christine M. Simbran
Date: December 07, 2023
Stub code: 1634

Submitted to:
Engr. Romarie Jhoanna C. Eder
Engg 1035 Instructor
I. Introduction

In the field of civil and structural engineering, understanding the behavior of truss structures
is crucial for designing efficient and stable constructions. The method of joints and method of sections
are fundamental techniques used to analyze such structures, and by implementing these methods in
Dev C++, you are essentially creating a digital tool for structural analysis.

The primary objective of this Dev C++ program is to perform a comprehensive 2D truss
analysis. This includes calculating internal forces (tension or compression) in each truss member and
providing a clear output that summarizes the structural response under specified loads and boundary
conditions.

The program will leverage the method of joints to systematically analyze individual joints
within the truss. It will then extend its functionality to incorporate the method of sections, enabling
users to analyze specific sections of the truss and extract valuable information about internal forces.

By developing this 2D truss analysis program in Dev C++, you are not just creating a piece of
software; you are building a valuable tool for engineers to gain insights into the structural behavior of
truss systems. This project combines principles of structural analysis with programming skills to offer
a powerful and educational resource for those involved in the field of civil and structural engineering.

SAMPLE COMPUTATIONS:

GIVEN:
L1 = 5 meters F1 = 100 N
L2 = 5 meters F2 = 200 N
L3 = 5 meters F3 = 300 N
H = 6 meters F4 = 400 N
F5 = 500 N

Note: Dimensions and external forces varies


in every truss structure; Summation of forces
is adding up all the forces on the respective
axis.

METHOD OF JOINTS:

STEP 1: at Joint A
∑Fy = ABy + F1 = 0 ∑Fx = - ABx + AD = 0
ABy = - F1 ABx = AD
AB (6m/6.5m) = - 100.000 N AB (2.5m/6.5m) = AD
AB = -108.333 N 108.333 N (2.5m/6.5m) = AD
AB = 108.333 N (Compression) AD = 41.667 N
AD = 41.667 N (Tension)

STEP 2: at Joint B
∑Fy = - F2 + ABy - BDy = 0
BDy = - F2 + ABy
BD (6m/6.5m) = - 200.000 N + 108.333 N (6m/6.5m)
BD = -108.333 N
BD = 108.333 N (Compression)

∑Fx = BC + ABx - BDx = 0


BC = - ABx + BDx
BC = - 108.333 N (2.5m/6.5m) + 108.333 N (2.5m/6.5m)
BC = -0.000 N
BC = 0.000 N --> a zero-force member
STEP 3: at Joint D
∑Fy = -BDy + CDy + F3 = 0
CDy = BDy - F3
CD (6m/6.5m) = 108.333 N (6m/6.5m) - 300.000 N
CD = -216.667 N
CD = 216.667 N (Compression)

∑Fx = BDx + DE - CDx - AD = 0


DE = - BDx + CDx + AD
DE = - 108.333 N (2.5m/6.5m) + 216.667 N (2.5m/6.5m) + 41.667 N
DE = 83.333 N
DE = 83.333 N (Tension)

STEP 4: at Joint E
∑Fy = F5 + CEy = 0
CEy = - F5
CE (6m/6.5m) = - 500.000
CE = -541.667 N
CE = 541.667 N (Compression)

It is important to note that in the method of joints, assuming all forces are in tension
establishes a sign convention where positive forces represent tension (pulling away from the joint)
and negative forces indicate compression (pushing towards the joint). This convention simplifies the
analysis process by providing a consistent way to interpret the calculated forces, making it easier to
determine the type of force (tension or compression) without referring to the truss diagram.

METHOD OF SECTIONS:

Note: The moment at a point tells you how much a force at that point is trying to make
something rotate, whereas, clockwise is negative and counterclockwise is positive.

STEP 1: section a-a


Moment at B = 0 = AB (0) + AD (6m) - F1 (2.5m)
AD (6m) = F1 (2.5m)
AD (6m) = 100.000 N (2.5m)
AD = 41.667 N
AD = 41.667 N (Tension)

Moment at D = 0 = - F1 (2.5m) + ABx (0) - ABy (2.5m)


ABy (2.5m) = - F1 (2.5m)
AB (6m/6.5m)(2.5m) = - 100.000 N (2.5m)
AB = -108.333 N
AB = 108.333 N (Compression)
STEP 2: section b-b
Moment at D = 0 = - F1 (5m) + F2 (2.5m) - BC (6m)
BC (6m) = - 100.000 N (5m) + 200.000 N (2.5m)
BC = 0.000 N
BC = 0.000 N --> a zero-force member

Moment at E = 0
0 = - F1 (10m) - F3 (5m) - CDy (5m) - BC (6m) + F2 (7.5m)
CDy (5m) = - F1 (10m) - F3 (5m) - BC (6m) + F2 (7.5m)
CD (6m/6.5m)(5m) = - 100.000 N (10m) - 300.000 N (5m) - 0.000 N
(6m) + 200.000 N (7.5m)
CD = -216.667 N
CD = 216.667 N (Compression)

Moment at C = 0 = BC (0) + CD (0) - F1 (7.5m) + F2 (5m) - F3 (2.5m) +


DE (6m)
DE (6m) = F1 (7.5m) - F2 (5m) + F3 (2.5m)
DE (6m) = 100.000 N (7.5m) - 200.000 N (5m) + 300.000 N (2.5m)
DE = 83.333 N
DE = 83.333 N (Tension)

STEP 3: section c-c


Moment at D = 0 = F5 (5m) + CEy (5m) + CEx (0) + DE (0)
CEy (5m) = - F5 (5m)
CE (6m/6.5m)(5m) = - 500.000 N (5m)
CE = -541.667 N
CE = 541.667 N (Compression)

SUMMARY OF ANSWERS:
FOR METHOD OF JOINTS: FOR METHOD OF SECTIONS:
AB = 108.333 N (Compression) AB = 108.333 N (Compression)
AD = 41.667 N (Tension) AD = 41.667 N (Tension)
BD = 108.333 N (Compression) BD = 108.333 N (Compression)
BC = 0.000 N (zero-force member) BC = 0.000 N (zero-force member)
CD = 216.667 N (Compression) CD = 216.667 N (Compression)
CE = 541.667 N (Compression) CE = 541.667 N (Compression)
DE = 83.333 N (Tension) DE = 83.333 N (Tension)

The method of joints and the method of sections in truss analysis yield the same results
because both approaches are rooted in the principles of static equilibrium and compatibility.
Whether analyzing individual joints or larger sections of the truss, the fundamental application of
equilibrium equations ensures that the internal forces calculated for each truss member are
consistent with the overall equilibrium of the structure. Both methods assume rigid joints, negligible
member weight, and that truss members are two-force members experiencing only axial forces.

In summary, despite focusing on different aspects of the truss, the methods converge to
provide internally consistent results reflective of the truss's static equilibrium.
II. Flowchart
III. Algorithm
STEP 1: Initialize F1, F1, F3, F4, F5, AB, BC, AD, CD, CE, BD, and DE to 0, and convert, answer, method,
and again to blank.
STEP 2: Print "\n\t\t\tProgram Created by: Simbran, Anne Christine M.", "\n\t\t\t\t Stub code:
1634", "\n\t\t FINAL OUTPUT: 2D TRUSS ANALYSIS USING METHOD OF JOINTS",
"\n\t\t\t AND METHOD OF SECTIONS (WITH STEPS)".
STEP 3: Print "\n___________________________________________________________________
__________________________", "\n____________________________________________
_________________________________________________", "\n\t\t __________ _______
__ __ __ _________ _________", "\n\t\t|___ ___|| ___ || | | || ______||
______|", "\n\t\t | | | |___| || | | || |______ | |______", "\n\t\t | | | ___
_|| | | ||______ ||______ |", "\n\t\t | | | | | | | |____| | ______| | ______|
|", "\n\t\t |__| |__| |_| |__________||_________||_________|", "\n __________
__ __ __________ __ __ __ _________ ____ _________", "\n | ____ || \\ |
|| ____ || | | | | || ______|| || ______|", "\n | | | || |\\ | || | | ||
| | |____| || |______ | || |______ ", "\n | |____| || | \\| || |____| || |
|__ __||______ || ||______ |”, "\n | ____ || | | || ____ || |______ | |
______| || | ______| |", "\n |__| |__||__| |__||__| |__||_________| |____|
|_________||____||_________|", "\n_________________________________________
_______, "\n________________________________________________”.
STEP 4: Print "\n\t\t\t F2 \t\t\t\t F4", "\n\t\t\t || \t\t\t\t ||", "\n\t\t\t \\/ \t\t L3 \t\t
\\/", "\n\t\t\t B =================================== C", "\n\t\t\t // \\", "\\ \t\t\t //
\\", "\\", "\n\t\t\t // \\", "\\ \t\t\t // \\", "\\", "\n\t\t\t // \\", "\\ \t\t\t // \\", "\\",
"\n\t\t\t// \\", "\\ \t\t\t// \\", "\\", "\n\t\t // \t \\", "\\ \t\t //\t \\", "\\",
"\n\t\t // \t \\", "\\ \t\t //\t \\", "\\", "\n\t\t // \t \\", "\\ \t\t //\t\t \\", "\\",
"\n\t\t // \t \\", "\\ \t //\t\t \\", "\\", "\n\t\t //\t\t \\", "\\ \t //\t\t \\", "\\",
"\n\t\t //\t\t \\", "\\ \t //\t\t \\", "\\", "\n\t\t //\t\t \\", "\\ \t //\t\t \\", "\\",
"\n\t\t//\t\t\t \\", "\\ \t//\t\t \\", "\\", "\n\t //\t\t\t \\", "\\ //\t\t\t \\", "\\", "\n\t
//\t\t\t \\", "\\ //\t\t\t \\", "\\", "\n\t A =====================================
============================ E", "\n\t /\\ \t L1 \t\t /\\ D \t L2 \t /\\", "\n\t
|| \t\t\t || \t\t\t\t ||", "\n\t || \t\t\t || \t\t\t\t ||", "\n\t F1 \t\t\t F3
\t\t\t\t F5".
STEP 5: Print "\n\n Instructions: Find the force on each member and determine if it's in tension or
compression, if:", "\n L1 = 5 meters", "\n L2 = 5 meters", "\n L3 = 5 meters", "\n height of
each triangle = 6 meters", "\n\n ENTER THE VALUES FOR YOUR EXTERNAL FORCES: (in
Newtons)", "\n F1: ".
STEP 6: Read in the value of F1.
STEP 7: Print " F2: ".
STEP 8: Read in the value of F2.
STEP 9: Print " F3: ".
STEP 10: Read in the value of F3.
STEP 11: Print " F4: ".
STEP 12: Read in the value of F4.
STEP 13: Print " F5: ".
STEP 14: Read in the value of F5.
STEP 15: Test if F1 is less than 0 or F2 is less than 0 or F3 is less than 0 or F4 is less than 0 or F5 is less
than 0.
STEP 16: If F1 is less than 0 or F2 is less than 0 or F3 is less than 0 or F4 is less than 0 or F5 is less
than 0, print "\n\n Please enter a positive value of force.", "\n\n Explanation:", "\t\tIn
physics and engineering, forces are treated as vectors with both magnitude", "\n\t\t\tand
direction. The convention of assigning positive and negative values to forces is used to",
"\n\t\t\trepresent opposite directions. This directional representation simplifies
mathematical", "\n\t\t\tequations, especially when breaking forces into components along
specific axes, and ensures", "\n\t\t\tmathematical consistency when dealing with vector
addition and subtraction. While forces", "\n\t\t\tthemselves don't inherently have a
'negative' value, the choice of representation helps", "\n\t\t\texpress and manipulate forces
in a more intuitive and convenient manner." then proceed to step 17. Otherwise, print "\n I
want to solve using:", "\n a) METHOD OF JOINTS", "\n b) METHOD OF SECTIONS", "\n\n
ANSWER: ", and proceed to step 16.1.

STEP 16.1: Read in the value of method.

STEP 16.2: Test if method is equal to ‘a’ or ‘A’.

STEP 16.3: If method is equal to ‘a’ or ‘A’, print "\n\t _____________________", "\n
_______| \t\t |_______", "\n |_______| METHOD OF JOINTS: |_______|", "\n\t
|_____________________|\n", and proceed to step 16.3.1. Otherwise, test if method is
equal to ‘b’ or ‘B’ and proceed to step 16.4

STEP 16.3.1: Print "\n\n ANGLES:", "\n base = 5 meters", "\n height = 6 meters",
"\n\n for every x component of a slanting member (AB, BD, DC, EC):", "\n angle =
(base / 2) / hypotenuse", "\n hypotenuse = sqrt[(2.5m)^2 + (6m)^2] = 6.5 m", "\n
angle = 2.5 m / 6.5 m", "\n\n for every y component of a slanting member (AB, BD,
DC, EC):", "\n angle = height / hypotenuse", "\n hypotenuse = sqrt[(2.5m)^2 +
(6m)^2] = 6.5 m", "\n angle = 6 m / 6.5 m".

STEP 16.3.2: Print "\n\n\t _____________________", "\n _______| \t\t


|_______","\n |_______| AT JOINT A: |_______|", "\n\t |______________
_______|\n", "\n\t\t AB", "\n\t\t /\\", "\n\t\t //", "\n\t\t //", "\n\t\t o
===> AD", "\n\t\t/\\", "\n\t\t||", "\n\t\t||", "\n\t ", F1, " N".

STEP 16.3.3: Print "\n\n Summation of Fy = ABy + F1 = 0", "\n ABy = - F1", "\n AB
(6m/6.5m) = - ", F1, " N".

STEP 16.3.4: Compute the value of force in member AB.

STEP 16.3.5: Print "\n AB = ", AB, " N", "\n AB = ", -AB, " N (Compression) ---> FINAL
ANSWER".

STEP 16.3.6: Print "\n\n Summation of Fx = - ABx + AD = 0", "\n ABx = AD", "\n AB
(2.5m/6.5m) = AD", "\n ", -AB, " N (2.5m/6.5m) = AD".

STEP 16.3.7: Compute the value of force in member AD.

STEP 16.3.8: Print "\n AD = ", AD, " N", "\n AD = ", AD, " N (Tension) ---> FINAL
ANSWER".

STEP 16.3.9: Print "\n\t _____________________", "\n _______| \t\t


|_______", "\n |_______| AT JOINT B: |_______|", "\n\t |_____________
________|\n", "\n\t\t ", F2, " N", "\n\t\t ||", "\n\t\t ||", "\n\t\t \\/", "\n\t\t o
===> BC", "\n\t\t /\\\\", "\\", "\n\t\t // \\", "\\", "\n\t\t// \\/", "\n\t AB BD".

STEP 16.3.10: Print "\n\n Summation of Fy = - F2 + ABy - BDy = 0", "\n BDy = - F2 +
ABy", "\n BD (6m/6.5m) = - ", F2, " N + ", -AB, " N (6m/6.5m)".

STEP 16.3.11: Computer the value of force in member BD.


STEP 16.3.12: Print "\n BD = ", BD, " N".

STEP 16.3.13: Test if BD is less than 0.

STEP 16.3.14: If BD is less than 0, print "\n BD = ", -BD, " N (Compression) ---> FINAL
ANSWER" and proceed to step [Link]. Otherwise, print "\n BD = ", BD, " N
(Tension) ---> FINAL ANSWER" and proceed to step 16.3.15.

STEP [Link]: Print "\n\n Summation of Fx = BC + ABx - BDx = 0", "\n BC =


- ABx + BDx", "\n BC = - ", -AB, " N (2.5m/6.5m) + ", -BD, " N (2.5m/6.5m)".

STEP [Link]: Compute the value of force in member BC.

STEP [Link]: Print "\n BC = ", BC, " N".

STEP [Link]: Test if BC is less than 0.

STEP [Link]: If BC is less than 0, print "\n BC = ", -BC, " N (Compression) -
--> FINAL ANSWER" and proceed to step [Link]. Otherwise, print "\n BC =
", BC, " N (Tension) ---> FINAL ANSWER" and proceed to step [Link].

STEP [Link]: Print "\n\t _____________________", "\n _______| \t\t


|_______", "\n |_______| AT JOINT D: |_______|", "\n\t
|_____________________|\n", "\n\t\t BD CD", "\n\t\t \\", "\\", " /\\",
"\n\t\t \\", "\\", " //", "\n\t\t \\/", "//", "\n\t AD <=== o ===> DE", "\n\t\t
/\\", "\n\t\t ||", "\n\t\t ||", "\n\t\t ", F3, " N".

STEP [Link]: Print "\n\n Summation of Fy = -BDy + CDy + F3 = 0", "\n


CDy = BDy - F3", "\n CD (6m/6.5m) = ", -BD, " N (6m/6.5m) - ", F3, " N".

STEP [Link]: Computer the value of force in member CD.

STEP [Link]: Print "\n CD = ", CD, " N".

STEP [Link]: Test if CD is less than 0.

STEP [Link]: If CD is less than 0, print "\n CD = ", -CD, " N (Compression)
---> FINAL ANSWER" and proceed to step [Link].1. Otherwise, print "\n
CD = ", CD, " N (Tension) ---> FINAL ANSWER" and proceed to step
[Link].

STEP [Link].1: Print "\n\n Summation of Fx = BDx + DE - CDx -


AD = 0", "\n DE = - BDx + CDx + AD", "\n DE = - ", -BD, " N
(2.5m/6.5m) + ", -CD, " N (2.5m/6.5m) + ", AD, " N".

STEP [Link].2: Compute the value of force in member DE.

STEP [Link].3: Print "\n DE = ", DE, " N".

STEP [Link].4: Test if DE is less than 0.

STEP [Link].5: If DE is less than 0, print "\n DE = ", -DE, " N


(Compression) ---> FINAL ANSWER" and proceed to step 16.3.31.
Otherwise, print "\n DE = ", DE, " N (Tension) ---> FINAL ANSWER"
and proceed to step 16.3.31.

STEP [Link]: Print "\n\n Summation of Fx = BDx + DE + CDx - AD = 0", "\n


DE = - BDx - CDx + AD", "\n DE = - ", -BD, " N (2.5m/6.5m) - ", CD, " N
(2.5m/6.5m) + ", AD, " N".

STEP [Link]: Compute the value of force in member DE.

STEP [Link]: Print "\n DE = ", DE, " N".

STEP [Link]: Test if DE is less than 0.

STEP [Link]: If DE is less than 0, print "\n DE = ", -DE, " N (Compression)
---> FINAL ANSWER" and proceed to step 16.3.31. Otherwise, print "\n DE =
", DE, " N (Tension) ---> FINAL ANSWER" and proceed to step 16.3.31.

STEP 16.3.15: Print "\n\n Summation of Fx = BC + ABx + BDx = 0", "\n BC = - ABx
- BDx", "\n BC = - ", -AB, "(2.5m/6.5m) - ", BD, "(2.5m/6.5m)".

STEP 16.3.16: Compute the value of force in member BC.

STEP 16.3.17: Print "\n BC = ", BC, " N".

STEP 16.3.18: Test if BC is less than 0.

STEP 16.3.19: If BC is less than 0, print "\n BC = ", -BC, " N (Compression) ---> FINAL
ANSWER" and proceed to step 16.3.20. Otherwise, print "\n BC = ", BC, " (Tension) -
--> FINAL ANSWER" and proceed to step 16.3.20.

STEP 16.3.20: Print "\n\t _____________________", "\n _______| \t\t


|_______", "\n |_______| AT JOINT D: |_______|", "\n\t
|_____________________|\n", "\n\t\t BD CD", "\n\t\t /\\", "\\", " /\\", "\n\t\t
\\", "\\", " //", "\n\t\t \\", "//", "\n\t AD <=== o ===> DE", "\n\t\t /\\", "\n\t\t
||", "\n\t\t ||", "\n\t\t ", F3, ". N".

STEP 16.3.21: Print "\n\n Summation of Fy = BDy + CDy + F3 = 0", "\n CDy = - BDy -
F3", "\n CD (6m/6.5m) = - ", BD, " N (6m/6.5m) - ", F3, " N".

STEP 16.3.22: Compute the value of force in member CD.

STEP 16.3.23: Print "\n CD = ", CD, " N".

STEP 16.3.24: Test if CD is less than 0.

STEP 16.3.25: If CD is less than 0, print "\n CD = ", -CD, " N (Compression) ---> FINAL
ANSWER" and proceed to step [Link]. Otherwise, print "\n CD = ", CD, " N
(Tension) ---> FINAL ANSWER" and proceed to step 16.3.26.

STEP [Link]: Print "\n\n Summation of Fx = - BDx + DE - CDx - AD = 0",


"\n DE = BDx + CDx + AD", "\n DE = ", BD, " N (2.5m/6.5m) + ", -CD, " N
(2.5m/6.5m) + ", AD, " N"

STEP [Link]: Compute the value of force in member DE.

STEP [Link]: Print "\n DE = ", DE, " N".

STEP [Link]: Test if DE is less than 0.

STEP [Link]: If DE is less than 0, print "\n DE = ", -DE, " N (Compression) -
--> FINAL ANSWER" and proceed to step 16.3.31. Otherwise, print "\n DE =
", DE, " N (Tension) ---> FINAL ANSWER" and proceed to step 16.3.31.
STEP 16.3.26: Print "\n\n Summation of Fx = - BDx + DE + CDx - AD = 0", "\n DE =
BDx - CDx + AD", "\n DE = ", BD, " N (2.5m/6.5m) - ", CD, " N (2.5m/6.5m) + ", AD, "
N".

STEP 16.3.27: Compute the value of force in member DE.

STEP 16.3.28: Print "\n DE = ", DE, " N".

STEP 16.3.29: Test if DE is less than 0.

STEP 16.3.30: If DE is less than 0, print "\n DE = ", -DE, " N (Compression) ---> FINAL
ANSWER" and proceed to step 16.3.31. Otherwise, print "\n DE = ", DE, " N (Tension)
---> FINAL ANSWER" and proceed to step 16.3.31.

STEP 16.3.31: Print "\n\t _____________________", "\n _______| \t\t


|_______", "\n |_______| AT JOINT E: |_______|", "\n\t
|_____________________|\n", "\n\t\t CE", "\n\t\t /\\", "\\", "\n\t\t \\", "\\",
"\n\t\t \\", "\\", "\n\t DE <=== o", "\n\t\t /\\", "\n\t\t ||", "\n\t\t
||", "\n\t\t ", F5, " N".

STEP 16.3.33: Print "\n\n Summation of Fy = F5 + CEy = 0", "\n CEy = - F5", "\n CE
(6m/6.5m) = - ", F5.

STEP 16.3.34: Compute the value of force in member CE.

STEP 16.3.35: Print "\n CE = ", CE, " N".

STEP 16.3.36: Test if CE is less than 0.

STEP 16.3.37: If CE is less than 0, print "\n CE = ", -CE, " N (Compression) ---> FINAL
ANSWER" and proceed to step 16.5 Otherwise, print "\n CE = ", CE, " N (Tension) ---
> FINAL ANSWER" and proceed to step 16.5.

STEP 16.4: If method is equal to ‘b’ or ‘B’, print "\n\n REMINDER: When using moment at a
certain point, clockwise is", "\n understood to be negative, and counterclockwise is
positive." and proceed to step 16.4.1. Otherwise, print "\n\n Please choose among the given
choices only." and proceed to step 17.

STEP 16.4.1: Print "\n\n\t _____________________", "\n _______|


\t\t\t|_______", "\n |_______| AT SECTION a-a |_______|", "\n\t
|_____________________|\n", "\n\t\t B", "\n\t\t /\\", "\n\t\t //", "\n\t\t //",
"\n\t A ====== - - - > D", "\n\t\t/\\", "\n\t\t||", "\n\t\t||", "\n\t ", F1, " N".

STEP 16.4.2: Print "\n\n Moment at B = 0", "\n 0 = AB (0) + AD (6m) - F1 (2.5m)",
"\n AD (6m) = F1 (2.5m)", "\n AD (6m) = ", F1, " N (2.5m)".

STEP 16.4.3: Compute the value of force in member AD.

STEP 16.4.4: Print "\n AD = ", AD, " N".

STEP 16.4.5: Test if AD is less than 0.

STEP 16.4.6: If AD is less than 0, print "\n AD = ", -AD, " N (Compression) ---> FINAL
ANSWER" and proceed to step 16.4.7. Otherwise, print "\n AD = ", AD, " N (Tension)
---> FINAL ANSWER" and proceed to step 16.4.7.

STEP 16.4.7: Print "\n\n Moment at D = 0", "\n 0 = - F1 (2.5m) + ABx (0) - ABy
(2.5m)", "\n ABy (2.5m) = - F1 (2.5m)", "\n AB (6m/6.5m)(2.5m) = - ", F1, " N
(2.5m)".

STEP 16.4.8: Compute the value of force in member AB.

STEP 16.4.9: Print "\n AB = ", AB, " N".

STEP 16.4.10: Test if AB is less than 0.

STEP 16.4.11: If AB is less than 0, print "\n AB = ", -AB, " N (Compression) ---> FINAL
ANSWER" and proceed to step 16.4.12. Otherwise, print "\n AB = ", AB, " N
(Tension) ---> FINAL ANSWER" and proceed to step 16.4.12.

STEP 16.4.12: Print "\n\n\t _____________________", "\n _______|


\t\t\t|_______", "\n |_______| AT SECTION b-b |_______|", "\n\t
|_____________________|\n", "\n\t\t", F2, " N", "\n\t\t ||", "\n\t\t ||", "\n\t\t
\\/", "\n\t\t B ====== - - -> C", "\n\t\t // \\", "\\", "\n\t\t // \\", "\\ /\\", "\n\t\t//
\\", "\\ //", "\n\t // \\", "\\//", "\n\t A ============== - -> E", "\n\t /\\
/\\ D", "\n\t || ||", "\n\t || ||", "\n\t ", F1, " N ", F3, " N".

STEP 16.4.13: Print "\n\n Moment at D = 0", "\n 0 = - F1 (5m) + F2 (2.5m) - BC


(6m)", "\n BC (6m) = - ", F1, " N (5m) + ", F2, " N (2.5m)".

STEP 16.4.14: Compute the value of force in member BC.

STEP 16.4.15: Print "\n BC = ", BC, " N".

STEP 16.4.16: Test if BC is less than 0.

STEP 16.4.17: If BC is less than 0, print "\n BC = ", -BC, " N (Compression) ---> FINAL
ANSWER" and proceed to step [Link]. Otherwise, print "\n BC = ", BC, " N
(Tension) ---> FINAL ANSWER" and proceed to step 16.4.18.

STEP [Link]: Print "\n\n Moment at E = 0", "\n 0 = - F1 (10m) - F3 (5m) -


CDy (5m) + BC (6m) + F2 (7.5m)", "\n CDy (5m) = - F1 (10m) - F3 (5m) + BC
(6m) + F2 (7.5m)", "\n CD (6m/6.5m)(5m) = - ", F1, " N (10m) - ", F3, " N (5m)
+ ", -BC, " N (6m) + ", F2, " N (7.5m)".

STEP [Link]: Compute the value of force in member CD.

STEP [Link]: Print "\n CD = ", CD, " N".

STEP [Link]: Test if CD is less than 0.

STEP [Link]: If CD is less than 0, print "\n CD = ", -CD, " N (Compression)
---> FINAL ANSWER" and proceed to step 16.4.23. Otherwise, print "\n CD =
", CD, " N (Tension) ---> FINAL ANSWER" and proceed to step 16.4.23.

STEP 16.4.18: Print "\n\n Moment at E = 0", "\n 0 = - F1 (10m) - F3 (5m) - CDy (5m) -
BC (6m) + F2 (7.5m)", "\n CDy (5m) = - F1 (10m) - F3 (5m) - BC (6m) + F2 (7.5m)", "\n
CD (6m/6.5m)(5m) = - ", F1, " N (10m) - ", F3, " N (5m) - ", BC, " N (6m) + ", F2, " N
(7.5m)".

STEP 16.4.19: Compute the value of force in member CD.

STEP 16.4.20: Print "\n CD = ", CD, " N".


STEP 16.4.21: Test if CD is less than 0.

STEP 16.4.22: If CD is less than 0, print "\n CD = ", -CD, " N (Compression) --->
FINAL ANSWER" and proceed to step 16.4.23. Otherwise, print "\n CD = ", CD, " N
(Tension) ---> FINAL ANSWER" and proceed to step 16.4.23.

STEP 16.4.23: Print "\n\n Moment at C = 0", "\n 0 = BC (0) + CD (0) - F1 (7.5m) + F2
(5m) - F3 (2.5m) + DE (6m)", "\n DE (6m) = F1 (7.5m) - F2 (5m) + F3 (2.5m)", "\n DE
(6m) = ", F1, " N (7.5m) - ", F2, " N (5m) + ", F3, " N (2.5m)".

STEP 16.4.24: Compute the value of force in member DE.

STEP 16.4.25: Print "\n DE = ", DE, " N".

STEP 16.4.26: Test if DE is less than 0.

STEP 16.4.27: If DE is less than 0, print "\n DE = ", -DE, " N (Compression) ---> FINAL
ANSWER" and proceed to step 16.4.28. Otherwise, print "\n DE = ", DE, " N (Tension)
---> FINAL ANSWER" and proceed to step 16.4.28.

STEP 16.4.28: Print "\n\n\t _____________________", "\n _______|


\t\t\t|_______", "\n |_______| AT SECTION c-c |_______|", "\n\t
|_____________________|\n", "\n\t\t C", "\n\t\t /\\", "\n\t\t \\", "\\",
"\n\t\t \\", "\\", "\n\tD <- - - ====== E", "\n\t\t /\\", "\n\t\t ||", "\n\t\t ||",
"\n\t\t ", F5, " N".

STEP 16.4.29: Print "\n\n Moment at D = 0", "\n 0 = F5 (5m) + CEy (5m) + CEx (0) +
DE (0)", "\n CEy (5m) = - F5 (5m)", "\n CE (6m/6.5m)(5m) = - ", F5, " N (5m)".

STEP 16.4.30: Compute the value of force in member CE.

STEP 16.4.31: Print "\n CE = ", CE, " N".

STEP 16.4.32: Test if CE is less than 0.

STEP 16.4.33: If CE is less than 0, print "\n CE = ", -CE, " N (Compression) ---> FINAL
ANSWER" and proceed to step 16.5. Otherwise, print "\n CE = ", CE, " N (Tension) ---
> FINAL ANSWER" and proceed to step 16.5.

STEP 16.5: Print "\n\n\t ____________________", "\n _______|\t\t


|_______", "\n |_______| SUMMARY OF ANSWERS |_______|", "\n\t
|____________________|\n\n".

STEP 16.6: Test if AB is less than 0.

STEP 16.7: If AB is less than 0, print "\n AB = ", -AB, " N (Compression)" and proceed to step
16.8. Otherwise, print "\n AB = ", AB, " N (Tension)" and proceed to step 16.8.

STEP 16.8: Test if AD is less than 0.

STEP 16.9: If AD is less than 0, print "\n AD = ", -AD, " N (Compression)" and proceed to step
16.10. Otherwise, print "\n AD = ", AD, " N (Tension)" and proceed to step 16.10.

STEP 16.10: Test if BD is less than 0.

STEP 16.11: If BD is less than 0, print "\n BD = ", -BD, " N (Compression)" and proceed to
step 16.12. Otherwise, print "\n BD = ", BD, " N (Tension)" and proceed to step 16.12.
STEP 16.12: Test if BC is less than 0.

STEP 16.13: If BC is less than 0, print "\n BC = ", -BC, " N (Compression)" and proceed to step
16.14. Otherwise, print "\n BC = ", BC, " N (Tension)" and proceed to step 16.14.

STEP 16.14: Test if CD is less than 0.

STEP 16.15: If CD is less than 0, print "\n CD = ", -CD, " N (Compression)" and proceed to
step 16.16. Otherwise, print "\n CD = ", CD, " N (Tension)" and proceed to step 16.16.

STEP 16.16: Test if CE is less than 0.

STEP 16.17: If CE is less than 0, print "\n CE = ", -CE, " N (Compression)" and proceed to step
16.18. Otherwise, print "\n CE = ", CE, " N (Tension)" and proceed to step 16.18.

STEP 16.18: Test if DE is less than 0.

STEP 16.19: If DE is less than 0, print "\n DE = ", -DE, " N (Compression)" and proceed to step
16.20. Otherwise, print "\n DE = ", DE, " N (Tension)" and proceed to step 16.20.

STEP 16.20: Print "\n", "\n ____________________________________________________


________ ", "\n |\t\t\t\t\t\t\t |", "\n | ***NOTES***\t\t\t\t\t\t |", "\n | In
structural engineering, a zero-force member |", "\n | is a truss element with no
force due to equilibrium |", "\n | conditions, typically occurring when two non-collinear
|", "\n | members meet at a joint without external loads. |", "\n |____________
________________________________________________|", "\n\t\t\t | |", "\n\t\t\t
| |", "\n\t\t\t | |", "\n\t\t\t | |", "\n\t\t\t | |", "\n\t\t\t |____|".

STEP 16.21: Print "\n\n\n\n Do you want to convert your answers into other unit systems?
<y/n>: ".

STEP 16.22: Read in the value of answer.

STEP 16.23: Test if answer is equal to ‘y’ or ‘Y’.

STEP 16.24: If answer is equal to ‘y’ or ‘Y’, print "\n\n Please choose which one do you want
to convert it to." and proceed to step 16.24.1. Otherwise, proceed to step 17.

STEP 16.24.1: Print "\n a) English System (pound-force)", "\n b) CGS System
(dyne)", "\n c) Kilonewtons",

STEP 16.24.2: Print "\n\n ANSWER: ".

STEP 16.24.3: Read in the value of convert.

STEP 16.24.4: Test if convert is equal to ‘a’ or ‘A’.

STEP 16.24.5: If convert is equal to ‘a’ or ‘A’, print "\n\n\t


____________________", "\n _______|\t\t |_______", "\n _______|\t\t
|_______", "\n\t |____________________|\n", "\n GUIDE:", "\n 1N =
0.2248089431 lbf” and proceed to step [Link]. Otherwise, test if convert is equal
to ‘b’ or ‘B’ and proceed to step 16.24.6.

STEP [Link]: Initialize AB1, AD1, BC1, BD1, CD1, CE1, and DE1 to 0.

STEP [Link]: Compute the values of AB1, AD1, BC1, BD1, CD1, CE1, and
DE1.
STEP [Link]: Print "\n\n AB = ", AB1, " lbf", "\n AD = ", AD1, " lbf", "\n
BC = ", BC1, " lbf", "\n BD = ", BD1, " lbf", "\n CD = ", CD1, " lbf", "\n CE = ",
CE1, " lbf", "\n DE = ", DE1, " lbf".

STEP 16.24.6: If convert is equal to ‘b’ or ‘B’, print "\n\n\t


____________________", "\n _______|\t\t |_______", "\n |_______|
CGS SYSTEM |_______|", "\n\t |____________________|\n", "\n
GUIDE:", "\n 1N = 100 000 dyn" and proceed to step [Link]. Otherwise,
test if convert is equal to ‘c’ or ‘C’ and proceed to step 16.24.7.

STEP [Link]: Initialize AB2, AD2, BC2, BD2, CD2, CE2, and
DE2 to 0.

STEP [Link]: Compute the values of AB2, AD2, BC2, BD2, CD2,
CE2, and DE2.

STEP [Link]: Print "\n\n AB = ", AB2, " dyn", "\n AD = ", AD2, "
dyn", "\n BC = ", BC2, " dyn", "\n BD = ", BD2, " dyn", "\n CD = ",
CD2, " dyn", "\n CE = ", CE2, " dyn", "\n DE = ", DE2, " dyn".

STEP 16.24.7: If convert is equal to ‘c’ or ‘C’, print "\n\n\t ____________________",


"\n _______|\t\t |_______", "\n |_______| KILONEWTONS |_______|",
"\n\t |____________________|\n", "\n GUIDE:", "\n 1N = 0.001 kN" and proceed
to step [Link]. Otherwise, print "\n\n Invalid! Please choose among the given
choices only." and go back to step 16.24.2.

STEP [Link]: Initialize AB3, AD3, BC3, BD3, CD3, CE3, and
DE3 to 0.

STEP [Link]: Compute the values of AB3, AD3, BC3, BD3,


CD3, CE3, and DE3.

STEP [Link]: Print "\n\n AB = ", AB3, " kN", "\n AD = ", AD3, " kN", "\n
BC = ", BC3, " kN", "\n BD = ", BD3, " kN", "\n CD = ", CD3, " kN", "\n CE = ",
CE3, " kN", "\n DE = ", DE3, " kN".

STEP 17: Print "\n\n\n Do you want to try again? <y/n>: ".

STEP 18: Read in the value of again.

STEP 19: If again is equal to ‘y’ or ‘Y’, go back to step 1. Otherwise, print "\n\n Okay!
Thank you and have a nice day ahead!\n\n".
IV. Program Codes
V. Executable file

POSSIBLEE OUTCOME #1
POSSIBLE OUTCOME #2
POSSIBLE OUTCOME #3
POSSIBLE OUTCOME #4
SAMPLE OUTCOME #5

You might also like