diff --git a/ebos/eclpeacemanwell.hh b/ebos/eclpeacemanwell.hh index 4d26c0d15..d459484c8 100644 --- a/ebos/eclpeacemanwell.hh +++ b/ebos/eclpeacemanwell.hh @@ -718,6 +718,10 @@ public: refDepth_ = dofPos[2]; } + int numConnections() const { + return dofVariables_.size(); + } + /*! * \brief Finalize the specification of the borehole. */ diff --git a/ebos/eclwellmanager.hh b/ebos/eclwellmanager.hh index d6298017f..4adc841e5 100644 --- a/ebos/eclwellmanager.hh +++ b/ebos/eclwellmanager.hh @@ -555,6 +555,19 @@ public: wellOut.rates.set( rt::wat, ebosWell->surfaceRate(waterPhaseIdx) ); wellOut.rates.set( rt::oil, ebosWell->surfaceRate(oilPhaseIdx) ); wellOut.rates.set( rt::gas, ebosWell->surfaceRate(gasPhaseIdx) ); + + const int numConnections = ebosWell->numConnections(); + wellOut.connections.resize(numConnections); + + for( int i = 0; i < numConnections; ++i ) { + auto& connection = wellOut.connections[ i ]; + connection.index = 0; + connection.pressure = 0.0; + connection.reservoir_rate = 0.0; + connection.rates.set( rt::wat, 0.0 ); + connection.rates.set( rt::oil, 0.0 ); + connection.rates.set( rt::gas, 0.0 ); + } } return wellDat;