You are on page 1of 7

Syed 

Kaleem Gilani 
326957 
Assignment # 2  Advanced Modelling and Simulation  Dr. Usman Hanif 

Question 2 
 
Model single crack propagation in RC Beam
 

 
 

Statement: 
Newton–Raphson iterative solver has been used to model single crack propagation in RC‐Beam in 
MatLab. 

Matlab Code and Syntax: 
 
 
clear all
loop=1;
number = 1; %count for display
fprintf ('Table of Extension Stress, and Loads \n\n');
fprintf ('Number Extension Width Stress Compression
Tension Moment \n');
fprintf (' mm mm N/mm^2 N
N Nmm \n');
fprintf ('====== ========= ======== ======= ==========
========= =========== \n');
 
%defining variables
w=0;
E=30000; %E (Young Modulus) of concrete given in the question in
N/mm^2
fcu= 30; %compressive strength given in question statement
div=100; %Number of discretizations
b=130; %breadth of the section
Syed Kaleem Gilani 
326957 
Assignment # 2  Advanced Modelling and Simulation  Dr. Usman Hanif 
h=210; %depth of the section
hc=b/2; %equivalent elastic zone
fct=fcu/10; %assuming tensile strength to be 10% of Compressive
Strength
vct=(fct)*hc/E; %elongation of concrete at the ultimate tensile strength
vx=0.0001; %elongation of concrete assumed 0.001 as starting point
 
%For Elastic Range
 
%we know that stress= E x Strain
while vx <= vct
 
%Calculation of Steel
 
Steel_sigma= 200000*(vx/hc); %200000=E of steel given in question
%Reinforced concrete is introduced here for elastic region
if Steel_sigma > 250.46 %250.46= tensile strength of steel given in
question
Steel_sigma = 250.46;
end
Steel_Forces = Steel_sigma * 258; %yield strength of steel
 
%Steel
VTension = vx;
SigmaT = (E * VTension)/hc;
 
%Finding Neutral Axis
 
f=@(y1) 1/2*b*y1*SigmaT-1/2*b*(h-y1)*((h-y1)/y1)*SigmaT + Steel_Forces;
y1 = fzero(f, [40,210]); %fzero command finds a point where the function
changes sign
y2 = h-y1; %reversing the direction
 
%Display Window
Pcomp = 1/2*b*(h-y1)*((h-y1)/y1)*SigmaT;
Ptension = 1/2*b*y1*SigmaT + Steel_Forces;
stress = E*(vx/hc);
moment = ((y1*2/3)+50)*Ptension - (y2*1/3)*Pcomp + Steel_Forces*(h-37.5);
 
%Tension Positive
 
out = [number,vx,w,stress,Pcomp,Ptension,moment];
fprintf (' %4d %11.4f %11.4f %11.4f %11.4f %11.4f %13.4f \n', out);
number = number + 1;
 
%Display Window
 
Moment(loop) = moment;
phi(loop) = atan(vx/y1); %atan command calculates tan inverse
loop = loop + 1;
 
vx = vx + 0.0001;
end
Elastic_moment = moment;
Syed Kaleem Gilani 
326957 
Assignment # 2  Advanced Modelling and Simulation  Dr. Usman Hanif 
 
%Inelastic Region Calculations
 
%Finding Neutral Axis
C1 = 3; %Value taken from research paper quoted in annexure
C2 = 6.93; %Value taken from research paper quoted in annexure
Gf = (43.3 + 1.13*fcu)/1000; %Gf in N/m and fcu in MPa
wc = 5.14*(Gf/3.127); %wc in mm
p3 = ((1+C1^3) / wc);
p2 = -C2/wc;
p1 = (C1/wc)^3;
while vx > vct
 
%Steel Calculation
Steel_Sigma = 200000*(vx/hc); %Reinforced concrete is introduced here for
elastic region
if Steel_Sigma > 250.46
Steel_Sigma = 250.46;
end
Steel_Forces = Steel_Sigma*258;
 
%Steel
vdiff = vx - vct;
incre = vdiff/100;
 
%Fictitious Curve Calculation
vparabolic = vct:incre:vx;
y=1;
for i = vparabolic
w = i - vct;
Stress(y) = fct*((1+(C1*(w/wc))^3)*exp(-C2*(w/wc))-(w/wc)*(1+C1^3)*exp(-
C2));
y = y+1;
end
 
%Compression Curve Calculation
 
%chu equation for compression curve
e0 = (7.1*fcu + 1680)*10^(-6);
Beta = 1/(1-(fcu/(E*e0)));
A = (fcu*Beta)/(hc*e0);
B = Beta - 1;
C = (1/(hc*e0));
fc = @(a) (A*a)./(B+(C*a).^Beta); %Chu Equation
 
%It is the height of the sample from bottomthrough which parabola will
%occur = y1 - ((vct/vx)*y1)
 
z = @(y1) sum(stress)*((y1-((vct/vx)*y1))/100*b...
+ (fct*((vct/vx)*y1)*b*1/2) + Steel_Forces...
- sum (fc(0:((vx * (h-y1))/(y1*100)):(vx * (h-y1)/y1)))*b*(h-y1)/100);
y1 = fzero(z,[40 210]);
y2 = h-y1;
 
%Moment in Compression
Syed Kaleem Gilani 
326957 
Assignment # 2  Advanced Modelling and Simulation  Dr. Usman Hanif 
 
Strip_Length = (h-y1):-(h-y1)/100:0;
icre = 1;
Moment_Comp = 0;
for a=0:((vx*(h-y1))/(y*100)):(vx*(h-y1)/y1)
m = fc(a);
Moment_Comp = Moment_Comp + (m*b*(h-y1)/100*(Strip_Length(incre)));
incre = incre + 1;
end
 
curvelength = y1-(vct/vx)*y1;
increment = curvelength/100;
moment_increment = 0:increment:curvelength;
moment = 0;
y=1;
for a = (stress)
moment = moment + a*b*increment*(h-(y1(vct/vx)*y1)) +
moment_increment(y);
y = y+1;
end
 
mom = moment + (fct*((vct/vx)*y1)*b*1/2) + (y2+((vct/vx)*y1)*(2/3) -
Moment_Comp + Steel_Forces*(h-37.5));
 
%Display Window
 
Pcomp = ((h-y1)*1/2*b*(((h-y1)/y1))*(vx/hc)*E);
Ptension = sum(stress)*((y1-((vct/vx)*y1)*y1)/100)*b +
(fct*((vct/vx)*y1)*b*1/2);
stress1 = fct*((1+(C1*(w/wc))^3)*exp(-C2*(w/wc)) - (w/wc)*(1+C1^3)*exp(-
C2));
out = [number,vx,w,stress1,Pcomp,Ptension,mom];
fprintf (' %4d %11.4f %11.4f %11.4f %11.4f %11.4f %13.4f \n', out);
 
number = number + 1;
Moment(loop) = mom;
phi(loop) = atan(vx/y1);
loop = loop + 1;
vx = vx + 0.0001;
end
Syed Kaleem Gilani 
326957 
Assignment # 2  Advanced Modelling and Simulation  Dr. Usman Hanif 

MATLAB Result 
 

Figure 1: MATLAB Results Table 
 
 
 
 
Extens Widt Stres Compressi Tension  Moment 
Number 
mm  mm  N/m N  N  Nmm 

1  0.000 0.000 0.046 375.71  375.71  43291 
2  0.000 0.000 0.092 751.43  751.43  86583 
3  0.000 0.000 0.138 1127.14  1127.14  129874 
4  0.000 0.000 0.184 1502.86  1502.86  173166 
5  0.000 0.000 0.230 1878.57  1878.57  216457 
6  0.000 0.000 0.276 2254.29  2254.29  259748 
7  0.000 0.000 0.323 2630.00  2630.00  303040 
8  0.000 0.000 0.369 3005.72  3005.72  346331 
9  0.000 0.000 0.415 3381.43  3381.43  389623 
1 0.001 0.000 0.461 3757.15  3757.15  432914 
1 0.001 0.000 0.507 4132.86  4132.86  476206 
1 0.001 0.000 0.553 4508.58  4508.58  519497 
1 0.001 0.000 0.600 4884.29  4884.29  562788 
1 0.001 0.000 0.646 5260.01  5260.01  606080 
1 0.001 0.000 0.692 5635.72  5635.72  649371 
1 0.001 0.000 0.738 6011.44  6011.44  692663 
1 0.001 0.000 0.784 6387.15  6387.15  735954 
1 0.001 0.000 0.830 6762.87  6762.87  779245 
1 0.001 0.000 0.876 7138.58  7138.58  822537 
2 0.002 0.000 0.923 7514.29  7514.29  865828 
2 0.002 0.000 0.969 7890.01  7890.01  909120 
2 0.00 0.000 1.015 7514.29  7514.29  952411 
Syed Kaleem Gilani 
326957 
Assignment # 2  Advanced Modelling and Simulation  Dr. Usman Hanif 
 

2 0.0023  0.000 1.061 7890.01 7890.01 995703 


2 0.0024  0.000 1.107 8265.72  8265.72  1038994 
2 0.0025  0.000 1.153 8641.44  8641.44  1082285 
2 0.0026  0.000 1.200 9017.15  9017.15  1125577 
2 0.0027  0.000 1.246 9392.87  9392.87  1168868 
2 0.0028  0.000 1.292 9768.58  9768.58  1212160 
2 0.0029  0.000 1.338 10144.30  10144.3 1255451 
3 0.0030  0.000 1.384 10520.01  10520.0 1298742 
3 0.0031  0.000 1.430 10895.73  10895.7 1342034 
3 0.0032  0.000 1.476 11271.44  11271.4 1385325 
3 0.0033  0.000 1.523 11647.16  11647.1 1428617 
3 0.0034  0.000 1.569 12022.87  12022.8 1471908 
3 0.0035  0.000 1.615 12398.59  12398.5 1515200 
3 0.0036  0.000 1.661 12774.30  12774.3 1558491 
3 0.0037  0.000 1.707 13150.02  13150.0 1601782 
3 0.0038  0.000 1.753 13525.73  13525.7 1645073 
3 0.0039  0.000 1.800 13901.45  13901.4 1688365 
4 0.0040  0.000 1.846 13901.45  13901.4 1731657 
4 0.0041  0.000 1.892 14277.16  14277.1 1774948 
4 0.0042  0.000 1.938 14652.87  14652.8 1818239 
4 0.0043  0.000 1.984 15028.59  15028.5 1861530 
4 0.0044  0.000 2.030 15404.30  15404.3 1904822 
4 0.0045  0.000 2.076 15780.02  15780.0 1948114 
4 0.0046  0.000 2.123 16155.73  16155.7 1991405 
4 0.0047  0.000 2.169 16531.45  16531.4 2034697 
4 0.0048  0.000 2.215 16907.16  16907.1 2077988 
4 0.0049  0.000 2.261 17282.88  17282.8 2121279 
5 0.0050  0.000 2.307 17658.59  17658.5 2164571 
5 0.0051  0.000 2.353 18034.31  18034.3 2207862 
5 0.0052  0.000 2.400 18034.31  18034.3 2251154 
5 0.0053  0.000 2.446 18410.02  18410.0 2294445 
5 0.0054  0.000 2.492 18785.74  18785.7 2337736 
5 0.0055  0.000 2.538 19161.45  19161.4 2381028 
5 0.0056  0.000 2.584 19537.17  19537.1 2424319 
5 0.0057  0.000 2.630 19912.88  19912.8 2467611 
5 0.0058  0.000 2.676 20288.60  20288.6 2510902 
5 0.0059  0.000 2.723 22167.17  22167.1 2554193 
6 0.0060  0.000 2.769 22542.88  22542.8 2597485 
6 0.0061  0.000 2.815 22918.60  22918.6 2640776 
6 0.0062  0.000 2.861 23294.31  23294.3 2684068 
Table 1: Excel import from MATLAB file 
Syed Kaleem Gilani 
326957 
Assignment # 2  Advanced Modelling and Simulation  Dr. Usman Hanif 
 
 
 
Moment, Nmm  Stress, N/mm2 
 

1000000 

1500000 

2000000 

2500000 

3000000 

0.0000 

0.5000 

1.0000 

1.5000 

2.0000 

2.5000 

3.0000 

3.5000 
500000 
 
 

  0.0001 
0.0001  0.0003 
0.0003  0.0005 
0.0005  0.0007 
0.0007 
0.0009 
0.0009 
0.0011 
0.0011 
0.0013 
0.0013 
0.0015 
0.0015 
0.0017 

Extension vs Stress Graph


0.0017 

Extension vs Moment
0.0019 
0.0019 
0.0021 
0.0021 
0.0023  0.0023 
Extension, mm

0.0025  0.0025 
0.0027 

Extension, mm
0.0027 
0.0029  0.0029 
0.0031  0.0031 
0.0033  0.0033 
0.0035  0.0035 
0.0037  0.0037 
0.0039  0.0039 
0.0041  0.0041 
0.0043  0.0043 
0.0045  0.0045 
0.0047  0.0047 
0.0049  0.0049 
0.0051  0.0051 
0.0053  0.0053 
0.0055  0.0055 
0.0057  0.0057 
0.0059 
0.0059 
0.0061 
0.006

The graph represents only elastic region and not the inelastic region. 

You might also like