Skip to content

Commit a2f36e5

Browse files
committed
[kinetics] prevent overwrite kr for irreversible case
1 parent c30c1a5 commit a2f36e5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/kinetics/ElectronCollisionPlasmaRate.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ double ElectronCollisionPlasmaRate::evalFromStruct(
112112
void ElectronCollisionPlasmaRate::modifyRateConstants(
113113
const ElectronCollisionPlasmaData& shared_data, double& kf, double& kr)
114114
{
115+
if (kr == 0.0) {
116+
// The reverse rate constant is only for reversible reactions
117+
// kr = 0.0 indicates that the reaction is irreversible
118+
return;
119+
}
120+
115121
// Interpolate cross-sections data to the energy levels of
116122
// the electron energy distribution function
117123
if (shared_data.levelChanged) {

0 commit comments

Comments
 (0)