Results Visualization

Dear all

I want to extract data from Poiseuiile2d simulation and use MATLAB (imagesec command) [or TechPlot] for Post Processing.

I added saveAsciiData " saveAsciiData(lattice.getDataAnalysis().getPressure() ,“pressure.dat” ) to the code.

TechPLOT can’t read pressure.dat.

In MATLAB :

load Pressure.dat
size (Pressure)

ans =

       1             5151

When i used saveData “saveData(lattice.getDataAnalysis().getPressure(),“Pressure_Binary.dat”);”

TechPLOT can’t read pressure.dat.

In MATLAB:

load Pressure_Binary.dat
??? Error using ==> load
Unknown text on line number 1 of ASCII file F:\OLB\end\Pressure_Binary.dat

Why MATLAB (and even wordpad! ) can’t read Pressure_Binary.dat?

Can any one help me?

I think i should change Pressure.dat size in MATLAB, But i can’t find real size of computational domain in the code.

Cheers

Often when I’m trying to gather data from openLB programs I find it easiest to write a custom output method, which gives you more control over how the data is arranged. Look up “ofstream” in c++ reference, that should get you started.

Thanks a lot brucedjones!

How can I use it? Could you explain a bit more?

Using ofstream you are able to output data to a plain text file, take a look at the method “writeProfile” in the example poiseuille2d where it is used to write the analytical and numerical velocity profiles of the flow to a file.