# Equation Solving in Multiphase Flow

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

 May 21, 2013, 05:14 Equation Solving in Multiphase Flow #1 New Member   Join Date: Oct 2012 Posts: 14 Rep Power: 4 Dear foamers, I would like to know how are the Navier-Stokes equations solved in a multiphase flow. Let's consider a liquid/air flow. When a mesh is full of liquid or air, the equation resolution is similar to a monophasic fluid flow. But when a cell is partially filled with liquid and gas, are the equations solved for each phase fraction? Maybe the density and other parameters are averaged for each cell? Thank you for your time, Andreas

 May 21, 2013, 07:22 #2 Senior Member     Tobias Holzmann Join Date: Oct 2010 Location: Leoben (Austria) Posts: 1,100 Blog Entries: 6 Rep Power: 19 Hi Andreas, I´ve been working with the interFoam solver many times. For the density you are creating a averaged density in that cell for the beginning: Code: ```00037 const dimensionedScalar& rho1 = twoPhaseProperties.rho1(); 00038 const dimensionedScalar& rho2 = twoPhaseProperties.rho2(); 00039 00040 00041 // Need to store rho for ddt(rho, U) 00042 volScalarField rho 00043 ( 00044 IOobject 00045 ( 00046 "rho", 00047 runTime.timeName(), 00048 mesh, 00049 IOobject::READ_IF_PRESENT 00050 ), 00051 alpha1*rho1 + (scalar(1) - alpha1)*rho2, 00052 alpha1.boundaryField().types() 00053 ); 00054 rho.oldTime();``` First you extract the value of the density for phase1 and phase2 out of the properties file and then creating a averaged density: Code: `alpha1*rho1 + (scalar(1) - alpha1)*rho2` After that every time step execute the following line: Code: `00082 twoPhaseProperties.correct();` In that function (object=twoPhaseProperties; function=correct()) you should find the calculation of the thermophysical variables depending on Phase1 and Phase2. Hope that is helpful. Tobi sharonyue likes this.

 May 21, 2013, 14:01 #3 New Member   Join Date: Oct 2012 Posts: 14 Rep Power: 4 Hello Tobi, and thank you for your answer. I am working on interFoam as well! What you are saying is that the density is averaged on each cell automatically? What about other parameters? Is pressure averaged as well? And finally, are the Navier-Stokes solved for these averaged values? Or maybe for each phase fraction on each cell. Thank you, Andreas

 May 21, 2013, 14:13 #4 Senior Member     Tobias Holzmann Join Date: Oct 2010 Location: Leoben (Austria) Posts: 1,100 Blog Entries: 6 Rep Power: 19 Hi, first Code: `p == p_rgh + rho*gh;` So you can see that p is calculated with the averaged density. and p_rgh is calculated as: Code: ``` fvScalarMatrix p_rghEqn ( fvm::laplacian(rAUf, p_rgh) == fvc::div(phiHbyA) );``` The variables rAUf, phiHbyA is calculated in pEqn.H befor. I am familiar with the code of standard solvers for compressible and incompressible flows but not for multiphase. For that I can not give you an exact answer. For the velocity: Code: ``` fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) + turbulence->divDevRhoReff(rho, U) ); UEqn.relax();``` As you can see there are the averaged values again. But the averages are just in those cells with 0 < alpha < 1 sharonyue likes this.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20 Unseen OpenFOAM Running, Solving & CFD 7 April 16, 2014 03:38 hfs OpenFOAM Running, Solving & CFD 3 October 29, 2013 09:35 immortality OpenFOAM Running, Solving & CFD 2 January 25, 2013 11:21 liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07

All times are GMT -4. The time now is 16:26.