Changeset 22754
- Timestamp:
- 05/09/18 21:11:18 (7 years ago)
- Location:
- issm/trunk-jpl/src/m/mech
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/mech/mechanicalproperties.m
r21275 r22754 111 111 %plug onto the model 112 112 %NB: Matlab sorts the eigen value in increasing order, we want the reverse 113 %NOTE: all stresses below are deviatoric114 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 125 113 strainrate=struct('xx',[],'yy',[],'xy',[],'principalvalue1',[],'principalaxis1',[],'principalvalue2',[],'principalaxis2',[],'effectivevalue',[]); 126 114 strainrate.xx=ux*md.constants.yts; %strain rate in 1/a instead of 1/s -
issm/trunk-jpl/src/m/mech/mechanicalproperties.py
r21303 r22754 125 125 ##plug onto the model 126 126 ##NB: Matlab sorts the eigen value in increasing order, we want the reverse 127 stress=results()128 stress.xx=tau_xx129 stress.yy=tau_yy130 stress.xy=tau_xy131 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=stress137 127 138 128 strainrate=results()
Note:
See TracChangeset
for help on using the changeset viewer.