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

wo does negSumDiag() work?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 20, 2017, 07:41
Default wo does negSumDiag() work?
  #1
New Member
 
toboto
Join Date: Jun 2016
Posts: 20
Rep Power: 9
toboto is on a distinguished road
Dear all,

I am totally confused regarding how the diagonal coefficient in OpenFOAM is calculated.

I know that this is done using the negSumDiag() function as follows:
Code:
 void Foam::lduMatrix::negSumDiag()
   51 {
   52     const scalarField& Lower = const_cast<const lduMatrix&>(*this).lower();
   53     const scalarField& Upper = const_cast<const lduMatrix&>(*this).upper();
   54     scalarField& Diag = diag();
   55 
   56     const labelUList& l = lduAddr().lowerAddr();
   57     const labelUList& u = lduAddr().upperAddr();
   58 
   59     for (label face=0; face<l.size(); face++)
   60     {
   61         Diag[l[face]] -= Lower[face];
   62         Diag[u[face]] -= Upper[face];
   63     }
   64 }
I think (correct me if I am wrong) this implies column wise summation. This contradicts all explanations of this function on this forum.

Is this valid for any case, i.e. even if the matrix isn't symmetric?

Can you please provide a reference on the relation between diagonal and off-diagonal coefficients for different flow cases?

Best regards.
toboto 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
RP_Set_Integer does not work in parallel 86lolo Fluent UDF and Scheme Programming 2 July 3, 2014 11:37
Does CX_Interpret_String work in parallel? 86lolo Fluent UDF and Scheme Programming 2 June 30, 2014 04:36
Companies that lease software & hardware for cloud-based work? Catthan ANSYS 0 June 18, 2014 10:53
Why do the Plant library cases don't work? Alumna Phoenics 6 June 22, 2004 12:08
why my In-Form doesn't work? green Phoenics 2 May 27, 2004 21:03


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