From 895409088112760d1b1420e2c95413859e14aa84 Mon Sep 17 00:00:00 2001 From: Steven DeCaluwe Date: Mon, 28 Jul 2014 18:18:41 +0000 Subject: [PATCH] Modifying TransportFactory::fitProperties to eliminate an assumption that the phase of interest is an ideal gas. --- src/transport/TransportFactory.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/transport/TransportFactory.cpp b/src/transport/TransportFactory.cpp index b53a22714..5718d5e60 100644 --- a/src/transport/TransportFactory.cpp +++ b/src/transport/TransportFactory.cpp @@ -1145,7 +1145,10 @@ void TransportFactory::fitProperties(GasTransportParams& tr, t = tr.tmin + dt*n; tr.thermo->setTemperature(t); - cp_R = ((IdealGasPhase*)tr.thermo)->cp_R_ref()[k]; + vector_fp cp_R_all(tr.thermo->nSpecies()); + tr.thermo->getCp_R_ref(&cp_R_all[0]); + cp_R = cp_R_all[k]; + tstar = Boltzmann * t/ tr.eps[k]; sqrt_T = sqrt(t);