[cantera] r3436 committed - Implementing RedlichKwongMFTP::cv_mole()

2 views
Skip to first unread message

can...@googlecode.com

unread,
Jun 9, 2015, 12:56:37 PM6/9/15
to cantera...@googlegroups.com
Revision: 3436
Author: steven....@gmail.com
Date: Tue Jun 9 16:49:54 2015 UTC
Log: Implementing RedlichKwongMFTP::cv_mole()
https://code.google.com/p/cantera/source/detail?r=3436

Modified:
/cantera/trunk/src/thermo/RedlichKwongMFTP.cpp

=======================================
--- /cantera/trunk/src/thermo/RedlichKwongMFTP.cpp Tue Jun 9 16:49:51 2015
UTC
+++ /cantera/trunk/src/thermo/RedlichKwongMFTP.cpp Tue Jun 9 16:49:54 2015
UTC
@@ -211,8 +211,16 @@

doublereal RedlichKwongMFTP::cv_mole() const
{
- //throw CanteraError("", "unimplemented");
- return cp_mole() - GasConstant;
+ _updateReferenceStateThermo();
+ doublereal TKelvin = temperature();
+ doublereal sqt = sqrt(TKelvin);
+ doublereal mv = molarVolume();
+ doublereal vpb = mv + m_b_current;
+ doublereal cvref = GasConstant * (mean_X(m_cp0_R) - 1.0);
+ doublereal dadt = da_dt();
+ doublreal fac = TKelvin * dadt - 3.0 * m_a_current / 2.0;
+ return (cvref - 1.0/(2.0 * m_b_current * TKelvin * sqt) *
log(vpb/mv)*fac
+ +1.0/(m_b_current * sqt) *
log(vpb/mv)*(-0.5*dadt));
}

doublereal RedlichKwongMFTP::pressure() const
Reply all
Reply to author
Forward
0 new messages