# LduMatrix<Type, DType, LUType>

 Register Blogs Members List Search Today's Posts Mark Forums Read

 September 11, 2013, 07:48 LduMatrix #1 New Member   Behnam Nasr Join Date: Sep 2013 Posts: 4 Rep Power: 5 Sponsored Links Hi all FOAMers; As you may know, the LduMatrix class involved in OF-2.2.x is constructed by three types as below: LduMatrix which the first is type of the X and B (source). Second and third ones are obvious! It’s ok! But, when OF uses "typedef" or "make" functions to rename objects for using in LduSolvers (such as PBiCCCG, …) and Preconditioners, DType and LUType are always considered as scalar. (whether Type is scalar, vector or tensor) It is much obscure for me! I don’t understand why!? When I tried to understand cavityCoupledU tutorial in pisoFoam, I encountered this problem; Suppose my mesh is a 3x3 grid and has 9 cells, and I want to solve a coupled system for U equations (as done in cavityCoupledU tutorial in pisoFoam)! If I use predefined objects (i.e. LduMatrix) and construct the equation system (fvVectorMatrix) for my grid, I will have an array of 9 vectors for source, an array of 9 scalars for diag and two arrays of 12 scalars for lower and upper arrays. This configuration for D and LU, except the source, does not differ with an fvScalarMatrix used for a scalar equation such as pEqn. Now, my questions are: 1) when Type is vector and matrix A in 3 equation-3 unknown system is a tensor, why are D and LU considered as scalars in OF, rather than tensors?! while X and B (in AX = B) are of vector type! Does not this corrupt the equation system (as I think)?! 2) if D and LU must be as scalars (by any reason), why we have 9 coefficients [for U equation system] for 9 cells in D, rather than 27?! I guess I need a 27x27 array for solving 3 momentum equations for a 3x3 mesh! Am I wrong?! Thank you all in advance! Behnam Last edited by behnamnasr; October 8, 2013 at 05:57.

 October 8, 2013, 06:01 #2 New Member   Behnam Nasr Join Date: Sep 2013 Posts: 4 Rep Power: 5 OMG! Don't anyone encounter with such a problem?! Indeed, I have a crude guess for the reason, but not sure! Can anyone kindly give me a hint?!

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules