renamed saltwater-->brine and removed keywords from missingFeatures

This commit is contained in:
Trine S. Mykkeltvedt 2019-12-03 17:48:17 +01:00 committed by Tor Harald Sandve
parent 5749615bd8
commit 99e7785fb5
20 changed files with 80 additions and 83 deletions

View File

@ -168,7 +168,7 @@ opm_add_test(flow
flow/flow_ebos_oilwater.cpp flow/flow_ebos_oilwater.cpp
flow/flow_ebos_polymer.cpp flow/flow_ebos_polymer.cpp
flow/flow_ebos_foam.cpp flow/flow_ebos_foam.cpp
flow/flow_ebos_saltwater.cpp flow/flow_ebos_brine.cpp
flow/flow_ebos_solvent.cpp flow/flow_ebos_solvent.cpp
flow/flow_ebos_energy.cpp flow/flow_ebos_energy.cpp
flow/flow_ebos_oilwater_polymer.cpp flow/flow_ebos_oilwater_polymer.cpp
@ -224,7 +224,7 @@ endif()
# the research oriented general-purpose ECL simulator ("ebos" == &ecl # the research oriented general-purpose ECL simulator ("ebos" == &ecl
# &black-&oil &simulator) # &black-&oil &simulator)
set(MEBOS_TARGETS "") set(MEBOS_TARGETS "")
foreach(OBJ blackoil solvent polymer foam gasoil oilwater oilwaterpolymer thermal) foreach(OBJ blackoil solvent polymer foam brine gasoil oilwater oilwaterpolymer thermal)
add_library(ebos_lib${OBJ} OBJECT EXCLUDE_FROM_ALL ebos/ebos_${OBJ}.cc) add_library(ebos_lib${OBJ} OBJECT EXCLUDE_FROM_ALL ebos/ebos_${OBJ}.cc)
list(APPEND MEBOS_TARGETS $<TARGET_OBJECTS:ebos_lib${OBJ}>) list(APPEND MEBOS_TARGETS $<TARGET_OBJECTS:ebos_lib${OBJ}>)
endforeach() endforeach()
@ -248,7 +248,7 @@ else()
set(EBOS_EXTENSIONS_DEFAULT_ENABLE_IF "TRUE") set(EBOS_EXTENSIONS_DEFAULT_ENABLE_IF "TRUE")
endif() endif()
foreach(OBJ solvent polymer foam saltwater gasoil oilwater oilwaterpolymer thermal) foreach(OBJ solvent polymer foam brine gasoil oilwater oilwaterpolymer thermal)
opm_add_test(ebos_${OBJ} opm_add_test(ebos_${OBJ}
ONLY_COMPILE ONLY_COMPILE
DEFAULT_ENABLE_IF ${EBOS_EXTENSIONS_DEFAULT_ENABLE_IF} DEFAULT_ENABLE_IF ${EBOS_EXTENSIONS_DEFAULT_ENABLE_IF}
@ -288,7 +288,7 @@ opm_add_test(ebos_plain
LIBRARIES opmsimulators) LIBRARIES opmsimulators)
if (BUILD_EBOS_EXTENSIONS) if (BUILD_EBOS_EXTENSIONS)
foreach(TGT ebos_solvent ebos_polymer ebos_foam ebos_saltwater ebos_gasoil ebos_oilwater ebos_oilwaterpolymer ebos_thermal mebos) foreach(TGT ebos_solvent ebos_polymer ebos_foam ebos_brine ebos_saltwater ebos_gasoil ebos_oilwater ebos_oilwaterpolymer ebos_thermal mebos)
install(TARGETS ${TGT} DESTINATION bin) install(TARGETS ${TGT} DESTINATION bin)
opm_add_bash_completion(${TGT}) opm_add_bash_completion(${TGT})
endforeach() endforeach()

View File

@ -32,21 +32,21 @@
BEGIN_PROPERTIES BEGIN_PROPERTIES
NEW_TYPE_TAG(EbosSaltWaterTypeTag, INHERITS_FROM(EbosTypeTag)); NEW_TYPE_TAG(EbosBrineTypeTag, INHERITS_FROM(EbosTypeTag));
// enable the salt extension of the black oil model // enable the brine extension of the black oil model
SET_BOOL_PROP(EbosSaltWaterTypeTag, EnableSaltWater, true); SET_BOOL_PROP(EbosBrineTypeTag, EnableBrine, true);
END_PROPERTIES END_PROPERTIES
namespace Opm { namespace Opm {
void ebosSaltWaterSetDeck(Opm::Deck* deck, void ebosBrineSetDeck(Opm::Deck* deck,
Opm::ParseContext* parseContext, Opm::ParseContext* parseContext,
Opm::ErrorGuard* errorGuard, Opm::ErrorGuard* errorGuard,
double externalSetupTime) double externalSetupTime)
{ {
typedef TTAG(EbosSaltWaterTypeTag) ProblemTypeTag; typedef TTAG(EbosBrineTypeTag) ProblemTypeTag;
typedef GET_PROP_TYPE(ProblemTypeTag, Vanguard) Vanguard; typedef GET_PROP_TYPE(ProblemTypeTag, Vanguard) Vanguard;
Vanguard::setExternalSetupTime(externalSetupTime); Vanguard::setExternalSetupTime(externalSetupTime);
@ -55,9 +55,9 @@ void ebosSaltWaterSetDeck(Opm::Deck* deck,
Vanguard::setExternalDeck(deck); Vanguard::setExternalDeck(deck);
} }
int ebosSaltWaterMain(int argc, char **argv) int ebosBrineMain(int argc, char **argv)
{ {
typedef TTAG(EbosSaltWaterTypeTag) ProblemTypeTag; typedef TTAG(EbosBrineTypeTag) ProblemTypeTag;
return Opm::startEbos<ProblemTypeTag>(argc, argv); return Opm::startEbos<ProblemTypeTag>(argc, argv);
} }

View File

@ -23,22 +23,22 @@
/*! /*!
* \file * \file
* *
* \brief The function prototypes required to start the salt variant of ebos * \brief The function prototypes required to start the brine variant of ebos
*/ */
#ifndef EBOS_SALTWATER_HH #ifndef EBOS_BRINE_HH
#define EBOS_SALTWATER_HH #define EBOS_BRINE_HH
#include <opm/parser/eclipse/Deck/Deck.hpp> #include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp> #include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Parser/ErrorGuard.hpp> #include <opm/parser/eclipse/Parser/ErrorGuard.hpp>
namespace Opm { namespace Opm {
void ebosSaltWaterSetDeck(Opm::Deck* deck, void ebosBrineSetDeck(Opm::Deck* deck,
Opm::ParseContext* parseContext, Opm::ParseContext* parseContext,
Opm::ErrorGuard* errorGuard, Opm::ErrorGuard* errorGuard,
double externalSetupTime); double externalSetupTime);
int ebosSaltWaterMain(int argc, char** argv); int ebosBrineMain(int argc, char** argv);
} }
#endif #endif

View File

@ -23,15 +23,15 @@
/*! /*!
* \file * \file
* *
* \brief The main function for the stand alone salt variant of ebos. * \brief The main function for the stand alone brine variant of ebos.
* *
* This only calls the ebosSaltWaterMain() function. * This only calls the ebosBrineMain() function.
*/ */
#include "config.h" #include "config.h"
#include "ebos_saltwater.hh" #include "ebos_brine.hh"
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
return Opm::ebosSaltWaterMain(argc, argv); return Opm::ebosBrineMain(argc, argv);
} }

View File

@ -312,7 +312,7 @@ public:
cPolymer_.resize(bufferSize, 0.0); cPolymer_.resize(bufferSize, 0.0);
if (GET_PROP_VALUE(TypeTag, EnableFoam)) if (GET_PROP_VALUE(TypeTag, EnableFoam))
cFoam_.resize(bufferSize, 0.0); cFoam_.resize(bufferSize, 0.0);
if (GET_PROP_VALUE(TypeTag, EnableSaltWater)) if (GET_PROP_VALUE(TypeTag, EnableBrine))
cSalt_.resize(bufferSize, 0.0); cSalt_.resize(bufferSize, 0.0);
if (simulator_.problem().vapparsActive()) if (simulator_.problem().vapparsActive())
@ -570,7 +570,7 @@ public:
} }
if (cSalt_.size() > 0) { if (cSalt_.size() > 0) {
cSalt_[globalDofIdx] = fs.saltconcentration().value(); cSalt_[globalDofIdx] = fs.saltConcentration().value();
} }
if (bubblePointPressure_.size() > 0) { if (bubblePointPressure_.size() > 0) {

View File

@ -26,7 +26,7 @@
#include <flow/flow_ebos_solvent.hpp> #include <flow/flow_ebos_solvent.hpp>
#include <flow/flow_ebos_polymer.hpp> #include <flow/flow_ebos_polymer.hpp>
#include <flow/flow_ebos_foam.hpp> #include <flow/flow_ebos_foam.hpp>
#include <flow/flow_ebos_saltwater.hpp> #include <flow/flow_ebos_brine.hpp>
#include <flow/flow_ebos_energy.hpp> #include <flow/flow_ebos_energy.hpp>
#include <flow/flow_ebos_oilwater_polymer.hpp> #include <flow/flow_ebos_oilwater_polymer.hpp>
#include <flow/flow_ebos_oilwater_polymer_injectivity.hpp> #include <flow/flow_ebos_oilwater_polymer_injectivity.hpp>
@ -429,10 +429,10 @@ int main(int argc, char** argv)
Opm::flowEbosFoamSetDeck(externalSetupTimer.elapsed(), *deck, *eclipseState, *schedule, *summaryConfig); Opm::flowEbosFoamSetDeck(externalSetupTimer.elapsed(), *deck, *eclipseState, *schedule, *summaryConfig);
return Opm::flowEbosFoamMain(argc, argv, outputCout, outputFiles); return Opm::flowEbosFoamMain(argc, argv, outputCout, outputFiles);
} }
// Salt case // Brine case
else if ( phases.active( Opm::Phase::SALTWATER ) ) { else if ( phases.active( Opm::Phase::BRINE ) ) {
Opm::flowEbosSaltWaterSetDeck(externalSetupTimer.elapsed(), *deck, *eclipseState, *schedule, *summaryConfig); Opm::flowEbosBrineSetDeck(externalSetupTimer.elapsed(), *deck, *eclipseState, *schedule, *summaryConfig);
return Opm::flowEbosSaltWaterMain(argc, argv, outputCout, outputFiles); return Opm::flowEbosBrineMain(argc, argv, outputCout, outputFiles);
} }
// Solvent case // Solvent case
else if ( phases.active( Opm::Phase::SOLVENT ) ) { else if ( phases.active( Opm::Phase::SOLVENT ) ) {
@ -452,7 +452,7 @@ int main(int argc, char** argv)
else else
{ {
if (outputCout) if (outputCout)
std::cerr << "No suitable configuration found, valid are Twophase, polymer, foam, salt, solvent, energy, blackoil." << std::endl; std::cerr << "No suitable configuration found, valid are Twophase, polymer, foam, brine, solvent, energy, blackoil." << std::endl;
return EXIT_FAILURE; return EXIT_FAILURE;
} }
} }

View File

@ -16,7 +16,7 @@
*/ */
#include "config.h" #include "config.h"
#include <flow/flow_ebos_saltwater.hpp> #include <flow/flow_ebos_brine.hpp>
#include <opm/material/common/ResetLocale.hpp> #include <opm/material/common/ResetLocale.hpp>
#include <opm/grid/CpGrid.hpp> #include <opm/grid/CpGrid.hpp>
@ -31,14 +31,14 @@
namespace Opm { namespace Opm {
namespace Properties { namespace Properties {
NEW_TYPE_TAG(EclFlowSaltWaterProblem, INHERITS_FROM(EclFlowProblem)); NEW_TYPE_TAG(EclFlowBrineProblem, INHERITS_FROM(EclFlowProblem));
SET_BOOL_PROP(EclFlowSaltWaterProblem, EnableSaltWater, true); SET_BOOL_PROP(EclFlowBrineProblem, EnableBrine, true);
}} }}
namespace Opm { namespace Opm {
void flowEbosSaltWaterSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig) void flowEbosBrineSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
{ {
typedef TTAG(EclFlowSaltWaterProblem) TypeTag; typedef TTAG(EclFlowBrineProblem) TypeTag;
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard; typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
Vanguard::setExternalSetupTime(setupTime); Vanguard::setExternalSetupTime(setupTime);
@ -50,7 +50,7 @@ void flowEbosSaltWaterSetDeck(double setupTime, Deck &deck, EclipseState& eclSta
// ----------------- Main program ----------------- // ----------------- Main program -----------------
int flowEbosSaltWaterMain(int argc, char** argv, bool outputCout, bool outputFiles) int flowEbosBrineMain(int argc, char** argv, bool outputCout, bool outputFiles)
{ {
// we always want to use the default locale, and thus spare us the trouble // we always want to use the default locale, and thus spare us the trouble
// with incorrect locale settings. // with incorrect locale settings.
@ -63,7 +63,7 @@ int flowEbosSaltWaterMain(int argc, char** argv, bool outputCout, bool outputFil
Dune::MPIHelper::instance(argc, argv).rank(); Dune::MPIHelper::instance(argc, argv).rank();
#endif #endif
Opm::FlowMainEbos<TTAG(EclFlowSaltWaterProblem)> mainfunc; Opm::FlowMainEbos<TTAG(EclFlowBrineProblem)> mainfunc;
return mainfunc.execute(argc, argv, outputCout, outputFiles); return mainfunc.execute(argc, argv, outputCout, outputFiles);
} }

View File

@ -14,8 +14,8 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>. along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef FLOW_EBOS_SALTWATER_HPP #ifndef FLOW_EBOS_BRINE_HPP
#define FLOW_EBOS_SALTWATER_HPP #define FLOW_EBOS_BRINE_HPP
#include <opm/parser/eclipse/Deck/Deck.hpp> #include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp> #include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
@ -24,8 +24,8 @@
namespace Opm { namespace Opm {
void flowEbosSaltWaterSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig); void flowEbosBrineSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
int flowEbosSaltWaterMain(int argc, char** argv, bool outputCout, bool outputFiles); int flowEbosBrineMain(int argc, char** argv, bool outputCout, bool outputFiles);
} }
#endif // FLOW_EBOS_SALTWATER_HPP #endif // FLOW_EBOS_BRINE_HPP

View File

@ -53,7 +53,7 @@ public:
GET_PROP_VALUE(TypeTag, EnablePolymer), GET_PROP_VALUE(TypeTag, EnablePolymer),
GET_PROP_VALUE(TypeTag, EnableEnergy), GET_PROP_VALUE(TypeTag, EnableEnergy),
GET_PROP_VALUE(TypeTag, EnableFoam), GET_PROP_VALUE(TypeTag, EnableFoam),
GET_PROP_VALUE(TypeTag, EnableSaltWater), GET_PROP_VALUE(TypeTag, EnableBrine),
/*PVOffset=*/0, /*PVOffset=*/0,
/*disabledCompIdx=*/FluidSystem::waterCompIdx> type; /*disabledCompIdx=*/FluidSystem::waterCompIdx> type;
}; };

View File

@ -53,7 +53,7 @@ public:
GET_PROP_VALUE(TypeTag, EnablePolymer), GET_PROP_VALUE(TypeTag, EnablePolymer),
GET_PROP_VALUE(TypeTag, EnableEnergy), GET_PROP_VALUE(TypeTag, EnableEnergy),
GET_PROP_VALUE(TypeTag, EnableFoam), GET_PROP_VALUE(TypeTag, EnableFoam),
GET_PROP_VALUE(TypeTag, EnableSaltWater), GET_PROP_VALUE(TypeTag, EnableBrine),
/*PVOffset=*/0, /*PVOffset=*/0,
/*disabledCompIdx=*/FluidSystem::gasCompIdx> type; /*disabledCompIdx=*/FluidSystem::gasCompIdx> type;
}; };

View File

@ -54,7 +54,7 @@ public:
GET_PROP_VALUE(TypeTag, EnablePolymer), GET_PROP_VALUE(TypeTag, EnablePolymer),
GET_PROP_VALUE(TypeTag, EnableEnergy), GET_PROP_VALUE(TypeTag, EnableEnergy),
GET_PROP_VALUE(TypeTag, EnableFoam), GET_PROP_VALUE(TypeTag, EnableFoam),
GET_PROP_VALUE(TypeTag, EnableSaltWater), GET_PROP_VALUE(TypeTag, EnableBrine),
/*PVOffset=*/0, /*PVOffset=*/0,
/*disabledCompIdx=*/FluidSystem::gasCompIdx> type; /*disabledCompIdx=*/FluidSystem::gasCompIdx> type;
}; };

