mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user