# Linear Solver

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

 October 8, 2011, 19:03 Linear Solver #1 Member   Join Date: Jan 2010 Posts: 44 Rep Power: 7 Assuming one linear system AX=B, where A is a matrix of NxN and B is a vector, A and B are known and vector X is unknown. How to use the linear solver in OpenFoam to solve this linear system?

 October 8, 2011, 20:28 #2 Member   Join Date: Jan 2010 Posts: 44 Rep Power: 7 I thought that two fields of X and B are probably created first as Info<< "Reading field T\n" <

 October 8, 2011, 21:36 #3 Senior Member     Santiago Marquez Damian Join Date: Aug 2009 Location: Santa Fe, Santa Fe, Argentina Posts: 418 Rep Power: 14 Argen, X and B creating is just as you showed in the post. Respect the matrix, as far as I know the problem is that fvMatrices in FOAM are ever related to a geometrical problem and its discretization, so that is not possible to create them only from their coefficients and positions in the matrix (Both fvMatrix and lduMatrix don't have constructors from elements and positions). It requires to use the lduAddressing at low level and would require to code your own classes to do so. Please FOAMers correct me if I'm wrong. Regards. __________________ Santiago MÁRQUEZ DAMIÁN, Ph.D. Post-doctoral Fellow Research Center for Computational Mechanics (CIMEC) - CONICET/FICH-UNL T.E.: 54-342-4511594 Ext. 1005 Güemes 3450 - (3000) Santa Fe Santa Fe - Argentina http://www.cimec.org.ar

October 10, 2011, 01:17
#4
Member

Join Date: Jan 2010
Posts: 44
Rep Power: 7
Quote:
 Originally Posted by santiagomarquezd Argen, X and B creating is just as you showed in the post. Respect the matrix, as far as I know the problem is that fvMatrices in FOAM are ever related to a geometrical problem and its discretization, so that is not possible to create them only from their coefficients and positions in the matrix (Both fvMatrix and lduMatrix don't have constructors from elements and positions). It requires to use the lduAddressing at low level and would require to code your own classes to do so. Please FOAMers correct me if I'm wrong.
lduAddressing is a addressing array which is provided for the lower and upper triangles to translate their face index into a corresponding cell index. I could not figure out how to make it from the known matrix, A. As Santiago mentioned, I sense that lduMatrix and fvMatrix can't work for this case since matrix is generated in OpenFOAM directly by discretizing a certain equation.

Do you have more suggestions on it?

 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

 Similar Threads Thread Thread Starter Forum Replies Last Post vkrastev OpenFOAM Running, Solving & CFD 5 September 4, 2012 11:58 Attila CFX 1 April 13, 2012 22:22 bearcat Main CFD Forum 1 February 5, 2010 08:11 ztdep Main CFD Forum 7 May 24, 2007 14:14 fanzhong Meng CFX 4 March 21, 2006 21:16

All times are GMT -4. The time now is 16:24.