source: issm/trunk/src/m/model/sia.m@ 9733

Last change on this file since 9733 was 9733, checked in by seroussi, 14 years ago

keep building mesh

File size: 709 bytes
RevLine 
[9367]1function [velx,vely,vel]=sia(md)
2%BALVEL - computation of Shallow Ice velocities
[1]3%
4% This routine uses the model of Hutter to compute the velocities
5% of a 2d model using the surface slope
6%
7% Usage:
[9367]8% [velx,vely,vel]=sia(md)
[1]9
[9719]10if md.mesh.dimension~=2,
[1]11 error('Only 2d meshes are allowed to compute velocity balances');
12end
13
14%Get slope
15[sx,sy,s]=slope(md);
16
17%Average thickness and B over all elements.
18summer=[1;1;1];
[9733]19hel=md.geometry.thickness(md.mesh.elements)*summer/3;
20Bel=md.B(md.mesh.elements)*summer/3;
[1]21
22Ael=Bel.^(-3);
23
[9636]24velx=-2*(md.materials.rho_ice*md.constants.g)^3*s.^2.*sx.*Ael/4.*hel.^4;
25vely=-2*(md.materials.rho_ice*md.constants.g)^3*s.^2.*sy.*Ael/4.*hel.^4;
[1]26vel=sqrt(velx.^2+vely.^2);
Note: See TracBrowser for help on using the repository browser.