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

FACULTY OF CIVIL AND ENVIRONMENTAL ENGINEERING

GROUP WORK
TITLE OF PROJECT : MOMENT ON BEAM

COURSE NAME COMPUTER PROGRAMMING

COURSE CODE BFC 20802

GROUP NAME THE CI- ENGINEERING

GROUP MEMBER
NAME STUDENT I/D
NUR FATIN NADIAH BINTI ANUAR (L) AF150142
CHAN QING WEI AF150186
KARTEK PILLAI A/L MURALI DHARAN AF150034
NUR RAIDAH UZMA BINTI MOHAMED RASIDI AF150110
NUR KHALILAH BINTI SAFIE AF150054

SECTION 7

LECTURER NAME DR NORHAYATI BINTI ABDUL GHAFAR

DATE SUBMISSION 4 DECEMBER 2016

TABLE OF CONTENT

1
No Title Pages

1) Contents 2

2) Introduction 3

3) Description 4

4) Flowchart 5-6

5) Pseudo-code 7

6) Source Code 8-10

7) Features Of Programming 11

8) Sample Input and Output 12-14

9) Conclusion 15

10) References 16

11) Appendix 17-22

INTRODUCTION

Civil engineering is a career known worldwide, moreover they are also known as
specialist in static structures. There are 4 sections in civil engineering where a student need to

2
choose one to further their knowledge in it. They are hydraulics, geotechnics, building
constructions and road and railway constructions. Therefore as the days goes by more
upgraded technology keeps pouring in that help daily jobs easier and programming is one of
it.
This is why our team would like to be one of the contributors of life made easy. We
would like to propose a program made from C++ that is able to calculate the shear force and
bending moment of the forces that acts on the beam. As we all known, forces applied on the
beam are very important during construction sites, therefore we would like to minimize the
problem like miscalculations that could cause critical problems.
Let us brief you on our program (coding), first as we all know there are 3 main types
of loading acting on a beam they are point load(single normal force), uniform distributed load
(constant or gradually decrease/increase), and triangle distributed load. There will be
opposing forces which is why those beams are able to stay firm. Basically, it consists of 3
equations, where by using these three equations, reactions of certain structures can be
determined. The equation is:
Fx = 0 Fy = 0 M = 0.

With this equation, we are able to obtain M. In this case too, there is exists a shear
force, the force that causes the member to slide and separate into two sections but we will not
include in this coding. Meanwhile moment M is known as the bending moment, which is a
reaction moment at a certain point for all forces as well as combinations reacting on the left
or right side of the point. The formula for moment is Moment = Force*Distance. The
following we would insert in our flowchart of this coding.

DESCRIPTION

3
Our system is built to calculate moment in load in a fastest and technological way for
the civil engineering areas or other areas that involved in moment calculation. Firstly, to start
the system, user must put the sub-system that include in the system such as iostream or
iomanip or both.
Then, insert the input of moment for example the force and the distance of the load to
calculate the moment. These input are crucial as it is the part of the calculation. If either one
input is wrong, then it will calculate wrongly.
In the system, user can choose in three situations of load for example uniform
distributed load, triangle distribution load or point load. We decided to put these type of load
because they were commonly used in construction or usually in civil engineering nowadays.
In calculating the point load, user must include the formula M=P*L, while for the
uniform distributed load, the formula is M=P*12(L)*L. For the triangle distributed load, the
formula is M=P*13(L)*L to obtain the moment. P represents force, M is the moment and L
act as a distance.
Our system will continues if the input and the data was correct and fulfill the system
rules in order to get the result. If any of the data was incorrect or the user did not choose the
type of load that provided, then there will not have any output given. Besides, the user is
given the decision whether to continue or not in choosing the type of load.
Insert Y to continue calculating or N to stop calculate if the user have finished the
calculation to find the moment. At the end, when it is done, insert return 0 and close page to
stop the system.

FLOWCHART

4
Start

Input
Distance = L
Force = P

