Changeset 22754


Ignore:
Timestamp:
05/09/18 21:11:18 (7 years ago)
Author:
Mathieu Morlighem
Message:

CHG: removing stress from mechanical properties output as it is actually the deviatoric stress

Location:
issm/trunk-jpl/src/m/mech
Files:
2 edited

Legend:

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

    r21275 r22754  
    111111%plug onto the model
    112112%NB: Matlab sorts the eigen value in increasing order, we want the reverse
    113 %NOTE: all stresses below are deviatoric
    114 stress=struct('xx',[],'yy',[],'xy',[],'principalvalue1',[],'principalaxis1',[],'principalvalue2',[],'principalaxis2',[],'effectivevalue',[]);
    115 stress.xx=tau_xx;
    116 stress.yy=tau_yy;
    117 stress.xy=tau_xy;
    118 stress.principalvalue1=valuesstress(:,1);
    119 stress.principalaxis1=directionsstress(:,1:2);
    120 stress.principalvalue2=valuesstress(:,2);
    121 stress.principalaxis2=directionsstress(:,3:4);
    122 stress.effectivevalue=1/sqrt(2)*sqrt(stress.xx.^2+stress.yy.^2+2*stress.xy.^2); % effective shear stress (sqrt(J2))
    123 md.results.stress=stress;
    124 
    125113strainrate=struct('xx',[],'yy',[],'xy',[],'principalvalue1',[],'principalaxis1',[],'principalvalue2',[],'principalaxis2',[],'effectivevalue',[]);
    126114strainrate.xx=ux*md.constants.yts; %strain rate in 1/a instead of 1/s
  • issm/trunk-jpl/src/m/mech/mechanicalproperties.py

    r21303 r22754  
    125125        ##plug onto the model
    126126        ##NB: Matlab sorts the eigen value in increasing order, we want the reverse
    127         stress=results()
    128         stress.xx=tau_xx
    129         stress.yy=tau_yy
    130         stress.xy=tau_xy
    131         stress.principalvalue1=valuesstress[:,0]
    132         stress.principalaxis1=directionsstress[:,0:2]
    133         stress.principalvalue2=valuesstress[:,1]
    134         stress.principalaxis2=directionsstress[:,2:4]
    135         stress.effectivevalue=1./np.sqrt(2.)*np.sqrt(stress.xx**2+stress.yy**2+2.*stress.xy**2)
    136         md.results.stress=stress
    137127       
    138128        strainrate=results()
Note: See TracChangeset for help on using the changeset viewer.