Richards model does not support TwoPImmiscible fluid system
Bug report
What happened / Problem description:
It fails to compile when the user decides to use the FluidSystems::TwoPImmiscible
as fluid system in properties to a Richards problem due to the lack of index system.
For example, if we use
First, the default "volumevariables.hh"
requires these index members, therefore, it would return following errors:
/DUMUX/dumux/dumux/porousmediumflow/richards/volumevariables.hh:132:40: error: no member named 'liquidPhaseIdx' in
'Dumux::FluidSystems::TwoPImmiscible<double, Dumux::FluidSystems::OnePLiquid<double, Dumux::Components::SimpleH2O<double> >,
Dumux::FluidSystems::OnePGas<double, Dumux::Components::TabulatedComponent<Dumux::Components::Air<double>, false> > >'
massFraction_[FluidSystem::liquidPhaseIdx] = 1.0;
and
error: no member named 'gasPhaseIdx' ...
This problem also occurs when the user implemented own volumevariables.hh
, for richards/iofields.hh
also needs the index members, it will return the following errors:
/DUMUX/dumux/dumux/porousmediumflow/richards/iofields.hh:49:74: error: no member named 'gasPhaseIdx' in
'Dumux::FluidSystems::TwoPImmiscible<double, Dumux::FluidSystems::OnePLiquid<double, Dumux::Components::SimpleH2O<double> >,
Dumux::FluidSystems::OnePGas<double, Dumux::Components::TabulatedComponent<Dumux::Components::Air<double>, false> > >'
out.addVolumeVariable([](const auto& v){ return v.saturation(FS::gasPhaseIdx); }, ...
What you expected to happen:
The Richards model is supposed to support TwoPImmiscible
.
How to reproduce it (as minimally and precisely as possible): Try two constant components in the properties.hh for a Richards problem and compile:
using L = FluidSystems::OnePLiquid<double, Components::Constant<0,double> >;
using G = FluidSystems::OnePGas<double, Components::Constant<0,double> >;
using type = FluidSystems::TwoPImmiscible<Scalar, L, G>;
Anything else we need to know?:
Environment:
- Dune version: 2.7
- DuMux version: master
- Others: