Changeset 22051


Ignore:
Timestamp:
09/06/17 05:04:06 (8 years ago)
Author:
sjohnsen
Message:

NEW: added CoupledFlag(Neff) for frictionlaw 7, coulomb

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/frictioncoulomb.m

    r21049 r22051  
    1010                q                  = NaN;
    1111                coefficientcoulomb = NaN;
     12                coupling        = 0;
     13                effective_pressure = NaN;
    1214        end
    1315        methods
     
    1719                        self.p=project3d(md,'vector',self.p,'type','element');
    1820                        self.q=project3d(md,'vector',self.q,'type','element');
     21                        switch self.coupling
     22                                case 0
     23                                case 1
     24                                        self.effective_pressure=project3d(md,'vector',self.effective_pressure,'type','node','layer',1);
     25                                case 2
     26                                        error('not implemented yet');
     27                                otherwise
     28                                        error('not supported yet');             
     29                        end
    1930                end % }}}
    2031                function self = frictioncoulomb(varargin) % {{{
     
    3748                        md = checkfield(md,'fieldname','friction.q','NaN',1,'Inf',1,'size',[md.mesh.numberofelements 1]);
    3849                        md = checkfield(md,'fieldname','friction.p','NaN',1,'Inf',1,'size',[md.mesh.numberofelements 1]);
     50                        md = checkfield(md,'fieldname','friction.coupling','numel',[1],'values',[0 1 2]);
     51                        switch self.coupling
     52                                case 0
     53                                case 1
     54                                        md = checkfield(md,'fieldname','friction.effective_pressure','NaN',1,'Inf',1,'timeseries',1);
     55                                case 2
     56                                        error('not implemented yet');
     57                                otherwise
     58                                        error('not supported yet');             
     59                        end
    3960                end % }}}
    4061                function disp(self) % {{{
     
    4465                        fielddisplay(self,'p','p exponent');
    4566                        fielddisplay(self,'q','q exponent');
     67                        fielddisplay(self,'effective_pressure','Effective Pressure for the forcing if not coupled [Pa]');
     68                        fielddisplay(self,'coupling','Coupling flag: 0 for default, 1 for forcing(provide md.friction.effective_pressure)  and 2 for coupled(not implemented yet)');
    4669                end % }}}
    4770                function marshall(self,prefix,md,fid) % {{{
     
    5275                        WriteData(fid,prefix,'object',self,'fieldname','p','format','DoubleMat','mattype',2);
    5376                        WriteData(fid,prefix,'object',self,'fieldname','q','format','DoubleMat','mattype',2);
     77                        WriteData(fid,prefix,'class','friction','object',self,'fieldname','coupling','format','Integer');
     78                        switch self.coupling
     79                                case 0
     80                                case 1
     81                                        WriteData(fid,prefix,'class','friction','object',self,'fieldname','effective_pressure','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
     82                                case 2
     83                                        error('not implemented yet');
     84                                otherwise
     85                                        error('not supported yet');             
     86                        end
    5487
    5588                end % }}}
Note: See TracChangeset for help on using the changeset viewer.