Add solvent to phaseUsage

This commit is contained in:
Tor Harald Sandve 2017-05-03 10:54:06 +02:00
parent acc0f81260
commit daecfa7e55
2 changed files with 13 additions and 0 deletions

View File

@ -38,6 +38,7 @@ namespace Opm
int num_phases;
int phase_used[MaxNumPhases];
int phase_pos[MaxNumPhases];
bool has_solvent;
};
/// Check or assign presence of a formed, free phase. Limited to

View File

@ -66,6 +66,12 @@ namespace Opm
OPM_THROW(std::runtime_error, "Cannot handle cases with no OIL, i.e. water-gas systems.");
}
// Add solvent info
pu.has_solvent = false;
if (phase.active(Phase::SOLVENT)) {
pu.has_solvent = true;
}
return pu;
}
@ -112,6 +118,12 @@ namespace Opm
OPM_THROW(std::runtime_error, "Cannot handle cases with no OIL, i.e. water-gas systems.");
}
// Add solvent info
pu.has_solvent = false;
if (phase.active(Phase::SOLVENT)) {
pu.has_solvent = true;
}
return pu;
}