# Problem with alpha.water > 1 in multiphase flow

 Register Blogs Members List Search Today's Posts Mark Forums Read

 August 9, 2022, 10:54 Problem with alpha.water > 1 in multiphase flow #1 New Member   Marc Baydoun Join Date: Aug 2022 Location: paris Posts: 1 Rep Power: 0 Hello everyone! I'm new to this community and I'm a beginner in openfoam programming so bare that in mind. I'm simulating a gas generation from a porous media into a liquid bassin. The two domains are resolved via two previously developed openfoam codes: porous media code: Handles the generation of gas and the transport of gas governed by Darcy equation liquid bassin code: Handles fluid flow (based on compressible flow) I developed a code for the interface boundary conditions for:alpha.water, U and P The U and P conditions are the based on pressurePermeableAlphaInletOutletVelocity and prghPermeableAlphaTotalPressureFvPatchScalarField that are used in the dam break tutorial. For the alpha.water condition, I want to precise that when the gas pressure in the porous medium surpasses that of the neighbouring cell in the liquid bassin, the gas bubble can flow and thus: if(p_Porous>p_Bassin): { this->refValue()=0.9; this->valueFraction()=1,0; } else { this->refValue()=1.0; this->valueFraction()=0,0; } However, the alpha.water during calculations becomes greater than 1 and, at some point, the simulation diverges because of a "negative initial temperature". What is wrong with the conditions specified? what might be the source of the error? Any help is appreciated. Thanks initial conditions for alpha.water: boundaryField { walls { type zeroGradient; } atmosphere { type inletOutlet; inletValue uniform 0; value uniform 0; } interface { type coupledmixedAlphaMultiphaseBC; (developed library) neighbourFieldName poreMedia; value uniform 1; } } For the U file: boundaryField { walls { type fixedValue; value uniform (0 0 0);} atmosphere { type pressureInletOutletVelocity; value uniform (0.0 0.0 0.0); } Interface { type coupledMixedVelocityMultiphaseBC ; (developed library) value uniform (0 0 0); alphaMin 0.01; } and for the P file: boundaryField { walls { type fixedFluxPressure; } atmosphere { type totalPressure; p0 uniform 101325; U U; phi phi; rho rho; psi none; gamma 1; value uniform 101325; } Interface { type mycoupledmixedPressureMultiphaseBC; (developed library) value uniform 101325; alphaMin 0.01; }

 Tags alpha.water, multiphase boundary wall, multiphase flow