CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

pEqn.flux()

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By boger
  • 1 Post By boger

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 23, 2011, 09:40
Default pEqn.flux()
  #1
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18
ata is on a distinguished road
Hi FOAMers
can any one tell me U.correctBoundaryConditions() in icoFoam code is for what?
Thanks a lot
ata is offline   Reply With Quote

Old   January 24, 2011, 10:26
Default
  #2
Senior Member
 
David Boger
Join Date: Mar 2009
Location: Penn State Applied Research Laboratory
Posts: 146
Rep Power: 17
boger is on a distinguished road
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".
mnajafi likes this.
__________________
David A. Boger
boger is offline   Reply With Quote

Old   January 24, 2011, 11:13
Default P.correctBoundaryConditions();
  #3
New Member
 
Salman
Join Date: Oct 2010
Posts: 5
Rep Power: 16
salman189 is on a distinguished road
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
salman189 is offline   Reply With Quote

Old   January 24, 2011, 11:18
Default U.correctBoundaryConditions()
  #4
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18
ata is on a distinguished road
Thanks a lot
ata is offline   Reply With Quote

Old   January 24, 2011, 11:24
Default
  #5
Senior Member
 
David Boger
Join Date: Mar 2009
Location: Penn State Applied Research Laboratory
Posts: 146
Rep Power: 17
boger is on a distinguished road
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.
saba_saeb likes this.
__________________
David A. Boger
boger is offline   Reply With Quote

Old   January 24, 2011, 23:30
Default U.correctBoundaryConditions()
  #6
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18
ata is on a distinguished road
Thank you very much again
ata is offline   Reply With Quote

Old   August 25, 2013, 23:31
Default
  #7
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 848
Rep Power: 18
sharonyue is on a distinguished road
Quote:
Originally Posted by boger View Post
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.
sharonyue is offline   Reply With Quote

Old   May 2, 2018, 19:58
Default
  #8
New Member
 
Mohammad Najafi
Join Date: Oct 2017
Posts: 11
Rep Power: 9
mnajafi is on a distinguished road
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.
mnajafi is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 01:09.