white space cleaning up

no functionality change.
This commit is contained in:
Kai Bao 2022-06-23 22:44:20 +02:00
parent 16c88d0a02
commit 0f8df5cca1
4 changed files with 30 additions and 30 deletions

View File

@ -205,30 +205,30 @@ public:
Vm = VmCubic; Vm = VmCubic;
// find the extrema (if they are present) // find the extrema (if they are present)
Evaluation Vmin, Vmax, pmin, pmax; Evaluation Vmin, Vmax, pmin, pmax;
if (findExtrema_(Vmin, Vmax, if (findExtrema_(Vmin, Vmax,
pmin, pmax, pmin, pmax,
a, b, T)) a, b, T))
{ {
if (isGasPhase) if (isGasPhase)
Vm = std::max(Vmax, VmCubic); Vm = std::max(Vmax, VmCubic);
else { else {
if (Vmin > 0) if (Vmin > 0)
Vm = std::min(Vmin, VmCubic); Vm = std::min(Vmin, VmCubic);
else else
Vm = VmCubic; Vm = VmCubic;
} }
} }
else { else {
// the EOS does not exhibit any physically meaningful // the EOS does not exhibit any physically meaningful
// extrema, and the fluid is critical... // extrema, and the fluid is critical...
Vm = VmCubic; Vm = VmCubic;
handleCriticalFluid_(Vm, fs, params, phaseIdx, isGasPhase); handleCriticalFluid_(Vm, fs, params, phaseIdx, isGasPhase);
} }
} }
Valgrind::CheckDefined(Vm); Valgrind::CheckDefined(Vm);
assert(std::isfinite(scalarValue(Vm))); assert(std::isfinite(scalarValue(Vm)));
assert(Vm > 0); assert(Vm > 0);
return Vm; return Vm;
} }
@ -250,7 +250,7 @@ public:
const Evaluation& p = params.pressure(); const Evaluation& p = params.pressure();
const Evaluation& Vm = params.molarVolume(); const Evaluation& Vm = params.molarVolume();
const Evaluation& RT = Constants<Scalar>::R*T; const Evaluation& RT = Constants<Scalar>::R*T;
const Evaluation& Z = p*Vm/RT; const Evaluation& Z = p*Vm/RT;
const Evaluation& Bstar = p*params.b() / RT; const Evaluation& Bstar = p*params.b() / RT;

View File

@ -163,9 +163,9 @@ namespace Opm {
{ {
// Use LBC method to calculate viscosity // Use LBC method to calculate viscosity
LhsEval mu; LhsEval mu;
mu = ViscosityModel::LBC(fluidState, paramCache, phaseIdx); mu = ViscosityModel::LBC(fluidState, paramCache, phaseIdx);
return mu; return mu;
} }
@ -180,11 +180,11 @@ namespace Opm {
assert(0 <= phaseIdx && phaseIdx < numPhases); assert(0 <= phaseIdx && phaseIdx < numPhases);
assert(0 <= compIdx && compIdx < numComponents); assert(0 <= compIdx && compIdx < numComponents);
LhsEval phi = PengRobinsonMixture::computeFugacityCoefficient(fluidState, paramCache, phaseIdx, compIdx); LhsEval phi = PengRobinsonMixture::computeFugacityCoefficient(fluidState, paramCache, phaseIdx, compIdx);
return phi; return phi;
} }
}; };
} }
#endif //OPM_CO2BRINEFLUIDSYSTEM_HH #endif //OPM_CO2BRINEFLUIDSYSTEM_HH

View File

@ -54,14 +54,14 @@ void testChiFlash()
comp[0] = Evaluation::createVariable(0.5, 1); comp[0] = Evaluation::createVariable(0.5, 1);
comp[1] = Evaluation::createVariable(0.3, 2); comp[1] = Evaluation::createVariable(0.3, 2);
comp[2] = 1. - comp[0] - comp[1]; comp[2] = 1. - comp[0] - comp[1];
// TODO: not sure whether the saturation matter here. // TODO: not sure whether the saturation matter here.
ComponentVector sat; ComponentVector sat;
// We assume that currently everything is in the oil phase // We assume that currently everything is in the oil phase
sat[0] = 1.0; sat[1] = 1.0-sat[0]; sat[0] = 1.0; sat[1] = 1.0-sat[0];
Scalar temp = 300.0; Scalar temp = 300.0;
// FluidState will be the input for the flash calculation // FluidState will be the input for the flash calculation
FluidState fluid_state; FluidState fluid_state;
fluid_state.setPressure(FluidSystem::oilPhaseIdx, p_init); fluid_state.setPressure(FluidSystem::oilPhaseIdx, p_init);
@ -136,4 +136,4 @@ int main(int argc, char **argv)
testChiFlash(); testChiFlash();
return 0; return 0;
} }

View File

@ -63,7 +63,7 @@ void testCo2BrineFlash()
FluidState fs; FluidState fs;
// TODO: no capillary pressure for now // TODO: no capillary pressure for now
fs.setPressure(FluidSystem::oilPhaseIdx, p_init); fs.setPressure(FluidSystem::oilPhaseIdx, p_init);
fs.setPressure(FluidSystem::gasPhaseIdx, p_init); fs.setPressure(FluidSystem::gasPhaseIdx, p_init);