[18512] | 1 | %FRICTIONWEERTMAN class definition
|
---|
| 2 | %
|
---|
| 3 | % Usage:
|
---|
[18775] | 4 | % friction=frictionhydro();
|
---|
[18512] | 5 |
|
---|
| 6 | classdef frictionhydro
|
---|
| 7 | properties (SetAccess=public)
|
---|
[19152] | 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
|
---|
| 29 | if ~ismember(StressbalanceAnalysisEnum(),analyses) & ~ismember(ThermalAnalysisEnum(),analyses), return; end
|
---|
[19152] | 30 | md = checkfield(md,'fieldname','friction.Coupling','numel',[1],'values',[0 1]);
|
---|
[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]);
|
---|
[19195] | 34 | if self.Coupling==0,
|
---|
[19897] | 35 | md = checkfield(md,'fieldname','friction.effective_pressure','NaN',1,'Inf',1,'timeseries',1);
|
---|
[19195] | 36 | end
|
---|
[18512] | 37 | end % }}}
|
---|
[19048] | 38 | function self = extrude(self,md) % {{{
|
---|
| 39 | self.q=project3d(md,'vector',self.q,'type','element');
|
---|
| 40 | self.C=project3d(md,'vector',self.C,'type','element');
|
---|
| 41 | self.As=project3d(md,'vector',self.As,'type','element');
|
---|
[19195] | 42 | if self.Coupling==0,
|
---|
[19152] | 43 | self.effective_pressure=project3d(md,'vector',self.effective_pressure,'type','node','layer',1);
|
---|
| 44 | end
|
---|
| 45 | end % }}}
|
---|
[19040] | 46 | function disp(self) % {{{
|
---|
[18775] | 47 | disp(sprintf('Effective Pressure based friction law described in Gagliardini 2007'));
|
---|
[19152] | 48 | fielddisplay(self,'Coupling','Coupling flag, 1 for coupling and 0 for forcing');
|
---|
[19040] | 49 | fielddisplay(self,'q','friction law exponent q>=1');
|
---|
| 50 | fielddisplay(self,'C','friction law max value [SI]');
|
---|
| 51 | fielddisplay(self,'As','Sliding Parameter without cavitation [m Pa^-n s^-1]');
|
---|
[19152] | 52 | fielddisplay(self,'effective_pressure','Effective Pressure for the forcing if not coupled [Pa]');
|
---|
[18512] | 53 | end % }}}
|
---|
[20690] | 54 | function marshall(self,prefix,md,fid) % {{{
|
---|
| 55 | WriteData(fid,prefix,'name','md.friction.law','data',3,'format','Integer');
|
---|
| 56 | WriteData(fid,prefix,'class','friction','object',self,'fieldname','Coupling','format','Integer');
|
---|
| 57 | WriteData(fid,prefix,'class','friction','object',self,'fieldname','q','format','DoubleMat','mattype',2);
|
---|
| 58 | WriteData(fid,prefix,'class','friction','object',self,'fieldname','C','format','DoubleMat','mattype',2);
|
---|
| 59 | WriteData(fid,prefix,'class','friction','object',self,'fieldname','As','format','DoubleMat','mattype',2);
|
---|
[19152] | 60 | if self.Coupling==0,
|
---|
[20690] | 61 | WriteData(fid,prefix,'class','friction','object',self,'fieldname','effective_pressure','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1);
|
---|
[19152] | 62 | end
|
---|
| 63 | end % }}}
|
---|
[18512] | 64 | end
|
---|
| 65 | end
|
---|