Professional Documents
Culture Documents
function main
num_simulations = 100000;
L = 5;
gamma_g = 1.4;
gamma_q = 1.4;
% Cases and their corresponding parameters: [As (cm^2), rho (%), d' (cm), c1 (cm)]
cases = {
};
% Load ratios
load_ratios = [0.25, 0.5, 0.75];
alpha_r_standard = [
];
alpha_r_parametric = [
];
compartment = struct();
compartment.floor_width = 10; % m
compartment.floor_length = 15; % m
compartment.num_doors = 2;
compartment.door_width = 1; % m
compartment.num_windows = 12;
compartment.window_width = 15; % m
compartment.thermal_inertia_floor_ceiling = 2034; % J/m^2Ks^0.5
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
for c = 1:length(cases)
for r = 1:length(load_ratios)
for f = 1:2 % Fire types
fire_type = 'Standard';
if f == 2
fire_type = 'Parametric';
end
figure;
subplot(2, 1, 1);
title(['Reliability Index for Case ' num2str(c) ', Load Ratio ' num2str(load_ratios(r)) ', '
fire_type ' Fire']);
ylabel('Reliability Index');
subplot(2, 1, 2);
title(['Probability of Failure for Case ' num2str(c) ', Load Ratio ' num2str(load_ratios(r))
', ' fire_type ' Fire']);
ylabel('Probability of Failure');
end
end
end
end
failure_count = 0;
M_Rd = [
156.4;
152.4;
239.4;
233.2;
377.1;
367.4;
435.3;
424.2
];
for i = 1:num_simulations
% Calculate the temperature of the steel reinforcement (Tr) using Wickstrom's model
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
t_star = t * Gamma;
end
% Calculate the temperature of the steel reinforcement (Tr) 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 = Tr;
end