Two Phase Darcy flow with gravity -> problem

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

 November 17, 2010, 08:58 Two Phase Darcy flow with gravity -> problem #1 Senior Member   Cyprien Join Date: Feb 2010 Location: Stanford University Posts: 260 Rep Power: 11 Sponsored Links Hi everybody! I am currently working on a Darcy two phase flow solver with IMPES method (IMplicit Pressure Explicit Saturation). I want to simulate a two phase flow in porous media in 3D. It is why I use permeability tensor fields. These permeabilities depend on the liquid saturation Here is the snippet I programmed in OpenFOAM: Code: ``` M_beta = K*pow(S,2)/mu_beta; M_gamma = K*pow((scalar(1.0)-S),2)/mu_gamma; phi_beta = linearInterpolate( (rho_beta*M_beta & g)) & mesh.Sf(); phi_gamma = linearInterpolate( (rho_gamma*M_gamma & g)) & mesh.Sf(); fvScalarMatrix pEqn ( fvm::laplacian((M_beta + M_gamma),p) == fvc::div(phi_beta) + fvc::div(phi_gamma) ); pEqn.relax(); pEqn.solve(); fvScalarMatrix SEqn ( fvm::ddt(eps,S) - fvm::laplacian(diffS,S) == (fvc::laplacian(M_beta,p)) - fvc::div(phi_beta) ); SEqn.relax(); SEqn.solve(); U_beta = -(M_beta&fvc::grad(p))+((rho_beta*M_beta)&g); U_gamma = -(M_gamma&fvc::grad(p))+((rho_gamma*M_gamma)&g);``` where - S and p are volScalarFields - M_beta and M_gamma are volTensorFields. - K is a dimensionedTensor The compilation is ok. As a validation case, I simulate a the flow through a 1D vertical column: I inject a liquid at the top of column initially filled up with gas. the simulation is correct on a case without gravity (g= (0 0 0)). However, the code diverges when I tried to simulate a flow with gravity (g = (0 -9.81 0)). Is there something wrong with the gravity in my code ? Best Regards, Cyp

 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 moas CFX 0 September 7, 2008 15:32 mvee FLUENT 0 March 28, 2007 05:17 Paresh Jain CFX 4 March 27, 2004 18:10 youngan CFX 2 June 30, 2003 02:11 Atholl Main CFD Forum 2 May 7, 2002 03:49