
[Sponsors] 
April 29, 2011, 08:05 
pisoFoam laplace equation

#1 
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 9 
Hello,
i'm currently reading jasaks thesis and have a look inside the pisofoam solver. Here is one thing i didnt understand in the following part of the solver: U = rUA*UEqn.H(); phi = (fvc::interpolate(U) & mesh.Sf())+(maybe something) ... fvScalarMatrix pEqn ( fvm::laplacian(rUA, p) == fvc::div(phi) ); Is the equation for phi representing the hole (2nd) r.h.s. of equation 3.141 in the thesis (page 146)? I thought so, because we are evaluating here the UEqn.H/a_p on the Surface multiplied by the Area. Why are we then taking the divergence of phi in the laplace equation? This would not match the formula 3.141 or 3.143... Can anybody help me and/or tell me my missinterpretations? This would be great. Thanks for any advice, rupert 

April 30, 2011, 02:40 

#2 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,910
Rep Power: 28 
Hi, think to discretizing the momentum equation as
A*U = H  grad(p), then U = H/A  1/A * grad(p) The face flux is then phi = U_f . S = (H/A)_f . S  (1/A)_f S snGrad(p) OpenFOAM first computes phi = (H/A)_f . S, then solves the pressure equation obtained imposing div(phi) = 0, which leads to laplacian (1/A*p) = div(phi) Once this equation is solved, the flux is corrected using the second part of the flux definition.
__________________
Alberto Passalacqua GeekoCFD  A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

April 30, 2011, 08:37 

#3  
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 9 
Quote:
Hello Alberto, thank you for the reply. Maybe i have problems understanding the commands... I understand that taking the divergence of equation phi = U_f . S = (H/A)_f . S  (1/A)_f S snGrad(p) removes the left hand side and the right hand side = 0 is building then the poisson equation... right? But I thought that (1/A)_f S snGrad(p) == div[(1/A) * grad(p)] == laplace (1/A * p) Herein snGrad(p) is the gradient of p at the surfaces. is this not right? Having a look on the equation for pressure on http://openfoamwiki.net/index.php/Th...hm_in_OpenFOAM at chapter 2 (the last equation) this would lead (for me) to a pressure equation like: laplacian (1/A*p) = (H/A)_f . S = phi (and not div(phi)) Do you understand my problem? where is my misinterpretation??? Thank you a lot, rupert 

April 30, 2011, 16:57 

#4  
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,910
Rep Power: 28 
Quote:
Quote:
phi = (H/A)_f . S  (1/A)_f S snGrad(p) you have div(phi) = 0 implies div((H/A)_f . S) = laplacian(1/A*p), which is exactly div(phi) = laplacian(1/A*p) Best,
__________________
Alberto Passalacqua GeekoCFD  A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. Last edited by alberto; May 2, 2011 at 03:12. Reason: Added missing S 

May 1, 2011, 06:47 

#5 
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 9 
Good morning,
i hope that i'm not bugging you, but: you confirmed that a) (1/A)_f S snGrad(p) == div[(1/A) * grad(p)] == laplace (1/A * p) right? If a) works it will make the phi equation from phi = (H/A)_f  (1/A)_f S snGrad(p) to b) phi = (H/A)_f  laplace (1/A*p) div(b) leads to 0 = div((H/A)_f)  div(laplace (1/A*p)) or not? I think that my problem lies in a) If (1/A)_f S snGrad(p) would be equal to (1/A) * grad(p) this would solve my problems... Is this the case? This would mean that snGrad(p) == grad(p) (defined at the cellcenter) * normalvector (at the surfaces) Hope you can finally help me Thanks, rupert 

May 1, 2011, 18:19 

#6  
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,910
Rep Power: 28 
Quote:
div(1/A grad(p)) be equal to (1/A)_f S snGrad(p) ? You have to think to the velocity predictor U = H/A  1/A grad(p), interpolate it on cell faces, and obtain U_f. At that point you dot it with the surface vector, and, at that point, you have the snGrad(p). Best,
__________________
Alberto Passalacqua GeekoCFD  A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

May 2, 2011, 02:58 

#7  
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 9 
Quote:
using your definition for phi: "phi = (H/A)_f  (1/A)_f S snGrad(p)" Div of this equation leads to " 0 = div((H/A)_f)  div( (1/A)_f) S snGrad(p))" How can you say here that div( (1/A)_f) S snGrad(p)) is equal to laplacian(1/A*p)??? 

May 2, 2011, 03:22 

#8  
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,910
Rep Power: 28 
Quote:
The only element that probably can cause confusion is the norm of the surface, which is not in the code, since operators take care of it. Best,
__________________
Alberto Passalacqua GeekoCFD  A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

May 2, 2011, 05:04 

#9 
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 9 
thank you very much


October 29, 2011, 08:14 
learn a lot!

#10 
New Member
charlse
Join Date: Mar 2011
Location: china
Posts: 6
Rep Power: 8 
I learn a lot! Thank you!
For me, the relationship of div(phi)=0 is doubted. Now I know, phi is a scalar, and its div is zero! Last edited by star shower; October 29, 2011 at 09:11. 

July 16, 2013, 22:13 

#11  
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Torino, Italy
Posts: 751
Rep Power: 10 
Quote:


Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Calculation of the Governing Equations  Mihail  CFX  7  September 7, 2014 06:27 
Constant velocity of the material  Sas  CFX  15  July 13, 2010 08:56 
mass flow in is not equal to mass flow out  saii  CFX  2  September 18, 2009 08:07 
Fast iterative methods (for Laplace equation)?  pzhang  Main CFD Forum  2  September 30, 2008 16:28 
discretization of laplace equation using FVM  stein  Main CFD Forum  2  November 9, 2005 13:58 