Add flag allowCrossFlow()

This PR adds support for item 10 in welspecs where a flag is used to
determine whether the well should allow cross flow or not.

A test is added to check default behavior.
This commit is contained in:
Tor Harald Sandve
2015-10-06 15:47:07 +02:00
parent 6dee686dc0
commit 9665b54ad3
4 changed files with 49 additions and 5 deletions

View File

@@ -1272,7 +1272,12 @@ namespace Opm {
if (refDepthItem->hasValue(0))
refDepth.setValue( refDepthItem->getSIDouble(0));
well = std::make_shared<Well>(wellName, m_grid , headI, headJ, refDepth, preferredPhase, m_timeMap , timeStep, wellCompletionOrder);
bool allowCrossFlow = true;
const std::string& allowCrossFlowStr = record->getItem("CROSSFLOW")->getTrimmedString(0);
if (allowCrossFlowStr == "NO")
allowCrossFlow = false;
well = std::make_shared<Well>(wellName, m_grid , headI, headJ, refDepth, preferredPhase, m_timeMap , timeStep, wellCompletionOrder, allowCrossFlow);
m_wells.insert( wellName , well);
m_events.addEvent( ScheduleEvents::NEW_WELL , timeStep );
}