internalize the WINJTEMP keyword

currently the only quantity that us used is the well temperature,
i.e., specifying the fluid enthalpy does not have any effect.
This commit is contained in:
Andreas Lauser
2018-04-10 14:56:11 +02:00
parent d381110119
commit 10258f247b
2 changed files with 29 additions and 3 deletions

View File

@@ -182,6 +182,9 @@ namespace Opm {
else if (keyword.name() == "WTEMP")
handleWTEMP(keyword, currentStep);
else if (keyword.name() == "WINJTEMP")
handleWINJTEMP(keyword, currentStep);
else if (keyword.name() == "WCONINJH")
handleWCONINJH(section, keyword, currentStep);
@@ -722,9 +725,9 @@ namespace Opm {
const std::string& wellNamePattern = record.getItem("WELL").getTrimmedString(0);
for (auto* well : getWells(wellNamePattern)) {
// TODO: Can this be done like this? Setting the temperature only has an
// effect on injectors, but specifying this for producers won't hurt and
// wells can also switch their injector/producer status. Note that
// TODO: Is this the right approach? Setting the well temperature only
// has an effect on injectors, but specifying it for producers won't hurt
// and wells can also switch their injector/producer status. Note that
// modifying the injector properties for producer wells currently leads
// to a very weird segmentation fault downstream. For now, let's take the
// water route.
@@ -737,6 +740,28 @@ namespace Opm {
}
}
void Schedule::handleWINJTEMP( const DeckKeyword& keyword, size_t currentStep) {
// we do not support the "enthalpy" field yet. how to do this is a more difficult
// question.
for( const auto& record : keyword ) {
const std::string& wellNamePattern = record.getItem("WELL").getTrimmedString(0);
for (auto* well : getWells(wellNamePattern)) {
// TODO: Is this the right approach? Setting the well temperature only
// has an effect on injectors, but specifying it for producers won't hurt
// and wells can also switch their injector/producer status. Note that
// modifying the injector properties for producer wells currently leads
// to a very weird segmentation fault downstream. For now, let's take the
// water route.
if (well->isInjector(currentStep)) {
WellInjectionProperties injectionProperties = well->getInjectionProperties(currentStep);
injectionProperties.temperature = record.getItem("TEMPERATURE").getSIDouble(0);
well->setInjectionProperties(currentStep, injectionProperties);
}
}
}
}
void Schedule::handleWCONINJH( const SCHEDULESection& section, const DeckKeyword& keyword, size_t currentStep) {
for( const auto& record : keyword ) {
const std::string& wellName = record.getItem("WELL").getTrimmedString(0);