Skip to content

Commit 87a44a8

Browse files
committed
Refstate gravity support
1 parent 1ab8dba commit 87a44a8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

stagpy/phyvars.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@
239239
('Cp', Varr('Heat capacity', 'Heat capacity', 'J/(kg.K)')),
240240
('Tcond', Varr('Conductivity', 'Conductivity', 'W/(m.K)')),
241241
('P', Varr('Pressure', 'Pressure', 'Pa')),
242+
('grav', Varr('Gravity', 'Gravity', 'm/s2')),
242243
))
243244

244245
Varp = namedtuple('Varp', ['description'])
@@ -266,6 +267,7 @@
266267
'1/s': lambda scl: 1 / scl.time,
267268
'K/s': lambda scl: scl.temperature / scl.time,
268269
'm/s': lambda scl: scl.length / scl.time,
270+
'm/s2': lambda scl: scl.length / scl.time**2,
269271
}
270272

271273
PREFIXES = ('k', 'M', 'G')

stagpy/stagyyparsers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def _clean_names_refstate(names):
251251
return [to_clean.get(n, n) for n in names]
252252

253253

254-
def refstate(reffile, ncols=7):
254+
def refstate(reffile, ncols=8):
255255
"""Extract reference state profiles.
256256
257257
Args:

0 commit comments

Comments
 (0)