
[Sponsors] 
August 15, 2009, 04:35 
ldumatrix

#1 
New Member
Markus
Join Date: Aug 2009
Posts: 3
Rep Power: 10 
Hi folks,
i've got my own Algebraic Multigrid solver and try to use it as a solver in openFoam. Therefore i adapted the interface of GAMG, at least tried it. I'm new to OpenFoam and its very hard for me to understand the at most undocumented code. So my first question, to avoid a "RTFM"answer 1) Is there somewhere a hidden (to me) SourceCode documentation? I found the doxygen docu, but without comments in the code, it isnt very helpful. In fact I dont understand the most simplest issues: 2) What is the ldumatrix storageformat? Ok, I found 3 arrays containing the data for the diagonal, the upper triangular und lower triangular part of the matrix. in addition there are 2 addressing arrays. More Precise: 2)' How does the LDUAdressing work? I browsed the source code for several hours, but i dont get it. I'm using a Compressed RowFormat for my matrices; but things are strange here. For example in the ldumatrix class something about "faces", "nodes" etc. is said; is the class strictly dependend on some geometry information? A mesh? I hope thats not true... Please help me; i'm not really motivated to invest lots of more time in such a simple problem; for example building a demolaplaceproblem on a regular grid, to generate a matrix, from which i know, how it looks like... Best regards ;), Markus 

August 15, 2009, 08:28 

#2 
Senior Member
Henrik Rusche
Join Date: Mar 2009
Location: Braunschweig, Niedersachsen, Germany
Posts: 277
Rep Power: 11 
Dear Marcus,
the key to understand OpenFOAM's addressing and linear solvers is understanding "face addressing". There is no documentation apart from what's in the source code and a few threads on this forum. But I think it provides a good starting point. http://www.cfdonline.com/Forums/ope...fficients.html http://www.cfdonline.com/Forums/ope...ddressing.html http://www.cfdonline.com/Forums/ope...msolvers.html Happy foaming, Henrik 

August 17, 2009, 04:27 
Thanks!

#3 
New Member
Markus
Join Date: Aug 2009
Posts: 3
Rep Power: 10 
Hallo Henrik!
Thanks for your reply. I read the Threads you mentioned, and i think, the information i needed is very simple. So, to be sure, i quickly write, what i found out. A ldumatrix consists of 1) diag() > Array of diag elements 2) lower() > Array of lowertriangular elements 3) upper() > upper 4) lowerAddr(), upperAddr() > Coefficient position for offdiag entries. All offdiag in the uppertriagonal matrix are numbered, say from 1 to n. Now holds: i = lowerAddr()[k] > Row of k'th offdiagentry in uppertriagonal j = upperAddr()[k] > Columns of k'th offdiagentry in upper triagonal a_ij = upper()[k] a_ji = lower()[k] It holds: lowerAddr()[k] < upperAddr()[k] ; maybe that explains the names "lowerAddr, upperAddr". Because in fact the addressing is only stored for one half of the matrix, this storage format seems perfectly fitted to symmetric matrices. In this case upper() == lower() holds. Considering a nonsymmetric matrix, this format generates overhead, because an explicit "0" is stored for each a_ij, for which a_ji <> 0, and the other way round. In Addition the matrix storage seems to have a corresondence for the mesh numbering and the other way round, so matrix addressing can be obtained from the mesh(addressing). But that seems irrelevant for purely algebraic purposes. Is this right? Thanks again, Markus 

August 17, 2009, 08:40 

#4 
Senior Member
Henrik Rusche
Join Date: Mar 2009
Location: Braunschweig, Niedersachsen, Germany
Posts: 277
Rep Power: 11 
Hallo Markus,
yes, all correct! Also note that the mesh is stored such that face k is the face between the cells i and j. @overhead: Correct, but in reality there is negligible overhead because most schemes add to a_ij and a_ji. In fact, only the matrix for pure upwind convection without any diffusion will have overhead. There are other pieces of addressing in lduAddressing. For example losortAddr() for sweeps going from row n to row 0 as well as ownerStartAddr() and losortStartAddr() for individual row/column access. Best Regards, Henrik 

August 19, 2009, 21:59 
Convection Heat Transfer

#5 
New Member
rodrigo
Join Date: Aug 2009
Posts: 7
Rep Power: 10 
hi someone have or know where I can found the solution manual of book Convection Heat Transfer, third edition of author Adrian Bejan, because I need very much in my pos graduate , thanks.
my e mail is augusto_bassan@yahoo.com.br 

August 19, 2009, 22:01 

#6  
New Member
rodrigo
Join Date: Aug 2009
Posts: 7
Rep Power: 10 
Quote:
my e mail is augusto_bassan@yahoo.com.br 

August 20, 2009, 05:48 
ownerstartaddr....

#7 
New Member
Markus
Join Date: Aug 2009
Posts: 3
Rep Power: 10 
Hi Henrik again,
thanks for your reply. >>> losortAddr() for sweeps going from row n to row 0 as well as ownerStartAddr() and losortStartAddr() for individual row/column access. <<< I tried, but i couldnt figure out, what you exactly mean by this, but i think/hope thats exactly what i need. I generated an ownerstartlist for an example matrix by hand using the algorithm in the doxygen docu, but i couldnt interpret the result. Similar the losortAddr / losortStartAddr(). Do you have an idea? Greetings, Markus 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
FvMatrix coefficients  shrina  OpenFOAM Running, Solving & CFD  10  October 3, 2013 14:38 
Getting old values of psi internal  ffbof  OpenFOAM Running, Solving & CFD  4  August 27, 2008 14:46 
Disabling and Enabling Solver Summary Outputs within code  adona058  OpenFOAM Running, Solving & CFD  3  November 1, 2007 12:00 
Sparse matrix  hemph  OpenFOAM Running, Solving & CFD  5  September 27, 2005 16:57 