|
[Sponsors] |
April 19, 2012, 13:29 |
visualizing spheres in fluid
|
#1 |
New Member
Join Date: Apr 2012
Posts: 3
Rep Power: 14 |
Hello community,
I have simulated (with an in-house code) 3D spheres that move in liquid. Now i want to visualize the results in a movie of liquid and spheres, using Paraview. Unfortunately I have not found a feature that puts spheres to a position that is automatically taken from a input file (*.dat). I only managed to put spheres manually, which does not help me much. I also had the idea to load the particle file into paraview together with the fluid field (which worked), but i didnt manage to merge the positions and i didnt manage to plot spheres from these particle positions neither. It would be great if you could hint me in a possible direction or give me a link where this is described (I didnt found any) Thanks a lot! |
|
April 20, 2012, 05:50 |
|
#2 |
Super Moderator
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,093
Rep Power: 34 |
Hi Jellyfish,
I have found the VTK format quite straightforward for visualisation in ParaView. For example, if you want to visualise spheres then the VTK file would look like this: Code:
# vtk DataFile Version 2.0 Unstructured grid legacy vtk file with point scalar data ASCII DATASET UNSTRUCTURED_GRID POINTS 4 double 0 0 0 1 0 0 0 1 0 1 1 0 If you have multiple time steps then name the VTK files as test_1.vtk, test_2.vtk, test_3.vtk, etc. And ParaView will know they are time steps. If you want to define scalar or vector data at each point (maybe representing the radii or velocity or some other variable) then the VTK file would look like this: Code:
# vtk DataFile Version 2.0 Unstructured grid legacy vtk file with point scalar data ASCII DATASET UNSTRUCTURED_GRID POINTS 4 double 0 0 0 1 0 0 0 1 0 1 1 0 POINT_DATA 4 SCALARS radii double LOOKUP_TABLE default 2 1.5 3 0.5 VECTORS velocity double 1 1 1 0 30 3 -4 5 6 0.4 -4 16 You can find more on the (legacy) VTK format here: http://www.vtk.org/VTK/img/file-formats.pdf Hope it helps, Philip |
|
April 20, 2012, 06:19 |
|
#3 |
New Member
Join Date: Apr 2012
Posts: 3
Rep Power: 14 |
Hey Philip,
This sounds indeed very easy. I did not know that the glyphe-feature can do sth else than arrows. I will create this file format this afternoon and tell you how it goes. In any case, thanks for the fast and good reply!!! Many greetings Jellyfish |
|
April 20, 2012, 06:51 |
|
#4 |
New Member
Join Date: Apr 2012
Posts: 3
Rep Power: 14 |
Wow, it worked, And its even possibble to set the diameter by the radius, given in the script. Thanks a lot!!!
|
|
April 20, 2012, 06:55 |
|
#5 |
Super Moderator
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,093
Rep Power: 34 |
Great!
Philip |
|
Tags |
sphere multi body merge |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Difficulty in calculating angular velocity of Savonius turbine simulation | alfaruk | CFX | 14 | March 17, 2017 07:08 |
Average Rising Velocity as boundary condition | Floing | CFX | 11 | August 21, 2016 06:47 |
Multiphase simulation of bubble rising | Niru | CFX | 5 | November 25, 2014 14:57 |
My Revised "Time Vs Energy" Article For Review | Abhi | Main CFD Forum | 2 | July 9, 2002 10:08 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 10:11 |