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

When does correctBoundaryConditions() needs to be called

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 6, 2022, 04:12
Default When does correctBoundaryConditions() needs to be called
  #1
New Member
 
Join Date: Dec 2021
Posts: 23
Rep Power: 4
MamboJambo is on a distinguished road
Hello to all,


I would like to know in what conditions does the function correctBoundaryConditions() needs to be called?
MamboJambo is offline   Reply With Quote

Old   January 6, 2022, 05:12
Default
  #2
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 772
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
Typically each type the equations and thus the matrix is updated within a S/Pimple loop.
dlahaye is offline   Reply With Quote

Old   January 6, 2022, 11:54
Default
  #3
New Member
 
Join Date: Dec 2021
Posts: 23
Rep Power: 4
MamboJambo is on a distinguished road
Quote:
Originally Posted by dlahaye View Post
Typically each type the equations and thus the matrix is updated within a S/Pimple loop.
Was not able to understand. Would you illustrate with some examples?
Are general rules of thumb to do this.


For instance, if you do:

Code:
        forAll(p, cellI)
        {
            p[cellI] = p[cellI] + 10*mesh.C()[cellI].x();
        }
        forAll(p.boundaryField(), patchI)
        {
            forAll(p.boundaryField()[patchI], faceI)
            p.boundaryFieldRef()[patchI][faceI] = p.boundaryField()[patchI][faceI] + 1010*mesh.Cf().boundaryField()[patchI][faceI].x(); 
        }

        U = fvc::grad(p)*dimensionedScalar("tmp", dimTime, 1.);
You should need p.correctBoundaryConditions() before the computation of U
MamboJambo 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
Why is the wrong function called during run-time? lumpor OpenFOAM Programming & Development 1 May 26, 2021 07:57
SU2-7.0.1 on ubuntu 18.04 hyunko SU2 Installation 7 March 16, 2020 04:37
terminate called after throwing an instance of 'int' b614910 SU2 10 July 27, 2014 22:16
understanding how turbulence models are called romant OpenFOAM Programming & Development 0 March 21, 2012 09:22
reconstructParMesh not working with an axisymetric case francesco OpenFOAM Bugs 4 May 8, 2009 05:49


All times are GMT -4. The time now is 03:21.