balvel

PURPOSE ^

BALVEL - computation of balanced velocities

SYNOPSIS ^

function [velx,vely,vel]=balvel(md)

DESCRIPTION ^

BALVEL - computation of balanced velocities

   This routine uses the model of Hutter to compute the velocities
   of a 2d model using the surface slope

   Usage:
      [velx,vely,vel]=balvel(md)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [velx,vely,vel]=balvel(md)
0002 %BALVEL - computation of balanced velocities
0003 %
0004 %   This routine uses the model of Hutter to compute the velocities
0005 %   of a 2d model using the surface slope
0006 %
0007 %   Usage:
0008 %      [velx,vely,vel]=balvel(md)
0009 
0010 if ~strcmpi(md.type,'2d'),
0011     error('Only 2d meshes are allowed to compute velocity balances');
0012 end
0013 
0014 %Get slope
0015 [sx,sy,s]=slope(md);
0016 
0017 %Average thickness and B over all elements.
0018 summer=[1;1;1];
0019 hel=md.thickness(md.elements)*summer/3;
0020 Bel=md.B(md.elements)*summer/3;
0021 
0022 Ael=Bel.^(-3);
0023 
0024 velx=-2*(md.rho_ice*md.g)^3*s.^2.*sx.*Ael/4.*hel.^4;
0025 vely=-2*(md.rho_ice*md.g)^3*s.^2.*sy.*Ael/4.*hel.^4;
0026 vel=sqrt(velx.^2+vely.^2);

Generated on Sun 29-Mar-2009 20:22:55 by m2html © 2003