|
Last change
on this file since 23670 was 23670, checked in by bdef, 7 years ago |
|
CHG: python scripts after 2to3 and indentation fix
|
|
File size:
463 bytes
|
| Rev | Line | |
|---|
| [23670] | 1 | import numpy as np
|
|---|
| [19895] | 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
|
|---|
| [21255] | 19 | ref=reftemp*np.ones_like(pressure)
|
|---|
| [19895] | 20 |
|
|---|
| 21 | return reftemp-beta*pressure
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.