source: issm/branches/trunk-jpl-damage/src/m/classes/friction.py@ 12168

Last change on this file since 12168 was 12168, checked in by cborstad, 13 years ago

merged trunk-jpl into branch through revision 12167

File size: 740 bytes
RevLine 
[12038]1#module imports
2from fielddisplay import fielddisplay
3
4class friction:
5 #properties
6 def __init__(self):
7 # {{{ Properties
8 self.coefficient = float('NaN')
9 self.p = float('NaN')
10 self.q = float('NaN')
[12123]11
12 #set defaults
13 self.setdefaultparameters()
14
[12038]15 #}}}
16 def __repr__(obj):
17 # {{{ Display
18 string="Sigma= drag^2 * Neff ^r * u ^s, with Neff=rho_ice*g*thickness+rho_water*g*bed, r=q/p and s=1/p"
19 string="%s\n\n%s"%(string,fielddisplay(obj,"coefficient","friction coefficient [SI]"))
20 string="%s\n%s"%(string,fielddisplay(obj,"p","p exponent"))
21 string="%s\n%s"%(string,fielddisplay(obj,"q","q exponent"))
22 return string
23 #}}}
[12123]24
25 def setdefaultparameters(obj):
26 # {{{setdefaultparameters
27 return obj
28 #}}}
29
Note: See TracBrowser for help on using the repository browser.