CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   icoBlockedCellFoam (http://www.cfd-online.com/Forums/openfoam-solving/87458-icoblockedcellfoam.html)

makaveli_lcf April 20, 2011 13:40

icoBlockedCellFoam
 
Here you can find an example how to manipulate matrices in OpenFOAM.

alberto April 21, 2011 03:53

Hi,

isn't this similar to what setValues can do? http://foam.sourceforge.net/docs/cpp...rce.php#l00386

Best,

makaveli_lcf April 21, 2011 04:00

At this point it is the same, but will have further extension. Thank you for comment)

alberto April 21, 2011 04:51

Interesting. I have been hacking on that a bit myself in the past, since setValues does not take care of .A(), for some unknown reason :-)

lrunber May 1, 2011 17:53

Thanks Dr. Alexander for your useful program, it helped me understand the method of blocking cells from the solver. I am eagerly awaiting the extension! Perhaps multiple region based blocking...

Quote:

Originally Posted by alberto (Post 304525)
Interesting. ...since setValues does not take care of .A(), for some unknown reason :-)

Alberto, could you please elaborate on "does not take care of .A()"? I am currently using setValues on internal velocity fields and would like to know of these implications :) I was under the impression that setValues does work on the coefficient matrix A, for the cells under question being set to the identity matrix.

alberto May 1, 2011 18:23

Quote:

Originally Posted by lrunber (Post 305822)
Alberto, could you please elaborate on "does not take care of .A()"? I am currently using setValues on internal velocity fields and would like to know of these implications :) I was under the impression that setValues does work on the coefficient matrix A, for the cells under question being set to the identity matrix.

setValues blocks the solution in the cell, however the central coefficient A() is not defined. Try for example to consider an equation where A can go to zero, remove the cells where this happens with setValues, and then compute 1/A: this will lead to a segmentation fault because A is not properly set in those cells.

Best,

lrunber May 2, 2011 04:09

Quote:

Originally Posted by alberto (Post 305825)
setValues blocks the solution in the cell, however the central coefficient A() is not defined. Try for example to consider an equation where A can go to zero, remove the cells where this happens with setValues, and then compute 1/A: this will lead to a segmentation fault because A is not properly set in those cells.

Thanks for explaining :D


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