1 | %FRICTIONPISM class definition
|
---|
2 | %
|
---|
3 | % Usage:
|
---|
4 | % frictionpism=frictionpism();
|
---|
5 |
|
---|
6 | classdef frictionpism
|
---|
7 | properties (SetAccess=public)
|
---|
8 | pseudoplasticity_exponent = 0.;
|
---|
9 | threshold_speed = 0.;
|
---|
10 | delta = 0.;
|
---|
11 | void_ratio = 0.;
|
---|
12 | till_friction_angle = NaN;
|
---|
13 | sediment_compressibility_coefficient = NaN;
|
---|
14 | end
|
---|
15 | methods
|
---|
16 | function self = extrude(self,md) % {{{
|
---|
17 | self.till_friction_angle=project3d(md,'vector',self.till_friction_angle,'type','node','layer',1);
|
---|
18 | self.sediment_compressibility_coefficient=project3d(md,'vector',self.sediment_compressibility_coefficient,'type','node','layer',1);
|
---|
19 | end % }}}
|
---|
20 | function self = frictionpism(varargin) % {{{
|
---|
21 | switch nargin
|
---|
22 | case 0
|
---|
23 | self=setdefaultparameters(self);
|
---|
24 | case 1
|
---|
25 | self=structtoobj(frictionpism(),varargin{1});
|
---|
26 | otherwise
|
---|
27 | error('constructor not supported');
|
---|
28 | end
|
---|
29 | end % }}}
|
---|
30 | function self = setdefaultparameters(self) % {{{
|
---|
31 |
|
---|
32 | self.pseudoplasticity_exponent = 0.6;
|
---|
33 | self.threshold_speed = 100.;
|
---|
34 | self.delta = 0.02;
|
---|
35 | self.void_ratio = 0.69;
|
---|
36 |
|
---|
37 | end % }}}
|
---|
38 | function md = checkconsistency(self,md,solution,analyses) % {{{
|
---|
39 |
|
---|
40 | %Early return
|
---|
41 | if ~ismember('StressbalanceAnalysis',analyses) & ~ismember('ThermalAnalysis',analyses), return; end
|
---|
42 | if (strcmp(solution,'TransientSolution') & md.transient.isstressbalance ==0 & md.transient.isthermal == 0), return; end
|
---|
43 |
|
---|
44 | md = checkfield(md,'fieldname','friction.pseudoplasticity_exponent','numel',[1],'>',0,'NaN',1,'Inf',1);
|
---|
45 | md = checkfield(md,'fieldname','friction.threshold_speed','numel',[1],'>',0,'NaN',1,'Inf',1);
|
---|
46 | md = checkfield(md,'fieldname','friction.delta','numel',[1],'>',0,'<',1,'NaN',1,'Inf',1);
|
---|
47 | md = checkfield(md,'fieldname','friction.void_ratio','numel',[1],'>',0,'<',1,'NaN',1,'Inf',1);
|
---|
48 | md = checkfield(md,'fieldname','friction.till_friction_angle','NaN',1,'Inf',1,'<',360.,'>',0.,'size',[md.mesh.numberofvertices 1]); %User should give angle in degrees, Matlab calculates in rad
|
---|
49 | md = checkfield(md,'fieldname','friction.sediment_compressibility_coefficient','NaN',1,'Inf',1,'<',1.,'>',0.,'size',[md.mesh.numberofvertices 1]);
|
---|
50 | end % }}}
|
---|
51 | function disp(self) % {{{
|
---|
52 | disp(sprintf('Basal shear stress parameters for the PISM friction law (See Aschwanden et al. 2016 for more details)'));
|
---|
53 | fielddisplay(self,'pseudoplasticity_exponent','pseudoplasticity exponent [dimensionless]');
|
---|
54 | fielddisplay(self,'threshold_speed','threshold speed [m/yr]');
|
---|
55 | fielddisplay(self,'delta','lower limit of the effective pressure, expressed as a fraction of overburden pressure [dimensionless]');
|
---|
56 | fielddisplay(self,'void_ratio','void ratio at a reference effective pressure [dimensionless]');
|
---|
57 | fielddisplay(self,'till_friction_angle','till friction angle [deg], recommended default: 30 deg');
|
---|
58 | fielddisplay(self,'sediment_compressibility_coefficient','coefficient of compressibility of the sediment [dimensionless], recommended default: 0.12');
|
---|
59 | end % }}}
|
---|
60 | function marshall(self,prefix,md,fid) % {{{
|
---|
61 | yts=md.constants.yts;
|
---|
62 |
|
---|
63 | WriteData(fid,prefix,'name','md.friction.law','data',10,'format','Integer');
|
---|
64 | WriteData(fid,prefix,'class','friction','object',self,'fieldname','pseudoplasticity_exponent','format','Double');
|
---|
65 | WriteData(fid,prefix,'class','friction','object',self,'fieldname','threshold_speed','format','Double','scale',1./yts);
|
---|
66 | WriteData(fid,prefix,'class','friction','object',self,'fieldname','delta','format','Double');
|
---|
67 | WriteData(fid,prefix,'class','friction','object',self,'fieldname','void_ratio','format','Double');
|
---|
68 | WriteData(fid,prefix,'class','friction','object',self,'fieldname','till_friction_angle','format','DoubleMat','mattype',1);
|
---|
69 | WriteData(fid,prefix,'class','friction','object',self,'fieldname','sediment_compressibility_coefficient','format','DoubleMat','mattype',1);
|
---|
70 | end % }}}
|
---|
71 | function savemodeljs(self,fid,modelname) % {{{
|
---|
72 | error('not implemented yet!');
|
---|
73 | end % }}}
|
---|
74 | end
|
---|
75 | end
|
---|