Changeset 1314
- Timestamp:
- 07/14/09 14:57:42 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/classes/public/basalstress.m
r1 r1314 1 function [sx,sy,smag]=basalstress(md) 2 %BASALSTRESS - evaluates the basal stress 3 % 4 % The basal stress is computed according to the following formula: 5 % sigma=drag^2*Neff^r*vel^s 6 % where: 7 % Neff is the effective pressure (Neff=rho_ice*g*thickness+rho_water*g*bed), 8 % r=q/p 9 % s=1/p 10 % p and q being friction coefficients found in the literature (Paterson). 1 function [bx by b]=basalstress(md,options_structure,width,i,type); 2 %BASALSTRESS - compute basal stress from basal drag and geometric information. 11 3 % 12 4 % Usage: 13 % [Fx,Fy,Fmag]=basalstress(md) 5 % basalstress(md,options_structure,width,i,type); 6 % 7 % See also: plot_basaldrag 14 8 15 %Compute effective pressure 16 Neff=md.rho_ice*md.g*md.thickness+md.rho_water*md.g*md.bed; 17 Neff(find(Neff<0))=0.1; 18 r=md.q./md.p; 19 s=1./md.p; 20 dragel=(md.drag(md.elements(:,1))+md.drag(md.elements(:,2))+md.drag(md.elements(:,3)))/3; 21 Neffel=(Neff(md.elements(:,1))+Neff(md.elements(:,2))+Neff(md.elements(:,3)))/3; 22 velel=(md.vel(md.elements(:,1))+md.vel(md.elements(:,2))+md.vel(md.elements(:,3)))/3/md.yts; 23 vxel=(md.vx(md.elements(:,1))+md.vx(md.elements(:,2))+md.vx(md.elements(:,3)))/3/md.yts; 24 vyel=(md.vy(md.elements(:,1))+md.vy(md.elements(:,2))+md.vy(md.elements(:,3)))/3/md.yts; 9 %check layer 10 if strcmpi(md.type,'3d') 11 if options_structure.layer~=1, 12 disp('plot_basaldrag warning: basal drag is displayed in the lower layer') 13 options_structure.layer=1; 14 end 15 end 25 16 26 sx=dragel.^2.*Neffel.^r.*velel.^(s-1).*vxel; 27 sy=dragel.^2.*Neffel.^r.*velel.^(s-1).*vyel; 28 smag=sqrt(sx.^2+sy.^2); 17 %compute exponents 18 s=averaging(md,1./md.p,0); 19 r=averaging(md,md.p./md.q,0); 20 21 %compute horizontal velocity 22 ub=sqrt(md.vx.^2+md.vy.^2)/md.yts; 23 ubx=md.vx/md.yts; 24 uby=md.vy/md.yts; 25 26 %compute basal drag 27 bx=(md.g*(md.rho_ice*md.thickness+md.rho_water*md.bed)).^r.*(md.drag).^2.*ubx.^s; 28 by=(md.g*(md.rho_ice*md.thickness+md.rho_water*md.bed)).^r.*(md.drag).^2.*uby.^s; 29 b=(md.g*(md.rho_ice*md.thickness+md.rho_water*md.bed)).^r.*(md.drag).^2.*ub.^s;
Note:
See TracChangeset
for help on using the changeset viewer.