corrected indices for mass transfer due to phase change

This commit is contained in:
andy
2009-05-08 17:02:58 +01:00
parent 321e4af9e8
commit 312aba6ef2

View File

@ -102,7 +102,7 @@ void Foam::ReactingParcel<ParcelType>::calc
scalar dhTrans = 0.0;
// Mass transfer due to phase change
scalarField dMassPC(td.cloud().gases().size(), 0.0);
scalarField dMassPC(Y_.size(), 0.0);
// Phase change
@ -172,7 +172,8 @@ void Foam::ReactingParcel<ParcelType>::calc
// Transfer mass lost from particle to carrier mass source
forAll(dMassPC, i)
{
td.cloud().rhoTrans(i)[cellI] += np0*dMassPC[i];
label id = td.cloud().composition().localToGlobalGasId(0, i);
td.cloud().rhoTrans(id)[cellI] += np0*dMassPC[i];
}
// Update momentum transfer