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/)
-   -   Live connection Matlab VS OF (http://www.cfd-online.com/Forums/openfoam-solving/104451-live-connection-matlab-vs.html)

levka July 10, 2012 04:15

Live connection Matlab VS OF
 
Hello, fomers
i need to link OF with a huje code written in Matlab. I will explain. My goal is to modify BC according to the certain Matlab algorithm(that is quite huge and coupled with Fourier transformation technics ). Input for that Matlab code is a velocity field after certain time steps produced by OF. Output is NEW BC for OF. And this is a loop. How to realize it?
I have one idea...
There is no problem to initialize this loop. For example like this:First compile Matlab code into stand alone application and run it in a loop with OF from Allrun script. That works.

But i need to organize data exchange between these programs!

First that comes to my mind is to write and read csv file:
OF output-->ParaFoam: csv file--> Matlab code:NEW csv file-->OF reads it as BC...

What do you say guys?


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