View File

@ -56,7 +56,7 @@ public:
2, 2,
0, 0,
GET_PROP_VALUE(TypeTag, EnableFoam), GET_PROP_VALUE(TypeTag, EnableFoam),
GET_PROP_VALUE(TypeTag, EnableSaltWater), GET_PROP_VALUE(TypeTag, EnableBrine),
/*PVOffset=*/0, /*PVOffset=*/0,
/*disabledCompIdx=*/FluidSystem::gasCompIdx> type; /*disabledCompIdx=*/FluidSystem::gasCompIdx> type;
}; };

View File

@ -33,11 +33,11 @@ namespace Opm
// sense that they can be active or not and canonical indices can be translated // sense that they can be active or not and canonical indices can be translated
// to and from active ones. That said, they are not considered by num_phases or // to and from active ones. That said, they are not considered by num_phases or
// MaxNumPhases. The crypto phases which are currently implemented are solvent, // MaxNumPhases. The crypto phases which are currently implemented are solvent,
// polymer, energy, polymer molecular weight, foam and salt. // polymer, energy, polymer molecular weight, foam and brine.
static const int NumCryptoPhases = 6; static const int NumCryptoPhases = 6;
// enum ComponentIndex { Water = 0, Oil = 1, Gas = 2 }; // enum ComponentIndex { Water = 0, Oil = 1, Gas = 2 };
enum PhaseIndex { Aqua = 0, Liquid = 1, Vapour = 2, Solvent = 3, Polymer = 4, Energy = 5, PolymerMW = 6, Foam = 7, Salt = 8 }; enum PhaseIndex { Aqua = 0, Liquid = 1, Vapour = 2, Solvent = 3, Polymer = 4, Energy = 5, PolymerMW = 6, Foam = 7, Brine = 8 };
}; };
struct PhaseUsage : public BlackoilPhases struct PhaseUsage : public BlackoilPhases
@ -51,7 +51,7 @@ namespace Opm
// polymer molecular weight // polymer molecular weight
bool has_polymermw; bool has_polymermw;
bool has_foam; bool has_foam;
bool has_salt; bool has_brine;
}; };
/// Check or assign presence of a formed, free phase. Limited to /// Check or assign presence of a formed, free phase. Limited to

