Last change
on this file since 23670 was 23670, checked in by bdef, 6 years ago |
CHG: python scripts after 2to3 and indentation fix
|
File size:
463 bytes
|
Line | |
---|
1 | import numpy as np
|
---|
2 |
|
---|
3 | def TMeltingPoint(reftemp,pressure):
|
---|
4 | '''
|
---|
5 | Calculate the pressure melting point of ice at a given pressure
|
---|
6 |
|
---|
7 | reftemp is the melting temperature in K at atmospheric pressure (initialized in md.materials.meltingpoint)
|
---|
8 |
|
---|
9 | pressure is in Pa
|
---|
10 |
|
---|
11 | Usage:
|
---|
12 | Tm=TMeltingPoint(md.materials.meltingpoint,pressure)
|
---|
13 | '''
|
---|
14 |
|
---|
15 | #variables
|
---|
16 | beta=7.9e-8
|
---|
17 |
|
---|
18 | #ensure ref is same dimension as pressure
|
---|
19 | ref=reftemp*np.ones_like(pressure)
|
---|
20 |
|
---|
21 | return reftemp-beta*pressure
|
---|
Note:
See
TracBrowser
for help on using the repository browser.