CDIGO PROGRAMA PARA CLCULO DE MURO DE CONTENCIN POR GRAVEDAD
Leonardo Andres Ortega Ochoa
f=imread('matlabimagen.png'); imshow(f); fprintf('Calculo de muro de contencion por gravedad\n'); fprintf('Los datos deben ser ingresados en metros,kN y grados\n'); b=input('ingrese b:'); while b<=0; fprintf('!b > cero!! \n'); b=input('ingrese b:'); end a=input('ingrese a:'); while a>b ||a==0; fprintf('!a < b!! \n'); w=input('ingrese a:'); end h=input('ingrese h:'); while h<=0; fprintf('!h > cero!! \n'); h=input('ingrese h:'); end c=input('ingrese c:'); while c>=h||c==0; fprintf('!c < h!! \n'); c=input('ingrese c:'); end q=input('ingrese q:'); while q<0; fprintf('!q >= cero!! \n'); q=input('ingrese q:'); end alfa=input('ingrese alfa:'); while alfa<0; fprintf('!alfa >= cero!! \n'); alfa=input('ingrese alfa:'); end d=input('ingrese d:'); while d>h; fprintf('!d <= a h!! \n'); d=input('ingrese d:'); end coe=input('ingrese la cohesion:'); while coe<0; fprintf('!cohesion >= cero!! \n'); coe=input('ingrese la cohesion:'); end if d==0 || d==h; pe=input('ingrese P.esp de suelo:'); while pe<=0; fprintf('!P.esp de suelo > cero!! \n'); pe=input('ingrese P.esp de suelo:'); end fi=input('ingrese fi:'); while fi<=0; fprintf('!fi > cero!! \n'); fi=input('ingrese fi:'); end ar=input('ingrese angulo de rozamiento:'); while ar<0; fprintf('!angulo de rozamiento >= cero!! \n'); ar=input('ingrese angulo de rozamiento:'); end else pe=input('ingrese P.esp de suelo:'); while pe<=0; fprintf('!P.esp de suelo > cero!! \n'); pe=input('ingrese P.esp de suelo:'); end pe2=input('ingrese P.esp de suelo sat:'); while pe2<=0; fprintf('!P.esp de suelo sat > cero!! \n'); pe2=input('ingrese P.esp de suelo sat:'); end fi=input('ingrese fi no nf:'); while fi<=0; fprintf('!fi no nf > cero!! \n'); fi=input('ingrese fi no nf:'); end fi2=input('ingrese fi nf:'); while fi2<=0; fprintf('!fi nf > cero!! \n'); fi2=input('ingrese fi nf:'); end ar=input('ingrese angulo de rozamiento no nf:'); while ar<0; fprintf('!angulo de rozamiento no nf>= cero!! \n'); ar=input('ingrese angulo de rozamiento no nf:'); end
ar2=input('ingrese angulo de rozamiento nf:');
while ar2<0; fprintf('!angulo de rozamiento nf>= cero!! \n'); ar2=input('ingrese angulo de rozamiento nf:'); end end %calculos previos bta=atand(h/((b-a)/2)); %coeficientes y empujes if pe2~=0; ka=sind(bta+fi)^2/(sind(bta)^2*sind(bta- ar)*(1+((sind(fi+ar)*sind(fi-alfa))/(sind(bta- ar)*sind(alfa+bta)))^(1/2))^2); peq=pe+(sind(bta)/sind(bta+alfa))*(2*q*cosd(alfa)/(h-d)); ea=(ka*peq*(h-d)^2)/2; eax=ea*cosd(ar+90-bta); eay=ea*sind(ar+90-bta); kp=tand(45+fi)^2; ep=kp*pe*c/2; ka2=sind(bta+fi2)^2/(sind(bta)^2*sind(bta- ar2)*(1+((sind(fi2+ar2)*sind(fi2-alfa))/(sind(bta- ar2)*sind(alfa+bta)))^(1/2))^2); peq2=pe2-9.8+(sind(bta)/sind(bta+alfa))*(2*q*cosd(alfa)/(d)); ea2=(ka2*peq2*(d)^2)/2; ea2x=ea2*cosd(ar2+90-bta); ea2y=ea2*sind(ar2+90-bta); u=9.8*d;%influencia del agua l=(((b-a)*d/(2*h))^2+d^2)^(1/2); U=l*u/2; Ux=U*cosd(90-bta); Uy=U*sind(90-bta); eatx=eax+ea2x+Ux; %volteo yea=2*h/3;yea2=d/3; xea=b-yea*(b-a)/(2*h);xea2=b-yea2*(b-a)/(2*h); Mo=eax*yea+ea2x*yea2+Ux*yea2; Mr=(((b-a)/2*h)/2)*24*(2*(b-a)/3)+a*h*24*(b/2)+(((b- a)/2*h)/2)*24*(b-2*(b-a)/3)+eay*yea+ea2y*yea2+Uy*yea2; Fsv=Mr/Mo; Fsd=(ep+24*((b-a)*h/2+a*b))/eatx; else ka=sind(bta+fi)^2/(sind(bta)^2*sind(bta- ar)*(1+((sind(fi+ar)*sind(fi-alfa))/(sind(bta- ar)*sind(alfa+bta)))^(1/2))^2); peq=pe+(sind(bta)/sind(bta+alfa))*(2*q*cosd(alfa)/(h-d)); ea=(ka*peq*(h-d)^2)/2; eax=ea*cosd(ar+90-bta); eay=ea*sind(ar+90-bta); eatx=eax; kp=tand(45+fi)^2; ep=kp*pe*c/2; yea=2*h/3; xea=b-yea*(b-a)/(2*h); Mo=eax*yea; Mr=(((b-a)/2*h)/2)*24*(2*(b-a)/3)+a*h*24*(b/2)+(((b- a)/2*h)/2)*24*(b-2*(b-a)/3)+eay*yea; Fsv=Mr/Mo; Fsd=(ep+24*((b-a)*h/2+a*b))/eatx; end fprintf('factor de seguridad de desplazamiento=:%f\n',Fsd) fprintf('factor de seguridad de volteo=:%f\n',Fsv)