Changeset 27595


Ignore:
Timestamp:
02/20/23 08:45:01 (2 years ago)
Author:
Mathieu Morlighem
Message:

CHG: better way to handle friction when coupling with N

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/mech/basalstress.m

    r24943 r27595  
    1313r=averaging(md,md.friction.q./md.friction.p,0);
    1414
    15 %compute horizontal velocity
     15%Compute effective pressure
     16switch(md.friction.coupling)
     17        case 0
     18                N = max(md.constants.g*(md.materials.rho_ice*md.geometry.thickness+md.materials.rho_water*md.geometry.base),0);
     19        case 3
     20                N = max(md.friction.effective_pressure, 0);
     21        otherwise
     22                error('not supported yet');
     23end
     24
     25%compute sliding velocity
    1626ub=sqrt(md.initialization.vx.^2+md.initialization.vy.^2)/md.constants.yts;
    1727ubx=md.initialization.vx/md.constants.yts;
     
    1929
    2030%compute basal drag (S.I.)
    21 alpha2=(max(md.constants.g*(md.materials.rho_ice*md.geometry.thickness+md.materials.rho_water*md.geometry.base),0).^r).*(md.friction.coefficient.^2).*(ub.^(s-1));
     31alpha2 = (N.^r).*(md.friction.coefficient.^2).*(ub.^(s-1));
    2232b  =  alpha2.*ub;
    2333bx = -alpha2.*ubx;
    2434by = -alpha2.*uby;
    2535
    26 clear alpha2
    27 
     36%reeeturn magnitude of only one output is requested
     37if nargout==1
     38        bx = b;
    2839end
Note: See TracChangeset for help on using the changeset viewer.