Input
Type of load
If starting at point A

Point load Uniform distributed load Triangle distributed


load

M = P*L P1 1
M = 2 M =P* 3

End

REVIEW

5
1) Point Load

P kN

A L B

2) Uniform Distributed Load

P kN/m

A L B

3) Triangle Distributed Load

P kN/m

A L B

PSEUDO-CODE

6
1. Start.
2. Open file and write the information of load by input the force and distance of load.
3. Read the input.
4. Loop.
5. Read the choice of the user:
a. do (choice from 1 to 3)
read the choose load
b. if
display the type of load
c.else if
display different type of load
6. Read the formula
a.point load
M = P*L
b.uniform distributed load
M = P*1/2 (L)*L
c.triangle distributed load
M =P* 1/3 (L)*L
7. Display the moment of load
8. Display Do you want to choose another type of load? (Y/N).
9. Close file.
10. End.

SOURCE CODE

7
#include <iostream>

#include <iomanip>

using namespace std;

int main ()

double l, p, m, TypeOfLoad, M;

int PointLoad=1;

int UniformDistributedLoad=2;

int TriangleDistributedLoad=3;

char again;

do

cout<<"Moment=Fd"<<"\n";

cout<<"Choose 1 for point load, ";

cout<<"2 for uniform distributed load";

cout<<" and 3 for triangle distributed load"<<"\n";

cin>>TypeOfLoad;

if (TypeOfLoad==PointLoad)

//Point Load

cout<<"\n"<<"You have choose Point Load"<<"\n";

cout<<"\nEnter the value of distance and force."<<"\n";

8
cout<<"Distance =";

cin>>l;

cout<<"Force =";

cin>>p;

//Point Load formula to get moment

M=p*l;

cout<<"M is "<<M<<"\n";

else if (TypeOfLoad ==UniformDistributedLoad)

//Unifrom Distribution Load

cout<<"\n"<<"You have choose Uniform Distribution Load"<<"\n";

cout<<"\nEnter the value of length and force"<<"\n";

cout<<"Distance =";

cin>>l;

cout<<"Force =";

cin>>p;

//Uniform Distributed Load formula to get moment

M=(p*1/2*l*l);

cout<<"M is " <<M<<"\n";

else if (TypeOfLoad ==TriangleDistributedLoad)

//Triangle Distribution Load

cout<<"\n"<<"You have choose Triangle Distribution Load"<<"\n";

cout<<"\nEnter the value of length and force"<<"\n";

9
cout<<"Distance =";

cin>>l;

cout<<"Force =";

cin>>p;

//Triangle Distribution load formula to get moment

M=(p*1/3)*l*l;

cout<<"M is "<<M<<"\n";

cout<<"Do you want to choose another type of load? (Y/N)"<<"\n";

cin>>again;

while (again == 'Y' || again =='y' );

return 0;

FEATURES OF C++ PROGRAMMING

Dev C++ is a computer language. In C++ programming, a function is one of the


example subroutines that connected with executable code where value is one of the ways that

10
passed the parameters of functions. To make a statement terminator, semicolon is used while
curly braces for grouping blocks of statements in C++ because of the source text program
which is free-format.

Besides, there are many library functions in order to make the users easy when create
a program. In our system, we included two of the library functions to create our sources code,
which are iostream and iomanip. Each of them contain different meaning and functions.
Most of the function is only concentrate for the library, because without the library, the source
will not activate successfully.

Commonly, the library that we used is standard input and output header file. We can
use variety of functions such as scanf, gets, printf, fopen, fprintf, and fclose. In a conclusion,
different library have different functions in computer world.

SAMPLE INPUT

11
12
13
OUTPUT

14
CONCLUSION

