Add gasoil + energy simulator

Useful when combining CO2STORE + THERMAL

This PR also fixes an issue with missing phases in computation of output temperature
This commit is contained in:
Tor Harald Sandve
2021-12-06 10:26:54 +01:00
parent ad10e419da
commit 4f75d1ab8d
11 changed files with 198 additions and 5 deletions

View File

@@ -1686,9 +1686,15 @@ namespace Opm {
const auto& intQuants = *(ebosSimulator_.model().cachedIntensiveQuantities(cell_idx, /*timeIdx=*/0));
const auto& fs = intQuants.fluidState();
// we on only have one temperature pr cell any phaseIdx will do
double cellTemperatures = fs.temperature(/*phaseIdx*/0).value();
double weight_factor = 0.0;
for (int phaseIdx = 0; phaseIdx < np; ++phaseIdx) {
for (unsigned phaseIdx = 0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
{
if (!FluidSystem::phaseIsActive(phaseIdx)) {
continue;
}
cellInternalEnergy = fs.enthalpy(phaseIdx).value() - fs.pressure(phaseIdx).value() / fs.density(phaseIdx).value();
cellBinv = fs.invB(phaseIdx).value();
cellDensity = fs.density(phaseIdx).value();