Changeset 28030
- Timestamp:
- 12/19/23 21:01:48 (15 months ago)
- Location:
- issm/trunk-jpl/src/m/classes
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/frictioncoulomb.m
r27164 r28030 6 6 classdef frictioncoulomb 7 7 properties (SetAccess=public) 8 coefficient = NaN;9 p = NaN;10 q = NaN;11 coefficientcoulomb = NaN;12 coupling 13 effective_pressure = NaN;8 coefficient = NaN; 9 p = NaN; 10 q = NaN; 11 coefficientcoulomb = NaN; 12 coupling = 0; 13 effective_pressure = NaN; 14 14 effective_pressure_limit = 0; 15 15 end … … 27 27 error('not implemented yet'); 28 28 otherwise 29 error('not supported yet'); 29 error('not supported yet'); 30 30 end 31 31 end % }}} … … 52 52 md = checkfield(md,'fieldname','friction.p','NaN',1,'Inf',1,'size',[md.mesh.numberofelements 1]); 53 53 md = checkfield(md,'fieldname','friction.coupling','numel',[1],'values',[0 1 2]); 54 md = checkfield(md,'fieldname','friction.effective_pressure_limit','numel',[1],'>=',0); 54 md = checkfield(md,'fieldname','friction.effective_pressure_limit','numel',[1],'>=',0); 55 55 56 switch self.coupling 56 57 case 0 … … 60 61 error('not implemented yet'); 61 62 otherwise 62 error('not supported yet'); 63 error('not supported yet'); 63 64 end 64 65 end % }}} … … 71 72 fielddisplay(self,'effective_pressure','Effective Pressure for the forcing if not coupled [Pa]'); 72 73 fielddisplay(self,'coupling','Coupling flag: 0 for default, 1 for forcing(provide md.friction.effective_pressure) and 2 for coupled(not implemented yet)'); 73 fielddisplay(self,'effective_pressure_limit','Neff do not allow to fall below a certain limit: effective_pressure_limit*rho_ice*g*thickness (default 0)'); 74 fielddisplay(self,'effective_pressure_limit','Neff do not allow to fall below a certain limit: effective_pressure_limit*rho_ice*g*thickness (default 0)'); 74 75 end % }}} 75 76 function marshall(self,prefix,md,fid) % {{{ 77 yts=md.constants.yts; 76 78 77 79 WriteData(fid,prefix,'name','md.friction.law','data',7,'format','Integer'); 78 WriteData(fid,prefix,'object',self,'fieldname','coefficient','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts', md.constants.yts);80 WriteData(fid,prefix,'object',self,'fieldname','coefficient','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',yts); 79 81 WriteData(fid,prefix,'object',self,'fieldname','coefficientcoulomb','format','DoubleMat','mattype',1); 80 82 WriteData(fid,prefix,'object',self,'fieldname','p','format','DoubleMat','mattype',2); … … 85 87 case 0 86 88 case 1 87 WriteData(fid,prefix,'class','friction','object',self,'fieldname','effective_pressure','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts', md.constants.yts);89 WriteData(fid,prefix,'class','friction','object',self,'fieldname','effective_pressure','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',yts); 88 90 case 2 89 91 error('not implemented yet'); 90 92 otherwise 91 error('not supported yet'); 93 error('not supported yet'); 92 94 end 93 95 -
issm/trunk-jpl/src/m/classes/frictioncoulomb.py
r27458 r28030 7 7 8 8 9 class frictioncoulomb( object):10 """ FRICTIONCOULOMBclass definition9 class frictioncoulomb(): 10 """frictioncoulomb class definition 11 11 12 12 Usage: … … 14 14 """ 15 15 16 def __init__(self ): # {{{16 def __init__(self, *args): # {{{ 17 17 self.coefficient = np.nan 18 18 self.coefficientcoulomb = np.nan … … 23 23 self.effective_pressure_limit = 0 24 24 25 self.setdefaultparameters() 25 nargs = len(args) 26 27 if nargs == 0: 28 self.setdefaultparameters() 29 else: 30 raise Exception('constructor not supported') 26 31 # }}} 27 32 … … 77 82 78 83 def marshall(self, prefix, md, fid): # {{{ 84 yts = md.constants.yts 85 79 86 WriteData(fid, prefix, 'name', 'md.friction.law', 'data', 7, 'format', 'Integer') 80 WriteData(fid, prefix, 'object', self, 'fieldname', 'coefficient', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', md.constants.yts)87 WriteData(fid, prefix, 'object', self, 'fieldname', 'coefficient', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts) 81 88 WriteData(fid, prefix, 'object', self, 'fieldname', 'coefficientcoulomb', 'format', 'DoubleMat', 'mattype', 1) 82 89 WriteData(fid, prefix, 'object', self, 'fieldname', 'p', 'format', 'DoubleMat', 'mattype', 2) … … 85 92 WriteData(fid, prefix, 'object', self, 'class', 'friction', 'fieldname', 'effective_pressure_limit', 'format', 'Double') 86 93 if self.coupling == 1: 87 WriteData(fid, prefix, 'class', 'friction', 'object', self, 'fieldname', 'effective_pressure', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', md.constants.yts)94 WriteData(fid, prefix, 'class', 'friction', 'object', self, 'fieldname', 'effective_pressure', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts) 88 95 elif self.coupling == 2: 89 96 raise ValueError('not implemented yet') -
issm/trunk-jpl/src/m/classes/frictionregcoulomb.m
r27478 r28030 39 39 end % }}} 40 40 function disp(self) % {{{ 41 %See Joughin et al. 2019 (equivalent form by Matt Trevers, poster at AGU 2022) https://agupubs.onlinel ibrary.wiley.com/doi/full/10.1029/2019GL08252642 disp('Regularized Coulo ub friction law (Joughin et al., 2019) parameters:');43 disp(' Regularized Coulo ub friction law reads:');41 %See Joughin et al. 2019 (equivalent form by Matt Trevers, poster at AGU 2022) https://agupubs.onlinelåibrary.wiley.com/doi/full/10.1029/2019GL082526 42 disp('Regularized Coulomb friction law (Joughin et al., 2019) parameters:'); 43 disp(' Regularized Coulomb friction law reads:'); 44 44 disp(' C^2 |u|^(1/m) '); 45 45 disp(' tau_b = - ____________________________'); 46 disp(' (|u|/u0 + 1)^(1/m)');46 disp(' (|u|/u0 + 1)^(1/m) '); 47 47 disp(' '); 48 48 fielddisplay(self,'C','friction coefficient [SI]'); 49 49 fielddisplay(self,'m','m exponent (set to m=3 in original paper)'); 50 fielddisplay(self,'u0','velocity control ing plastic limit');50 fielddisplay(self,'u0','velocity controlling plastic limit'); 51 51 end % }}} 52 52 function marshall(self,prefix,md,fid) % {{{ … … 54 54 55 55 WriteData(fid,prefix,'name','md.friction.law','data',14,'format','Integer'); 56 WriteData(fid,prefix,'class','friction','object',self,'fieldname','C','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts', md.constants.yts);56 WriteData(fid,prefix,'class','friction','object',self,'fieldname','C','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',yts); 57 57 WriteData(fid,prefix,'class','friction','object',self,'fieldname','u0','format','Double','scale',1/yts); 58 58 WriteData(fid,prefix,'class','friction','object',self,'fieldname','m','format','DoubleMat','mattype',2); -
issm/trunk-jpl/src/m/classes/frictionregcoulomb2.m
r27509 r28030 2 2 % 3 3 % Usage: 4 % frictionregcoulomb =frictionregcoulomb();4 % frictionregcoulomb2=frictionregcoulomb2(); 5 5 6 6 classdef frictionregcoulomb2 7 7 properties (SetAccess=public) 8 C = NaN;9 K = NaN;10 m = NaN;8 C = NaN; 9 K = NaN; 10 m = NaN; 11 11 effective_pressure_limit = 0; 12 12 end … … 43 43 function disp(self) % {{{ 44 44 %See Zoet and Iverson 2020 or Choi et al., 2022 45 disp('Regularized Coulo ub friction law 2parameters:');46 disp(' Regularized Coulo ub friction law reads:');45 disp('Regularized Coulomb friction law 2 parameters:'); 46 disp(' Regularized Coulomb friction law reads:'); 47 47 disp(' C N |u|^(1/m) '); 48 48 disp(' tau_b = - ____________________________'); 49 disp(' (|u| + (K*N)^m)^(1/m)');49 disp(' (|u| + (K*N)^m)^(1/m) '); 50 50 disp(' '); 51 51 fielddisplay(self,'C','friction coefficient [SI]'); 52 52 fielddisplay(self,'m','m exponent'); 53 fielddisplay(self,'K','(K*N)^m to be velocity control ing plastic limit');53 fielddisplay(self,'K','(K*N)^m to be velocity controlling plastic limit'); 54 54 fielddisplay(self,'effective_pressure_limit','Neff do not allow to fall below a certain limit: effective_pressure_limit*rho_ice*g*thickness (default 0)'); 55 55 end % }}} … … 58 58 59 59 WriteData(fid,prefix,'name','md.friction.law','data',15,'format','Integer'); 60 WriteData(fid,prefix,'class','friction','object',self,'fieldname','C','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts', md.constants.yts);61 WriteData(fid,prefix,'class','friction','object',self,'fieldname','K','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts', md.constants.yts);60 WriteData(fid,prefix,'class','friction','object',self,'fieldname','C','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',yts); 61 WriteData(fid,prefix,'class','friction','object',self,'fieldname','K','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',yts); 62 62 WriteData(fid,prefix,'class','friction','object',self,'fieldname','m','format','DoubleMat','mattype',2); 63 63 WriteData(fid,prefix,'object',self,'class','friction','fieldname','effective_pressure_limit','format','Double');
Note:
See TracChangeset
for help on using the changeset viewer.