Athena++/Atmosphere
Planetary Atmosphere Simulator
fit_ammonia.py
Go to the documentation of this file.
1 #! /usr/bin/env python2.7
2 from scipy.stats import linregress
3 from pylab import *
4 
5 data = genfromtxt('ammonia.dat')
6 temp = data[:,0] + 273.15
7 hfv = data[:,4]
8 a, b, r, p, e = linregress(temp, hfv)
9 print 'cpv = %.2f kJ/kg' % a
10 
11 hfl = data[:,3]
12 a, b, r, p, e = linregress(temp, hfl)
13 print 'cpl = %.2f kJ/kg' % a
14 
15 hfl = data[:,3]
16 a, b, r, p, e = linregress(temp, hfv - hfl)
17 print 'delta_cp = %.2f kJ/kg' % -a
18 print 'mu = %.2f kJ/kg' % b