mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Whitespace fixes and style consistency.
This commit is contained in:
parent
544aeea40b
commit
8977d64bc6
@ -128,10 +128,10 @@ public:
|
||||
|
||||
// extract the water and the gas saturations for convenience
|
||||
Evaluation Sw = 0.0;
|
||||
if (waterEnabled){
|
||||
if(priVars.primaryVarsMeaning() == PrimaryVariables::OnePhase_p){
|
||||
if (waterEnabled) {
|
||||
if (priVars.primaryVarsMeaning() == PrimaryVariables::OnePhase_p) {
|
||||
Sw = 1.0;
|
||||
}else{
|
||||
} 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::OnePhase_p) );
|
||||
assert( priVars.primaryVarsMeaning() != PrimaryVariables::OnePhase_p );
|
||||
Sg = priVars.makeEvaluation(Indices::compositionSwitchIdx, timeIdx);
|
||||
} else if (priVars.primaryVarsMeaning() == PrimaryVariables::Sw_pg_Rv) {
|
||||
// -> gas-water case
|
||||
@ -206,11 +206,10 @@ public:
|
||||
// update the Saturation functions for the blackoil solvent module.
|
||||
asImp_().solventPostSatFuncUpdate_(elemCtx, dofIdx, timeIdx);
|
||||
|
||||
Evaluation SoMax=0;
|
||||
if(FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx)){
|
||||
SoMax =
|
||||
Opm::max(fluidState_.saturation(oilPhaseIdx),
|
||||
elemCtx.problem().maxOilSaturation(globalSpaceIdx));
|
||||
Evaluation SoMax = 0.0;
|
||||
if (FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx)) {
|
||||
SoMax = Opm::max(fluidState_.saturation(oilPhaseIdx),
|
||||
elemCtx.problem().maxOilSaturation(globalSpaceIdx));
|
||||
}
|
||||
|
||||
// take the meaning of the switiching primary variable into account for the gas
|
||||
@ -349,11 +348,11 @@ public:
|
||||
if (rockCompressibility > 0.0) {
|
||||
Scalar rockRefPressure = problem.rockReferencePressure(elemCtx, dofIdx, timeIdx);
|
||||
Evaluation x;
|
||||
if(FluidSystem::phaseIsActive(oilPhaseIdx)){
|
||||
if (FluidSystem::phaseIsActive(oilPhaseIdx)) {
|
||||
x = rockCompressibility*(fluidState_.pressure(oilPhaseIdx) - rockRefPressure);
|
||||
}else if( FluidSystem::phaseIsActive(waterPhaseIdx) ){
|
||||
} else if (FluidSystem::phaseIsActive(waterPhaseIdx)){
|
||||
x = rockCompressibility*(fluidState_.pressure(waterPhaseIdx) - rockRefPressure);
|
||||
}else{
|
||||
} else {
|
||||
x = rockCompressibility*(fluidState_.pressure(gasPhaseIdx) - rockRefPressure);
|
||||
}
|
||||
porosity_ *= 1.0 + x + 0.5*x*x;
|
||||
|
@ -265,9 +265,10 @@ public:
|
||||
EnergyModule::assignPrimaryVars(*this, fluidState);
|
||||
|
||||
// determine the meaning of the primary variables
|
||||
if ( FluidSystem::numActivePhases() == 1 ){
|
||||
if (FluidSystem::numActivePhases() == 1) {
|
||||
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
|
||||
// with the "protagonist" component of the other phase.)
|
||||
primaryVarsMeaning_ = Sw_po_Sg;
|
||||
@ -292,10 +293,10 @@ public:
|
||||
|
||||
// assign the actual primary variables
|
||||
if (primaryVarsMeaning() == OnePhase_p) {
|
||||
if (waterEnabled){
|
||||
if (waterEnabled) {
|
||||
(*this)[waterSaturationIdx] = FsToolbox::value(fluidState.saturation(waterPhaseIdx));
|
||||
(*this)[pressureSwitchIdx] = FsToolbox::value(fluidState.pressure(waterPhaseIdx));
|
||||
}else{
|
||||
} else {
|
||||
throw std::logic_error("Only pure ware is presently allowed");
|
||||
}
|
||||
|
||||
|
@ -580,7 +580,7 @@ protected:
|
||||
// Use the implicit Euler time discretization
|
||||
for (unsigned eqIdx = 0; eqIdx < numEq; ++eqIdx) {
|
||||
double dt = elemCtx.simulator().timeStepSize();
|
||||
assert(dt>0);
|
||||
assert(dt > 0);
|
||||
tmp[eqIdx] -= tmp2[eqIdx];
|
||||
tmp[eqIdx] *= scvVolume / dt;
|
||||
|
||||
|
@ -762,7 +762,7 @@ public:
|
||||
else
|
||||
// ask the problem to provide the next time step size
|
||||
dt = std::min(maxTimeStepSize(), problem_->nextTimeStepSize());
|
||||
assert(dt>0);
|
||||
assert(dt > 0);
|
||||
setTimeStepSize(dt);
|
||||
}
|
||||
prePostProcessTimer_.stop();
|
||||
|
Loading…
Reference in New Issue
Block a user