Data Analysis
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Data Analysis
- This topic has 5 replies, 2 voices, and was last updated 8 years, 6 months ago by robin.trunk.
-
AuthorPosts
-
March 30, 2016 at 11:05 am #1819ivanMember
Hello, everybody,rnrnRecently I have been working in a couple simulations – which are nothing less but edited versions of the examples folder – and right now I would like to do some data extraction/analysis. Is it possible to be done with Paraview? If so, any usual proceedings for that?rnrnAtt.
March 30, 2016 at 11:31 am #2305robin.trunkKeymasterHi Ivan,rnthere are various possibilities for data extraction/analysis. It depends on what exactly you want to examine.rn
-
rn
- With the SuperVTKwriter3D<T> you can create output for Paraview, by adding functors, e.g. for velocity SuperLatticePhysVelocity3D<T, DESCRIPTOR> velocity(sLattice, converter); and vtkWriter.addFunctor(velocity);. This is done in the getResults function of the examples. To find other functors you can have a look at the doxygen documentation.rn
- The BlockGifWriter<T> gives output pictures during the simulation, however this is rather for the pictures and a first look at the results during simulation, than analysis.rn
- There are also functors for the flux, e.g. in the bifurcation example. Generally you can access the physical values by functors or the values of the distribution function and do your own evaluation/analysis. You can find some functors in the inheritance diagram of SuperLatticeF3D or SuperLatticeF2D in the developer guide (http://optilb.com/DoxyGen/html/d9/d80/classolb_1_1SuperLatticeF3D.html)rn
rnrnBestrnRobin
March 30, 2016 at 12:09 pm #2306ivanMemberHi, Robin,rnrnBasically I have edited the cylinder example in order to add more round obstacles to the flow and now I would like to do some analysis regarding the velocity / Reynolds number and maybe even the pressure drop. Do you think itś easier to do it with getResults function than with Paraview? And how is it done exactly?
March 30, 2016 at 1:00 pm #2307robin.trunkKeymasterThe pressure drop is computed in the cylinder2d example (line 263-285) and printed to the console. It is done by computing the pressure before and behind the cylinder (line 271-279) and taking the difference, just adapt this to your geometry.rnThe Reynolds number as well as other information are printed in cylinder2d.dat in the tmp folder.rnThe velocity field can be viewed and analysed in Paraview by opening the cylinder2d.pvd in tmp/vtkData with Paraview.rnrnBestrnRobin
March 30, 2016 at 2:22 pm #2308ivanMemberOh, thank you again for that, Robin, it really helped!rnrnBut now the challenge is: I would like to plot the pressure drop around the obstacle over time, so, I would need the pressure drops in every instant. For that, I thought of simply copy and paste the results printed on the terminal by the function [getResults], but then I realised it’s not even possible because I am not able to visualize the whole printed data due to the limited dimensions of the terminal and even if possible, would be quite exausting the copy all the data manually ( specially in some edited examples of mine, in which there are more obstacles ). Also, I would like to plot the velocity in two or three points around the obstacle, also over the time, and I simply don’t get these data from the terminal. For that, I was considering using Paraview, but for now I was only able to plot the Pressure/Velocity between two different points ( or in a line ) for a single instant, which is not what I want. Any ideas?rnrnAtt.
March 30, 2016 at 3:44 pm #2309robin.trunkKeymasterFor the pressure drop you can create your own output file. However, OpenLB has no function for this, but it should be easy to implement with some C++ coding, keyword ofstream.rnTo receive information about the velocity at a specific point, you can proceed analogously to the pressure. The functor for the velocity is SuperLatticePhysVelocity2D<T, DESCRIPTOR> velocity(sLattice, converter); and it can be evaluated like the pressure at a point. The variables for the output (p1 and p2 for the pressure) however should be two dimensional fields.rnrnBestrnRobin
-
AuthorPosts
- You must be logged in to reply to this topic.