View Issue Details

IDProjectCategoryView StatusLast Update
0001025OpenFOAMBugpublic2013-09-24 14:29
Reporternogenmyr Assigned Touser21 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSCentOSOS Version6
Summary0001025: Temperature derivative in chemistryModel::derivatives
DescriptionThe temperature's temporal derivative is evaluated in chemistryModel::derivatives. For this purpose, the mixtures heat capacity is determined as a sum of components cps in a for-loop. At the end of the for-loop (line 368 in chemistryModel.C) the variable "cp" has the unit J/(kg*K) and seems numerically correct when printed to stdout (1009 for air). Then, just after the loop, cp is =/ mw, giving it the strange unit J/(kg*K) / (kg/kmol) = J*kmol/(kg*kg*K).

Next the temperature derivative is calculated as dT = sum(hi*dcdt[i])/(rho*cp). This latter expression would be correct if the unit of cp was left as J/(kg*K). Hence it appears that the line "cp /= mw;" should be removed.
Steps To ReproduceAdd the two print lines in chemistryModel.C

    cp /= mw;
    Info << "cp " << cp << endl;
    Info << "mw " << mw << endl;
    scalar dT = 0.0;

compile and run for instance the counterFlowFlame reactingFoam tutorial. The printed cp for the initial air composition is 34.9909. Mean molecular weight is correct. cp for air would either be 1009 J/(kg*K) or 29099 J/(kmol*K).
TagsNo tags attached.

Activities

user21

2013-09-24 14:29

  ~0002514

thanks for the report. It was fixed on commit
da11a20a3bfba11e6d031a221eba2395ac14b61c

Issue History

Date Modified Username Field Change
2013-09-24 11:14 nogenmyr New Issue
2013-09-24 14:28 user21 Assigned To => user21
2013-09-24 14:28 user21 Status new => assigned
2013-09-24 14:29 user21 Note Added: 0002514
2013-09-24 14:29 user21 Status assigned => resolved
2013-09-24 14:29 user21 Resolution open => fixed