CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Dumping matrices from OpenFOAM (https://www.cfd-online.com/Forums/openfoam-solving/121831-dumping-matrices-openfoam.html)

kawechel August 6, 2013 07:25

Dumping matrices from OpenFOAM
 
Hello -

I would like to dump matrices from an OpenFOAM solver run (in something like Matrix Market, Harwell-Boeing or COO formats), so that I can use them as input for a new, stand-alone solver. The idea is to compare the performance of this new solver directly with those already available in OpenFOAM (and on a problem that I am currently using OpenFOAM for), without the need to integrate it.

Does anyone know how I can do this? Some other CFD applications that I have used in the past have options such as "dump_matrix" or similar, but I have not found anything similar for OpenFOAM.

Any help with this would be greatly appreciated.

thanks,
Kawechel

kawechel August 8, 2013 08:49

In response to my own post:

after a lot of trawling through forum posts, I found a way to dump matrices using gdbOF. I have tried the approach with the simple scalarTransportFoam example, and I can indeed export the matrix in Octave/Matlab readable format.

Kawechel

j-avdeev February 1, 2014 11:52

1 Attachment(s)
Hello,

Iliya Marchevsky made lab work - simple example (on basis of icoFoam solver source code), which shows way how you can save matrices from OF to text file.
Probably, this example useless in current state and for using you have to modify it - for example, now it saves matrices as dense and for mesh 1000x1000 elements you can run out of memory.

Hope will helpful for someone. ;)

Regards,
Evgeniy Avdeev.

santiagomarquezd March 7, 2014 22:52

Hi, you can do it at debug time using gdbOF.

Regards


All times are GMT -4. The time now is 03:40.