Beruflich Dokumente
Kultur Dokumente
0 INTRODUCTION
In general, the programmer's job is to convert problem solutions into instructions for
the computer. That is, the programmer prepares the instructions of a computer program and
runs those instructions on the computer, tests the program to see if it is working properly, and
makes corrections to the program. The programmer also writes a report on the program. These
activities are all done for the purpose of helping a user fill a need, such as paying employees,
billing customers, or admitting students to college.
A programming language is a formal language that specifies a set of instructions that
can be used to produce various kinds of output. Generally, it consist of instructions for
a computer. Besides that, programming language also can be used to create programs that
implement specific algorithms.
Design of reinforced concrete structures is an introductory design course in civil
engineering. In this course, basic elements governed by bending, shear, axial forces or
combination of them are identified and are considered as building blocks of the whole structure.
Different methods of design will be briefly described before introducing the limit states of
collapse and serviceability.
The series of European standards commonly known as “Eurocodes”, EN 1992
(Eurocode 2, in the following also listed as EC2) deals with the design of reinforced concrete
structures – buildings, bridges and other civil engineering works. EC2 allows the calculation
of action effects and of resistances of concrete structures submitted to specific actions and
contains all the prescriptions and good practices for properly detailing the reinforcement.
For this Computer Programming project (BFC 20802), we are given a task which is to
build a programmed about Civil engineering application. We need to apply all the knowledge
about Computer Programming and Reinforced Concrete Design that we learn from class to
develop a coding. We decided to produce a program which is to design the reinforcement
concrete structure. The beam is we use as a sample for calculation is continuous beam. The
calculation include beam, slab, deflection and cracking. The calculation can be made manually
to check the value and prove the result.
1
2.0 LITERATURE REVIEW
C++ is one of the most popular languages primarily utilized with system/application
software, drivers, client-server applications and embedded firmware. Classes can further
accommodate member functions to implement specific functionality. Multiple objects of a
particular class can be defined to implement the functions within the class. The main highlight
of C++ is a collection of predefined classes, which are data types that can be instantiated
multiple times. These classes can also be inherited by other new classes which take in the public
and protected functionalities by default. A few of the essential concepts within the C++
programming language include polymorphism, virtual and friend functions, templates,
namespaces and pointers. The language also facilitates declaration of user-defined classes. One
of the most attractive features of C++ is that it enables the overloading of certain operators
such as addition. C++ includes several operators such as comparison, arithmetic, bit
manipulation and logical operators.
The structure in making a program consist of 3 phase which is algorithm, flowchart and
pseudo code. Algorithms are a fundamental part of computing. Books have been written on
algorithms for such common activities as storing and ordering data. However, you may find
standard algorithms for those parts of your programs that do common activities. If you study
computing for many years you will study algorithms of frequently used processes. There are
two commonly used tools to help to document program logic (the algorithm). Generally,
flowcharts work well for small problems but Pseudocode is used for larger problems.
.
Terminal Input/Output Process
2
With flowcharting, essential steps of an algorithm are shown using the shapes above. The
flow of data between steps is indicated by arrows, or flow lines.
Flowchart Pseudocode
INTEREST = BALANCE x
RATE
WRITE NAME,
INTEREST
Stop
Note that the Pseudocode also describes the essential steps to be taken, but without the
graphical enhancements. Another example of a flowchart and the equivalent Pseudocode is
shown below.
3
Flowchart Pseudocode
Read X,Y,Z
S=X+Y+Z
A = S/3
P=XxYxZ
Write S,A,P
Stop
Concrete is a very strong and economical material that performs exceedingly well under
compression. Its weakness lies in its capability to carry tension forces and thus has its
limitations. Steel on the other hand is slightly different; it is similarly strong in both
compression and tension. Combining these two materials means engineers would be able to
work with a composite material that is capable of carrying both tension and compression forces
(Basis of Structural Design, CEN, November 29, 2001).
In euro code 2 we can design such as beam, beam into 6 which is cantilever, simply supported,
overhanging, continuous, fixed ended and other else. Slab also can be design using it (euro
code).
4
In this project we choose continuous beam as a material to done this project related with
C++. (Moskow, 1969) stated that continuous beam is a statically indeterminate multi span
beam on hinged support. The end spans may be cantilever, may be freely supported or fixed
supported. At least one of the supports of a continuous beam must be able to develop a reaction
along the beam axis. An example of a continuous beam is presented in Fig. 1a. The supports
are numbered from left to right 1, 2, 3 and 4. The moment of inertia remains constant within
the limits of each span, but varies from one span to another.
The slab provides a horizontal surface and is usually supported by columns, beams or
walls. Slabs can be categorized into two main types: one-way slabs and two-way slabs. One-
way slab is the most basic and common type of slab. One-way slabs are supported by two
opposite sides and bending occurs in one direction only. Two-way slabs are supported on four
sides and bending occurs in two directions. One-way slabs are designed as rectangular beams
placed side by side Reinforced concrete slabs are used in floors, roofs and walls of buildings
and as the decks of bridges. The floor system of a structure can take many forms such as in situ
solid slabs, ribbed slabs or precast units. Slabs may span in one direction or in two directions
and they may be supported on monolithic concrete beams, steel beams, walls or directly by the
structure's columns.
5
3.0 METHODOLOGY
The process in completing this programmed is quite complex as there a lots of
works need to be done. The first step on making this program start with the making of
flowchart. In this section, we discussed a command need to be put on our coding by summarize
the flow of coding by using C++ symbol. The flowchart must follow the correct steps in solving
the design calculation for reinforced design. We use Eurocode Reinforced Design book 2 as a
reference to recheck whether the calculation, values or flow of works is correctly written. Next
step is to convert the flowchart into a pseudocode. Pseudocode is really important as it will
show us with more detail on what term and command need to be used during the coding. After
that, we use the finished pseudocode to write the coding to for a programmed based on the task
give.
START
Insert value
- Permanent ,Gk
- Variable, Qk
- Characteristics strength of concrete, fck
- Characteristics of steel, fyk
- Unit weight of concrete = 25Kn/m3
- Nominal Concrete cover = Cnom
- Diameter bar (assume) = ø bar
6
1
Calculate Slab
Thickness
h = L/26
Insert Value
Gk = 5.38 KN/m2
Qk = 3.00
KN/m2
Calculate Moment
M = Nd (L2)/8
Calculate value of K,
K= M/ bd2fck
7
2
No
K<K Compression
bal reinforcement
required
Yes
Compression
reinforcement not
required
Calculate
Z = [ 0.5 + √(0.25 − 𝐾/1.134) ]
Z = 0.96d ≤ 0.95d
No
0.96d
Use 0.96d
≤0.95d
YES
Use 0.95d
Calculate
As= M / (0.87 fyk Z)
8
3
Area of steel
required, As req
Checking Shear
Ved = nL /2
Vrdc = [0.12K (100p1fck)1/3] bd
Calculate value
K = 1 + (200/d)1/2
P1= Asp / bd
Calculate value
Vrdc = [0.12K (100p1fck)1/3] bd
No
Vrdc>
Ved Change Size of
Slab
9
4
Calculate deflection
P = As req / bd
Po = (fck)1/2 x 10-3
No
YES
Calculate
𝑝0 𝑝0
l/d = K[ 11 +1.5√𝑓𝑐𝑘 𝑝
+ 3.2√𝑓𝑐𝑘( 𝑝 − 1)3/2]
Calculate modification
- Span less than 7m = 1
- Steel area provided = As prov/ As req
Calculate
(l/d) allowable and (l/d) actual
10
5
No
(l/d) actual < Change size
(l/d) allowable
YES
Check cracking
h < 200mm
S max, slab = 3h ≤
400mm
No
h<200m Use 200mm
m
Yes
Use h
3h<400m No Fail
m
Ye
END
11
3.1.2 FLOWCHART FOR SLAB CALULATION
START
Action on slab
Slab selfweight = Slab Thickness * Concrete
Weight
Finishes, Ceiling = Finishes + Ceiling
Beam selfweight = Beam breadth * (beam
height -thickness slab) * concrete weight
Brickwall = Brickwall height * Brickwall weight
12
1 2 3
Gk = Gk slab ½ + Gk slab
3 + brickwall + beam
selfweight
Action on beam
Qk = Qk slab ½ + Qk slab
B/1-3
3
Design Action =
(1.35*Gk) + (1.5*Qk)
Yes
STOP
13
3.2 PSUEDOCODE
3.2.1 PSUEDOCODE FOR SLAB DESIGN (SIMPLY SUPPORTED ONE WAY SLAB)
Start
1. Slab Thickness
2. Refer table 5.8 from Eurocode Reinforced Design
3. Obtain value of minimum thickness for fire resistance
4. Read effective span (L)”
𝐿
5. Calculate estimate thickness considering deflection control (h) = 26
14
30. Read Wd and effective span (L)
𝑊𝑑𝐿
31. Calculate shear force (V) = 2
15
59. Print Z value
60. Read M, fyk and Z
𝑀𝑥106
61. Calculate Area of compression (AS) = 0.87𝑓𝑦𝑘
75. Shear
76. Design shear resistance
77. Read ρ1, fck, b, d, and As
200 1/2
78. Calculate k value = 1 + ( )
𝑑
16
89. Case 1: VRd,c > Vmin
90. Print ok!
91. Case2: VRd,c < Vmin
92. Print Failed
93. Deflection
94. Calculate percentage of required tension reinforcement (ρ)
95. Read As, b and d
𝐴𝑠
96. Calculate ρ value = (𝑏𝑑)
17
121. Calculate modification factor for steel area provided
122. Read Asprov and Asreq
𝐴𝑠𝑝𝑟𝑜𝑣
123. Calculate Modification factor for steel area = ( 𝐴𝑠𝑟𝑒𝑞 )
139. If
𝒍 𝒍
140. Case 1: (𝒅)actual < (𝒅)allowable
18
148. Calculate Smax,slab value = 3h
149. Print Smax,slab value
150. Compare Smax,slab with 400mm (fixed for principle
reinforced)
151. Compare Smax,slab with link spacing for main bar
152. If
153. Case 1: link spacing for main bar < Smax,slab
154. Print ok!
155. Case 2: link spacing for main bar > Smax,slab
156. Print failed
157. Case 2 Secondary bar
158. Read h
159. Calculate Smax,slab value = 3.5h
160. Print Smax,slab value
161. Compare Smax,slab with 450mm (fixed for secondary
reinforced)
162. Compare Smax,slab with link spacing for main bar
163. If
164. Case 1: link spacing for main bar < Smax,slab
165. Print ok!
166. Case 2: link spacing for main bar > Smax,slab
167. Print Failed
End
19
3.2.2 PSUEDOCODE FOR CONTINOUS BEAM DESIGN
1. Start
2. Design Action act on Beam
3. Calculate Action on slab
4. Calculate Slab self-weight
5. Read thickness of slab and weight of concrete
6. Calculate Weight of concrete = thickness of slab x weight of concrete
7. Print weight of concrete
8. Calculate Distribution of action from slab
9. Read length of y, ly and length of x, lx
𝑙𝑦
10. Calculate Distribution action from slab = 𝑙𝑥
11. Print Distribution action from slab
12. Calculate Action from slab on beam
13. If
14. Case 1: Main Beam
15. Calculate WnGk
16. Refer table 3.15 for shear force coefficient value
17. Read length of beam (dprov), shear force coefficient (n ) and shortest length of slab (lx)
18. Calculate WnGk = length of beam x shear x length of slab
19. Print WnGk
20. Calculate WnQk
21. Read length of beam (dprov), Variable Action (Qk) and shortest length of slab (lx)
22. Calculate WnQk = length of beam x Variable Action,Qk x length of slab
23. Print WnQk
24. If
25. Case 2: Secondary Beam
26. Calculate WnGk
27. Refer table 3.15 for shear force coefficient value
28. Read length of beam (dprov), shear force coefficient (n ) and shortest length of slab (lx)
29. Calculate WnGk = length of beam x shear x length of slab
30. Print WnGk
31. Calculate WnQk
32. Read length of beam (dprov), Variable Action (Qk) and shortest length of slab (lx)
33. Calculate WnQk = length of beam x Variable Action,Qk x length of slab
34. Print WnQk
35. Calculate Action on Beam
36. If
37. Case 1: Main Beam
38. Calculate beam self-weight
39. Read beam breadth, beam height and thickness of slab.
40. Calculate Beam self-weight =𝑏𝑒𝑎𝑚 𝑏𝑟𝑒𝑎𝑑𝑡ℎ 𝑥 𝑏𝑒𝑎𝑚 ℎ𝑒𝑖𝑔ℎ𝑡 𝑥 𝑡ℎ𝑖𝑐𝑘𝑛𝑒𝑠𝑠 𝑜𝑓 𝑠𝑙𝑎𝑏
41. Print beam self-weight
42. If
43. Case 2: Secondary Beam
44. Read beam breadth, beam height and thickness of slab.
20
45. Calculate Beam self-weight =𝑏𝑒𝑎𝑚 𝑏𝑟𝑒𝑎𝑑𝑡ℎ 𝑥 𝑏𝑒𝑎𝑚 ℎ𝑒𝑖𝑔ℎ𝑡 𝑥 𝑡ℎ𝑖𝑐𝑘𝑛𝑒𝑠𝑠 𝑜𝑓 𝑠𝑙𝑎𝑏
46. Print beam self-weight
47. Calculate Brickwall
48. Read mass weight of brickwall and height of wall
49. Calculate brickwall = 𝑚𝑎𝑠𝑠 𝑤𝑒𝑖𝑔ℎ𝑡 𝑜𝑓 𝑏𝑟𝑖𝑐𝑘𝑤𝑎𝑙𝑙 𝑥 ℎ𝑒𝑖𝑔ℎ𝑡 𝑜𝑓 𝑤𝑎𝑙𝑙
50. Print Brickwall
51. Calculate Total Gk of beam
52. Read beam self-weight , WnGk and brickwall
53. Calculate Total Gk of beam = 𝑚𝑎𝑠𝑠 𝑤𝑒𝑖𝑔ℎ𝑡 𝑜𝑓 𝑏𝑟𝑖𝑐𝑘𝑤𝑎𝑙𝑙 𝑎𝑛𝑑 ℎ𝑒𝑖𝑔ℎ𝑡 𝑜𝑓 𝑤𝑎𝑙𝑙
54. Print Total Gk of beam
55. Total Qk of beam
56. Read slab Qk value
57. Calculate Total Qk of beam = 𝑄𝑘 𝑣𝑎𝑙𝑢𝑒 + 𝑄𝑘 𝑣𝑎𝑙𝑢𝑒
58. Print Total Gk of beam
59. Design action of beam
60. Read total Gk of beam and total Qk of beam
61. Calculate Design action of beam = 1.35 𝑥 𝑡𝑜𝑡𝑎𝑙 𝐺𝑘 𝑜𝑓 𝑏𝑒𝑎𝑚 +
1.5 𝑥 𝑡𝑜𝑡𝑎𝑙 𝑄𝑘 𝑜𝑓 𝑏𝑒𝑎𝑚
62. Print design action of beam
63. Design the Area Reinforcement Required
64. Maximum shear value (v)
65. Read design action of beam and length of beam
66. Calculate force (P) = 𝑑𝑒𝑠𝑖𝑔𝑛 𝑎𝑐𝑡𝑖𝑜𝑛 𝑜𝑓 𝑏𝑒𝑎𝑚 𝑥 𝑙𝑒𝑛𝑔𝑡ℎ 𝑜𝑓 𝑏𝑒𝑎𝑚
67. Print force (P)
68. Read force (P) design action of beam (M) and Length of beam (L)
𝑃𝐿 wl
69. Calculate maximum shear value = +
2 2
70. Print maximum shear value (V)
71. Calculate Maximum moment value (M)
72. Read design action of beam (M) , force and length of beam 2
𝑃𝐿 𝑤𝑙2
73. Calculate maximum moment value = +
4 8
74. Print maximum moment value
75. Calculate K value
76. Read maximum moment value(M), base length(b), effective depth(d)
𝑀
77. Calculate K value = 𝑏𝑑2 𝑓𝑐𝑘
78. Print K value
79. Compare K value with Kbal= 0.167 (fixed)
80. If
81. Case 1: K value > Kbal
82. Read K, Kbal, fck, b, d, fyk, d’,z
(𝐾 − 𝐾𝑏𝑎𝑙)𝑓𝑐𝑘.𝑏𝑑2
83. Calculate As’ = 0.87𝑓𝑦𝑘(𝑑−𝑑′ )
84. Print As’
𝐾𝑏𝑎𝑙.𝑓𝑐𝑘.𝑏𝑑2
85. Calculate As = + 𝐴𝑠′
0.87𝑓𝑦𝑘.𝑧
86. Print As
21
87. If
88. Case 2: K value < Kbal
89. Read fck, b, d, fyk, d’, z, M, Mbal
(𝑀−𝑀𝑏𝑎𝑙)
90. Calculate As’ = 0.87𝑓𝑦𝑘(𝑑−𝑑′ )
91. Print As’ value
0.167𝑓𝑐𝑘.𝑏𝑑2
92. Calculate As = + 𝐴𝑠′
0.87𝑓𝑦𝑘.𝑧
93. Print As value
94. Determine value of compression bar and tension bar
95. Print As’ value and As value
96. Refer table 1 from Eurocode2 Design Concrete Structure
97. Obtain value of Compression bar(As’prov)
98. Obtain value of Tension bar(As.prov)
99. End
22
4.0 ANALYSIS
#include<iostream>
#include<iomanip>
#include<cmath>
using namespace std;
int main ()
{
//specification
cout.precision(2);
cout.setf(ios::fixed);
float SLAB_THICKNESS = 0.125, //slab thickness
SPAN_SLAB = 2.8, //span slab
BEAM_BREADTH = 0.250, //beam breadth
BEAM_HEIGHT = 0.600, //beam height
FINISHES = 2, //finishes
CEILING = 2, //ceiling
WEIGHT_OF_CONCRETE = 25, //weight of concrete
BRICKWALL = 2.6, //3m height of brickwall
CHARACTERISTIC_STRENGTH_CONCRETE_fck = 25,
//characteristic strength of concrete
CHARACTERISTIC_STRENGTH_STEEL_fyk = 500,
//characteristic strength of steel and link
GK = 5.125, // characteristic permanent action
QK = 3, // characteristic variable action
SLAB_SELFWEIGHT; //slab selfweight
23
{
cout << "FAKULTI KEJURUTERAAN AWAM DAN ALAM SEKITAR"<<endl;
cout << "SARJANA MUDA KEJURUTERAAN AWAM"<<endl;
cout << "UNIVERSITI TUN HUSSEIN ONN MALAYSIA \n";
cout << setfill('*')<<setw(18)<<"JOHOR"<<setfill('*')<<setw(18)<<"\n";
cout << "COMPUTER PROGRAMMING"<<endl;
cout << "BFC20802"<<endl;
cout << "SECTION 5"<<endl;
cout << setfill('*')<<setw(18)<<"GROUP 5"<<setfill('*')<<setw(18)<<"\n";
cout << "WAN MOHD NASRUAZAM BIN WAN MOHD NAJEP
DF160003\n";
cout << "MUHAMMAD IRFAN SYAFRI BIN SAIFULLIZAN DF160005\n";
cout << "AHMAD FARRIZ BIN SHAHIDAN DF160008\n";
cout << "AHMAD MAHYUDDIN BIN MOHAMED DF160003\n";
cout << "RISKA MUSTAKIM BIN MARZUKI AF160260\n";
cout << setfill('-')<<setw(80)<< "\n";
cout << "DESIGN OF A CONTINUOUS RECTANGULAR BEAM\n";
cout << setfill('-')<<setw(80)<< "\n";
//Action on slab
cout << "ACTION ON SLAB\n";
SLAB_SELFWEIGHT = SLAB_THICKNESS*WEIGHT_OF_CONCRETE;
cout << "\nSLAB SELFWEIGHT = " << SLAB_SELFWEIGHT << " kN/m2\n";
cout << "GK = " << GK << " kN/m2\n";
cout << "QK = " << QK << " kN/m2\n";
cout << setfill('-')<<setw(80)<< "\n";
24
W2GKSB, //dead load from slab 2 on secondary beam
W2QKSB, //imposed load from slab 2 on secondary beam
W1GKMB, //dead load from slab 1 on main beam
W1QKMB, //imposed load from slab 1 on smain beam
W2GKMB, //dead load from slab 2 on main beam
W2QKMB, //imposed load from slab 2 on main beam
W3GKMB, //dead load from slab 3 on main beam
W3QKMB; //imposed load from slab 3 on main beam
25
cout << "\nBEAM SELFWEIGHT = " << BEAM_SELFWEIGHT << " kN/m\n";
BRICKWALL = BRICKWALL*3;
cout << "BRICKWALL = " << BRICKWALL << " kN/m\n";
cout << setfill('-')<<setw(80)<< "\n";
26
W3GKMB = BVX3*GK*SPAN_SLAB;
W3QKMB = BVX3*QK*SPAN_SLAB;
cout << "\nW3GKMB = " << W3GKMB << " kN/m\n";
cout << "W3QKMB = " << W3QKMB << " kN/m\n";
cout << setfill('-')<<setw(80)<< "\n";
27
MAX_MOMENT =
(ACTION_FROM_SECONDARY_BEAM_TO_MAIN_BEAM*SPAN_MAIN_BEAM/4)+(
DESIGN_ACTION_ON_MAIN_BEAM*pow(SPAN_MAIN_BEAM,2)/8);
cout << "VALUE MAX MOMENT = " << MAX_MOMENT << " kNm
(Mdesign)\n";
cout << setfill('-')<<setw(80)<< "\n";
// Main reinforcement
float K, //redistribution
d = 0.410, //effective depth tension
d2 = 0.050, //effecticve depth compression
Kbal = 0.167, //kbal
d2_OVER_x, //d'/x
x = 0.45*d, //x
z = 0.82*d, //z
As2, //Area of compression steel
As, //Area of tension steel
AS_REQ_COMPRESSION, //Area of compression steel required
AS_REQ_TENSION; //Area of tension steel required
28
As =
(Kbal*CHARACTERISTIC_STRENGTH_CONCRETE_fck*1000*1000*BEAM_BREADT
H*pow(d,2)/(0.87*CHARACTERISTIC_STRENGTH_STEEL_fyk*z))+As2;
cout << "AREA OF TENSION STEEL = " << As << " mm2\n\n";
cout << setfill('-')<<setw(80)<< "\n";
29
4.2 SLAB (ONE WAY)
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main ()
{
//specification
cout.precision(2);
cout.setf(ios::fixed);
float Ly = 7.500, //span slab
L = 4.25, //effective Span
GK_EX_SELFWEIGHT = 1.0, //Permanent load (excluding selfweight)
QK = 3.0, //Variable load
fck = 30, //Characteristic strength of concrete
fyk = 500, //Characteristic strength of steel
UNIT_WEIGHT_OF_CONCRETE = 25, //Unit weight of concrete
W = 26, //Unit weight of reinforces concrete
Diabar = 12, //Diameter bar
H; //thickness
30
cout << "WAN MOHD NASRUAZAM BIN WAN MOHD NAJEP
DF160003\n";
cout << "MUHAMMAD IRFAN SYAFRI BIN SAIFULLIZAN DF160005\n";
cout << "AHMAD FARRIZ BIN SHAHIDAN DF160008\n";
cout << "AHMAD MAHYUDDIN BIN MOHAMED DF160003\n";
cout << "RISKA MUSTAKIM BIN MARZUKI AF160260\n";
cout << setfill('-')<<setw(100)<< "\n";
cout << "DESIGN OF SIMPLY SUPPORTED TWO-WAY SLAB\n";
cout << setfill('-')<<setw(100)<< "\n";
cout << "SLAB THICKNESS\n";
cout << "\nMINIMUM THICKNESS FOR FIRE RESISTANCE = 12 mm\n";
cout << "\nESTIMATED THICKNESS CONSIDERING DEFLECTION
CONTROL";
H = L*1000/W;
cout << "\nH = "<<H<<" mm";
cout << "\nUse H = 175 mm\n";
cout << setfill('-')<<setw(100)<< "\n";
31
cout << "Use Cnom = 30 mm\n";
cout << setfill('-')<<setw(100)<< "\n";
cout<<"ACTIONS\n";
SLAB_SELFWEIGHT = H_DESIGN*UNIT_WEIGHT_OF_CONCRETE;
cout<<"\nSLAB SELFWEIGHT = "<<SLAB_SELFWEIGHT<<" kN/m2\n";
GK = SLAB_SELFWEIGHT + GK_EX_SELFWEIGHT;
cout<<"\nGK = "<<GK<<" kN/m2\n";
Nd = 1.35*GK + 1.5*QK;
cout<<"\nDESIGN ACTION, nd = "<<Nd<<" kN/m2";
Wd = Nd*1;
cout<<"\nCONSIDER 1m WIDTH, wd = " << Wd << " kN/m\n";
MAX_SHEAR = (Wd*L)/2;
cout<<"\nMAX SHEAR = " << MAX_SHEAR << " kN/m\n";
MAX_MOMENT = (Wd*pow(L,2))/8;
cout<<"MAX MOMENT = " << MAX_MOMENT << " kN/m/m\n";
cout << setfill('-')<<setw(100)<< "\n";
//main reinforcement
float d, //effective depth
Cnom_USE = 30,
z, //
32
As, //As,req
Asmin, //
Asmax, //
K, //redistribution
b = 1000, //
fctm = 2.9, //
n = 11.76, //shear force
Ac;
cout<<"MAIN REINFORCEMENT\n";
d = (H_DESIGN*1000) - Cnom_USE - 0.5*Diabar;
cout<<"\nEFFECTIVE DEPTH = " << d << " mm\n";
K = MAX_MOMENT*pow(10,6)/(b*pow(d,2)*fck);
cout << "\nK = "<<K;
cout<<" < Kbal = 0.167";
cout<<" ----- (Compression reinforcement is not required)";
z = (0.5 + sqrt(0.25 - K/1.134));
cout << "\nz = "<<z<<"d";
cout << " < 0.95d ----- use 0.95d\n";
As = (MAX_MOMENT*pow(10,6))/(0.87*fyk*0.95*d);
cout << "\nAREA OF STEEL MAIN BAR = " << As << " mm2/m\n\n";
cout << "MAIN BAR\n";
cout << "REFER TABLE 1 : CROSS SECTIONAL AREA OF REINFORCEMENT
(mm2)\n";
cout << "AREA OF STEEL MAIN BAR REQUIRED = 462 mm2/m < (H12 - 225,
As provided = 503 mm2/m)\n";
33
cout << "AREA OF STEEL SECONDARY BAR REQUIRED = 209 mm2/m < (H12
- 450, As provided = 251 mm2/m)\n";
Ac = b*H_DESIGN*1000;
Asmax = 0.04*Ac;
cout<<"\nAsmax ="<<Asmax << " mm2/m\n";
cout << setfill('-')<<setw(100)<< "\n";
//Shear
float Vrdc, //Design Shear Resistance
k, //
p1, //
Vmin, //
Asprov = 503,
knew = 2.0;
cout<<"SHEAR\n";
k = 1 + sqrt(200/d);
cout << "\nk = " << k << " =< 2.0";
cout.precision(4);
cout.setf(ios::fixed);
p1 = Asprov/(b*d);
cout<<"\nP1 = " << p1 << " =< 0.02\n";
//Deflection
34
float p, //Percentage of required tension reinforcement
p0, //Reference reinforcement ratio
ld, //span-effective depth
ldallow, //Allowable span-effective depth
ldact, //Actual span-effective depth
modfactor; //modification factor
cout<<"DEFLECTION";
cout.precision(4);
cout.setf(ios::fixed);
cout<<"\n\nPERCENTAGE OF REQUIRED TENSION REINFORCEMENT";
p = As/(b*d);
cout<<"\np = "<<p;
cout.precision(2);
cout.setf(ios::fixed);
cout<<"\n\np < p0 ----- Use equation (1)\n";
ld = 1.0*(11+1.5*sqrt(fck)*(p0/p)+3.2*sqrt(fck)*(pow(((p0/p)-1),1.5)));
cout<< "\nSPAN-EFFECTIVE DEPTH = "<<ld;
35
cout<<"\nSo, ldact < ldallow ----- OK!\n";
cout << setfill('-')<<setw(100)<< "\n";
//cracking
cout<<"CRACKING";
cout<<"\nh = 175mm < 200mm ----- OK!";
cout<<"\n\nMAIN BAR";
cout<<"\nSmax,slabs = 3h =< 400mm = 400mm";
cout<<"\nMAX. BAR SPACING = 225mm < Smax,slabs ----- OK!";
cout<<"\n\nSECONDARY BAR";
cout<<"\nSmax,slabs = 3.5h =< 450mm = 450mm";
cout<<"\nMAX. BAR SPACING = 450mm < Smax,slabs ----- OK!\n";
cout << setfill('-')<<setw(100)<< "\n";
system ("PAUSE");
return 0;
}
36
4.3 PROGRAM
37
38
4.3.2 ONE WAY SLAB CALCULATION PROGRAMMED
39
40
5.0 CONCLUSION
From the coding that we had built, we do not use the input function ‘cin’ because our
coding is only used to build a programmed based on our project respective design calculation
only. This mean that the scope of our project is not solely on making a programmed for
calculating design action in Reinforced Design which is related by cases but this programmed
is for one time calculation only. To justify the values used in design formula, we use the
function of command 'float'. Float is a shortened term for "floating point." By definition, it's a
fundamental data type built into the compiler that's used to define numeric values with floating
decimal points. The data required from formula is keep in in this section of coding. Then, the
function of "cout" is used to display the output of the design calculation. The ‘cout’ object in
C++ is an object of class ostream. It is used to display the output to the standard output device.
After finished the coding and program, both calculation from the Reinforced Concrete
Design To Eurocode 2 book and C++ program is okay. But there is some difference between
these two calculations for some value. As example, for the width and depth value in the book
we should round-off the value for the safety factor but different with the C++ program which
is the actual value of width and depth used in the calculation. From our design calculation of
slab, we do not use the actual value of depth which is 163mm but we increase the value to 175
mm for safety reason but in c++, we used the actual value as a factor in formula.
As for the overall project, we can conclude that the objective of this project is achieved
as we managed to apply the knowledge of c++ in making a programed which related to the
design calculation in Reinforced Concrete Design. This include the usage of flowchart,
pseudocode, C++ language, coding and a lot more. As for the programmed, the final calculation
shown the correct result indicate that the program’s coding is correctly based on our desired
design’s example.
41
6.0 APPENDIX
Members Present:
1. Wan Mohd Nasruazam Bin Wan Mohd Najep (Chairperson)
2. Ahmad Farriz Bin Shahidan (Secretary)
3. Muhammad Irfan Syafri Bin Saifullizan
4. Ahmad Mahyuddin Bin Mohamed
5. Riska Mustakim Bin Marzuki
Proceedings:-
NO SUBJECT ACTION FEEDBACK
BY
1.0 Chairperson address. Wan - A motion to elect Farriz was made by
1.1 Members were introduced in this Wan and seconded by Irfan.
meeting. - Farriz was confirmed as the Secretary.
1.2 Farriz was nominated as
Secretary.
2.0 Discussion All - Therefore, we should finish this
2.1 - Find a question about design to propose to the lecturer.
designing structure of beam
and slab.
- Start solving the problem and
2.2 design the structure
manually.
42
4.0 Closing Wan
4.1 Announcement, Next meeting
will be held on 26th April 2018,
3pm to 5:30pm, at Library.
___________________________ _________________________
(Ahmad Farriz Bin Shahidan) (Wan Mohd Nasruazam Bin Wan Mohd Najep)
43
MINUTE OF MEETING 2/2018
COMPUTER PROGRAMMING PROJECT
FACULTY OF CIVIL & ENVIRONMENTAL ENGINEERING
Members Present:
1. Wan Mohd Nasruazam Bin Wan Mohd Najep (Chairperson)
2. Ahmad Farriz Bin Shahidan (Secretary)
3. Muhammad Irfan Syafri Bin Saifullizan
4. Ahmad Mahyuddin Bin Mohamed
5. Riska Mustakim Bin Marzuki
Proceedings:-
NO SUBJECT ACTION FEEDBACK
BY
1.0 Approval of Minutes Wan and - Propose the design to the lecturer.
The minutes from last meeting 23rd Farriz - Receive comment and instruction
April 2018 was read. about the project
2.0 Separate work by part to the group Wan - The selection of work approved by
members each of group members
___________________________ _________________________
(Ahmad Farriz Bin Shahidan) (Wan Mohd Nasruazam Bin Wan Mohd Najep)
44
MINUTE OF MEETING 3/2018
COMPUTER PROGRAMMING PROJECT
FACULTY OF CIVIL & ENVIRONMENTAL ENGINEERING
Members Present:
1. Wan Mohd Nasruazam Bin Wan Mohd Najep (Chairperson)
2. Ahmad Farriz Bin Shahidan (Secretary)
3. Muhammad Irfan Syafri Bin Saifullizan
4. Ahmad Mahyuddin Bin Mohamed
5. Riska Mustakim Bin Marzuki
Proceedings:-
NO SUBJECT ACTION FEEDBACK
BY
1.0 Approval of Minutes All Every group members update their
The minutes from last meeting 29th work part so we can determine the
April 2018 was read. problem and can solve together.
3.0 Study the design. Mustakim - Analyze of the the structure
3.1 Build the flow chart and pseudo as and 1) Continuous Beam
flow of designing beam and slab Mahyuddin 2) Simply Supported one-way
work. slab
4.0 Closing Wan
Announcement, Next meeting will
be held on 21th May 2018, 9am to
11am, at Library.
___________________________ _________________________
(Ahmad Farriz Bin Shahidan) (Wan Mohd Nasruazam Bin Wan Mohd Najep)
45
MINUTE OF MEETING 4/2018
COMPUTER PROGRAMMING PROJECT
FACULTY OF CIVIL & ENVIRONMENTAL ENGINEERING
Members Present:
1. Wan Mohd Nasruazam Bin Wan Mohd Najep (Chairperson)
2. Ahmad Farriz Bin Shahidan (Secretary)
3. Muhammad Irfan Syafri Bin Saifullizan
4. Ahmad Mahyuddin Bin Mohamed
5. Riska Mustakim Bin Marzuki
Proceedings:-
NO SUBJECT ACTION FEEDBACK
BY
1.0 Approval of Minutes Wan Vote: Motion carried
The minutes from last meeting Resolved: Minutes for the meeting on
12th May 2018 was read. 12th April 2018 approved as read
without modification.
46
3.0 It was noted there will be a Farriz a) Cover Page
presentation for our project. b) Introduction
c) Description of how’s the program
work (shows how the variables, process
involve, user manual and etc)
d) Conclusion
e) Appendices (Pictures / Minutes of
Meeting/ Proof of Discussion/ Raw
Data)
___________________________ _________________________
(Ahmad Farriz Bin Shahidan) (Wan Mohd Nasruazam Bin Wan Mohd Najep)
47
MINUTE OF MEETING 5/2018
COMPUTER PROGRAMMING PROJECT
FACULTY OF CIVIL & ENVIRONMENTAL ENGINEERING
Members Present:
1. Wan Mohd Nasruazam Bin Wan Mohd Najep (Chairperson)
2. Ahmad Farriz Bin Shahidan (Secretary)
3. Muhammad Irfan Syafri Bin Saifullizan
4. Ahmad Mahyuddin Bin Mohamed
5. Riska Mustakim Bin Marzuki
Proceedings:-
NO SUBJECT ACTION FEEDBACK
BY
1.0 Rearrange all the information in a All
proper sequence and into proper parts.
Check and correct grammatical error for
1.1 the whole report.
Check and correct the format and the
1.2 layout of the report.
Final review the whole report before
1.3 hand in the report to lecturer.
2.0 Closing – Ready for presentation Wan
___________________________ _________________________
(Ahmad Farriz Bin Shahidan) (Wan Mohd Nasruazam Bin Wan Mohd Najep)
48