Changeset 13479


Ignore:
Timestamp:
09/28/12 14:28:41 (12 years ago)
Author:
cborstad
Message:

CHG: handle matice and matdamageice separately when calculating viscosity

File:
1 edited

Legend:

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

    r13476 r13479  
    5151power=(md.materials.rheology_n-1)./(2*md.materials.rheology_n);
    5252second_inv=(ux.^2+vy.^2+((uy+vx).^2)/4+ux.*vy);
     53
    5354%some corrections
    54 location=find(second_inv~=0);
    55 nu(location)=B_bar(location)./(second_inv(location).^power(location));
    5655location=find(second_inv==0 & power~=0);
    5756nu(location)=10^18;     %arbitrary maximum viscosity to apply where there is no effective shear
    58 location=find(second_inv==0 & power==0);
    59 nu(location)=B_bar(location);
     57
     58if isa(md.materials,'matice')
     59        location=find(second_inv~=0);
     60        nu(location)=B_bar(location)./(second_inv(location).^power(location));
     61        location=find(second_inv==0 & power==0);
     62        nu(location)=B_bar(location);
     63elseif isa(md.materials,'matdamageice')
     64        Zinv=md.materials.rheology_Z(index)*summation/3;
     65        location=find(second_inv~=0);
     66        nu(location)=Zinv(location).*B_bar(location)./(second_inv(location).^power(location));
     67        location=find(second_inv==0 & power==0);
     68        nu(location)=Zinv(location).*B_bar(location);
     69        clear Zinv
     70else
     71        error(['class of md.materials (' class(md.materials) ') not recognized or not supported']);
     72end
    6073clear B_bar location second_inv power
    6174
Note: See TracChangeset for help on using the changeset viewer.