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
|
Line | |
---|
1 | #module imports
|
---|
2 | from fielddisplay import fielddisplay
|
---|
3 |
|
---|
4 | class friction:
|
---|
5 | #properties
|
---|
6 | def __init__(self):
|
---|
7 | # {{{ Properties
|
---|
8 | self.coefficient = float('NaN')
|
---|
9 | self.p = float('NaN')
|
---|
10 | self.q = float('NaN')
|
---|
11 |
|
---|
12 | #set defaults
|
---|
13 | self.setdefaultparameters()
|
---|
14 |
|
---|
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 | #}}}
|
---|
24 |
|
---|
25 | def setdefaultparameters(obj):
|
---|
26 | # {{{setdefaultparameters
|
---|
27 | return obj
|
---|
28 | #}}}
|
---|
29 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.