Código em MATLAB 4
Código em MATLAB 4
cases = [32, 0.032, 45, 40; 32, 0.032, 35, 30; 50, 0.050, 45, 39; 50, 0.050, 35, 29; 80, 0.080,
45, 37; 80, 0.080, 35, 27; 94.5, 0.095, 45, 35; 94.5, 0.095, 35, 25]; % Cases: [As (cm^2), rho (%),
d' (cm), c1 (cm)]
alpha_r_standard = [27, 241, 53, 45, 195, 212, 165, 845; 285, 225, 39, 29, 235, 217, 186, 56;
178, 12, 19, 125, 185, 121, 13, 185; 115, 0735, 1148, 075, 1215, 076, 09, 096; 081, 0515, 08,
0511, 0861, 0525, 0675, 062]; % Thermal diffusivity ratio values for standard fire
alpha_r_parametric = [162, 115, 153, 112, 192, 21, 162, 8; 88, 58, 8, 54, 235, 215, 187, 58;
196, 201, 178, 178, 21, 25, 152, 208; 1067, 1096, 1052, 1085, 83, 104, 59, 1185; 717, 732, 709,
725, 65, 745, 515, 81]; % Thermal diffusivity ratio values for parametric fire
for t = 1:length(exposure_times)
for c = 1:length(cases)
for r = 1:length(load_ratios)
[reliability_index_std, probability_of_failure_std] =
monte_carlo_simulation(num_simulations, exposure_times(t), cases(c,:), load_ratios(r),
'standard', alpha_r_standard(t, c), compartment, L, gamma_g, gamma_q);
reliability_indices(t, c, r, 1) = reliability_index_std;
probabilities_of_failure(t, c, r, 1) = probability_of_failure_std;
[reliability_index_param, probability_of_failure_param] =
monte_carlo_simulation(num_simulations, exposure_times(t), cases(c,:), load_ratios(r),
'parametric', alpha_r_parametric(t, c), compartment, L, gamma_g, gamma_q);
reliability_indices(t, c, r, 2) = reliability_index_param;
probabilities_of_failure(t, c, r, 2) = probability_of_failure_param;
end
end
end
% Plot results
plotthe results
end
failure_count = 0;
M_Rd = [156.4; 152.4; 239.4; 233.2; 377.1; 367.4; 435.3; 424.2]; % Design resistant moments
(M_Rd) for each case (kNm)
for i = 1:num_simulations
b_Tc = b - 2 * x500;
fyTr = fy * r;
gX = MnT - MS;
if gX <= 0
failure_count = failure_count + 1;
end
end
reliability_index = -norminv(probability_of_failure);
end
t = exposure_time / 60;
if strcmp(fire_type, 'standard')
else
time_temperature = [20, 821; 30, 840; 60, 639; 90, 333; 100, 224; 120, 20];
end
% Calculate the temperature of the steel reinforcement (Tr) andconcrete (Tc) using
Wickstrom's model
s = case_params(3); % Distance from the steel bar axis to the concrete face (d')
nw = 1 - 0.0616 * t^(-0.88);
Tc = Tg;
end
% Plot reliability indices and probabilities of failure for each case and load ratio
for c = 1:length(cases)
for r = 1:length(load_ratios)
fire_type = 'Standard';
if f == 2
fire_type = 'Parametric';
end
% Plot reliability indices for all load ratios and fire types in one graph
figure;
hold on;
for r = 1:length(load_ratios)
if f == 1
fire_type = 'Standard';
line_style = '-';
else
fire_type = 'Parametric';
line_style = '--';
end
end
end
ylabel('Reliability Index');
legend('show');
% Plot probabilities of failure for all load ratios and fire types in one graph
figure;
hold on;
for r = 1:length(load_ratios)
for f = 1:2 % Fire types
if f == 1
fire_type = 'Standard';
line_style = '-';
else
fire_type = 'Parametric';
line_style = '--';
end
end
end
ylabel('Probability of Failure');
legend('show');
end
end
end
end