Skip to content

Commit

Permalink
Bug fix: Update usage of chemistry function on low Mach path
Browse files Browse the repository at this point in the history
Necessary b/c of changes in PR #242.
  • Loading branch information
trevilo committed Jun 7, 2024
1 parent 7293c4f commit b799fa7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/reactingFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1462,6 +1462,9 @@ void ReactingFlow::speciesProduction() {
Vector progressRate; // set to size nReactions_ in computeProgressRate
Vector creationRate; // set to size nSpecies_ in computeCreationRate

kfwd.SetSize(chemistry_->getNumReactions());
keq.SetSize(chemistry_->getNumReactions());

for (int i = 0; i < sDofInt_; i++) {
// Get temperature
const double Th = dataT[i];
Expand All @@ -1479,8 +1482,8 @@ void ReactingFlow::speciesProduction() {
mixture_->computeNumberDensities(state, n_sp);

// Evaluate the chemical source terms
chemistry_->computeForwardRateCoeffs(Th, Te, kfwd);
chemistry_->computeEquilibriumConstants(Th, Te, keq);
chemistry_->computeForwardRateCoeffs(Th, Te, i, kfwd.HostWrite());
chemistry_->computeEquilibriumConstants(Th, Te, keq.HostWrite());
chemistry_->computeProgressRate(n_sp, kfwd, keq, progressRate);
chemistry_->computeCreationRate(progressRate, creationRate);

Expand Down

0 comments on commit b799fa7

Please sign in to comment.