Factor out code that writes solution field variables
We will reuse this later for also writing the initial solution.
This commit is contained in:
parent
e7da0053cf
commit
1c0051b40e
@ -895,13 +895,10 @@ void EclipseWriter::writeInit(const SimulatorTimer &timer) {
|
||||
fortio.writeKeyword<float> ("PERMZ", *parser_);
|
||||
}
|
||||
|
||||
void EclipseWriter::writeTimeStep(
|
||||
const SimulatorTimer& timer,
|
||||
const SimulatorState& reservoirState,
|
||||
const WellState& wellState) {
|
||||
// eclipse timestep index
|
||||
const int timeStep = stepNum (timer);
|
||||
|
||||
void EclipseWriter::writeSolution (const int timeStep,
|
||||
const SimulatorTimer& timer,
|
||||
const SimulatorState& reservoirState,
|
||||
const WellState& wellState) {
|
||||
// convert the pressures from Pascals to bar because eclipse
|
||||
// seems to write bars
|
||||
const std::vector<double>& pas = reservoirState.pressure ();
|
||||
@ -935,6 +932,14 @@ void EclipseWriter::writeTimeStep(
|
||||
uses_.num_phases));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EclipseWriter::writeTimeStep(const SimulatorTimer& timer,
|
||||
const SimulatorState& reservoirState,
|
||||
const WellState& wellState) {
|
||||
// eclipse timestep index
|
||||
const int timeStep = stepNum (timer);
|
||||
writeSolution (timeStep, timer, reservoirState, wellState);
|
||||
|
||||
/* Summary variables (well reporting) */
|
||||
// TODO: instead of writing the header (smspec) every time, it should
|
||||
|
@ -87,6 +87,12 @@ private:
|
||||
std::string outputDir_;
|
||||
std::string baseName_;
|
||||
PhaseUsage uses_; // active phases in the input deck
|
||||
|
||||
/// Write solution field variables (pressure and saturation)
|
||||
void writeSolution (const int timeStep,
|
||||
const SimulatorTimer& timer,
|
||||
const SimulatorState& reservoirState,
|
||||
const WellState& wellState);
|
||||
};
|
||||
} // namespace Opm
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user