基于二分类方法和安全系数方法使用comsol with matlab蒙特卡洛模拟实现边坡失效概率计算——随机变量模型
基于二分类方法和安全系数方法使用comsol with matlab蒙特卡洛模拟实现边坡失效概率计算——随机变量模型
- 模型和全部代码下载
- 随机变量模拟
- 加载comsol模型
- 蒙特卡洛模拟(分类模型)
- 蒙特卡洛模拟(安全系数模型)
- 内聚力和内摩擦角随机变量分布
- 二分类稳定性1000次运行结果
- 失效概率1000次模拟结果(分类模型)
- 安全系数回归模型
- 失效概率1000次模拟结果(安全系数模型)
模型和全部代码下载
comsol边坡模型与comsol with matlab实现边坡可靠度蒙特卡洛模拟计算失效概率代码实现
随机变量模拟
clc;clear%% statr process
% 1. 生成随机变量
%(1)内聚力和内摩擦角
% 指定原始分布的均值和标准差(原始空间)
cohesion=rf(9800,3000,1000);
friction=rf(10,2,1000);% 可视化分布
figure(1)
histogram(cohesion, 30);
hold on;
plot([mean(cohesion),mean(cohesion)],[0,30],'-r','linewidth',2);
title('Log-normal Distribution with Specified Mean and Std Dev');
xlabel('Value');
ylabel('Frequency');
hold off;
figure(2)
histogram(friction, 30);
hold on;
plot([mean(friction),mean(friction)],[0,30],'-r','linewidth',2);
title('Log-normal Distribution with Specified Mean and Std Dev');
xlabel('Value');
ylabel('Frequency');
hold off;
加载comsol模型
%% load model
model = mphload('comsol_reliability -2.mph');
蒙特卡洛模拟(分类模型)
%% 分类模型多次计算求解kk=[];
fs=[];ratio_append=[];
% hold on;
% ratio_history = [];
for i