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

View File

@ -127,9 +127,8 @@ struct BlackOilOnePhaseIndices
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;
// one continuity equation follows
//! Index of the continuity equation for the first solvent component
static const int contiSolventEqIdx =

View File

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

View File

@ -83,17 +83,6 @@ public:
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
*/

View File

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