source: issm/branches/trunk-larour-SLPS2020/src/m/mech/drivingstress.m@ 25329

Last change on this file since 25329 was 21698, checked in by jbondzio, 8 years ago

BUG: signum error in directional components of driving stress

File size: 614 bytes
Line 
1function [px,py,pmag]=drivingstress(md)
2%DRIVINGSTRESS - evaluates the driving stress
3%
4% The driving stress is computed according to the following formula:
5% driving stress= rho_ice*g*H*slope
6%
7% Usage:
8% [Fx,Fy,Fmag]=drivingstress(md)
9
10%Get slope
11[sx,sy,s]=slope(md);
12
13%Average thickness over elements
14thickness_bar=(md.geometry.thickness(md.mesh.elements(:,1))+md.geometry.thickness(md.mesh.elements(:,2))+md.geometry.thickness(md.mesh.elements(:,3)))/3;
15
16px=-md.materials.rho_ice*md.constants.g*thickness_bar.*sx;
17py=-md.materials.rho_ice*md.constants.g*thickness_bar.*sy;
18pmag=sqrt(px.^2+py.^2);
Note: See TracBrowser for help on using the repository browser.