CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Running, Solving & CFD

Poisson solver

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

LinkBack Thread Tools Display Modes
Old   October 27, 2008, 11:04
Default Dear all, I'm new to OF and
Niklas Winkler
Join Date: Mar 2009
Location: Stockholm, Stockholm, Sweden
Posts: 73
Rep Power: 10
nikwin is on a distinguished road
Dear all,

I'm new to OF and trying to implement a Poisson solver to calculate a pressure field from a velocity field. For the simplest case, inviscid and incompressible that would be, laplace(p) = -div(div(UU)).

After reading U and setting pP (pressure to be derived) initially to p, using the cavity case in IcoFoam as a test case, the Poisson equation is implemented as

fvScalarMatrix pPEqn
fvm::laplacian(pP) == -fvc::div(fvc::div(phi, U))


and solved with the GAMG solver. The problem is that I'm getting strange results. Is there anything wrong with the implementation? What is the difference with the following implementation, (which does not want to work)

fvScalarMatrix pPEqn
-fvc::div(div(phi, U))

solve(pPEqn == fvm::laplacian(pP));

Is there a direct way of setting the boundary conditions for pP to fixed values, something similar to boundaryField().types()?

nikwin is offline   Reply With Quote

Old   April 17, 2009, 16:59
Senior Member
Ivan Flaminio Cozza
Join Date: Mar 2009
Location: Torino, Piemonte, Italia
Posts: 207
Rep Power: 11
ivan_cozza is on a distinguished road
Send a message via MSN to ivan_cozza
Hi Niklas,
did you success to implement your Poisson solver?
I'm managing to implement exactly the same solver, to get a pressure field from an incompressible velocity field. Do you obtain good results?
Thank you,
ivan_cozza is offline   Reply With Quote


Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
looking for a 3D Poisson Solver phsieh2005 Main CFD Forum 2 March 1, 2007 20:33
Different ans of poisson eqn with different solver Quarkz Main CFD Forum 0 October 6, 2005 11:49
Poisson solver Steve Main CFD Forum 6 July 22, 2004 21:16
solver for Poisson eqn billboard Main CFD Forum 3 May 22, 2002 00:07
Solver for poisson equ. Capi Main CFD Forum 1 May 3, 2001 11:20

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