source: issm/trunk-jpl/src/m/classes/frictioncoulomb2.m@ 25974

Last change on this file since 25974 was 25974, checked in by Mathieu Morlighem, 4 years ago

CHG: moving coefficient to C

File size: 3.6 KB
RevLine 
[25970]1%FRICTIONCOULOMB2 class definition
2%
3% Usage:
4% frictioncoulomb=frictioncoulomb2();
5
[25973]6classdef frictioncoulomb2
[25970]7 properties (SetAccess=public)
[25974]8 C = NaN;
[25970]9 m = NaN;
10 coupling = 0;
11 effective_pressure = NaN;
12 effective_pressure_limit = 0;
13 end
14 methods
15 function self = extrude(self,md) % {{{
[25974]16 self.C=project3d(md,'vector',self.C,'type','node','layer',1);
[25970]17 self.m=project3d(md,'vector',self.m,'type','element');
18 switch self.coupling
19 case 0
20 case 1
21 self.effective_pressure=project3d(md,'vector',self.effective_pressure,'type','node','layer',1);
22 case 2
23 error('not implemented yet');
24 otherwise
25 error('not supported yet');
26 end
27 end % }}}
28 function self = frictioncoulomb(varargin) % {{{
29 switch nargin
30 case 0
31 self=setdefaultparameters(self);
32 otherwise
33 error('constructor not supported');
34 end
35 end % }}}
36 function self = setdefaultparameters(self) % {{{
37
38 self.effective_pressure_limit = 0;
39
40 end % }}}
41 function md = checkconsistency(self,md,solution,analyses) % {{{
42
43 %Early return
44 if ~ismember('StressbalanceAnalysis',analyses) & ~ismember('ThermalAnalysis',analyses), return; end
[25974]45 md = checkfield(md,'fieldname','friction.C','timeseries',1,'NaN',1,'Inf',1);
[25970]46 md = checkfield(md,'fieldname','friction.m','NaN',1,'Inf',1,'size',[md.mesh.numberofelements 1]);
47 md = checkfield(md,'fieldname','friction.coupling','numel',[1],'values',[0 1 2]);
48 md = checkfield(md,'fieldname','friction.effective_pressure_limit','numel',[1],'>=',0);
49 switch self.coupling
50 case 0
51 case 1
52 md = checkfield(md,'fieldname','friction.effective_pressure','NaN',1,'Inf',1,'timeseries',1);
53 case 2
54 error('not implemented yet');
55 otherwise
56 error('not supported yet');
57 end
58 end % }}}
59 function disp(self) % {{{
60 disp('Coulomb limited sliding law parameters:');
61 disp(' ');
62 disp(' C^2 |u_b|^(m-1) * (.5*N) ');
63 disp(' tau_b = - _________________________________ u_b ');
64 disp(' (C^(2/m) |u_b| + (0.5*N)^(1/m) )^m ');
65 disp(' ');
[25974]66 fielddisplay(self,'C','friction coefficient [SI]');
[25970]67 fielddisplay(self,'m','m exponent (Weertman would be 1/3)');
68 fielddisplay(self,'effective_pressure','Effective Pressure for the forcing if not coupled [Pa]');
69 fielddisplay(self,'coupling','Coupling flag: 0 for default, 1 for forcing(provide md.friction.effective_pressure) and 2 for coupled (not implemented yet)');
70 fielddisplay(self,'effective_pressure_limit','Neff do not allow to fall below a certain limit: effective_pressure_limit*rho_ice*g*thickness (default 0)');
71 end % }}}
72 function marshall(self,prefix,md,fid) % {{{
73
74 WriteData(fid,prefix,'name','md.friction.law','data',13,'format','Integer');
[25974]75 WriteData(fid,prefix,'object',self,'fieldname','C','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
[25970]76 WriteData(fid,prefix,'object',self,'fieldname','m','format','DoubleMat','mattype',2);
77 WriteData(fid,prefix,'class','friction','object',self,'fieldname','coupling','format','Integer');
78 WriteData(fid,prefix,'object',self,'class','friction','fieldname','effective_pressure_limit','format','Double');
79 switch self.coupling
80 case 0
81 case 1
82 WriteData(fid,prefix,'class','friction','object',self,'fieldname','effective_pressure','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
83 case 2
84 error('not implemented yet');
85 otherwise
86 error('not supported yet');
87 end
88
89 end % }}}
90 end
91end
Note: See TracBrowser for help on using the repository browser.