0% found this document useful (0 votes)
14 views

Código em MATLAB 1

This MATLAB code performs Monte Carlo simulations to analyze the fire resistance of reinforced concrete beams under standard and parametric fire conditions. It defines input parameters like beam geometry, material properties, fire curves, and compartment characteristics. The code then runs simulations for different exposure times, beam configurations, and load ratios. It calculates temperatures, moment capacities, and reliability indices, and outputs failure probabilities and plots of reliability versus time for each scenario.

Uploaded by

SOST HUMAP
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Código em MATLAB 1

This MATLAB code performs Monte Carlo simulations to analyze the fire resistance of reinforced concrete beams under standard and parametric fire conditions. It defines input parameters like beam geometry, material properties, fire curves, and compartment characteristics. The code then runs simulations for different exposure times, beam configurations, and load ratios. It calculates temperatures, moment capacities, and reliability indices, and outputs failure probabilities and plots of reliability versus time for each scenario.

Uploaded by

SOST HUMAP
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Código em MATLAB

function main

% Number of Monte Carlo simulations

num_simulations = 100000;

% Beam span (m)

L = 5;

% Partial safety factors for ULS

gamma_g = 1.4;

gamma_q = 1.4;

% Exposure times in minutes

exposure_times = [20, 30, 60, 90, 120];

% Cases and their corresponding parameters: [As (cm^2), rho (%), d' (cm), c1 (cm)]

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]

};

% Load ratios
load_ratios = [0.25, 0.5, 0.75];

% Thermal diffusivity ratio values for standard fire

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 parametric 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

];

% Compartment characteristics for parametric fire

compartment = struct();

compartment.floor_width = 10; % m

compartment.floor_length = 15; % m

compartment.floor_area = 150; % m^2

compartment.ceiling_area = 150; % m^2

compartment.wall_area = [60, 60, 40, 40]; % m^2 for each wall

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

compartment.thermal_inertia_walls = 1521; % J/m^2Ks^0.5

% Initialize arrays for results

reliability_indices = zeros(length(exposure_times), length(cases), length(load_ratios), 2); %


Last dimension for fire types (1: standard, 2: parametric)

probabilities_of_failure = zeros(length(exposure_times), length(cases), length(load_ratios),


2); % Last dimension for fire types

% Loop over exposure times, cases, and load ratios

for t = 1:length(exposure_times)

for c = 1:length(cases)

for r = 1:length(load_ratios)

% Perform Monte Carlo simulation for standard fire

[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;

% Perform Monte Carlo simulation for parametric fire

[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);

plot(exposure_times, squeeze(reliability_indices(:, c, r, f)));

title(['Reliability Index for Case ' num2str(c) ', Load Ratio ' num2str(load_ratios(r)) ', '
fire_type ' Fire']);

xlabel('Exposure Time (min)');

ylabel('Reliability Index');

subplot(2, 1, 2);

plot(exposure_times, squeeze(probabilities_of_failure(:, c, r, f)));

title(['Probability of Failure for Case ' num2str(c) ', Load Ratio ' num2str(load_ratios(r))
', ' fire_type ' Fire']);

xlabel('Exposure Time (min)');

ylabel('Probability of Failure');

end

end

end

end

function [reliability_index, probability_of_failure] = monte_carlo_simulation(num_simulations,


exposure_time, case_params, load_ratio, fire_type, alpha_r, compartment, L, gamma_g,
gamma_q)

% Initialize variables for Monte Carlo simulation

failure_count = 0;

% Design resistant moment (M_Rd) for each case (kNm)

M_Rd = [
156.4;

152.4;

239.4;

233.2;

377.1;

367.4;

435.3;

424.2

];

% Loop over the number of simulations

for i = 1:num_simulations

% Generate random samples for the random variables

As = normrnd(case_params(1), case_params(1) * 0.02); % Reinforcement area

fy = lognrnd(log(1.16 * 500) - 0.5 * (0.07)^2, 0.07); % Steel yield stress

d = normrnd(50, 50 * 0.004); % Beam height

fc = lognrnd(log(1.23 * 25) - 0.5 * (0.15)^2, 0.15); % Concrete strength

alpha = normrnd(0.417e-6, 0.417e-6 * 0.06); % Thermal diffusivity

b = normrnd(20, 20 * 0.004); % Beam width

d_prime = lognrnd(log(case_params(3)) - 0.5 * (0.1)^2, 0.1); % Cover

theta_R = lognrnd(log(1.10) - 0.5 * (0.1)^2, 0.1); % Uncertainty in resistance model

% Calculate the temperature of the steel reinforcement (Tr) using Wickstrom's model

[Tr, Tc] = calculate_temperatures(exposure_time, alpha * alpha_r, fire_type, case_params,


compartment);

% Calculate the position of the 500 ºC isotherm (x500)

x500 = sqrt((alpha * alpha_r * exposure_time * 60) / exp(4.5 + 480 / (0.18 * (1 - 0.0616 *


(exposure_time * 60)^(-0.88)) * Tc)));

% Calculate the effective width of the compression block as a function of concrete


temperature (b(Tc))
b_Tc = b - 2 * x500;

% Calculate the reduction factor for steel yield strength (r)

r = (720 - (Tr + 20)) / 470;

r = min(max(r, 0), 1);

% Calculate the reduced steel yield strength (fy(Tr))

fyTr = fy * r;

% Calculate the depth of the compressive stress block (a(Tc))

aTc = (As * fyTr) / (0.85 * fc * b_Tc);

% Calculate the resistance moment (Mn(T))

MnT = theta_R * As * fyTr * (d - d_prime) + (As * fyTr * (d - aTc / 2));

% Calculate the mean values of permanent and live loads

mu_LL = (8 / L^2) * M_Rd(i) / ((5 * (1 - load_ratio) / (load_ratio * gamma_g) + gamma_q /


0.2));

mu_PL = mu_LL * (5 * (1 - load_ratio) / (load_ratio));

% Calculate the solicitation moment (MS)

MPL = normrnd(mu_PL, mu_PL * 0.1); % Permanent load

MLL = gamrnd(2, 0.5 * mu_LL); % Live load

theta_S = lognrnd(0, 0.1); % Uncertainty in load model

MS = theta_S * (MPL + MLL);

% Evaluate the performance function

gX = MnT - MS;

% Check for failure

if gX <= 0
failure_count = failure_count + 1;

end

end

% Calculate the probability of failure and reliability index

probability_of_failure = failure_count / num_simulations;

reliability_index = -norminv(probability_of_failure);

end

function [Tr, Tc] = calculate_temperatures(exposure_time, alpha, fire_type, case_params,


compartment)

% Convert exposure time to hours for the Wickstrom model

t = exposure_time / 60;

if strcmp(fire_type, 'standard')

% Standard fire curve (ISO 834)

Tg = 20 + 345 * log10(8 * t + 1);

else

% Parametric fire curve

Gamma = 0.04; % Time conversion factor

t_star = t * Gamma;

Tg = 20 + 1325 * (1 - 0.324 * exp(-0.2 * t_star) - 0.204 * exp(-0.17 * t_star) - 0.472 * exp(-


0.019 * t_star));

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);

nss = 0.18 * log(alpha * t / s^2) - 0.81;

nx = ny = nss; % Assuming symmetrical heating

Tr = nw * (nx + ny - 2 * nx * ny) + nx * ny * Tg;


% For demonstration purposes, assume concrete temperature (Tc) is the same as steel
temperature (Tr)

Tc = Tr;

end

You might also like