![]() |
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. |
| All times are GMT -4. The time now is 22:54. |