This system contributes in civil engineering areas where we can calculate the reaction
of the specific moment. If the user insert the false value, then the output of the result is also in
false condition as the system will automatically calculate the moment based on given
formula.
In order to make the system success, the programmer need to have the soft skills and
hard skills so that whenever there were errors exists, the programmer can analyze back and
recreated the system again. In order to do that, the knowledge about the computer
programming or the rules in computer, must be enhance in engineers so that we can produce
the professional engineers.
Last but not least, in this globalization world, most of everything will use computer or
technology because the world has transform into modernization and created many programs
using computer. Thus, we tried to create one system or program, where we compile and run it
to look whether it is succeed or not.

15
REFERENCES

1) References Book
1.1) C Programming For Engineering And Computer Sciences International Edition
1999, H.H.TAN, T.B.DORAZIO, WCB/McGraw-Hill
2) Internet Sources
2.1) http://www.cprogramming.com/tutorial/lesson7.html
2.2) http://www.cs.utah.edu/~germain/PPS/Topics/C_Language/file_IO.html
2.3) http://www.cprogramming.com/function.html
2.4) http://cboard.cprogramming.com/general-discussions/139660-computer-science-
engineering-major-c-best-language-start.html
2.5) http://en.wikipedia.org/wiki/C_(programming_language)

16
APPENDINCES
Minutes of 1st Meeting
1/2016

Date : 1 November 2016


Time : 8:00 pm 9:00pm
Venue : 24 hour study room, UTHM Library

PRESENT

Nur Fatin Nadiah binti Anuar (Chairperson)


Kartek Pillai a/l Murali Dharan
Chan Qing Wei (Secretary)
Nur Raidah Uzma binti Mohamed Rasidi
Nur Khalilah binti Safie

1. OPENING ADDRESS BY THE CHAIRPERSON


1.1. The Chairperson welcomed everyone present and apologized for the late of
meeting.
1.2. The Chairperson informed that the main purpose of the meeting was to discuss
about the group name, project name, objectives of project.

2. PROJECT ACTIVITIES

2.1 Group name

2.1.1. The Chairperson opened the discussion to decide on the group name.
2.1.2. Kartek suggested that The Future Gens as the group name.
2.1.3. Nadiah, the chairperson suggested that The Ci-engineering to be the name of
group.
2.1.4. Raidah proposed that Super 5 as the group name. Nadiah and Chan
seconded the suggestion.
2.1.5. By count of votes, the committee decided to choose The Ci-engineering as
the group name.

17
2.2 Project name

2.2.1 Khalilah suggested The Moment on Beam as the project name. Kartek

seconded the suggestion.

2.2.2 Raidah suggested Analyzer as the project name. Chan seconded the

suggestion.

2.2.3 By show of hands, Moment on Beam was chosen as the project name.

2.3 Date

2.3.1 The Chairperson asked everyone to suggest an appropriate date for the
project.
2.3.2 Nadiah proposed the project be held on December of 2016. No one opposed
but yet still not be confirmed.
2.3.3 The date and venue of the project will be discussed in the next meeting.

2.4 Objectives

2.4.1 To raise the awareness about the importance of technologies with relates to
engineering field.
2.4.2 To enable the students to contribute to environment or indirectly in their own
areas through the small or big efforts.

3. OTHER MATTERS

.1 The Chairperson reminded the committee to take turn as the secretary and update
the minutes of meeting.
3.2 Everyone was advised to read up on the format of minutes of meeting.

4. CONCLUSIONS

4.1 The Chairperson summarized the meeting stating that the group name is The Ci-
engineering, project name is The Moment on Beam, and the date and venue of the
project will be discussed in the coming meeting.
4.2 The meeting was adjourned at 9:00 pm.
Prepared by, Date: 3 November 2016
Qwei
(CHAN QING WEI)
Secretary

18
Minutes of 2nd Meeting
2/2016

Date : 10 November 2016


Time : 12:30 noon 1.30 pm
Venue : Makmal Multimedia 2

PRESENT

Nur Fatin Nadiah binti Anuar (Chairperson)


Kartek Pillai a/l Murali Dharan
Chan Qing Wei (Secretary)
Nur Raidah Uzma binti Mohamed Rasidi
Nur Khalilah binti Safie

