Good morning Lorenzo,

per default, the formulation for the 2p model is pw-sn. That means your primary variables are the water pressure and the non-wetting phase saturation (in your case oil I assume). Therefore, Indices::swIdx does not exists as it is not part of your primary variables.

Since you are considering a two-phase system, just set the oil saturation by doing

*values[Indices::snIdx] = 1.0 - std::min(smax, smin + exp_value + small_number);*

This is what you want I guess.

Best wishes,
Dennis


**

On 02.11.2018 08:37, lc wrote:

Good morning,

I'd like to ask how to impose an initial condition on the water saturation and not on the oil saturation.

Actually, what I implemented is the following:

         const auto pos = fvGeometry.subContVol[scvIdx].global;

        double x_0 = 0.;
        double smin = 0.2121;
        double smax = 0.7856;
        double exp_arg = (0.5 - pow((pos[0]-x_0)/(2.+cos(3.*sqrt(std::abs(pos[1]-75.0)))), 2.) );
        double exp_value = exp_arg >= -100 ? exp(exp_arg) : 0;
        double small_number = 1e-6;

*        values[Indices::snIdx] = std::min(smax, smin + exp_value + small_number);*

but this last line, should be imposed on values[Indices::swIdx] but if I write it I get an error, not declared variable.


Thank you,

Lorenzo





_______________________________________________
Dumux mailing list
Dumux@listserv.uni-stuttgart.de
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

_______________________________________________
Dumux mailing list
Dumux@listserv.uni-stuttgart.de
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

Reply via email to