Minor modifications requested in review.

This commit is contained in:
Atgeirr Flø Rasmussen 2019-08-08 10:27:17 +02:00
parent b4bd3d66e4
commit 544aeea40b
5 changed files with 9 additions and 21 deletions

View File

@ -129,7 +129,7 @@ public:
// extract the water and the gas saturations for convenience // extract the water and the gas saturations for convenience
Evaluation Sw = 0.0; Evaluation Sw = 0.0;
if (waterEnabled){ if (waterEnabled){
if(priVars.primaryVarsMeaning() == PrimaryVariables::px){ if(priVars.primaryVarsMeaning() == PrimaryVariables::OnePhase_p){
Sw = 1.0; Sw = 1.0;
}else{ }else{
Sw = priVars.makeEvaluation(Indices::waterSaturationIdx, timeIdx); Sw = priVars.makeEvaluation(Indices::waterSaturationIdx, timeIdx);
@ -140,7 +140,7 @@ public:
{ {
if (priVars.primaryVarsMeaning() == PrimaryVariables::Sw_po_Sg) { if (priVars.primaryVarsMeaning() == PrimaryVariables::Sw_po_Sg) {
// -> threephase case // -> threephase case
assert( not(priVars.primaryVarsMeaning() == PrimaryVariables::px) ); assert( not(priVars.primaryVarsMeaning() == PrimaryVariables::OnePhase_p) );
Sg = priVars.makeEvaluation(Indices::compositionSwitchIdx, timeIdx); Sg = priVars.makeEvaluation(Indices::compositionSwitchIdx, timeIdx);
} else if (priVars.primaryVarsMeaning() == PrimaryVariables::Sw_pg_Rv) { } else if (priVars.primaryVarsMeaning() == PrimaryVariables::Sw_pg_Rv) {
// -> gas-water case // -> gas-water case
@ -284,7 +284,7 @@ public:
fluidState_.setRs(0.0); fluidState_.setRs(0.0);
} }
} else { } else {
assert(priVars.primaryVarsMeaning() == PrimaryVariables::px); assert(priVars.primaryVarsMeaning() == PrimaryVariables::OnePhase_p);
} }
typename FluidSystem::template ParameterCache<Evaluation> paramCache; typename FluidSystem::template ParameterCache<Evaluation> paramCache;

View File

@ -127,9 +127,8 @@ struct BlackOilOnePhaseIndices
return 0; return 0;
} }
//! Index of the continuity equation of the first phase //! Index of the continuity equation of the first (and only) phase
static const int conti0EqIdx = PVOffset + 0; static const int conti0EqIdx = PVOffset + 0;
// one continuity equation follows
//! Index of the continuity equation for the first solvent component //! Index of the continuity equation for the first solvent component
static const int contiSolventEqIdx = static const int contiSolventEqIdx =

View File

@ -112,7 +112,7 @@ public:
Sw_po_Sg, // threephase case Sw_po_Sg, // threephase case
Sw_po_Rs, // water + oil case Sw_po_Rs, // water + oil case
Sw_pg_Rv, // water + gas case Sw_pg_Rv, // water + gas case
px , // onephase case OnePhase_p, // onephase case
}; };
BlackOilPrimaryVariables() BlackOilPrimaryVariables()
@ -266,7 +266,7 @@ public:
// determine the meaning of the primary variables // determine the meaning of the primary variables
if ( FluidSystem::numActivePhases() == 1 ){ if ( FluidSystem::numActivePhases() == 1 ){
primaryVarsMeaning_ = px; primaryVarsMeaning_ = OnePhase_p;
}else if ((gasPresent && oilPresent) || (onlyWater && FluidSystem::phaseIsActive(oilPhaseIdx)) ){ }else if ((gasPresent && oilPresent) || (onlyWater && FluidSystem::phaseIsActive(oilPhaseIdx)) ){
// gas and oil: both hydrocarbon phases are in equilibrium (i.e., saturated // gas and oil: both hydrocarbon phases are in equilibrium (i.e., saturated
// with the "protagonist" component of the other phase.) // with the "protagonist" component of the other phase.)
@ -291,7 +291,7 @@ public:
} }
// assign the actual primary variables // assign the actual primary variables
if (primaryVarsMeaning() == px ) { if (primaryVarsMeaning() == OnePhase_p) {
if (waterEnabled){ if (waterEnabled){
(*this)[waterSaturationIdx] = FsToolbox::value(fluidState.saturation(waterPhaseIdx)); (*this)[waterSaturationIdx] = FsToolbox::value(fluidState.saturation(waterPhaseIdx));
(*this)[pressureSwitchIdx] = FsToolbox::value(fluidState.pressure(waterPhaseIdx)); (*this)[pressureSwitchIdx] = FsToolbox::value(fluidState.pressure(waterPhaseIdx));
@ -353,7 +353,7 @@ public:
// the IntensiveQuantities). The reason is that most intensive quantities are not // the IntensiveQuantities). The reason is that most intensive quantities are not
// required to be able to decide if the primary variables needs to be switched or // required to be able to decide if the primary variables needs to be switched or
// not, so it would be a waste to compute them. // not, so it would be a waste to compute them.
if (primaryVarsMeaning() == px){ if (primaryVarsMeaning() == OnePhase_p){
return false; return false;
} }
Scalar Sw = 0.0; Scalar Sw = 0.0;

View File

@ -83,17 +83,6 @@ public:
BlackOilRateVector(Scalar value) : ParentType(Toolbox::createConstant(value)) BlackOilRateVector(Scalar value) : ParentType(Toolbox::createConstant(value))
{} {}
// template <class Eval = Evaluation>
// BlackOilRateVector(const typename std::enable_if<std::is_same<Eval, Evaluation>::value, Evaluation>::type& value) : ParentType(value)
// {}
/*!
* \copydoc ImmiscibleRateVector::ImmiscibleRateVector(const
* ImmiscibleRateVector& )
*/
// BlackOilRateVector(const BlackOilRateVector& value) : ParentType(value)
// {}
/*! /*!
* \copydoc ImmiscibleRateVector::setMassRate * \copydoc ImmiscibleRateVector::setMassRate
*/ */

View File

@ -125,7 +125,7 @@ public:
time_ = 0.0; time_ = 0.0;
endTime_ = EWOMS_GET_PARAM(TypeTag, Scalar, EndTime); endTime_ = EWOMS_GET_PARAM(TypeTag, Scalar, EndTime);
timeStepSize_ = EWOMS_GET_PARAM(TypeTag, Scalar, InitialTimeStepSize); timeStepSize_ = EWOMS_GET_PARAM(TypeTag, Scalar, InitialTimeStepSize);
assert(timeStepSize_>0); assert(timeStepSize_ > 0);
const std::string& predetTimeStepFile = const std::string& predetTimeStepFile =
EWOMS_GET_PARAM(TypeTag, std::string, PredeterminedTimeStepsFile); EWOMS_GET_PARAM(TypeTag, std::string, PredeterminedTimeStepsFile);
if (!predetTimeStepFile.empty()) { if (!predetTimeStepFile.empty()) {