From c1b64968a62183d457c2fef9b5e32288ce568833 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Wed, 29 Oct 2014 15:36:31 +0000 Subject: [PATCH] [ck2cti] Keep full precision of NASA 9-coefficient thermo data The 9-coefficient format keeps 10 digits for each coefficient, compared to 9 for the 7-coefficient format. --- interfaces/cython/cantera/ck2cti.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/interfaces/cython/cantera/ck2cti.py b/interfaces/cython/cantera/ck2cti.py index 2c8ab76a5..5efe84e28 100644 --- a/interfaces/cython/cantera/ck2cti.py +++ b/interfaces/cython/cantera/ck2cti.py @@ -179,13 +179,14 @@ class NASA(ThermoModel): def to_cti(self, indent=0): prefix = ' '*indent - vals = ['{0: 15.8E}'.format(i) for i in self.coeffs] if len(self.coeffs) == 7: + vals = ['{0: 15.8E}'.format(i) for i in self.coeffs] lines = ['NASA([{0:.2f}, {1:.2f}],'.format(self.Tmin[0], self.Tmax[0]), prefix+' [{0}, {1}, {2},'.format(*vals[0:3]), prefix+' {0}, {1}, {2},'.format(*vals[3:6]), prefix+' {0}]),'.format(vals[6])] else: + vals = ['{0: 15.9E}'.format(i) for i in self.coeffs] lines = ['NASA9([{0:.2f}, {1:.2f}],'.format(self.Tmin[0], self.Tmax[0]), prefix+' [{0}, {1}, {2},'.format(*vals[0:3]), prefix+' {0}, {1}, {2},'.format(*vals[3:6]),