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

Non-orthogonality correction

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By olwi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 1, 2009, 15:19
Default Non-orthogonality correction
  #1
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 23
santiagomarquezd will become famous soon enough
Hi all! I'm checking out the scalarTransportFoam code and I can't realize how non-orthogonality corrections are applied:

From code we read:

Code:
 00047 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 
00048 
00049     Info<< "\nCalculating scalar transport\n" << endl;
00050 
00051 #   include "CourantNo.H"
00052 
00053     while (runTime.loop())
00054     {
00055         Info<< "Time = " << runTime.timeName() << nl << endl;
00056 
00057 #       include "readSIMPLEControls.H" 00058 
00059         for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
00060         {
00061             solve 00062             (
00063                 fvm::ddt(T)
00064               + fvm::div(phi, T)
00065               - fvm::laplacian(DT, T)
00066             );
00067         }
00068 
00069         runTime.write();
00070     }
00071 
00072     Info<< "End\n" << endl;
00073 
00074     return 0;
00075 }
00076 
00077 
00078 // ************************************************************************* //
for loop is repeated as times as nNonOrthCorr indicates, but What changes in solve arguments? As is written the code is solving the same many times. I know that this corrections are about laplacian calculus but I couldn't find the source code that show us changes that happens in each loop.

Regards.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Old   October 1, 2009, 17:13
Default
  #2
Member
 
Ola Widlund
Join Date: Mar 2009
Location: Sweden
Posts: 87
Rep Power: 17
olwi is on a distinguished road
Hi Santiago,

The linear solvers solve a system Ax=b, where A is a matrix, x is a vector of all your unknowns (your field varaible) and b is a vector of source terms. Solving gives you x.

In the laplacian operator above, only the *orthogonal* contributions go into the matrix coeffcients of A. This keeps the "discretization molecule" small and the matrix A simple and sparse, with references only to the cells on either side of the respective faces. The non-orthogonal corrections instead go into the source term b. Although you don't see that. So, after you solve the equation once, you must recompute the explicit non-orthogonal contribution in the source term b again, with the latest values of your solution. And then solve again. Etcetera.

The correction is hopefully small, so that only a small number of iterations are required for the correction to converge and stabilize.

I warmly recommend downloading the PhD thesis of Hrvoje Jasak. All you want to know is in Chapter 3! You can download it from http://foamcfd.org/resources/theses.html (First link on the page; the PDF is a bit large, so be patient...)

You can also look for the book of Versteeg et al on the Finite Volume method. The latest issue (2008?) has been updated with methods for unstructured grids. Hrv:s text is just as good, however, and corresponds well to what is actually inside Op-nFOAM.

Happy FOAMing,

Ola
Tushar@cfd likes this.
olwi is offline   Reply With Quote

Old   October 1, 2009, 22:05
Default
  #3
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 23
santiagomarquezd will become famous soon enough
Ola, thanks for your support, It is invaluable for me! Your answer is very interesting and useful. I've been reading Jasak's thesis for the last weeks, is one of the best materials available about FVM I've ever read. I've read the books from Patankar, Versteerg and Ferziger, these are very good at the concepts but, some details in the implementation, specially for non-structured grids are not covered. The new edition of Versteeg you've indicated is welcome, I have to obtain a new copy, the one from my institute's library is the first.
As I put in my first post I know that non-orthogonal corrections are related with laplacian terms or diffusion terms as are named in Jasak's thesis. Although in this text the implementation is not present, and was looking for it in the code. I revised the code of fvm::laplacian and fvMatrix::solve but I couldnt't found it. You really surprised me, now I have new knowledge. Regarding this topic I would appreciate that you tell me in what source files are implemented the corrections. to continue my revising.

Thanks in advance.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd 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
About nonorthogonal correction in fvclaplacian 7islands OpenFOAM Running, Solving & CFD 4 December 9, 2012 22:54
Orthogonality Angle Tristan CFX 2 December 2, 2008 12:11
Pressure correction problem richard_larson OpenFOAM Running, Solving & CFD 8 October 30, 2008 08:48
mass flux correction at outflow boundaries Subhra Datta Main CFD Forum 2 November 24, 2003 13:11
Pressure correction question - Please help! Barry Main CFD Forum 1 February 5, 2003 00:27


All times are GMT -4. The time now is 08:05.