|
[Sponsors] |
January 23, 2011, 09:40 |
pEqn.flux()
|
#1 |
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18 |
Hi FOAMers
can any one tell me U.correctBoundaryConditions() in icoFoam code is for what? Thanks a lot |
|
January 24, 2011, 10:26 |
|
#2 |
Senior Member
David Boger
Join Date: Mar 2009
Location: Penn State Applied Research Laboratory
Posts: 146
Rep Power: 17 |
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".
__________________
David A. Boger |
|
January 24, 2011, 11:13 |
P.correctBoundaryConditions();
|
#3 |
New Member
Salman
Join Date: Oct 2010
Posts: 5
Rep Power: 16 |
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 |
|
January 24, 2011, 11:18 |
U.correctBoundaryConditions()
|
#4 |
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18 |
Thanks a lot
|
|
January 24, 2011, 11:24 |
|
#5 |
Senior Member
David Boger
Join Date: Mar 2009
Location: Penn State Applied Research Laboratory
Posts: 146
Rep Power: 17 |
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.
__________________
David A. Boger |
|
January 24, 2011, 23:30 |
U.correctBoundaryConditions()
|
#6 |
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18 |
Thank you very much again
|
|
August 25, 2013, 23:31 |
|
#7 | |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 848
Rep Power: 18 |
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:
...................................... #include "continuityErrs.H" U = HbyA - rAU*fvc::grad(p); Info << U << endl; U.correctBoundaryConditions(); Info << U << endl; ...................................... Thanks in advance. |
||
May 2, 2018, 19:58 |
|
#8 |
New Member
Mohammad Najafi
Join Date: Oct 2017
Posts: 11
Rep Power: 9 |
I guess because U is a volVectorField and it's not defined on boundaries (but on cell centers), you can't observer changes using Info. To see the difference check Info<<fvc::interpolate(U)<<endl; before and after U.correctBoundaryConditions(). As you would see, interpolate returns correct value for boundaries just after correctBoundaryConditions().
Last edited by mnajafi; May 2, 2018 at 21:07. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
phi -= pEqn.flux() vs. linearInterpolate(U) & mesh.Sf() | santiagomarquezd | OpenFOAM Programming & Development | 33 | October 15, 2019 11:24 |
pEqn.flux() | ata | OpenFOAM | 2 | January 24, 2011 23:31 |