CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   pEqn.flux() (https://www.cfd-online.com/Forums/openfoam/84208-peqn-flux.html)

ata January 23, 2011 09:40

pEqn.flux()
 
Hi FOAMers
can any one tell me U.correctBoundaryConditions() in icoFoam code is for what?
Thanks a lot

boger January 24, 2011 10:26

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".

salman189 January 24, 2011 11:13

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

ata January 24, 2011 11:18

U.correctBoundaryConditions()
 
Thanks a lot

boger January 24, 2011 11:24

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.

ata January 24, 2011 23:30

U.correctBoundaryConditions()
 
Thank you very much again

sharonyue August 25, 2013 22:31

Quote:

Originally Posted by boger (Post 291911)
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".

Hi David,

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:

          ......................................
            #include "continuityErrs.H"

            U = HbyA - rAU*fvc::grad(p);
Info << U << endl;
            U.correctBoundaryConditions();
Info << U << endl;
          ......................................

I make a testify in the cavity case.
Thanks in advance.


All times are GMT -4. The time now is 02:37.