CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Explanation of the phiGradp term in the pEqn.H of cavitatingFoam

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 6, 2022, 20:58
Question Explanation of the phiGradp term in the pEqn.H of cavitatingFoam
  #1
New Member
 
Join Date: Jul 2022
Posts: 5
Rep Power: 3
Yang16024 is on a distinguished road
Hi all,

I am working with OpenFoam version 9. And I am currently studying the cavitatingFoam solver. But there is a phiGradp term in the pEqn.H file which really confused me.


---------------------------pEqn.H-----------------------------------
...

surfaceScalarField rhof("rhof", fvc::interpolate(rho));

volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));

phi = fvc::flux(HbyA) + rhorAUf*fvc::ddtCorr(U, phi, Uf);
fvc::makeRelative(phi, U);

surfaceScalarField phiGradp(rhorAUf*mesh.magSf()*fvc::snGrad(p));

phi -= phiGradp/rhof;

volScalarField rho0(rho - psi*p);

while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
fvc::ddt(rho)
+ psi*correction(fvm::ddt(p))
+ fvc::div(phi, rho)
+ fvc::div(phiGradp)
- fvm::laplacian(rhorAUf, p)
);

...
--------------------------------------------------------------------------

So my questions are:

-What does this term phiGradp mean and Where does it come from ?
-Why the phi term has to minus the phiGradp/rhof before the pressure-correction loop and then plus it back ( fvc::div(phiGradp) ) in the loop ?

It would be really nice if you can help me to understand this.

Thanks
Yang16024 is offline   Reply With Quote

Reply

Tags
cavitatingfoam, peqn.h

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
momentum source term zwdi FLUENT 14 June 27, 2017 15:40
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 15:45
UDF Source Term Units? Brian FLUENT 1 October 24, 2005 09:15
pressure gradient term in low speed flow Atit Koonsrisuk Main CFD Forum 2 January 10, 2002 10:52
bouyancy term in epsilon equation Michael Main CFD Forum 1 June 25, 1999 10:20


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