Changeset 24668
- Timestamp:
- 03/17/20 06:04:30 (5 years ago)
- Location:
- issm/trunk-jpl/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Loads/Friction.cpp
r24666 r24668 610 610 void Friction::GetAlpha2Schoof(IssmDouble* palpha2, Gauss* gauss){/*{{{*/ 611 611 612 /*This routine calculates the basal friction coefficient 612 /*This routine calculates the basal friction coefficient 613 613 * 614 614 * C |u_b|^(m-1) … … 643 643 void Friction::GetAlpha2Tsai(IssmDouble* palpha2, Gauss* gauss){/*{{{*/ 644 644 645 /*This routine calculates the basal friction coefficient 645 /*This routine calculates the basal friction coefficient 646 646 * 647 647 * alpha2= min(C |ub|^m , f N ) / |ub| … … 727 727 case 3: 728 728 element->GetInputValue(&Neff,gauss,FrictionEffectivePressureEnum); 729 p_ice = 0.; // FIXME 729 element->GetInputValue(&thickness, gauss,ThicknessEnum); 730 IssmDouble rho_ice = element->FindParam(MaterialsRhoIceEnum); 731 IssmDouble gravity = element->FindParam(ConstantsGEnum); 732 p_ice = gravity*rho_ice*thickness; 730 733 break; 731 734 case 4: 732 735 element->GetInputValue(&Neff,gauss,EffectivePressureEnum); 733 p_ice = 0.; // FIXME 736 element->GetInputValue(&thickness, gauss,ThicknessEnum); 737 IssmDouble rho_ice = element->FindParam(MaterialsRhoIceEnum); 738 IssmDouble gravity = element->FindParam(ConstantsGEnum); 739 p_ice = gravity*rho_ice*thickness; 734 740 break; 735 741 default: -
issm/trunk-jpl/src/m/classes/friction.py
r24667 r24668 19 19 self.coupling = 0 20 20 self.effective_pressure = float('NaN') 21 22 #set defaults21 self.effective_pressure_limit = 0 22 #set defaults 23 23 self.setdefaultparameters() 24 24 self.requested_outputs = [] … … 33 33 string = "%s\n%s" % (string, fielddisplay(self, 'coupling', 'Coupling flag 0: uniform sheet (negative pressure ok, default), 1: ice pressure only, 2: water pressure assuming uniform sheet (no negative pressure), 3: use provided effective_pressure, 4: used coupled model (not implemented yet)')) 34 34 string = "%s\n%s" % (string, fielddisplay(self, 'effective_pressure', 'Effective Pressure for the forcing if not coupled [Pa]')) 35 string = "%s\n%s" % (string, fielddisplay(self, 'effective_pressure_limit','Neff do not allow to fall below a certain limit: effective_pressure_limit*rho_ice*g*thickness (default 0)'))35 string = "%s\n%s" % (string, fielddisplay(self, 'effective_pressure_limit', 'Neff do not allow to fall below a certain limit: effective_pressure_limit * rho_ice * g * thickness (default 0)')) 36 36 string = "%s\n%s" % (string, fielddisplay(self, 'requested_outputs', 'additional outputs requested')) 37 37 return string … … 52 52 def setdefaultparameters(self): # {{{ 53 53 self.requested_outputs = ['default'] 54 54 self.effective_pressure_limit = 0 55 55 return self 56 56 #}}} … … 71 71 md = checkfield(md, 'fieldname', 'friction.p', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofelements]) 72 72 md = checkfield(md, 'fieldname', 'friction.coupling', 'numel', [1], 'values', [0, 1, 2, 3, 4]) 73 md = checkfield(md, 'fieldname', 'friction.effective_pressure_limit','numel',[1],'>=',0)73 md = checkfield(md, 'fieldname', 'friction.effective_pressure_limit', 'numel', [1], '>=', 0) 74 74 if self.coupling == 3: 75 75 md = checkfield(md, 'fieldname', 'friction.effective_pressure', 'NaN', 1, 'Inf', 1, 'timeseries', 1) … … 86 86 WriteData(fid, prefix, 'object', self, 'fieldname', 'q', 'format', 'DoubleMat', 'mattype', 2) 87 87 WriteData(fid, prefix, 'class', 'friction', 'object', self, 'fieldname', 'coupling', 'format', 'Integer') 88 WriteData(fid, prefix, 'object', self,'class','friction','fieldname','effective_pressure_limit','format','Double')88 WriteData(fid, prefix, 'object', self, 'class', 'friction', 'fieldname', 'effective_pressure_limit', 'format', 'Double') 89 89 if self.coupling == 3: 90 90 WriteData(fid, prefix, 'class', 'friction', 'object', self, 'fieldname', 'effective_pressure', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', md.constants.yts) -
issm/trunk-jpl/src/m/classes/frictioncoulomb.py
r24667 r24668 20 20 self.coupling = 0 21 21 self.effective_pressure = float('NaN') 22 22 self.effective_pressure_limit = 0 23 23 #set defaults 24 24 self.setdefaultparameters() … … 33 33 string = "%s\n%s" % (string, fielddisplay(self, 'coupling', 'Coupling flag: 0 for default, 1 for forcing(provide md.friction.effective_pressure) and 2 for coupled(not implemented yet)')) 34 34 string = "%s\n%s" % (string, fielddisplay(self, 'effective_pressure', 'Effective Pressure for the forcing if not coupled [Pa]')) 35 string = "%s\n%s" % (string, fielddisplay(self, 'effective_pressure_limit','Neff do not allow to fall below a certain limit: effective_pressure_limit*rho_ice*g*thickness (default 0)'))35 string = "%s\n%s" % (string, fielddisplay(self, 'effective_pressure_limit', 'Neff do not allow to fall below a certain limit: effective_pressure_limit * rho_ice * g * thickness (default 0)')) 36 36 return string 37 37 #}}} … … 52 52 53 53 def setdefaultparameters(self): # {{{ 54 55 54 self.effective_pressure_limit = 0 55 return self 56 56 #}}} 57 57 … … 65 65 md = checkfield(md, 'fieldname', 'friction.q', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofelements]) 66 66 md = checkfield(md, 'fieldname', 'friction.p', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofelements]) 67 md = checkfield(md, 'fieldname', 'friction.effective_pressure_limit','numel',[1],'>=',0)67 md = checkfield(md, 'fieldname', 'friction.effective_pressure_limit', 'numel', [1], '>=', 0) 68 68 if self.coupling == 1: 69 69 md = checkfield(md, 'fieldname', 'friction.effective_pressure', 'NaN', 1, 'Inf', 1, 'timeseries', 1) … … 82 82 WriteData(fid, prefix, 'object', self, 'fieldname', 'q', 'format', 'DoubleMat', 'mattype', 2) 83 83 WriteData(fid, prefix, 'class', 'friction', 'object', self, 'fieldname', 'coupling', 'format', 'Integer') 84 WriteData(fid, prefix, 'object', self,'class','friction','fieldname','effective_pressure_limit','format','Double')84 WriteData(fid, prefix, 'object', self, 'class', 'friction', 'fieldname', 'effective_pressure_limit', 'format', 'Double') 85 85 if self.coupling == 1: 86 86 WriteData(fid, prefix, 'class', 'friction', 'object', self, 'fieldname', 'effective_pressure', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', md.constants.yts) -
issm/trunk-jpl/src/m/classes/frictionhydro.py
r24667 r24668 19 19 self.As = np.nan 20 20 self.effective_pressure = np.nan 21 self.effective_pressure_limit = 0 22 #set defaults 23 21 self.effective_pressure_limit = 0 22 #set defaults 24 23 self.setdefaultparameters() 25 24 # }}} … … 32 31 string = "%s\n%s" % (string, fielddisplay(self, 'As', 'Sliding Parameter without cavitation [m Pa^ - n s^ - 1]')) 33 32 string = "%s\n%s" % (string, fielddisplay(self, 'effective_pressure', 'Effective Pressure for the forcing if not coupled [Pa]')) 34 string = "%s\n%s" % (string, fielddisplay(self, 'effective_pressure_limit','Neff do not allow to fall below a certain limit: effective_pressure_limit*rho_ice*g*thickness (default 0)'))33 string = "%s\n%s" % (string, fielddisplay(self, 'effective_pressure_limit', 'Neff do not allow to fall below a certain limit: effective_pressure_limit * rho_ice * g * thickness (default 0)')) 35 34 36 35 return string … … 51 50 self.coupling = 0 52 51 self.effective_pressure = np.nan 53 52 self.effective_pressure_limit = 0 54 53 return self 55 54 # }}} … … 64 63 md = checkfield(md, 'fieldname', 'friction.C', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofelements]) 65 64 md = checkfield(md, 'fieldname', 'friction.As', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofelements]) 66 md = checkfield(md, 'fieldname', 'friction.effective_pressure_limit','numel',[1],'>=',0)65 md = checkfield(md, 'fieldname', 'friction.effective_pressure_limit', 'numel', [1], '>=', 0) 67 66 if self.coupling == 3: 68 67 md = checkfield(md, 'fieldname', 'friction.effective_pressure', 'NaN', 1, 'Inf', 1, 'timeseries', 1) … … 77 76 WriteData(fid, prefix, 'class', 'friction', 'object', self, 'fieldname', 'C', 'format', 'DoubleMat', 'mattype', 2) 78 77 WriteData(fid, prefix, 'class', 'friction', 'object', self, 'fieldname', 'As', 'format', 'DoubleMat', 'mattype', 2) 79 WriteData(fid, prefix, 'object', self,'class','friction','fieldname','effective_pressure_limit','format','Double')78 WriteData(fid, prefix, 'object', self, 'class', 'friction', 'fieldname', 'effective_pressure_limit', 'format', 'Double') 80 79 if self.coupling in[3, 4]: 81 80 WriteData(fid, prefix, 'class', 'friction', 'object', self, 'fieldname', 'effective_pressure', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', md.constants.yts) -
issm/trunk-jpl/src/m/classes/frictionweertman.py
r24256 r24668 22 22 23 23 def __repr__(self): # {{{ 24 string = "Weertman sliding law parameters: Sigma_b = C^(- 1 / m) * |u_b|^(1 / m - 1) * u_b"24 string = "Weertman sliding law parameters: Sigma_b = C^(- 1 / m) * |u_b|^(1 / m - 1) * u_b" 25 25 26 26 string = "%s\n%s" % (string, fielddisplay(self, "C", "friction coefficient [SI]"))
Note:
See TracChangeset
for help on using the changeset viewer.