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

LduMatrix<Type, DType, LUType>

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 11, 2013, 07:48
Default LduMatrix<Type, DType, LUType>
  #1
New Member
 
Behnam Nasr
Join Date: Sep 2013
Posts: 4
Rep Power: 3
behnamnasr is on a distinguished road
Hi all FOAMers;

As you may know, the LduMatrix class involved in OF-2.2.x is constructed by three types as below:

LduMatrix<Type, DType, LUType>

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<vector, scalar, scalar>) 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.
behnamnasr is offline   Reply With Quote

Old   October 8, 2013, 06:01
Default
  #2
New Member
 
Behnam Nasr
Join Date: Sep 2013
Posts: 4
Rep Power: 3
behnamnasr is on a distinguished road
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?!
behnamnasr is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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



All times are GMT -4. The time now is 00:46.