From 0f8df5cca19ad246dc75eec8a0954a1d3cb1de53 Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Thu, 23 Jun 2022 22:44:20 +0200 Subject: [PATCH] white space cleaning up no functionality change. --- opm/material/eos/PengRobinson.hpp | 44 +++++++++---------- .../fluidsystems/Co2BrineFluidSystem.hh | 8 ++-- tests/test_chiflash.cpp | 6 +-- tests/test_co2brine_flash.cpp | 2 +- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/opm/material/eos/PengRobinson.hpp b/opm/material/eos/PengRobinson.hpp index 8fedd2f4e..b14f7a677 100644 --- a/opm/material/eos/PengRobinson.hpp +++ b/opm/material/eos/PengRobinson.hpp @@ -205,30 +205,30 @@ public: Vm = VmCubic; // find the extrema (if they are present) - Evaluation Vmin, Vmax, pmin, pmax; - if (findExtrema_(Vmin, Vmax, - pmin, pmax, - a, b, T)) - { - if (isGasPhase) - Vm = std::max(Vmax, VmCubic); - else { - if (Vmin > 0) - Vm = std::min(Vmin, VmCubic); - else - Vm = VmCubic; - } - } - else { - // the EOS does not exhibit any physically meaningful - // extrema, and the fluid is critical... - Vm = VmCubic; - handleCriticalFluid_(Vm, fs, params, phaseIdx, isGasPhase); - } + Evaluation Vmin, Vmax, pmin, pmax; + if (findExtrema_(Vmin, Vmax, + pmin, pmax, + a, b, T)) + { + if (isGasPhase) + Vm = std::max(Vmax, VmCubic); + else { + if (Vmin > 0) + Vm = std::min(Vmin, VmCubic); + else + Vm = VmCubic; + } + } + else { + // the EOS does not exhibit any physically meaningful + // extrema, and the fluid is critical... + Vm = VmCubic; + handleCriticalFluid_(Vm, fs, params, phaseIdx, isGasPhase); + } } Valgrind::CheckDefined(Vm); - assert(std::isfinite(scalarValue(Vm))); + assert(std::isfinite(scalarValue(Vm))); assert(Vm > 0); return Vm; } @@ -250,7 +250,7 @@ public: const Evaluation& p = params.pressure(); const Evaluation& Vm = params.molarVolume(); - const Evaluation& RT = Constants::R*T; + const Evaluation& RT = Constants::R*T; const Evaluation& Z = p*Vm/RT; const Evaluation& Bstar = p*params.b() / RT; diff --git a/opm/material/fluidsystems/Co2BrineFluidSystem.hh b/opm/material/fluidsystems/Co2BrineFluidSystem.hh index f17152c53..11d13fb00 100644 --- a/opm/material/fluidsystems/Co2BrineFluidSystem.hh +++ b/opm/material/fluidsystems/Co2BrineFluidSystem.hh @@ -163,9 +163,9 @@ namespace Opm { { // Use LBC method to calculate viscosity LhsEval mu; - mu = ViscosityModel::LBC(fluidState, paramCache, phaseIdx); + mu = ViscosityModel::LBC(fluidState, paramCache, phaseIdx); + - return mu; } @@ -180,11 +180,11 @@ namespace Opm { assert(0 <= phaseIdx && phaseIdx < numPhases); assert(0 <= compIdx && compIdx < numComponents); - LhsEval phi = PengRobinsonMixture::computeFugacityCoefficient(fluidState, paramCache, phaseIdx, compIdx); + LhsEval phi = PengRobinsonMixture::computeFugacityCoefficient(fluidState, paramCache, phaseIdx, compIdx); return phi; } }; } -#endif //OPM_CO2BRINEFLUIDSYSTEM_HH \ No newline at end of file +#endif //OPM_CO2BRINEFLUIDSYSTEM_HH diff --git a/tests/test_chiflash.cpp b/tests/test_chiflash.cpp index 50a488358..a2ee93afd 100644 --- a/tests/test_chiflash.cpp +++ b/tests/test_chiflash.cpp @@ -54,14 +54,14 @@ void testChiFlash() comp[0] = Evaluation::createVariable(0.5, 1); comp[1] = Evaluation::createVariable(0.3, 2); comp[2] = 1. - comp[0] - comp[1]; - + // TODO: not sure whether the saturation matter here. ComponentVector sat; // We assume that currently everything is in the oil phase sat[0] = 1.0; sat[1] = 1.0-sat[0]; Scalar temp = 300.0; - + // FluidState will be the input for the flash calculation FluidState fluid_state; fluid_state.setPressure(FluidSystem::oilPhaseIdx, p_init); @@ -136,4 +136,4 @@ int main(int argc, char **argv) testChiFlash(); return 0; -} \ No newline at end of file +} diff --git a/tests/test_co2brine_flash.cpp b/tests/test_co2brine_flash.cpp index 3c96cefd8..b1534d5aa 100644 --- a/tests/test_co2brine_flash.cpp +++ b/tests/test_co2brine_flash.cpp @@ -63,7 +63,7 @@ void testCo2BrineFlash() FluidState fs; // TODO: no capillary pressure for now - + fs.setPressure(FluidSystem::oilPhaseIdx, p_init); fs.setPressure(FluidSystem::gasPhaseIdx, p_init);