I need help with Monte Carlo Simulation

Let's pretend that we have some material that is used to create a beam with a coefficient Phi (this coefficient is known and varies from 0.65 to 0.95 in intervals of 0.1)
Now let's assume we want to test the beam under loading coefficients of 1.25D+1.5L.
We know that D represents dead load, which is normally distributed.
We know that L represents live load, which follows gubmel distribution (extreme value distribution).
This loading case also tells us that alpha_1 is 1.25 and alpha_2 is 1.5
This will leave us with the following equation Phi x Rn = alpha_1 x Dead + alpha_2 x Live
We are trying to figure out what the reliability of the cross section that is to be designed by solving for the variable Rn. I wanted to use Monte Carlo Simulation to help me solve this problem by simulating 100 trials (as a starting point), however I don't know how to accomplish this task. I have started with the following code below:
clear all;
clc;
%phi = [0.65 0.75 0.85 0.95];
%For simplicity, assume phi = 0.75
phi = 0.75;
%loading case parameters
alpha_1 = 1.25;
alpha_2 = 1.5;
%dead load - normal distribution
dead = randn(100,1);
%live load - gumbel distribution
live = evrnd(1,0.5,100,1);
%Equation to solve
%Phi * Rn = alpha_1 * dead + alpha_2 * live
Your guidance and help is greatly appreciated. If I need to clarify anything, please let me know and I will gladly explain.

Answers (1)

Not sure if this helps:
alpha_1 = 1.25;
alpha_2 = 1.5;
dead = randn(100000,4);
live = evrnd(1,0.5,100000,4);
Rn=@(phi)(alpha_1*dead+alpha_2*live)./phi;
phi=.65:.1:.95;
histogram(Rn(phi),1000);

1 Comment

Hmm, this part seems to be correct:
Rn=@(phi)(alpha_1*dead+alpha_2*live)./phi;
I think it will be useful for finding the results and putting it in matrixes. Will see how it goes

Sign in to comment.

Categories

Asked:

on 9 Dec 2020

Commented:

on 9 Dec 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!