Changeset 17390


Ignore:
Timestamp:
03/07/14 13:28:15 (11 years ago)
Author:
cborstad
Message:

CHG: added some comments to clarify stress calculations

File:
1 edited

Legend:

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

    r17367 r17390  
    22%MECHANICALPROPERTIES - compute stress and strain rate for a goven velocity
    33%
    4 %   this routine computes the components of the stress tensor
    5 %   strain rate tensor and their respective principal directions.
    6 %   the results are in the model md: md.results
     4%   this routine computes the components of the (deviatoric) stress tensor,
     5%   the strain rate tensor, and their respective principal directions.
     6%   The results are in the model md: md.results
    77%
    88%   Usage:
     
    107107%plug onto the model
    108108%NB: Matlab sorts the eigen value in increasing order, we want the reverse
     109%NOTE: all stresses below are deviatoric
    109110stress=struct('xx',[],'yy',[],'xy',[],'principalvalue1',[],'principalaxis1',[],'principalvalue2',[],'principalaxis2',[],'effectivevalue',[]);
    110111stress.xx=tau_xx;
     
    115116stress.principalvalue2=valuesstress(:,2);
    116117stress.principalaxis2=directionsstress(:,3:4);
    117 stress.effectivevalue=1/sqrt(2)*sqrt(stress.xx.^2+stress.yy.^2+2*stress.xy.^2);
     118stress.effectivevalue=1/sqrt(2)*sqrt(stress.xx.^2+stress.yy.^2+2*stress.xy.^2); % effective shear stress
    118119md.results.stress=stress;
    119120
     
    129130md.results.strainrate=strainrate;
    130131
     132%exact same stress as above
    131133deviatoricstress=struct('xx',[],'yy',[],'xy',[],'principalvalue1',[],'principalaxis1',[],'principalvalue2',[],'principalaxis2',[],'effectivevalue',[]);
    132134deviatoricstress.xx=tau_xx;
Note: See TracChangeset for help on using the changeset viewer.