Changeset 27492
- Timestamp:
- 01/02/23 01:24:30 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/friction.py
r27458 r27492 8 8 9 9 class friction(object): 10 """ FRICTIONclass definition10 """friction class definition 11 11 12 12 Usage: … … 19 19 self.q = np.nan 20 20 self.coupling = 0 21 self.linearize = 0 21 22 self.effective_pressure = np.nan 22 23 self.effective_pressure_limit = 0 … … 26 27 s = 'Basal shear stress parameters: Sigma_b = coefficient^2 * Neff ^r * |u_b|^(s - 1) * u_b,\n' 27 28 s += '(effective stress Neff = rho_ice * g * thickness + rho_water * g * base, r = q / p and s = 1 / p)\n' 28 s += '{}\n'.format(fielddisplay(self, "coefficient", "friction coefficient [SI]"))29 s += '{}\n'.format(fielddisplay(self, "p", "p exponent"))30 s += '{}\n'.format(fielddisplay(self, "q", "q exponent"))29 s += '{}\n'.format(fielddisplay(self, 'coefficient', 'friction coefficient [SI]')) 30 s += '{}\n'.format(fielddisplay(self, 'p', 'p exponent')) 31 s += '{}\n'.format(fielddisplay(self, 'q', 'q exponent')) 31 32 s += '{}\n'.format(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)')) 33 s += '{}\n'.format(fielddisplay(self, 'linearize', '0: not linearized, 1: interpolated linearly, 2: constant per element (default is 0)')) 32 34 s += '{}\n'.format(fielddisplay(self, 'effective_pressure', 'Effective Pressure for the forcing if not coupled [Pa]')) 33 35 s += '{}\n'.format(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 37 # }}} 36 38 def setdefaultparameters(self): # {{{ 39 self.linearize = 0 40 self.coupling = 0 37 41 self.effective_pressure_limit = 0 38 42 return self … … 59 63 md = checkfield(md, 'fieldname', 'friction.q', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofelements]) 60 64 md = checkfield(md, 'fieldname', 'friction.p', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofelements]) 65 md = checkfield(md, 'fieldname', 'friction.linearize', 'numel', [1], 'values', [0, 1, 2]) 61 66 md = checkfield(md, 'fieldname', 'friction.coupling', 'numel', [1], 'values', [0, 1, 2, 3, 4]) 62 67 md = checkfield(md, 'fieldname', 'friction.effective_pressure_limit', 'numel', [1], '>=', 0) … … 77 82 WriteData(fid, prefix, 'object', self, 'fieldname', 'q', 'format', 'DoubleMat', 'mattype', 2) 78 83 WriteData(fid, prefix, 'class', 'friction', 'object', self, 'fieldname', 'coupling', 'format', 'Integer') 84 WriteData(fid, prefix, 'class', 'friction', 'object', self, 'fieldname', 'linearize', 'format', 'Integer') 79 85 WriteData(fid, prefix, 'object', self, 'class', 'friction', 'fieldname', 'effective_pressure_limit', 'format', 'Double') 80 86 if self.coupling == 3 or self.coupling == 4:
Note:
See TracChangeset
for help on using the changeset viewer.