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

Last change on this file since 9691 was 9691, checked in by Mathieu Morlighem, 14 years ago

Added geometry

File size: 688 bytes
Line 
1function [velx,vely,vel]=sia(md)
2%BALVEL - computation of Shallow Ice velocities
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:
8% [velx,vely,vel]=sia(md)
9
10if md.dim~=2,
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];
19hel=md.geometry.thickness(md.elements)*summer/3;
20Bel=md.B(md.elements)*summer/3;
21
22Ael=Bel.^(-3);
23
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;
26vel=sqrt(velx.^2+vely.^2);
Note: See TracBrowser for help on using the repository browser.