View File

@ -123,14 +123,14 @@ namespace Opm
else else
pu.phase_pos[BlackoilPhases::Foam] = -1; pu.phase_pos[BlackoilPhases::Foam] = -1;
// Add salt info // Add brine info
pu.has_salt = phases.active(Phase::SALTWATER); pu.has_brine = phases.active(Phase::BRINE);
if (pu.has_salt) { if (pu.has_brine) {
pu.phase_pos[BlackoilPhases::Salt] = numActivePhases; pu.phase_pos[BlackoilPhases::Brine] = numActivePhases;
++ numActivePhases; ++ numActivePhases;
} }
else else
pu.phase_pos[BlackoilPhases::Salt] = -1; pu.phase_pos[BlackoilPhases::Brine] = -1;
return pu; return pu;
} }

View File

@ -84,7 +84,7 @@ SET_BOOL_PROP(EclFlowProblem, EnableSolvent, false);
SET_BOOL_PROP(EclFlowProblem, EnableTemperature, true); SET_BOOL_PROP(EclFlowProblem, EnableTemperature, true);
SET_BOOL_PROP(EclFlowProblem, EnableEnergy, false); SET_BOOL_PROP(EclFlowProblem, EnableEnergy, false);
SET_BOOL_PROP(EclFlowProblem, EnableFoam, false); SET_BOOL_PROP(EclFlowProblem, EnableFoam, false);
SET_BOOL_PROP(EclFlowProblem, EnableSaltWater, false); SET_BOOL_PROP(EclFlowProblem, EnableBrine, false);
SET_TYPE_PROP(EclFlowProblem, EclWellModel, Opm::BlackoilWellModel<TypeTag>); SET_TYPE_PROP(EclFlowProblem, EclWellModel, Opm::BlackoilWellModel<TypeTag>);
SET_TAG_PROP(EclFlowProblem, LinearSolverSplice, FlowIstlSolver); SET_TAG_PROP(EclFlowProblem, LinearSolverSplice, FlowIstlSolver);
@ -125,13 +125,13 @@ namespace Opm {
static const int contiEnergyEqIdx = Indices::contiEnergyEqIdx; static const int contiEnergyEqIdx = Indices::contiEnergyEqIdx;
static const int contiPolymerMWEqIdx = Indices::contiPolymerMWEqIdx; static const int contiPolymerMWEqIdx = Indices::contiPolymerMWEqIdx;
static const int contiFoamEqIdx = Indices::contiFoamEqIdx; static const int contiFoamEqIdx = Indices::contiFoamEqIdx;
static const int contiSaltWaterEqIdx = Indices::contiSaltWaterEqIdx; static const int contiBrineEqIdx = Indices::contiBrineEqIdx;
static const int solventSaturationIdx = Indices::solventSaturationIdx; static const int solventSaturationIdx = Indices::solventSaturationIdx;
static const int polymerConcentrationIdx = Indices::polymerConcentrationIdx; static const int polymerConcentrationIdx = Indices::polymerConcentrationIdx;
static const int polymerMoleWeightIdx = Indices::polymerMoleWeightIdx; static const int polymerMoleWeightIdx = Indices::polymerMoleWeightIdx;
static const int temperatureIdx = Indices::temperatureIdx; static const int temperatureIdx = Indices::temperatureIdx;
static const int foamConcentrationIdx = Indices::foamConcentrationIdx; static const int foamConcentrationIdx = Indices::foamConcentrationIdx;
static const int saltWaterConcentrationIdx = Indices::saltConcentrationIdx; static const int saltConcentrationIdx = Indices::saltConcentrationIdx;
typedef Dune::FieldVector<Scalar, numEq > VectorBlockType; typedef Dune::FieldVector<Scalar, numEq > VectorBlockType;
typedef typename SparseMatrixAdapter::MatrixBlock MatrixBlockType; typedef typename SparseMatrixAdapter::MatrixBlock MatrixBlockType;
@ -167,7 +167,7 @@ namespace Opm {
, has_polymermw_(GET_PROP_VALUE(TypeTag, EnablePolymerMW)) , has_polymermw_(GET_PROP_VALUE(TypeTag, EnablePolymerMW))
, has_energy_(GET_PROP_VALUE(TypeTag, EnableEnergy)) , has_energy_(GET_PROP_VALUE(TypeTag, EnableEnergy))
, has_foam_(GET_PROP_VALUE(TypeTag, EnableFoam)) , has_foam_(GET_PROP_VALUE(TypeTag, EnableFoam))
, has_salt_(GET_PROP_VALUE(TypeTag, EnableSaltWater)) , has_brine_(GET_PROP_VALUE(TypeTag, EnableBrine))
, param_( param ) , param_( param )
, well_model_ (well_model) , well_model_ (well_model)
, terminal_output_ (terminal_output) , terminal_output_ (terminal_output)
@ -635,11 +635,11 @@ namespace Opm {
R_sum[ contiFoamEqIdx ] += R2; R_sum[ contiFoamEqIdx ] += R2;
maxCoeff[ contiFoamEqIdx ] = std::max( maxCoeff[ contiFoamEqIdx ], std::abs( R2 ) / pvValue ); maxCoeff[ contiFoamEqIdx ] = std::max( maxCoeff[ contiFoamEqIdx ], std::abs( R2 ) / pvValue );
} }
if (has_salt_ ) { if (has_brine_ ) {
B_avg[ contiSaltWaterEqIdx ] += 1.0 / fs.invB(FluidSystem::gasPhaseIdx).value(); B_avg[ contiBrineEqIdx ] += 1.0 / fs.invB(FluidSystem::gasPhaseIdx).value();
const auto R2 = ebosResid[cell_idx][contiSaltWaterEqIdx]; const auto R2 = ebosResid[cell_idx][contiBrineEqIdx];
R_sum[ contiSaltWaterEqIdx ] += R2; R_sum[ contiBrineEqIdx ] += R2;
maxCoeff[ contiSaltWaterEqIdx ] = std::max( maxCoeff[ contiSaltWaterEqIdx ], std::abs( R2 ) / pvValue ); maxCoeff[ contiBrineEqIdx ] = std::max( maxCoeff[ contiBrineEqIdx ], std::abs( R2 ) / pvValue );
} }
if (has_polymermw_) { if (has_polymermw_) {
@ -730,8 +730,8 @@ namespace Opm {
if (has_foam_) { if (has_foam_) {
compNames[foamConcentrationIdx] = "Foam"; compNames[foamConcentrationIdx] = "Foam";
} }
if (has_salt_) { if (has_brine_) {
compNames[saltWaterConcentrationIdx] = "Salt"; compNames[saltConcentrationIdx] = "Brine";
} }
} }
@ -885,7 +885,7 @@ namespace Opm {
const bool has_polymermw_; const bool has_polymermw_;
const bool has_energy_; const bool has_energy_;
const bool has_foam_; const bool has_foam_;
const bool has_salt_; const bool has_brine_;
ModelParameters param_; ModelParameters param_;
SimulatorReport failureReport_; SimulatorReport failureReport_;

View File

@ -124,7 +124,6 @@ namespace MissingFeatures {
"BPARA", "BPARA",
"BPIDIMS", "BPIDIMS",
"BRANPROP", "BRANPROP",
"BRINE",
"BTOBALFA", "BTOBALFA",
"BTOBALFV", "BTOBALFV",
"CALTRAC", "CALTRAC",
@ -627,7 +626,6 @@ namespace MissingFeatures {
"SALT", "SALT",
"SALTNODE", "SALTNODE",
"SALTREST", "SALTREST",
"SALTVD",
"SCALELIM", "SCALELIM",
"SCDATAB", "SCDATAB",
"SCDETAB", "SCDETAB",
@ -809,7 +807,6 @@ namespace MissingFeatures {
"WPOLYRED", "WPOLYRED",
"WPOTCALC", "WPOTCALC",
"WREGROUP", "WREGROUP",
"WSALT",
"WSCCLEAN", "WSCCLEAN",
"WSCCLENL", "WSCCLENL",
"WSCTAB", "WSCTAB",

View File

@ -31,7 +31,7 @@
#include <opm/models/blackoil/blackoilpolymermodules.hh> #include <opm/models/blackoil/blackoilpolymermodules.hh>
#include <opm/models/blackoil/blackoilsolventmodules.hh> #include <opm/models/blackoil/blackoilsolventmodules.hh>
#include <opm/models/blackoil/blackoilfoammodules.hh> #include <opm/models/blackoil/blackoilfoammodules.hh>
#include <opm/models/blackoil/blackoilsaltwatermodules.hh> #include <opm/models/blackoil/blackoilbrinemodules.hh>
#include <opm/material/densead/DynamicEvaluation.hpp> #include <opm/material/densead/DynamicEvaluation.hpp>
@ -69,22 +69,22 @@ namespace Opm
using Base::has_solvent; using Base::has_solvent;
using Base::has_polymer; using Base::has_polymer;
using Base::has_foam; using Base::has_foam;
using Base::has_salt; using Base::has_brine;
using Base::has_energy; using Base::has_energy;
using PolymerModule = Opm::BlackOilPolymerModule<TypeTag>; using PolymerModule = Opm::BlackOilPolymerModule<TypeTag>;
using FoamModule = Opm::BlackOilFoamModule<TypeTag>; using FoamModule = Opm::BlackOilFoamModule<TypeTag>;
using SaltWaterModule = Opm::BlackOilSaltWaterModule<TypeTag>; using BrineModule = Opm::BlackOilBrineModule<TypeTag>;
// polymer concentration and temperature are already known by the well, so // polymer concentration and temperature are already known by the well, so
// polymer and energy conservation do not need to be considered explicitly // polymer and energy conservation do not need to be considered explicitly
static const int numPolymerEq = Indices::numPolymers; static const int numPolymerEq = Indices::numPolymers;
static const int numEnergyEq = Indices::numEnergy; static const int numEnergyEq = Indices::numEnergy;
static const int numFoamEq = Indices::numFoam; static const int numFoamEq = Indices::numFoam;
static const int numSaltEq = Indices::numSaltWater; static const int numBrineEq = Indices::numBrine;
// number of the conservation equations // number of the conservation equations
static const int numWellConservationEq = numEq - numPolymerEq - numEnergyEq - numFoamEq - numSaltEq; static const int numWellConservationEq = numEq - numPolymerEq - numEnergyEq - numFoamEq - numBrineEq;
// number of the well control equations // number of the well control equations
static const int numWellControlEq = 1; static const int numWellControlEq = 1;
// number of the well equations that will always be used // number of the well equations that will always be used
@ -142,7 +142,7 @@ namespace Opm
using Base::contiSolventEqIdx; using Base::contiSolventEqIdx;
using Base::contiPolymerEqIdx; using Base::contiPolymerEqIdx;
using Base::contiFoamEqIdx; using Base::contiFoamEqIdx;
using Base::contiSaltWaterEqIdx; using Base::contiBrineEqIdx;
static const int contiEnergyEqIdx = Indices::contiEnergyEqIdx; static const int contiEnergyEqIdx = Indices::contiEnergyEqIdx;
StandardWell(const Well& well, const int time_step, StandardWell(const Well& well, const int time_step,

View File

@ -691,16 +691,16 @@ namespace Opm
connectionRates_[perf][contiFoamEqIdx] = Base::restrictEval(cq_s_foam); connectionRates_[perf][contiFoamEqIdx] = Base::restrictEval(cq_s_foam);
} }
if (has_salt) { if (has_brine) {
// TODO: the application of well efficiency factor has not been tested with an example yet // TODO: the application of well efficiency factor has not been tested with an example yet
const unsigned waterCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::waterCompIdx); const unsigned waterCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::waterCompIdx);
EvalWell cq_s_sm = cq_s[waterCompIdx] * well_efficiency_factor_; EvalWell cq_s_sm = cq_s[waterCompIdx] * well_efficiency_factor_;
if (this->isInjector()) { if (this->isInjector()) {
cq_s_sm *= wsalt(); cq_s_sm *= wsalt();
} else { } else {
cq_s_sm *= extendEval(intQuants.fluidState().saltconcentration()); cq_s_sm *= extendEval(intQuants.fluidState().saltConcentration());
} }
connectionRates_[perf][contiSaltWaterEqIdx] = Base::restrictEval(cq_s_sm); connectionRates_[perf][contiBrineEqIdx] = Base::restrictEval(cq_s_sm);
} }
// Store the perforation pressure for later usage. // Store the perforation pressure for later usage.
@ -2528,7 +2528,7 @@ namespace Opm
{ {
// the following implementation assume that the polymer is always after the w-o-g phases // the following implementation assume that the polymer is always after the w-o-g phases
// For the polymer, energy and foam cases, there is one more mass balance equations of reservoir than wells // For the polymer, energy and foam cases, there is one more mass balance equations of reservoir than wells
assert((int(B_avg.size()) == num_components_) || has_polymer || has_energy || has_foam || has_salt); assert((int(B_avg.size()) == num_components_) || has_polymer || has_energy || has_foam || has_brine);
const double tol_wells = param_.tolerance_wells_; const double tol_wells = param_.tolerance_wells_;
const double maxResidualAllowed = param_.max_residual_allowed_; const double maxResidualAllowed = param_.max_residual_allowed_;

View File

@ -98,13 +98,13 @@ namespace Opm
// flag for polymer molecular weight related // flag for polymer molecular weight related
static const bool has_polymermw = GET_PROP_VALUE(TypeTag, EnablePolymerMW); static const bool has_polymermw = GET_PROP_VALUE(TypeTag, EnablePolymerMW);
static const bool has_foam = GET_PROP_VALUE(TypeTag, EnableFoam); static const bool has_foam = GET_PROP_VALUE(TypeTag, EnableFoam);
static const bool has_salt = GET_PROP_VALUE(TypeTag, EnableSaltWater); static const bool has_brine = GET_PROP_VALUE(TypeTag, EnableBrine);
static const int contiSolventEqIdx = Indices::contiSolventEqIdx; static const int contiSolventEqIdx = Indices::contiSolventEqIdx;
static const int contiPolymerEqIdx = Indices::contiPolymerEqIdx; static const int contiPolymerEqIdx = Indices::contiPolymerEqIdx;
// index for the polymer molecular weight continuity equation // index for the polymer molecular weight continuity equation
static const int contiPolymerMWEqIdx = Indices::contiPolymerMWEqIdx; static const int contiPolymerMWEqIdx = Indices::contiPolymerMWEqIdx;
static const int contiFoamEqIdx = Indices::contiFoamEqIdx; static const int contiFoamEqIdx = Indices::contiFoamEqIdx;
static const int contiSaltWaterEqIdx = Indices::contiSaltWaterEqIdx; static const int contiBrineEqIdx = Indices::contiBrineEqIdx;
// For the conversion between the surface volume rate and reservoir voidage rate // For the conversion between the surface volume rate and reservoir voidage rate
using RateConverterType = RateConverter:: using RateConverterType = RateConverter::
@ -115,7 +115,7 @@ namespace Opm
has_temperature, has_temperature,
has_energy, has_energy,
compositionSwitchEnabled, compositionSwitchEnabled,
has_salt, has_brine,
Indices::numPhases >; Indices::numPhases >;
/// Constructor /// Constructor
WellInterface(const Well& well, const int time_step, WellInterface(const Well& well, const int time_step,

View File

@ -378,15 +378,15 @@ namespace Opm
WellInterface<TypeTag>:: WellInterface<TypeTag>::
wsalt() const wsalt() const
{ {
if (!has_salt) { if (!has_brine) {
return 0.0; return 0.0;
} }
auto injectorType = well_ecl_.injectorType(); auto injectorType = well_ecl_.injectorType();
if (injectorType == Well::InjectorType::WATER) { if (injectorType == Well::InjectorType::WATER) {
WellSaltwaterProperties fprop = well_ecl_.getSaltwaterProperties(); WellBrineProperties fprop = well_ecl_.getBrineProperties();
return fprop.m_saltwaterConcentration; return fprop.m_saltConcentration;
} else { } else {
// Not a water injection well => no salt (?). // Not a water injection well => no salt (?).
return 0.0; return 0.0;