diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C index 365a1b1f..56407ef4 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C @@ -733,6 +733,10 @@ void Foam::chemistryModel::calculate() const scalarField& T = this->thermo().T(); const scalarField& p = this->thermo().p(); + const bool neFound = this->mesh().template foundObject("ne"); + + if (!neFound) + { forAll(rho, celli) { const scalar rhoi = rho[celli]; @@ -753,6 +757,74 @@ void Foam::chemistryModel::calculate() RR_[i][celli] = dcdt[i]*specieThermo_[i].W(); } } + } + else + { + const scalarField& En = this->mesh().template lookupObject("En").internalField(); + const scalarField& Te = this->mesh().template lookupObject("Te").internalField(); + const scalarField& ne = this->mesh().template lookupObject("ne").internalField(); + + label neReactions_ = 0; + labelList eRxnLabels; + + for (label i=0; i::solve } else { + const scalarField& En = this->mesh().template lookupObject("En").internalField(); const scalarField& Te = this->mesh().template lookupObject("Te").internalField(); const scalarField& ne = this->mesh().template lookupObject("ne").internalField(); @@ -839,13 +912,11 @@ Foam::scalar Foam::chemistryModel::solve { if (reactions_[i].species().contains("E-")) { - // Info << "With E- " << reactions_[i] << endl; eRxnLabels.append(i); neReactions_++; } else { - // Info << "Without E- " << reactions_[i] << endl; } } @@ -856,15 +927,14 @@ Foam::scalar Foam::chemistryModel::solve scalar Ti = T[celli]; scalar nei = ne[celli]; scalar Tei = Te[celli]; + scalar Eni = En[celli]; - // nei = Tei; - // Tei = nei; for (label i=0; i