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

Some questions about the functions ddtPhiCorr(rUA, U, phi) and adjustPhi(phi, U, p)

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

Like Tree9Likes
  • 9 Post By fumiya

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 25, 2013, 07:29
Default Some questions about the functions ddtPhiCorr(rUA, U, phi) and adjustPhi(phi, U, p)
  #1
Member
 
Join Date: Jun 2009
Posts: 34
Rep Power: 16
lzgwhy is on a distinguished road
Dear all,

I am reading the icoFoam codes, where I find two functions ddtPhiCorr(rUA, U, phi) and adjustPhi(phi, U, p):

volScalarField rUA = 1.0/UEqn.A();

U = rUA*UEqn.H();
phi = (fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, U, phi);

adjustPhi(phi, U, p);


Could you tell me why the two functions are used here? And where could I find the explanation of these two functions in official documentation? Thank you very much!

lwhy
lzgwhy is offline   Reply With Quote

Old   March 25, 2013, 10:04
Default
  #2
Senior Member
 
fumiya's Avatar
 
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 18
fumiya is on a distinguished road
I'm afraid there aren't any official documents regrading this topic, but you can refer to the source code.

1) adjustPhi(phi, U, p)
  • source: https://github.com/OpenFOAM/OpenFOAM...hi/adjustPhi.C
  • This function is to adjust the flux phi to obey continuity(total flux into the domain equals total flux out from the domain).
    This is achieved in the following way:

    Total flux = massIn - fixedMassOut - massCorr * adjustableMassOut
    where
    • massCorr = (massIn - fixedMassOut)/adjustableMassOut
    • massIn: Total flux into the domain
    • fixedMassOut: Total flux out from the domain through the boundaries on which the velocity is prescribed
    • adjustableMassOut: Total flux from the domain through the boundaries on which the velocity is NOT fixed

    We can make the total flux equal 0 by adjusting the adjustableMassOut by multiplying it by massCorr.

2)ddtPhiCorr(rUA, U, phi)
You might want to read the following thread
http://www.cfd-online.com/Forums/ope...rua-u-phi.html
Hope this helps,
Fumiya
fumiya is offline   Reply With Quote

Old   June 5, 2013, 10:15
Default
  #3
New Member
 
NaiXian Leslie Lu
Join Date: Jun 2009
Location: France
Posts: 26
Rep Power: 16
LESlie is on a distinguished road
Quote:
Originally Posted by fumiya View Post
I'm afraid there aren't any official documents regrading this topic, but you can refer to the source code.

1) adjustPhi(phi, U, p)
  • source: https://github.com/OpenFOAM/OpenFOAM...hi/adjustPhi.C
  • This function is to adjust the flux phi to obey continuity(total flux into the domain equals total flux out from the domain).
    This is achieved in the following way:

    Total flux = massIn - fixedMassOut - massCorr * adjustableMassOut
    where
    • massCorr = (massIn - fixedMassOut)/adjustableMassOut
    • massIn: Total flux into the domain
    • fixedMassOut: Total flux out from the domain through the boundaries on which the velocity is prescribed
    • adjustableMassOut: Total flux from the domain through the boundaries on which the velocity is NOT fixed
Thanks for the explanation and sorry for my maybe stupid question.

Why is adjustPhi taken away in, e.g. compressibleInterFoam? Shouldn't the flux still be adjusted to satisfy continuity at the boundary?

Best regards,
Lesie
LESlie is offline   Reply With Quote

Old   December 25, 2014, 14:16
Default
  #4
New Member
 
Abtin Ansari
Join Date: Oct 2014
Posts: 2
Rep Power: 0
abtinansari is on a distinguished road
adjustPhi is taken away from compressible solvers because you are no longer solving Poisson equation for getting the pressure. look at post #4 in http://www.cfd-online.com/Forums/ope...adjustphi.html

so there are no singularities to be dealt with. for example lets look at pEqn in laminarSMOKE :

fvScalarMatrix pEqn
(
fvm::ddt(psi, p)
+ fvc::div(phi)
- fvm::laplacian(rho*rUA, p)
);
abtinansari is offline   Reply With Quote

Reply

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



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