mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-24 10:56:26 -06:00
ECL output: use the same units as the input deck for ECL output
this makes it possible to compare ECL restart and summary files produced by ebos directly with the ones stemming from Eclips. (But be aware that VTK output files from ebos are still all-SI!)
This commit is contained in:
parent
c651c2f4ce
commit
e09b026551
@ -211,26 +211,43 @@ public:
|
||||
if (!dynamic_cast<EclWriter*>(&writer))
|
||||
return; // this module only consideres ecl writers...
|
||||
|
||||
typedef EclDeckUnits<TypeTag> DeckUnits;
|
||||
const auto& deckUnits = this->simulator_.problem().deckUnits();
|
||||
|
||||
typename ParentType::BufferType bufferType = ParentType::ElementBuffer;
|
||||
if (pressuresOutput_()) {
|
||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx)
|
||||
deckUnits.siToDeck(pressure_[phaseIdx], DeckUnits::pressure);
|
||||
|
||||
this->commitScalarBuffer_(writer, "PRESSURE", pressure_[oilPhaseIdx], bufferType);
|
||||
this->commitScalarBuffer_(writer, "PGAS", pressure_[gasPhaseIdx], bufferType);
|
||||
this->commitScalarBuffer_(writer, "PWAT", pressure_[waterPhaseIdx], bufferType);
|
||||
}
|
||||
if (saturationsOutput_()) {
|
||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx)
|
||||
deckUnits.siToDeck(saturation_[phaseIdx], DeckUnits::saturation);
|
||||
|
||||
this->commitScalarBuffer_(writer, "SWAT", saturation_[waterPhaseIdx], bufferType);
|
||||
this->commitScalarBuffer_(writer, "SGAS", saturation_[gasPhaseIdx], bufferType);
|
||||
// the oil saturation is _NOT_ written to disk. Instead, it is calculated by
|
||||
// the visualization tool. Wondering why is probably a waste of time...
|
||||
}
|
||||
if (gasDissolutionFactorOutput_())
|
||||
if (gasDissolutionFactorOutput_()) {
|
||||
deckUnits.siToDeck(gasDissolutionFactor_, DeckUnits::gasDissolutionFactor);
|
||||
this->commitScalarBuffer_(writer, "RS", gasDissolutionFactor_, bufferType);
|
||||
if (gasFormationVolumeFactorOutput_())
|
||||
}
|
||||
if (gasFormationVolumeFactorOutput_()) {
|
||||
// no unit conversion required
|
||||
this->commitScalarBuffer_(writer, "BG", gasFormationVolumeFactor_, bufferType);
|
||||
if (saturatedOilFormationVolumeFactorOutput_())
|
||||
}
|
||||
if (saturatedOilFormationVolumeFactorOutput_()) {
|
||||
// no unit conversion required
|
||||
this->commitScalarBuffer_(writer, "BOSAT", saturatedOilFormationVolumeFactor_, bufferType);
|
||||
if (oilSaturationPressureOutput_())
|
||||
}
|
||||
if (oilSaturationPressureOutput_()) {
|
||||
deckUnits.siToDeck(oilSaturationPressure_, DeckUnits::pressure);
|
||||
this->commitScalarBuffer_(writer, "PSAT", oilSaturationPressure_);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "ecltransmissibility.hh"
|
||||
#include "ecldummygradientcalculator.hh"
|
||||
#include "eclfluxmodule.hh"
|
||||
#include "ecldeckunits.hh"
|
||||
|
||||
#include <ewoms/models/blackoil/blackoilmodel.hh>
|
||||
#include <ewoms/disc/ecfv/ecfvdiscretization.hh>
|
||||
@ -241,6 +242,7 @@ public:
|
||||
: ParentType(simulator)
|
||||
, transmissibilities_(simulator)
|
||||
, wellManager_(simulator)
|
||||
, deckUnits_(simulator)
|
||||
, eclWriter_(simulator)
|
||||
, summaryWriter_(simulator)
|
||||
{
|
||||
@ -419,6 +421,12 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns the object which converts between SI and deck units.
|
||||
*/
|
||||
const EclDeckUnits<TypeTag>& deckUnits() const
|
||||
{ return deckUnits_; }
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
||||
*/
|
||||
@ -992,6 +1000,8 @@ private:
|
||||
|
||||
EclWellManager<TypeTag> wellManager_;
|
||||
|
||||
EclDeckUnits<TypeTag> deckUnits_;
|
||||
|
||||
EclWriter<TypeTag> eclWriter_;
|
||||
EclSummaryWriter summaryWriter_;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user