# Closed incompressible two-phase system: set pressure reference

I am testing the solver twoPhaseEulerFoam (version 3.0.x) in a closed system to see the visualize the settling process. In my case, I set that fluids are rigorously incompressible. Since the system is closed, I set a no-slip b.c. for velocities (fixedValue (0 0 0)) in all patches and a fixedFluxPressure b.c. for p_rgh. In the dictionary fvSolution, I set pRefCell and pRefValue equal to 0 and 1e5 (as in internalField), respectively. Using GAMG solver for the solution of the pressure-associated linear system, the simulation crashes after 1 time-step. Using PCG solver, the simulation goes on but with an important increase in the number of iterations. The only way that I have to use GAMG for the pressure linear system is to fix a pressure in a patch and avoid to specify pRefCell and pRefValue. But, of course, this is not rigorous since I am considering an incompressible closed system. I attached a case for testing. In the case test, I sett

In the userguide, it is written that "In a closed incompressible system, pressure is relative: it is the pressure range that matters not the absolute values. In these cases, the solver sets a reference level of pRefValue in cell pRefCell where p is the name of the pressure solution variable. Where the pressure is p_rgh, the names are p_rhgRefValue and p_rhgRefCell respectively". Nevertheless, "createSystem.H" requires a pRefCell and pRefValue, not a p_rghRefCell and p_rghRefValue. I have tried to modify the "createSystem.H" but the case asks for a "pRefCell" and "pRefValue".

Thanks for your attention, NicolòcaseTest.tar.gz

## Reattaching the author to the issue ticket: @nic92 ##