Merge pull request #3604 from blattms/fix-ptflash
[bugfix] Use numComponents when accessing K_/moleFractions_ in PTFlash.
This commit is contained in:
@@ -928,7 +928,7 @@ protected:
|
||||
secondary_z[idx] = SecondaryEval(Opm::getValue(z[idx]), idx + 1);
|
||||
}
|
||||
// set up the mole fractions
|
||||
for (unsigned idx = 0; idx < num_equations; ++idx) {
|
||||
for (unsigned idx = 0; idx < numComponents; ++idx) {
|
||||
// TODO: double checking that fluid_state_scalar returns a scalar here
|
||||
const auto x_i = fluid_state_scalar.moleFraction(oilPhaseIdx, idx);
|
||||
secondary_fluid_state.setMoleFraction(FluidSystem::oilPhaseIdx, idx, x_i);
|
||||
|
||||
Reference in New Issue
Block a user