mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #5045 from bska/prune-prtfile-blank-table-lines
Remove Spurious Blank Lines in PRT File Reports
This commit is contained in:
@@ -200,7 +200,7 @@ EclGenericOutputBlackoilModule(const EclipseState& eclState,
|
||||
enableFlows_ = false;
|
||||
enableFlowsn_ = false;
|
||||
|
||||
for (const auto& block : this->schedule_) { // Uses Schedule::begin() and Schedule::end()
|
||||
for (const auto& block : this->schedule_) {
|
||||
const auto& rstkw = block.rst_config().keywords;
|
||||
|
||||
if (! anyFlores_) {
|
||||
@@ -226,37 +226,29 @@ EclGenericOutputBlackoilModule<FluidSystem,Scalar>::
|
||||
|
||||
template<class FluidSystem, class Scalar>
|
||||
void EclGenericOutputBlackoilModule<FluidSystem,Scalar>::
|
||||
outputCumLog(std::size_t reportStepNum, const bool substep, bool forceDisableCumOutput)
|
||||
outputCumLog(std::size_t reportStepNum)
|
||||
{
|
||||
if (!substep && !forceDisableCumOutput) {
|
||||
logOutput_.cumulative(reportStepNum,
|
||||
[this](const std::string& name)
|
||||
{ return this->isDefunctParallelWell(name); });
|
||||
}
|
||||
logOutput_.cumulative(reportStepNum,
|
||||
[this](const std::string& name)
|
||||
{ return this->isDefunctParallelWell(name); });
|
||||
}
|
||||
|
||||
template<class FluidSystem,class Scalar>
|
||||
void EclGenericOutputBlackoilModule<FluidSystem,Scalar>::
|
||||
outputProdLog(std::size_t reportStepNum,
|
||||
const bool substep,
|
||||
bool forceDisableProdOutput)
|
||||
outputProdLog(std::size_t reportStepNum)
|
||||
{
|
||||
if (!substep && !forceDisableProdOutput) {
|
||||
logOutput_.production(reportStepNum,
|
||||
[this](const std::string& name)
|
||||
{ return this->isDefunctParallelWell(name); });
|
||||
}
|
||||
logOutput_.production(reportStepNum,
|
||||
[this](const std::string& name)
|
||||
{ return this->isDefunctParallelWell(name); });
|
||||
}
|
||||
|
||||
template<class FluidSystem,class Scalar>
|
||||
void EclGenericOutputBlackoilModule<FluidSystem,Scalar>::
|
||||
outputInjLog(std::size_t reportStepNum, const bool substep, bool forceDisableInjOutput)
|
||||
outputInjLog(std::size_t reportStepNum)
|
||||
{
|
||||
if (!substep && !forceDisableInjOutput) {
|
||||
logOutput_.injection(reportStepNum,
|
||||
[this](const std::string& name)
|
||||
{ return this->isDefunctParallelWell(name); });
|
||||
}
|
||||
logOutput_.injection(reportStepNum,
|
||||
[this](const std::string& name)
|
||||
{ return this->isDefunctParallelWell(name); });
|
||||
}
|
||||
|
||||
template<class FluidSystem,class Scalar>
|
||||
|
||||
@@ -62,19 +62,13 @@ public:
|
||||
};
|
||||
|
||||
// write cumulative production and injection reports to output
|
||||
void outputCumLog(std::size_t reportStepNum,
|
||||
const bool substep,
|
||||
bool forceDisableCumOutput);
|
||||
void outputCumLog(std::size_t reportStepNum);
|
||||
|
||||
// write production report to output
|
||||
void outputProdLog(std::size_t reportStepNum,
|
||||
const bool substep,
|
||||
bool forceDisableProdOutput);
|
||||
void outputProdLog(std::size_t reportStepNum);
|
||||
|
||||
// write injection report to output
|
||||
void outputInjLog(std::size_t reportStepNum,
|
||||
const bool substep,
|
||||
bool forceDisableInjOutput);
|
||||
void outputInjLog(std::size_t reportStepNum);
|
||||
|
||||
// write Fluid In Place to output log
|
||||
Inplace outputFipLog(std::map<std::string, double>& miscSummaryData,
|
||||
|
||||
@@ -254,9 +254,6 @@ public:
|
||||
eclOutputModule_->outputFipresvLog(miscSummaryData, regionData, reportStepNum,
|
||||
isSubStep, simulator_.gridView().comm());
|
||||
}
|
||||
bool forceDisableProdOutput = false;
|
||||
bool forceDisableInjOutput = false;
|
||||
bool forceDisableCumOutput = false;
|
||||
|
||||
// Add TCPU
|
||||
if (totalCpuTime != 0.0) {
|
||||
@@ -311,11 +308,14 @@ public:
|
||||
this->udqState());
|
||||
}
|
||||
|
||||
{
|
||||
OPM_TIMEBLOCK(outputXXX);
|
||||
eclOutputModule_->outputProdLog(reportStepNum, isSubStep, forceDisableProdOutput);
|
||||
eclOutputModule_->outputInjLog(reportStepNum, isSubStep, forceDisableInjOutput);
|
||||
eclOutputModule_->outputCumLog(reportStepNum, isSubStep, forceDisableCumOutput);
|
||||
if (! isSubStep) {
|
||||
OPM_TIMEBLOCK(outputProdInjLogs);
|
||||
|
||||
eclOutputModule_->outputProdLog(reportStepNum);
|
||||
eclOutputModule_->outputInjLog(reportStepNum);
|
||||
eclOutputModule_->outputCumLog(reportStepNum);
|
||||
|
||||
OpmLog::note(""); // Blank line after all reports.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -571,7 +571,7 @@ outputCumulativeReport_(const std::vector<Scalar>& wellCum,
|
||||
const UnitSystem& units = eclState_.getUnits();
|
||||
std::ostringstream ss;
|
||||
if (wellCumNames[WellCumDataType::WellName].empty()) {
|
||||
ss << "=================================================== CUMULATIVE PRODUCTION/INJECTION REPORT =========================================\n"
|
||||
ss << "\n=================================================== CUMULATIVE PRODUCTION/INJECTION REPORT =========================================\n"
|
||||
<< ": WELL : LOCATION : WELL :CTRL: OIL : WATER : GAS : Prod : OIL : WATER : GAS : INJ :\n"
|
||||
<< ": NAME : (I,J,K) : TYPE :MODE: PROD : PROD : PROD : RES.VOL. : INJ : INJ : INJ : RES.VOL. :\n";
|
||||
if (units.getType() == UnitSystem::UnitType::UNIT_TYPE_METRIC) {
|
||||
@@ -580,8 +580,9 @@ outputCumulativeReport_(const std::vector<Scalar>& wellCum,
|
||||
ss << ": : : : : MSTB : MSTB : MMSCF : MRB : MSTB : MSTB : MMSCF : MRB :\n";
|
||||
} else if (units.getType() == UnitSystem::UnitType::UNIT_TYPE_LAB) {
|
||||
ss << ": : : : : MSCC : MSCC : MMSCC : MRCC : MSCC : MSCC : MMSCC : MRCC :\n";
|
||||
ss << ":--------:-----------:--------:----:-----------:-----------:-----------:-----------:------------:----------:-----------:-----------:";
|
||||
}
|
||||
ss << "====================================================================================================================================\n";
|
||||
ss << "====================================================================================================================================";
|
||||
} else {
|
||||
if (wellCum[WellCumDataType::WellLocationi] < 1) {
|
||||
ss << std::right << std::fixed << std::setprecision(0) << ":" << std::setw (8)
|
||||
@@ -613,7 +614,7 @@ outputCumulativeReport_(const std::vector<Scalar>& wellCum,
|
||||
<< std::setw(11) << wellCum[WellCumDataType::GasInj] / 1000.0 << ":"
|
||||
<< std::setw(11) << wellCum[WellCumDataType::FluidResVolInj] / 1000.0 << ": \n";
|
||||
}
|
||||
ss << ":--------:-----------:--------:----:------------:----------:-----------:-----------:------------:----------:-----------:-----------: \n";
|
||||
ss << ":--------:-----------:--------:----:-----------:-----------:-----------:-----------:------------:----------:-----------:-----------:";
|
||||
}
|
||||
OpmLog::note(ss.str());
|
||||
}
|
||||
@@ -626,7 +627,7 @@ outputInjectionReport_(const std::vector<Scalar>& wellInj,
|
||||
const UnitSystem& units = eclState_.getUnits();
|
||||
std::ostringstream ss;
|
||||
if (wellInjNames[WellInjDataType::WellName].empty()) {
|
||||
ss << "=================================================== INJECTION REPORT ========================================\n"//===================== \n"
|
||||
ss << "\n=================================================== INJECTION REPORT ========================================\n"//===================== \n"
|
||||
<< ": WELL : LOCATION : CTRL : CTRL : CTRL : OIL : WATER : GAS : FLUID : BHP OR : THP OR :\n"// STEADY-ST II :\n"
|
||||
<< ": NAME : (I,J,K) : MODE : MODE : MODE : RATE : RATE : RATE : RES.VOL. : CON.PR.: BLK.PR.:\n";// OR POTENTIAL :\n";
|
||||
if (units.getType() == UnitSystem::UnitType::UNIT_TYPE_METRIC) {
|
||||
@@ -635,8 +636,9 @@ outputInjectionReport_(const std::vector<Scalar>& wellInj,
|
||||
ss << ": : : OIL : WAT : GAS : STB/DAY : STB/DAY : MSCF/DAY : RB/DAY : PSIA : PSIA :\n";// :\n";
|
||||
} else if (units.getType() == UnitSystem::UnitType::UNIT_TYPE_LAB) {
|
||||
ss << ": : : OIL : WAT : GAS : SCC/HR : SCC/HR : SCC/HR : RCC/HR : ATMA : ATMA :\n";// :\n";
|
||||
ss << ":--------:-----------:------:------:------:-----------:-----------:-----------:-----------:--------:--------:";//--------------------:";
|
||||
}
|
||||
ss << "==============================================================================================================\n";//===================== \n";
|
||||
ss << "==============================================================================================================";//=====================";
|
||||
} else {
|
||||
if (wellInj[WellInjDataType::WellLocationi] < 1) {
|
||||
ss << std::right << std::fixed << std::setprecision(0) << ":"
|
||||
@@ -665,7 +667,7 @@ outputInjectionReport_(const std::vector<Scalar>& wellInj,
|
||||
<< std::setw(8) << wellInj[WellInjDataType::BHP] << ":"
|
||||
<< std::setw(8)<< wellInj[WellInjDataType::THP] << ": \n";//wellInj[WellInjDataType::SteadyStateII] << std::setw(10) << "\n"
|
||||
}
|
||||
ss << ":--------:-----------:------:------:------:------------:----------:-----------:-----------:--------:--------: \n";//--------------------:\n";
|
||||
ss << ":--------:-----------:------:------:------:-----------:-----------:-----------:-----------:--------:--------:";//--------------------:";
|
||||
}
|
||||
OpmLog::note(ss.str());
|
||||
}
|
||||
@@ -678,7 +680,7 @@ outputProductionReport_(const std::vector<Scalar>& wellProd,
|
||||
const UnitSystem& units = eclState_.getUnits();
|
||||
std::ostringstream ss;
|
||||
if (wellProdNames[WellProdDataType::WellName].empty()) {
|
||||
ss << "======================================================= PRODUCTION REPORT =======================================================\n"//=================== \n"
|
||||
ss << "\n======================================================= PRODUCTION REPORT =======================================================\n"//=================== \n"
|
||||
<< ": WELL : LOCATION :CTRL: OIL : WATER : GAS : FLUID : WATER : GAS/OIL : WAT/GAS : BHP OR : THP OR :\n"// STEADY-ST PI :\n"
|
||||
<< ": NAME : (I,J,K) :MODE: RATE : RATE : RATE : RES.VOL. : CUT : RATIO : RATIO : CON.PR.: BLK.PR.:\n";// OR POTN OF PREF. PH:\n";
|
||||
if (units.getType() == UnitSystem::UnitType::UNIT_TYPE_METRIC) {
|
||||
@@ -688,7 +690,7 @@ outputProductionReport_(const std::vector<Scalar>& wellProd,
|
||||
} else if (units.getType() == UnitSystem::UnitType::UNIT_TYPE_LAB) {
|
||||
ss << ": : : : SCC/HR : SCC/HR : SCC/HR : RCC : SCC/SCC : SCC/SCC : SCC/SCC : ATMA : ATMA :\n";// :\n";
|
||||
}
|
||||
ss << "=================================================================================================================================\n";//=================== \n";
|
||||
ss << "=================================================================================================================================";//===================";
|
||||
} else {
|
||||
if (wellProd[WellProdDataType::WellLocationi] < 1) {
|
||||
ss << std::right << std::fixed << ":"
|
||||
@@ -730,7 +732,7 @@ outputProductionReport_(const std::vector<Scalar>& wellProd,
|
||||
<< std::setfill ('-') << std::setw (11) << ":"
|
||||
<< std::setfill ('-') << std::setw (13) << ":"
|
||||
<< std::setfill ('-') << std::setw (9) << ":"
|
||||
<< std::setfill ('-') << std::setw (9) << ":" << "\n";
|
||||
<< std::setfill ('-') << std::setw (9) << ':';
|
||||
}
|
||||
OpmLog::note(ss.str());
|
||||
}
|
||||
@@ -808,7 +810,7 @@ outputRegionFluidInPlace_(std::unordered_map<Inplace::Phase, Scalar> oip,
|
||||
<< std::setw(14) << oip[Inplace::Phase::GasInGasPhase]
|
||||
<< std::setw(14) << oip[Inplace::Phase::GasInLiquidPhase]
|
||||
<< std::setw(14) << oip[Inplace::Phase::GAS] << ":\n"
|
||||
<< ":========================:==========================================:================:==========================================:\n";
|
||||
<< ":========================:==========================================:================:==========================================:";
|
||||
OpmLog::note(ss.str());
|
||||
}
|
||||
|
||||
@@ -825,7 +827,7 @@ outputResvFluidInPlace_(std::unordered_map<Inplace::Phase, Scalar> cipr,
|
||||
const UnitSystem& units = eclState_.getUnits();
|
||||
std::ostringstream ss;
|
||||
if (reg == 0) {
|
||||
ss << " ===================================\n";
|
||||
ss << "\n ===================================\n";
|
||||
if (units.getType() == UnitSystem::UnitType::UNIT_TYPE_METRIC) {
|
||||
ss << " : RESERVOIR VOLUMES M3 :\n";
|
||||
} else if (units.getType() == UnitSystem::UnitType::UNIT_TYPE_FIELD) {
|
||||
@@ -835,7 +837,7 @@ outputResvFluidInPlace_(std::unordered_map<Inplace::Phase, Scalar> cipr,
|
||||
<< ": REGION : TOTAL PORE : PORE VOLUME : PORE VOLUME : PORE VOLUME : PORE VOLUME :\n"
|
||||
<< ": : VOLUME : CONTAINING : CONTAINING : CONTAINING : CONTAINING :\n"
|
||||
<< ": : : OIL : WATER : GAS : HYDRO-CARBON :\n"
|
||||
<< ":---------:---------------:---------------:---------------:---------------:---------------\n";
|
||||
<< ":---------:---------------:---------------:---------------:---------------:---------------";
|
||||
}
|
||||
else {
|
||||
ss << std::right << std::fixed << std::setprecision(0) << ":"
|
||||
@@ -846,7 +848,7 @@ outputResvFluidInPlace_(std::unordered_map<Inplace::Phase, Scalar> cipr,
|
||||
<< std::setw(15) << cipr[Inplace::Phase::GasResVolume] << ":"
|
||||
<< std::setw(15) << cipr[Inplace::Phase::OilResVolume] +
|
||||
cipr[Inplace::Phase::GasResVolume] << ":\n"
|
||||
<< ":---------:---------------:---------------:---------------:---------------:---------------:\n";
|
||||
<< ":---------:---------------:---------------:---------------:---------------:---------------:";
|
||||
}
|
||||
OpmLog::note(ss.str());
|
||||
}
|
||||
|
||||
@@ -99,13 +99,13 @@ BOOST_AUTO_TEST_CASE(Cumulative)
|
||||
: : : : : MSTB : MSTB : MMSCF : MRB : MSTB : MSTB : MMSCF : MRB :
|
||||
====================================================================================================================================
|
||||
: FIELD: : : : 1.0: 2.0: 3.0: 4.0: 5.0: 6.0: 7.0: 8.0:
|
||||
:--------:-----------:--------:----:------------:----------:-----------:-----------:------------:----------:-----------:-----------:
|
||||
:--------:-----------:--------:----:-----------:-----------:-----------:-----------:------------:----------:-----------:-----------:
|
||||
: G1: : : : 9.0: 10.0: 11.0: 12.0: 13.0: 14.0: 15.0: 15.0:
|
||||
:--------:-----------:--------:----:------------:----------:-----------:-----------:------------:----------:-----------:-----------:
|
||||
:--------:-----------:--------:----:-----------:-----------:-----------:-----------:------------:----------:-----------:-----------:
|
||||
: PROD: 10, 10: PROD:ORAT: 16.0: 17.0: 18.0: 19.0: 20.0: 21.0: 22.0: 23.0:
|
||||
:--------:-----------:--------:----:------------:----------:-----------:-----------:------------:----------:-----------:-----------:
|
||||
:--------:-----------:--------:----:-----------:-----------:-----------:-----------:------------:----------:-----------:-----------:
|
||||
: INJ: 1, 1: INJ:GRAT: 24.0: 25.0: 26.0: 27.0: 28.0: 29.0: 30.0: 31.0:
|
||||
:--------:-----------:--------:----:------------:----------:-----------:-----------:------------:----------:-----------:-----------:
|
||||
:--------:-----------:--------:----:-----------:-----------:-----------:-----------:------------:----------:-----------:-----------:
|
||||
)";
|
||||
|
||||
std::stringstream str;
|
||||
@@ -335,11 +335,11 @@ BOOST_AUTO_TEST_CASE(Injection)
|
||||
: : : OIL : WAT : GAS : STB/DAY : STB/DAY : MSCF/DAY : RB/DAY : PSIA : PSIA :
|
||||
==============================================================================================================
|
||||
: FIELD: : : : : 1.0: 2.0: 3.0: 4.0: : :
|
||||
:--------:-----------:------:------:------:------------:----------:-----------:-----------:--------:--------:
|
||||
:--------:-----------:------:------:------:-----------:-----------:-----------:-----------:--------:--------:
|
||||
: G1: : : : : 5.0: 6.0: 7.0: 8.0: : :
|
||||
:--------:-----------:------:------:------:------------:----------:-----------:-----------:--------:--------:
|
||||
:--------:-----------:------:------:------:-----------:-----------:-----------:-----------:--------:--------:
|
||||
: INJ: 1, 1: : : GRAT: 9.0: 10.0: 11.0: 12.0: 13.0: 14.0:
|
||||
:--------:-----------:------:------:------:------------:----------:-----------:-----------:--------:--------:
|
||||
:--------:-----------:------:------:------:-----------:-----------:-----------:-----------:--------:--------:
|
||||
)";
|
||||
|
||||
std::stringstream str;
|
||||
|
||||
Reference in New Issue
Block a user