calculation of phi
Where do I have to look (in the source code), if I want to know how phi is calculated in interFoam?
|
In createFields.H, you'll see the line include "createPhi.H". You can find this in OpenFOAM-1.X/src/finiteVolume/cfdTools/incompressible
It is defined as: phi = linearInterpolate(U) & mesh.Sf() I think the best thing to do is to set up your IDE's code assistance, so that you can easily navigate through the source code. |
If phi is calculated from U, what is the advantage of using boundary conditions like fluxCorrectedVelocity, pressureInletVelocity, pressureInletOutletVelocity - which calculate U form the flux(phi)?
|
I've had a quick look at fluxCorrectedVelocity.
It would be used when you know the pressure at a boundary and the flux through that boundary. The BC is correcting the velocity component normal to the boundary, based on your knowledge of the flux through that boundary. I can't think of when I would use it, maybe someone else has? You could replace all instances of phi with linearInterpolate(U) & mesh.Sf(), but that would make the code messy. |
Quote:
Can anyone provide a better answer to clear things up ? |
Hi all,
this is an ancient thread, but I want to give some hints:
Lets consider the solver pimpleFoam
Now it should be clear, that the flux-corrected boundary conditions are useful because the fluxes are changing during the pressure equation and we recalculate the velocity from the new fluxes. |
Thanks Tobi, it's more clear for me now. Have a nice day.
|
Hey guys.
I know it's meant to be poor form, but this is directly relevant. Any thoughts?? https://www.cfd-online.com/Forums/op...-matching.html |
All times are GMT -4. The time now is 09:15. |