[18512] | 1 | %FRICTIONWEERTMAN class definition
|
---|
| 2 | %
|
---|
| 3 | % Usage:
|
---|
[18775] | 4 | % friction=frictionhydro();
|
---|
[18512] | 5 |
|
---|
| 6 | classdef frictionhydro
|
---|
| 7 | properties (SetAccess=public)
|
---|
[21739] | 8 | coupling = 0;
|
---|
[18779] | 9 | q = NaN;
|
---|
| 10 | C = NaN;
|
---|
| 11 | As = NaN;
|
---|
| 12 | effective_pressure = NaN;
|
---|
[18512] | 13 | end
|
---|
| 14 | methods
|
---|
[19040] | 15 | function self = frictionhydro(varargin) % {{{
|
---|
[18512] | 16 | switch nargin
|
---|
| 17 | case 0
|
---|
[19040] | 18 | self=setdefaultparameters(self);
|
---|
[18512] | 19 | otherwise
|
---|
| 20 | error('constructor not supported');
|
---|
| 21 | end
|
---|
| 22 | end % }}}
|
---|
[19040] | 23 | function self = setdefaultparameters(self) % {{{
|
---|
[18512] | 24 |
|
---|
| 25 | end % }}}
|
---|
[19040] | 26 | function md = checkconsistency(self,md,solution,analyses) % {{{
|
---|
[18512] | 27 |
|
---|
| 28 | %Early return
|
---|
[21049] | 29 | if ~ismember('StressbalanceAnalysis',analyses) & ~ismember('ThermalAnalysis',analyses), return; end
|
---|
[21739] | 30 | md = checkfield(md,'fieldname','friction.coupling','numel',[1],'values',[0 1 2]);
|
---|
[19897] | 31 | md = checkfield(md,'fieldname','friction.q','NaN',1,'Inf',1,'size',[md.mesh.numberofelements 1]);
|
---|
| 32 | md = checkfield(md,'fieldname','friction.C','NaN',1,'Inf',1,'size',[md.mesh.numberofelements 1]);
|
---|
| 33 | md = checkfield(md,'fieldname','friction.As','NaN',1,'Inf',1,'size',[md.mesh.numberofelements 1]);
|
---|
[21739] | 34 | switch self.coupling
|
---|
| 35 | case 0
|
---|
| 36 | case 1
|
---|
| 37 | md = checkfield(md,'fieldname','friction.effective_pressure','NaN',1,'Inf',1,'timeseries',1);
|
---|
| 38 | case 2
|
---|
| 39 | error('not implemented yet');
|
---|
| 40 | otherwise
|
---|
| 41 | error('not supported yet');
|
---|
| 42 | end
|
---|
[19195] | 43 | end
|
---|
[18512] | 44 | end % }}}
|
---|
[19048] | 45 | function self = extrude(self,md) % {{{
|
---|
| 46 | self.q=project3d(md,'vector',self.q,'type','element');
|
---|
| 47 | self.C=project3d(md,'vector',self.C,'type','element');
|
---|
| 48 | self.As=project3d(md,'vector',self.As,'type','element');
|
---|
[21739] | 49 | switch self.coupling
|
---|
| 50 | case 0
|
---|
| 51 | case 1
|
---|
| 52 | self.effective_pressure=project3d(md,'vector',self.effective_pressure,'type','node','layer',1);
|
---|
| 53 | case 2
|
---|
| 54 | error('not implemented yet');
|
---|
| 55 | otherwise
|
---|
| 56 | error('not supported yet');
|
---|
[19152] | 57 | end
|
---|
| 58 | end % }}}
|
---|
[19040] | 59 | function disp(self) % {{{
|
---|
[18775] | 60 | disp(sprintf('Effective Pressure based friction law described in Gagliardini 2007'));
|
---|
[21739] | 61 | fielddisplay(self,'coupling','Coupling flag: 0 for default, 1 for forcing(provide md.friction.effective_pressure) and 2 for coupled(not implemented yet)');
|
---|
[19040] | 62 | fielddisplay(self,'q','friction law exponent q>=1');
|
---|
| 63 | fielddisplay(self,'C','friction law max value [SI]');
|
---|
| 64 | fielddisplay(self,'As','Sliding Parameter without cavitation [m Pa^-n s^-1]');
|
---|
[19152] | 65 | fielddisplay(self,'effective_pressure','Effective Pressure for the forcing if not coupled [Pa]');
|
---|
[18512] | 66 | end % }}}
|
---|
[20690] | 67 | function marshall(self,prefix,md,fid) % {{{
|
---|
| 68 | WriteData(fid,prefix,'name','md.friction.law','data',3,'format','Integer');
|
---|
[21739] | 69 | WriteData(fid,prefix,'class','friction','object',self,'fieldname','coupling','format','Integer');
|
---|
[20690] | 70 | WriteData(fid,prefix,'class','friction','object',self,'fieldname','q','format','DoubleMat','mattype',2);
|
---|
| 71 | WriteData(fid,prefix,'class','friction','object',self,'fieldname','C','format','DoubleMat','mattype',2);
|
---|
| 72 | WriteData(fid,prefix,'class','friction','object',self,'fieldname','As','format','DoubleMat','mattype',2);
|
---|
[21739] | 73 | switch self.coupling
|
---|
| 74 | case 0
|
---|
| 75 | case 1
|
---|
| 76 | WriteData(fid,prefix,'class','friction','object',self,'fieldname','effective_pressure','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
|
---|
| 77 | case 2
|
---|
| 78 | error('not implemented yet');
|
---|
| 79 | otherwise
|
---|
| 80 | error('not supported yet');
|
---|
[19152] | 81 | end
|
---|
| 82 | end % }}}
|
---|
[18512] | 83 | end
|
---|
| 84 | end
|
---|