2. OPENING ADDRESS BY THE CHAIRPERSON

2.1. The Chairperson welcomed everyone present.


2.2. The Chairperson informed that the main purpose of the days meeting was to
discuss the problem statement of project as well as the coding for programming
needed for the project.

3. PASSING OF PREVIOUS MINUTES OF MEETING


3.1. Kartek proposed the 1st Minutes of Project Meeting be accepted.
3.2. All the members seconded.

4. MATTERS ARISING
4.1. Nadiah proposed that the date of project to be fixed at 27 November 2016 because
all the members are free on that day.
4.2. All the members seconded.
4.3. Kartek suggested the meeting of group to finalize the project should be held after
test. He suggested to let others focus on examination which is more important.
4.4. All members seconded.

19
5. ACTIVITY
5.1. Raidah suggested giving a brief explanation to the group members before we start to
do the project. Chan seconded the suggestion.
5.2. Khalilah suggested that we should focus on the flowchart first.
5.3. Nadiah suggested that we should divide work equally to save time because left only
3 weeks before due date.
5.4. By the count of hands, it was decided that we divide work equally.

6. OTHER MATTERS

6.1. The Chairperson reminded the committee to take turn as the secretary and update the
minutes of meeting as the project progress.
6.2. Everyone was advised to read up on the format of minutes of meeting from the
previous secretary.

7. CONCLUSIONS

7.1. The Chairperson summarized the meeting stating that the checking of the report and
coding will be held on 29 November 2016 at caf in Kolej Kediaman Tun Fatimah .
7.2. The activity will be held from 8:00 am to 10:00 am.
7.3. The meeting was adjourned at 1:30 pm.
Prepared by,
Qwei Date: 10 November 2016
(CHAN QING WEI)
Secretary

20
Minutes of 3rd Meeting
3/2016

Date : 27 November 2016


Time : 12:30 noon 1:30 pm
Venue : Caf Hall, Kolej Kediaman Tun Dr Ismail

PRESENT

Nur Fatin Nadiah binti Anuar (Chairperson)


Kartek Pillai a/l Murali Dharan
Chan Qing Wei (Secretary)
Nur Raidah Uzma binti Mohamed Rasidi
Nur Khalilah binti Safie

2. OPENING ADDRESS BY THE CHAIRPERSON

2.1. The Chairperson welcomed everyone present.


2.2. The Chairperson mentioned the main purpose of the days meeting was to discuss
the progress of the report and checking of coding.
2.3. The presentation of this project was discussed too.
3. PASSING OF PREVIOUS MINUTES OF MEETING
3.1. Chan proposed the 2nd Minutes of Project Meeting be accepted.
3.2. All the members seconded.
4. MATTERS ARISING
4.1. Nadiah told the members that we have some changes related to coding of the
computer.
4.2. Khalilah and Kartek confirmed to in charge of making video presentation for the
group.
4.3. All the members seconded.
5. ACTIVITY
5.1. Nadiah and Chan will do the checking of the coding. Raidah seconded the
suggestion.
5.2. Khalilah suggested that we should do the video presentation in a such way of that
affordable and interesting. Kartek seconded the suggestion.

21
5.3. Raidah suggested that we should make a slideshow style of video presentation to
attract the attention of people. Chan seconded the suggestion.
5.4. Nadiah proposed that pickup one or two members to do the explanation in the video.
All seconded the suggestion.
6. OTHER MATTERS
6.1. The Chairperson reminded the secretary to update the minutes of meeting.
6.2. Everyone was advised to read up on the format of minutes of meeting from
secretary.

7. CONCLUSIONS

7.1. The Chairperson summarized the making of video involving one or two members.
7.2. The meeting was adjourned at 1:30 pm.

Prepared by, Date: 27 November 2016


Qwei
(CHAN QING WEI)
Secretary

22

Вам также может понравиться