pEqn.flux()
Hi FOAMers
can any one tell me U.correctBoundaryConditions() in icoFoam code is for what? Thanks a lot 
It is an explicit command to update the boundary conditions on U because U has been modified explicitly on the line before. In contrast, when U and p are updated by solving systems of equations, the boundary conditions are updated implicitly as part of the Matrix "solve".

P.correctBoundaryConditions();
Thank you very much
May be my question is a low level one. Why there is not P.correctBoundaryConditions(); in the icoFoam solver? Thanks a lot 
U.correctBoundaryConditions()
Thanks a lot

As I said, it is because p is updated by solving a system of equations, and the boundary conditions are updated implicitly as part of the Matrix "solve". If you look in finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C, for example, you will see that correctBoundaryConditions() is called as the final instruction in Foam::fvMatrix<Type>::solve.

U.correctBoundaryConditions()
Thank you very much again

Quote:
As U have said, so the velocity field after "U.correctBoundaryConditions()" should changes. but why there is no difference in my result? I rewmake the icoFoam's code: Code:
...................................... Thanks in advance. 
All times are GMT 4. The time now is 00:38. 