以MATLAB對給定之壩體模型進行對水流之潰堤分析
B09501067 陳澤祺
B09501014 林曾浩
B09501013 王禮恩
用於未決堤之分析
gravity=9.81;
q_in = 1.2 ; %(m^3/s)
qoutmodify = 1; %(modify to q_out)
progressbar = 1; %(enable progessbar or not)
erosion = 0;
original_dam_height = 2.1 ;
decreased_dam_height=0.000001;
z_c = 2.1; %initial dam crest elevation
b_B = 4; %initial breach width
S_d = 1;
b_B = 1;
Lambda = 100;
K = 1;
for t = 1:outputdata
heightin = volumetoheight(volumevalue,volumemap);
damheight=original_dam_height-decreased_dam_height;
greek_n=waterheight(heightin,damheight);
if t==q_in_stoptimer/time_interval
q_in=0;
end
qthistime= q_in - qout(heightin,b_B,gravity,qoutmodify,damheight);
alpha=((1/2)*(2/3)^(3/2))*(((K*(S_d^2)*gravity^(1/2)))/Lambda);
if decreased_dam_height==0
D_dam_height_decrease=0;
else
D_dam_height_decrease=alpha*(greek_n^(3/2))/decreased_dam_height;
end
if decreased_dam_height>=original_dam_height
decreased_dam_height=original_dam_height;
else
decreased_dam_height=decreased_dam_height+D_dam_height_decrease*time_interval;
end
volumevalue=volumevalue+qthistime*time_interval;
if volumevalue<0
volumevalue=0;
end