Changeset 20214


Ignore:
Timestamp:
02/19/16 00:31:58 (9 years ago)
Author:
cborstad
Message:

CHG: damage can be passed as an argument to compute damage-dependent mechanical properties

File:
1 edited

Legend:

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

    r19386 r20214  
    1 function md=mechanicalproperties(md,vx,vy)
     1function md=mechanicalproperties(md,vx,vy,varargin)
    22%MECHANICALPROPERTIES - compute stress and strain rate for a goven velocity
    33%
     
    2323        disp('Warning: the model has some non SSA elements. These will be treated like SSA''s elements');
    2424end
     25
     26%get damage, if passed
     27options = pairoptions(varargin{:});
     28damage = getfieldvalue(options,'damage',zeros(md.mesh.numberofvertices,1));
    2529
    2630%initialization
     
    6266        nu(location)=B_bar(location);
    6367elseif isa(md.materials,'matdamageice')
    64         % FIXME this needs to use md.damage.D or damage from a solution
    65         Zinv=md.materials.rheology_Z(index)*summation/3;
     68        Zinv=1-damage(index)*summation/3;
    6669        location=find(second_inv~=0);
    6770        nu(location)=Zinv(location).*B_bar(location)./(second_inv(location).^power(location));
Note: See TracChangeset for help on using the changeset viewer.