Changeset 28062


Ignore:
Timestamp:
01/23/24 13:25:41 (14 months ago)
Author:
Mathieu Morlighem
Message:

NEW: adding vz to SIA

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/contrib/morlighem/sia.m

    r20176 r28062  
    1 function [velx,vely,vel]=sia(md)
     1function [vx, vy, vz, vel]=sia(md)
    22%SIA - computation of Shallow Ice velocities
    33%
     
    66%
    77%   Usage:
    8 %      [velx,vely,vel]=sia(md)
     8%      [vx, vy, vz, vel]=sia(md)
    99
    10 if md.mesh.dimension~=2,
    11         error('Only 2d meshes are allowed to compute velocity balances');
     10disp('Info: assuming no basal sliding and isothermal ice');
     11
     12n=3;
     13
     14rhog = (md.materials.rho_ice*md.constants.g);
     15
     16if md.mesh.dimension==2,
     17        %Get slope
     18        [sx,sy,s]=slope(md);
     19
     20        %Average thickness and B over all elements.
     21        summer=[1;1;1];
     22        hel=md.geometry.thickness(md.mesh.elements)*summer/3;
     23        Bel=md.materials.rheology_B(md.mesh.elements)*summer/3;
     24
     25        Ael=Bel.^(-3);
     26
     27        vx=-2*rhog^n*s.^(n-1).*sx.*Ael/(n+2).*hel.^(n+1);
     28        vy=-2*rhog^n*s.^(n-1).*sy.*Ael/(n+2).*hel.^(n+1);
     29        vz = zeros(size(vx));
     30else
     31
     32        [sx,sy,s]=slope(md);
     33        sx = average(md, sx, 3);
     34        sy = average(md, sy, 3);
     35        surf = sqrt(sx.^2 + sy.^2);
     36        s  = md.geometry.surface;
     37        z  = md.mesh.z;
     38        H  = md.geometry.thickness;
     39
     40        A = md.materials.rheology_B.^-3;
     41
     42        vx =-2*rhog^n*surf.^(n-1).*sx.*A/(n+1).*(H.^(n+1) - (s-z).^(n+1));
     43        vy =-2*rhog^n*surf.^(n-1).*sy.*A/(n+1).*(H.^(n+1) - (s-z).^(n+1));
     44
     45        chi = 1-(s-z)./H;
     46        vz  = -md.smb.mass_balance.*((n+2)*chi + (1-chi).^(n+2) -1)/(n+1)
    1247end
    1348
    14 %Get slope
    15 [sx,sy,s]=slope(md);
    16 
    17 %Average thickness and B over all elements.
    18 summer=[1;1;1];
    19 hel=md.geometry.thickness(md.mesh.elements)*summer/3;
    20 Bel=md.materials.rheology_B(md.mesh.elements)*summer/3;
    21 
    22 Ael=Bel.^(-3);
    23 
    24 velx=-2*(md.materials.rho_ice*md.constants.g)^3*s.^2.*sx.*Ael/4.*hel.^4;
    25 vely=-2*(md.materials.rho_ice*md.constants.g)^3*s.^2.*sy.*Ael/4.*hel.^4;
    26 vel=sqrt(velx.^2+vely.^2);
     49vel=sqrt(vx.^2+vy.^2+vz.^2);
Note: See TracChangeset for help on using the changeset viewer.