OPM / opm-models

The models module for the Open Porous Media Simulation (OPM) framework
Other
17 stars 69 forks source link

initialize water saturation for gas dissolved in water #908

Closed jakobtorben closed 1 month ago

jakobtorben commented 2 months ago

For the case of gas being dissolved in water, the water saturation is not initialized explicitly, such that it is currently set to the default 0.0.

This fix should not change the behaviour of primaryVarsMeaningWater as the water saturation is hardcoded for the RSW case in line 768

computeCapillaryPressures_(pC, /*so=*/ 0.0,  /*sg=*/ 0.0, /*sw=*/ 1.0, matParams);

but it might cause issues later if someone uses sw directly.

For primaryVarsMeaningGas there might be an impact, depending on what primary variable is being used for gas.

There might be other bugs like this in the code, as it is hard to have an overview of all the different combinations of the different primary variable states.

akva2 commented 2 months ago

jenkins build this please

atgeirr commented 1 month ago

I agree, merging.