2015-06-18 06:47:07 -05:00
|
|
|
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
|
|
// vi: set et ts=4 sw=4 sts=4:
|
2013-12-02 09:31:53 -06:00
|
|
|
/*
|
|
|
|
This file is part of the Open Porous Media project (OPM).
|
|
|
|
|
|
|
|
OPM is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
OPM is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
2016-03-14 08:11:22 -05:00
|
|
|
|
|
|
|
Consult the COPYING file in the top-level source directory of this
|
|
|
|
module for the precise wording of the license and the list of
|
|
|
|
copyright holders.
|
2013-12-02 09:31:53 -06:00
|
|
|
*/
|
2013-05-30 11:44:10 -05:00
|
|
|
/*!
|
|
|
|
* \file
|
|
|
|
*
|
|
|
|
* \brief This test makes sure that the programming interface is
|
2013-12-03 04:56:45 -06:00
|
|
|
* observed by all fluid systems
|
2013-05-30 11:44:10 -05:00
|
|
|
*/
|
|
|
|
#include "config.h"
|
|
|
|
|
2023-11-10 03:12:13 -06:00
|
|
|
#include <boost/mpl/list.hpp>
|
|
|
|
|
2023-05-23 15:31:50 -05:00
|
|
|
#define BOOST_TEST_MODULE FluidSystems
|
|
|
|
#include <boost/test/unit_test.hpp>
|
|
|
|
|
2016-01-29 04:55:12 -06:00
|
|
|
#include <opm/material/checkFluidSystem.hpp>
|
2016-06-02 11:20:16 -05:00
|
|
|
#include <opm/material/densead/Evaluation.hpp>
|
|
|
|
#include <opm/material/densead/Math.hpp>
|
2015-05-21 08:33:16 -05:00
|
|
|
|
2013-05-30 11:44:10 -05:00
|
|
|
// include all fluid systems in opm-material
|
2014-05-08 09:53:53 -05:00
|
|
|
#include <opm/material/fluidsystems/SinglePhaseFluidSystem.hpp>
|
|
|
|
#include <opm/material/fluidsystems/TwoPhaseImmiscibleFluidSystem.hpp>
|
2013-09-10 07:55:59 -05:00
|
|
|
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
|
|
|
|
#include <opm/material/fluidsystems/BrineCO2FluidSystem.hpp>
|
|
|
|
#include <opm/material/fluidsystems/H2ON2FluidSystem.hpp>
|
|
|
|
#include <opm/material/fluidsystems/H2ON2LiquidPhaseFluidSystem.hpp>
|
|
|
|
#include <opm/material/fluidsystems/H2OAirFluidSystem.hpp>
|
|
|
|
#include <opm/material/fluidsystems/H2OAirMesityleneFluidSystem.hpp>
|
|
|
|
#include <opm/material/fluidsystems/H2OAirXyleneFluidSystem.hpp>
|
2013-05-30 11:44:10 -05:00
|
|
|
|
2018-01-04 08:25:11 -06:00
|
|
|
#include <opm/material/thermal/FluidThermalConductionLaw.hpp>
|
2017-12-11 07:06:53 -06:00
|
|
|
|
2013-05-30 11:44:10 -05:00
|
|
|
// include all fluid states
|
2013-09-10 07:55:59 -05:00
|
|
|
#include <opm/material/fluidstates/PressureOverlayFluidState.hpp>
|
|
|
|
#include <opm/material/fluidstates/SaturationOverlayFluidState.hpp>
|
|
|
|
#include <opm/material/fluidstates/TemperatureOverlayFluidState.hpp>
|
|
|
|
#include <opm/material/fluidstates/CompositionalFluidState.hpp>
|
|
|
|
#include <opm/material/fluidstates/NonEquilibriumFluidState.hpp>
|
|
|
|
#include <opm/material/fluidstates/ImmiscibleFluidState.hpp>
|
2015-07-28 10:24:27 -05:00
|
|
|
#include <opm/material/fluidstates/SimpleModularFluidState.hpp>
|
2020-07-02 06:42:58 -05:00
|
|
|
#include <opm/material/fluidstates/BlackOilFluidState.hpp>
|
2013-05-30 11:44:10 -05:00
|
|
|
|
2015-05-21 08:33:16 -05:00
|
|
|
// include the tables for CO2 which are delivered with opm-material by default
|
2015-04-27 09:34:36 -05:00
|
|
|
#include <opm/material/common/UniformTabulated2DFunction.hpp>
|
2013-09-10 07:55:59 -05:00
|
|
|
|
2021-12-14 01:24:17 -06:00
|
|
|
#include <opm/input/eclipse/Python/Python.hpp>
|
2021-04-26 03:20:22 -05:00
|
|
|
#if HAVE_ECL_INPUT
|
2021-12-14 01:24:17 -06:00
|
|
|
#include <opm/input/eclipse/Deck/Deck.hpp>
|
2022-12-12 08:47:47 -06:00
|
|
|
#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
|
2022-12-12 08:47:47 -06:00
|
|
|
#include <opm/input/eclipse/Schedule/Schedule.hpp>
|
2021-04-26 03:20:22 -05:00
|
|
|
#endif
|
2020-03-25 12:32:46 -05:00
|
|
|
|
2015-11-18 05:44:33 -06:00
|
|
|
// check that the blackoil fluid system implements all non-standard functions
|
|
|
|
template <class Evaluation, class FluidSystem>
|
|
|
|
void ensureBlackoilApi()
|
|
|
|
{
|
|
|
|
// here we don't want to call these methods at runtime, we just want to make sure
|
|
|
|
// that they compile
|
|
|
|
while (false) {
|
2018-03-05 05:48:09 -06:00
|
|
|
#if HAVE_ECL_INPUT
|
2020-03-31 03:46:17 -05:00
|
|
|
auto python = std::make_shared<Opm::Python>();
|
2016-10-13 07:49:48 -05:00
|
|
|
Opm::Deck deck;
|
|
|
|
Opm::EclipseState eclState(deck);
|
2020-03-25 12:32:46 -05:00
|
|
|
Opm::Schedule schedule(deck, eclState, python);
|
2020-03-03 06:58:03 -06:00
|
|
|
FluidSystem::initFromState(eclState, schedule);
|
2015-11-18 05:44:33 -06:00
|
|
|
#endif
|
|
|
|
|
2016-01-04 08:31:30 -06:00
|
|
|
typedef typename FluidSystem::Scalar Scalar;
|
2020-07-02 06:42:58 -05:00
|
|
|
typedef Opm::BlackOilFluidState<Evaluation, FluidSystem> FluidState;
|
2016-01-04 08:31:30 -06:00
|
|
|
FluidState fluidState;
|
|
|
|
Evaluation XoG = 0.0;
|
2022-11-24 07:00:15 -06:00
|
|
|
Evaluation XwG = 0.0;
|
2016-01-04 08:31:30 -06:00
|
|
|
Evaluation XgO = 0.0;
|
|
|
|
Evaluation Rs = 0.0;
|
|
|
|
Evaluation Rv = 0.0;
|
2015-11-18 05:44:33 -06:00
|
|
|
|
2016-01-04 08:31:28 -06:00
|
|
|
// some additional typedefs
|
|
|
|
typedef typename FluidSystem::OilPvt OilPvt;
|
|
|
|
typedef typename FluidSystem::GasPvt GasPvt;
|
|
|
|
typedef typename FluidSystem::WaterPvt WaterPvt;
|
|
|
|
|
2016-01-04 08:31:30 -06:00
|
|
|
// check the black-oil specific enums
|
|
|
|
static_assert(FluidSystem::numPhases == 3, "");
|
|
|
|
static_assert(FluidSystem::numComponents == 3, "");
|
|
|
|
|
|
|
|
static_assert(0 <= FluidSystem::oilPhaseIdx && FluidSystem::oilPhaseIdx < 3, "");
|
|
|
|
static_assert(0 <= FluidSystem::gasPhaseIdx && FluidSystem::gasPhaseIdx < 3, "");
|
|
|
|
static_assert(0 <= FluidSystem::waterPhaseIdx && FluidSystem::waterPhaseIdx < 3, "");
|
|
|
|
|
|
|
|
static_assert(0 <= FluidSystem::oilCompIdx && FluidSystem::oilCompIdx < 3, "");
|
|
|
|
static_assert(0 <= FluidSystem::gasCompIdx && FluidSystem::gasCompIdx < 3, "");
|
|
|
|
static_assert(0 <= FluidSystem::waterCompIdx && FluidSystem::waterCompIdx < 3, "");
|
|
|
|
|
2015-11-18 05:44:33 -06:00
|
|
|
// check the non-parser initialization
|
2016-01-04 08:31:28 -06:00
|
|
|
std::shared_ptr<OilPvt> oilPvt;
|
|
|
|
std::shared_ptr<GasPvt> gasPvt;
|
|
|
|
std::shared_ptr<WaterPvt> waterPvt;
|
2015-11-18 05:44:33 -06:00
|
|
|
|
|
|
|
unsigned numPvtRegions = 2;
|
|
|
|
FluidSystem::initBegin(numPvtRegions);
|
|
|
|
FluidSystem::setEnableDissolvedGas(true);
|
|
|
|
FluidSystem::setEnableVaporizedOil(true);
|
2022-11-24 07:00:15 -06:00
|
|
|
FluidSystem::setEnableDissolvedGasInWater(true);
|
2015-11-18 05:44:33 -06:00
|
|
|
FluidSystem::setGasPvt(gasPvt);
|
|
|
|
FluidSystem::setOilPvt(oilPvt);
|
|
|
|
FluidSystem::setWaterPvt(waterPvt);
|
|
|
|
FluidSystem::setReferenceDensities(/*oil=*/600.0,
|
|
|
|
/*water=*/1000.0,
|
|
|
|
/*gas=*/1.0,
|
|
|
|
/*regionIdx=*/0);
|
|
|
|
FluidSystem::initEnd();
|
|
|
|
|
|
|
|
// the molarMass() method has an optional argument for the PVT region
|
2022-08-02 03:16:47 -05:00
|
|
|
[[maybe_unused]] unsigned numRegions = FluidSystem::numRegions();
|
|
|
|
[[maybe_unused]] Scalar Mg = FluidSystem::molarMass(FluidSystem::gasCompIdx,
|
2016-01-04 08:31:30 -06:00
|
|
|
/*regionIdx=*/0);
|
2022-08-02 03:16:47 -05:00
|
|
|
[[maybe_unused]] bool b1 = FluidSystem::enableDissolvedGas();
|
|
|
|
[[maybe_unused]] bool b2 = FluidSystem::enableVaporizedOil();
|
|
|
|
[[maybe_unused]] Scalar rhoRefOil = FluidSystem::referenceDensity(FluidSystem::oilPhaseIdx,
|
2016-01-04 08:31:30 -06:00
|
|
|
/*regionIdx=*/0);
|
2023-05-23 15:16:47 -05:00
|
|
|
std::cout << FluidSystem::convertXoGToRs(XoG, /*regionIdx=*/0);
|
|
|
|
std::cout << FluidSystem::convertXwGToRsw(XwG, /*regionIdx=*/0);
|
|
|
|
std::cout << FluidSystem::convertXgOToRv(XgO, /*regionIdx=*/0);
|
|
|
|
std::cout << FluidSystem::convertXoGToxoG(XoG, /*regionIdx=*/0);
|
|
|
|
std::cout << FluidSystem::convertXgOToxgO(XgO, /*regionIdx=*/0);
|
|
|
|
std::cout << FluidSystem::convertRsToXoG(Rs, /*regionIdx=*/0);
|
|
|
|
std::cout << FluidSystem::convertRvToXgO(Rv, /*regionIdx=*/0);
|
2016-01-04 08:31:30 -06:00
|
|
|
|
|
|
|
for (unsigned phaseIdx = 0; phaseIdx < FluidSystem::numPhases; ++ phaseIdx) {
|
2023-05-23 15:16:47 -05:00
|
|
|
std::cout << FluidSystem::density(fluidState, phaseIdx, /*regionIdx=*/0);
|
|
|
|
std::cout << FluidSystem::saturatedDensity(fluidState, phaseIdx, /*regionIdx=*/0);
|
|
|
|
std::cout << FluidSystem::inverseFormationVolumeFactor(fluidState, phaseIdx, /*regionIdx=*/0);
|
|
|
|
std::cout << FluidSystem::saturatedInverseFormationVolumeFactor(fluidState, phaseIdx, /*regionIdx=*/0);
|
|
|
|
std::cout << FluidSystem::viscosity(fluidState, phaseIdx, /*regionIdx=*/0);
|
|
|
|
std::cout << FluidSystem::saturatedDissolutionFactor(fluidState, phaseIdx, /*regionIdx=*/0);
|
|
|
|
std::cout << FluidSystem::saturatedDissolutionFactor(fluidState, phaseIdx, /*regionIdx=*/0, /*maxSo=*/1.0);
|
|
|
|
std::cout << FluidSystem::saturationPressure(fluidState, phaseIdx, /*regionIdx=*/0);
|
2016-06-29 04:22:35 -05:00
|
|
|
for (unsigned compIdx = 0; compIdx < FluidSystem::numComponents; ++ compIdx)
|
2023-05-23 15:16:47 -05:00
|
|
|
std::cout << FluidSystem::fugacityCoefficient(fluidState, phaseIdx, compIdx, /*regionIdx=*/0);
|
2016-01-04 08:31:30 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
// the "not considered safe to use directly" API
|
2022-08-02 03:16:47 -05:00
|
|
|
[[maybe_unused]] const OilPvt& oilPvt2 = FluidSystem::oilPvt();
|
|
|
|
[[maybe_unused]] const GasPvt& gasPvt2 = FluidSystem::gasPvt();
|
|
|
|
[[maybe_unused]] const WaterPvt& waterPvt2 = FluidSystem::waterPvt();
|
2015-11-18 05:44:33 -06:00
|
|
|
}
|
|
|
|
}
|
2015-11-10 04:11:24 -06:00
|
|
|
|
2023-11-10 03:12:13 -06:00
|
|
|
using EvalTypes = boost::mpl::list<float,double,Opm::DenseAd::Evaluation<float,3>,Opm::DenseAd::Evaluation<double,3>>;
|
2023-05-23 15:31:50 -05:00
|
|
|
|
|
|
|
BOOST_AUTO_TEST_CASE_TEMPLATE(SimpleModularFluidState, Eval, EvalTypes)
|
|
|
|
{
|
|
|
|
Opm::SimpleModularFluidState<Eval,
|
|
|
|
/*numPhases=*/2,
|
|
|
|
/*numComponents=*/0,
|
|
|
|
/*FluidSystem=*/void,
|
|
|
|
/*storePressure=*/false,
|
|
|
|
/*storeTemperature=*/false,
|
|
|
|
/*storeComposition=*/false,
|
|
|
|
/*storeFugacity=*/false,
|
|
|
|
/*storeSaturation=*/false,
|
|
|
|
/*storeDensity=*/false,
|
|
|
|
/*storeViscosity=*/false,
|
|
|
|
/*storeEnthalpy=*/false> fs;
|
|
|
|
checkFluidState<Eval>(fs);
|
|
|
|
|
|
|
|
using FluidSystem = Opm::H2ON2FluidSystem<Eval>;
|
|
|
|
Opm::SimpleModularFluidState<Eval,
|
|
|
|
/*numPhases=*/2,
|
|
|
|
/*numComponents=*/2,
|
|
|
|
FluidSystem,
|
|
|
|
/*storePressure=*/true,
|
|
|
|
/*storeTemperature=*/true,
|
|
|
|
/*storeComposition=*/true,
|
|
|
|
/*storeFugacity=*/true,
|
|
|
|
/*storeSaturation=*/true,
|
|
|
|
/*storeDensity=*/true,
|
|
|
|
/*storeViscosity=*/true,
|
|
|
|
/*storeEnthalpy=*/true> fs2;
|
|
|
|
|
|
|
|
checkFluidState<Eval>(fs2);
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOST_AUTO_TEST_CASE_TEMPLATE(CompositionalFluidState, Eval, EvalTypes)
|
|
|
|
{
|
|
|
|
using FluidSystem = Opm::H2ON2FluidSystem<Eval>;
|
|
|
|
Opm::CompositionalFluidState<Eval, FluidSystem> fs;
|
|
|
|
checkFluidState<Eval>(fs);
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOST_AUTO_TEST_CASE_TEMPLATE(NonEquilibriumFluidState, Eval, EvalTypes)
|
|
|
|
{
|
|
|
|
using FluidSystem = Opm::H2ON2FluidSystem<Eval>;
|
|
|
|
Opm::NonEquilibriumFluidState<Eval, FluidSystem> fs;
|
|
|
|
checkFluidState<Eval>(fs);
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOST_AUTO_TEST_CASE_TEMPLATE(ImmiscibleFluidState, Eval, EvalTypes)
|
2013-05-30 11:44:10 -05:00
|
|
|
{
|
2023-05-23 15:31:50 -05:00
|
|
|
using FluidSystem = Opm::H2ON2FluidSystem<Eval>;
|
|
|
|
Opm::ImmiscibleFluidState<Eval, FluidSystem> fs;
|
|
|
|
checkFluidState<Eval>(fs);
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOST_AUTO_TEST_CASE_TEMPLATE(TemperatureOverlayFluidState, Eval, EvalTypes)
|
|
|
|
{
|
|
|
|
using FluidSystem = Opm::H2ON2FluidSystem<Eval>;
|
|
|
|
using BaseFluidState = Opm::CompositionalFluidState<Eval, FluidSystem>;
|
2015-05-21 08:33:16 -05:00
|
|
|
BaseFluidState baseFs;
|
2023-05-23 15:31:50 -05:00
|
|
|
Opm::TemperatureOverlayFluidState fs(baseFs);
|
|
|
|
checkFluidState<Eval>(fs);
|
|
|
|
}
|
2013-05-30 11:44:10 -05:00
|
|
|
|
2023-05-23 15:31:50 -05:00
|
|
|
BOOST_AUTO_TEST_CASE_TEMPLATE(PressureOverlayFluidState, Eval, EvalTypes)
|
|
|
|
{
|
|
|
|
using FluidSystem = Opm::H2ON2FluidSystem<Eval>;
|
|
|
|
using BaseFluidState = Opm::CompositionalFluidState<Eval, FluidSystem>;
|
|
|
|
BaseFluidState baseFs;
|
|
|
|
Opm::PressureOverlayFluidState fs(baseFs);
|
|
|
|
checkFluidState<Eval>(fs);
|
|
|
|
}
|
2013-05-30 11:44:10 -05:00
|
|
|
|
2023-05-23 15:31:50 -05:00
|
|
|
BOOST_AUTO_TEST_CASE_TEMPLATE(SaturationOverlayFluidState, Eval, EvalTypes)
|
|
|
|
{
|
|
|
|
using FluidSystem = Opm::H2ON2FluidSystem<Eval>;
|
|
|
|
using BaseFluidState = Opm::CompositionalFluidState<Eval, FluidSystem>;
|
|
|
|
BaseFluidState baseFs;
|
|
|
|
Opm::SaturationOverlayFluidState fs(baseFs);
|
|
|
|
checkFluidState<Eval>(fs);
|
|
|
|
}
|
2013-05-30 11:44:10 -05:00
|
|
|
|
2023-11-10 03:12:13 -06:00
|
|
|
using ScalarTypes = boost::mpl::list<float,double>;
|
2023-05-23 15:31:50 -05:00
|
|
|
|
|
|
|
BOOST_AUTO_TEST_CASE_TEMPLATE(BlackoilFluidSystem, Scalar, ScalarTypes)
|
|
|
|
{
|
|
|
|
using Evaluation = Opm::DenseAd::Evaluation<Scalar,3>;
|
|
|
|
using FluidSystem = Opm::BlackOilFluidSystem<Scalar>;
|
|
|
|
|
|
|
|
if (false) checkFluidSystem<Scalar, FluidSystem, Scalar, Scalar>();
|
|
|
|
if (false) checkFluidSystem<Scalar, FluidSystem, Evaluation, Scalar>();
|
|
|
|
if (false) checkFluidSystem<Scalar, FluidSystem, Evaluation, Evaluation>();
|
|
|
|
|
|
|
|
using BlackoilDummyEval = Opm::DenseAd::Evaluation<Scalar, 1>;
|
|
|
|
ensureBlackoilApi<Scalar, FluidSystem>();
|
|
|
|
ensureBlackoilApi<BlackoilDummyEval, FluidSystem>();
|
2015-05-21 08:33:16 -05:00
|
|
|
}
|
2013-05-30 11:44:10 -05:00
|
|
|
|
2023-05-23 15:31:50 -05:00
|
|
|
BOOST_AUTO_TEST_CASE_TEMPLATE(BrineCO2FluidSystem, Scalar, ScalarTypes)
|
2015-05-21 08:33:16 -05:00
|
|
|
{
|
2023-05-23 15:31:50 -05:00
|
|
|
using Evaluation = Opm::DenseAd::Evaluation<Scalar,3>;
|
|
|
|
using FluidSystem = Opm::BrineCO2FluidSystem<Scalar>;
|
2013-05-30 11:44:10 -05:00
|
|
|
|
2023-05-23 15:31:50 -05:00
|
|
|
checkFluidSystem<Scalar, FluidSystem, Scalar, Scalar>();
|
|
|
|
checkFluidSystem<Scalar, FluidSystem, Evaluation, Scalar>();
|
|
|
|
checkFluidSystem<Scalar, FluidSystem, Evaluation, Evaluation>();
|
|
|
|
}
|
2015-11-18 05:44:33 -06:00
|
|
|
|
2023-05-23 15:31:50 -05:00
|
|
|
BOOST_AUTO_TEST_CASE_TEMPLATE(H2ON2FluidSystem, Scalar, ScalarTypes)
|
|
|
|
{
|
|
|
|
using Evaluation = Opm::DenseAd::Evaluation<Scalar,3>;
|
|
|
|
using FluidSystem = Opm::H2ON2FluidSystem<Scalar>;
|
2013-05-30 11:44:10 -05:00
|
|
|
|
2023-05-23 15:31:50 -05:00
|
|
|
checkFluidSystem<Scalar, FluidSystem, Scalar, Scalar>();
|
|
|
|
checkFluidSystem<Scalar, FluidSystem, Evaluation, Scalar>();
|
|
|
|
checkFluidSystem<Scalar, FluidSystem, Evaluation, Evaluation>();
|
|
|
|
}
|
2013-05-30 11:44:10 -05:00
|
|
|
|
2023-05-23 15:31:50 -05:00
|
|
|
BOOST_AUTO_TEST_CASE_TEMPLATE(H2ON2LiquidPhaseFluidSystem, Scalar, ScalarTypes)
|
|
|
|
{
|
|
|
|
using Evaluation = Opm::DenseAd::Evaluation<Scalar,3>;
|
|
|
|
using FluidSystem = Opm::H2ON2LiquidPhaseFluidSystem<Scalar>;
|
2013-05-30 11:44:10 -05:00
|
|
|
|
2023-05-23 15:31:50 -05:00
|
|
|
checkFluidSystem<Scalar, FluidSystem, Scalar, Scalar>();
|
|
|
|
checkFluidSystem<Scalar, FluidSystem, Evaluation, Scalar>();
|
|
|
|
checkFluidSystem<Scalar, FluidSystem, Evaluation, Evaluation>();
|
|
|
|
}
|
2013-05-30 11:44:10 -05:00
|
|
|
|
2023-05-23 15:31:50 -05:00
|
|
|
BOOST_AUTO_TEST_CASE_TEMPLATE(H2OAirFluidSystem, Scalar, ScalarTypes)
|
|
|
|
{
|
|
|
|
using Evaluation = Opm::DenseAd::Evaluation<Scalar,3>;
|
|
|
|
using H2O = Opm::SimpleH2O<Scalar>;
|
|
|
|
using FluidSystem = Opm::H2OAirFluidSystem<Scalar, H2O>;
|
2013-05-30 11:44:10 -05:00
|
|
|
|
2023-05-23 15:31:50 -05:00
|
|
|
checkFluidSystem<Scalar, FluidSystem, Scalar, Scalar>();
|
|
|
|
checkFluidSystem<Scalar, FluidSystem, Evaluation, Scalar>();
|
|
|
|
checkFluidSystem<Scalar, FluidSystem, Evaluation, Evaluation>();
|
|
|
|
}
|
2013-05-30 11:44:10 -05:00
|
|
|
|
2023-05-23 15:31:50 -05:00
|
|
|
BOOST_AUTO_TEST_CASE_TEMPLATE(H2OAirXyleneFluidSystem, Scalar, ScalarTypes)
|
|
|
|
{
|
|
|
|
using Evaluation = Opm::DenseAd::Evaluation<Scalar,3>;
|
|
|
|
using FluidSystem = Opm::H2OAirXyleneFluidSystem<Scalar>;
|
2013-05-30 11:44:10 -05:00
|
|
|
|
2023-05-23 15:31:50 -05:00
|
|
|
checkFluidSystem<Scalar, FluidSystem, Scalar, Scalar>();
|
|
|
|
checkFluidSystem<Scalar, FluidSystem, Evaluation, Scalar>();
|
|
|
|
checkFluidSystem<Scalar, FluidSystem, Evaluation, Evaluation>();
|
|
|
|
}
|
2013-05-30 11:44:10 -05:00
|
|
|
|
2023-05-23 15:31:50 -05:00
|
|
|
BOOST_AUTO_TEST_CASE_TEMPLATE(TwoPhaseImmiscibleFluidSystemLL, Scalar, ScalarTypes)
|
|
|
|
{
|
|
|
|
using Evaluation = Opm::DenseAd::Evaluation<Scalar,3>;
|
|
|
|
using Liquid = Opm::LiquidPhase<Scalar, Opm::H2O<Scalar>>;
|
|
|
|
using FluidSystem = Opm::TwoPhaseImmiscibleFluidSystem<Scalar, Liquid, Liquid>;
|
2013-05-30 11:44:10 -05:00
|
|
|
|
2023-05-23 15:31:50 -05:00
|
|
|
checkFluidSystem<Scalar, FluidSystem, Scalar, Scalar>();
|
|
|
|
checkFluidSystem<Scalar, FluidSystem, Evaluation, Scalar>();
|
|
|
|
checkFluidSystem<Scalar, FluidSystem, Evaluation, Evaluation>();
|
|
|
|
}
|
2013-05-30 11:44:10 -05:00
|
|
|
|
2023-05-23 15:31:50 -05:00
|
|
|
BOOST_AUTO_TEST_CASE_TEMPLATE(TwoPhaseImmiscibleFluidSystemLG, Scalar, ScalarTypes)
|
|
|
|
{
|
|
|
|
using Evaluation = Opm::DenseAd::Evaluation<Scalar,3>;
|
|
|
|
using Gas = Opm::GasPhase<Scalar, Opm::N2<Scalar>>;
|
|
|
|
using Liquid = Opm::LiquidPhase<Scalar, Opm::H2O<Scalar>>;
|
|
|
|
using FluidSystem = Opm::TwoPhaseImmiscibleFluidSystem<Scalar, Liquid, Gas>;
|
|
|
|
|
|
|
|
checkFluidSystem<Scalar, FluidSystem, Scalar, Scalar>();
|
|
|
|
checkFluidSystem<Scalar, FluidSystem, Evaluation, Scalar>();
|
|
|
|
checkFluidSystem<Scalar, FluidSystem, Evaluation, Evaluation>();
|
|
|
|
}
|
2013-05-30 11:44:10 -05:00
|
|
|
|
2023-05-23 15:31:50 -05:00
|
|
|
BOOST_AUTO_TEST_CASE_TEMPLATE(TwoPhaseImmiscibleFluidSystemGL, Scalar, ScalarTypes)
|
|
|
|
{
|
|
|
|
using Evaluation = Opm::DenseAd::Evaluation<Scalar,3>;
|
|
|
|
using Gas = Opm::GasPhase<Scalar, Opm::N2<Scalar>>;
|
|
|
|
using Liquid = Opm::LiquidPhase<Scalar, Opm::H2O<Scalar>>;
|
|
|
|
using FluidSystem = Opm::TwoPhaseImmiscibleFluidSystem<Scalar, Gas, Liquid>;
|
|
|
|
|
|
|
|
checkFluidSystem<Scalar, FluidSystem, Scalar, Scalar>();
|
|
|
|
checkFluidSystem<Scalar, FluidSystem, Evaluation, Scalar>();
|
|
|
|
checkFluidSystem<Scalar, FluidSystem, Evaluation, Evaluation>();
|
2015-05-21 08:33:16 -05:00
|
|
|
}
|
|
|
|
|
2023-05-23 15:31:50 -05:00
|
|
|
BOOST_AUTO_TEST_CASE_TEMPLATE(SinglePhaseFluidSystemL, Scalar, ScalarTypes)
|
2015-05-21 08:33:16 -05:00
|
|
|
{
|
2023-05-23 15:31:50 -05:00
|
|
|
using Evaluation = Opm::DenseAd::Evaluation<Scalar,3>;
|
|
|
|
using Liquid = Opm::LiquidPhase<Scalar, Opm::H2O<Scalar>>;
|
|
|
|
using FluidSystem = Opm::SinglePhaseFluidSystem<Scalar, Liquid>;
|
|
|
|
|
|
|
|
checkFluidSystem<Scalar, FluidSystem, Scalar, Scalar>();
|
|
|
|
checkFluidSystem<Scalar, FluidSystem, Evaluation, Scalar>();
|
|
|
|
checkFluidSystem<Scalar, FluidSystem, Evaluation, Evaluation>();
|
2016-01-14 18:28:07 -06:00
|
|
|
}
|
2013-05-30 11:44:10 -05:00
|
|
|
|
2023-05-23 15:31:50 -05:00
|
|
|
BOOST_AUTO_TEST_CASE_TEMPLATE(SinglePhaseFluidSystemG, Scalar, ScalarTypes)
|
2016-01-14 18:28:07 -06:00
|
|
|
{
|
2023-05-23 15:31:50 -05:00
|
|
|
using Evaluation = Opm::DenseAd::Evaluation<Scalar,3>;
|
|
|
|
using Gas = Opm::GasPhase<Scalar, Opm::N2<Scalar>>;
|
|
|
|
using FluidSystem = Opm::SinglePhaseFluidSystem<Scalar, Gas>;
|
2016-04-17 04:28:06 -05:00
|
|
|
|
2023-05-23 15:31:50 -05:00
|
|
|
checkFluidSystem<Scalar, FluidSystem, Scalar, Scalar>();
|
|
|
|
checkFluidSystem<Scalar, FluidSystem, Evaluation, Scalar>();
|
|
|
|
checkFluidSystem<Scalar, FluidSystem, Evaluation, Evaluation>();
|
2013-05-30 11:44:10 -05:00
|
|
|
}
|