chemistryModel electron reactions are selected with indices and Te update method changed

This commit is contained in:
ignis 2016-07-03 14:07:58 +09:00
parent 5a50a80378
commit 765926435b

View file

@ -832,15 +832,15 @@ Foam::scalar Foam::chemistryModel<CompType, ThermoType>::solve
const scalarField& Te = this->mesh().template lookupObject<volScalarField>("Te").internalField();
const scalarField& ne = this->mesh().template lookupObject<volScalarField>("ne").internalField();
PtrList<Reaction<ThermoType> > eReactions_(nReaction_);
label neReactions_ = 0;
labelList eRxnLabels;
for (label i=0; i<nReaction_; i++)
{
if (reactions_[i].species().contains("E-"))
{
// Info << "With E- " << reactions_[i] << endl;
eReactions_.set(neReactions_, const_cast<Reaction<ThermoType>*>(reactions_(i)));
eRxnLabels.append(i);
neReactions_++;
}
else
@ -849,11 +849,6 @@ Foam::scalar Foam::chemistryModel<CompType, ThermoType>::solve
}
}
for (label i=0; i<neReactions_; i++)
{
Info << eReactions_[i] << endl;
}
forAll(rho, celli)
{
const scalar rhoi = rho[celli];
@ -867,8 +862,9 @@ Foam::scalar Foam::chemistryModel<CompType, ThermoType>::solve
for (label i=0; i<neReactions_; i++)
{
// Info << eReactions_[i] << endl;
eReactions_[i].Te() = Tei;
label ei = eRxnLabels[i];
Info << reactions_[ei] << endl;
reactions_[ei].Te(Tei);
}
for (label i=0; i<nSpecie_; i++)