thicknessevolution

PURPOSE ^

THICKNESSEVOLUTION - compute the new thickness of a model after ∆t

SYNOPSIS ^

function dhdt=thicknessevolution(md)

DESCRIPTION ^

THICKNESSEVOLUTION - compute the new thickness of a model after ∆t

   This routine compute the new thickness of a model after a time step
   according to the following formula:
   dh/dt=div(Hu)+Ms-Mb

   Usage:
      dhdt=thicknessevolution(md)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function dhdt=thicknessevolution(md)
0002 %THICKNESSEVOLUTION - compute the new thickness of a model after ∆t
0003 %
0004 %   This routine compute the new thickness of a model after a time step
0005 %   according to the following formula:
0006 %   dh/dt=div(Hu)+Ms-Mb
0007 %
0008 %   Usage:
0009 %      dhdt=thicknessevolution(md)
0010 
0011 if (length(md.vx)~=md.numberofgrids)|(length(md.vy)~=md.numberofgrids)
0012     error('thicknessevolution error message: velocity empty')
0013 end
0014 
0015 alpha=zeros(md.numberofelements,3);
0016 beta=zeros(md.numberofelements,3);
0017 
0018 for n=1:md.numberofelements
0019     X=inv([md.x(md.elements(n,:)) md.y(md.elements(n,:)) ones(3,1)]);
0020     alpha(n,:)=X(1,:);
0021     beta(n,:)=X(2,:);
0022 end
0023 
0024 summation=[1;1;1];
0025 dHu=(md.vx(md.elements).*md.thickness(md.elements).*alpha)*summation;
0026 dHv=(md.vy(md.elements).*md.thickness(md.elements).*beta)*summation;
0027 
0028 dHu=averaging(md,dHu,0);
0029 dHv=averaging(md,dHv,0);
0030 
0031 dhdt=dHu+dHv+md.accumulation-md.melting;

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