|November 17, 2010, 08:58||
Two Phase Darcy flow with gravity -> problem
Join Date: Feb 2010
Location: Stanford University
Posts: 235Rep Power: 9
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:
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);
- 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 ?
|Thread||Thread Starter||Forum||Replies||Last Post|
|two phase stratified flow. convergence problem||moas||CFX||0||September 7, 2008 15:32|
|error in two phase flow problem||mvee||FLUENT||0||March 28, 2007 05:17|
|More Probs - Gas-Solid 2 Phase flow||Paresh Jain||CFX||4||March 27, 2004 18:10|
|Problem on boundry of two phase flow||youngan||CFX||2||June 30, 2003 02:11|
|Two phase flow models||Atholl||Main CFD Forum||2||May 7, 2002 03:49|