|
[Sponsors] |
[OpenFOAM] paraFoam for aachenBomb particle tracing |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
James Feng
Join Date: Dec 2013
Posts: 21
Rep Power: 13 ![]() |
Hi,
Would some of you please share experience with using paraFoam to display Lagrangian particle tracing? I'm using OpenFOAM 2.2.2 and tried to compute the "sprayFoam" tutorial case "aachenBomb". The solver finished computing and generated data files. But I have no clue on how to get paraFoam to display the particles and their pathlines. Any comments on the general procedures for Lagrangian cases can also be of great help for a new OpenFOAM user like me. Thanks very much. James |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Member
Ananda Kannan
Join Date: Feb 2014
Location: Göteborg, Sweden
Posts: 55
Rep Power: 13 ![]() |
Hey Foamer!!
I am a newbie just like you and I am using DPMFoam.. so particle tracking is something I have been doing. Export your case to paraview.. In the geometry view tree to the left (where different parts of your geometry are displayed).. select... kinematic cloud (or whichever cloud you have used.. could be colliding cloud etc.).. create a glyph.. while having selected the corresponding cloud.. here you choose the method of tracking you want.. solid spheres or path lines. arrows..etc.... click on apply.. and Voila!! you are done.. for more details refer earlier threads in this forum.. http://www.cfd-online.com/Forums/ope...-paraview.html Hope this helps.. Cheers!!! |
|
![]() |
![]() |
![]() |
![]() |
#3 | |
New Member
James Feng
Join Date: Dec 2013
Posts: 21
Rep Power: 13 ![]() |
Quote:
Any more detailed instructions? Thanks. James |
||
![]() |
![]() |
![]() |
![]() |
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 129 ![]() ![]() ![]() ![]() ![]() ![]() |
Quick answer: http://openfoamwiki.net/index.php/Ma...gian_particles
|
|
![]() |
![]() |
![]() |
![]() |
#5 |
Member
Ananda Kannan
Join Date: Feb 2014
Location: Göteborg, Sweden
Posts: 55
Rep Power: 13 ![]() |
Hey there!!
You need to open each and every subfolder within VTK, then select the object which has a +sign before it...(you dont need to click on the + sign as it would just open up the tree..)... selecting this would select all the data for each time step... load each of these VTK files, and select the kinematic sub section.. as i quoted earlier apply a glyph here.. and ur done.. |
|
![]() |
![]() |
![]() |
![]() |
#6 | ||
New Member
James Feng
Join Date: Dec 2013
Posts: 21
Rep Power: 13 ![]() |
Quote:
Quote:
By the way, is there a general instruction on the steps for paraFoam with Lagrangian data for OpenFOAM 2.2.2 in particular (most of those postings were for earlier versions)? |
|||
![]() |
![]() |
![]() |
![]() |
#7 |
Member
Ananda Kannan
Join Date: Feb 2014
Location: Göteborg, Sweden
Posts: 55
Rep Power: 13 ![]() |
Hi Again!
Very interesting.. when you execute foamToVTK in ur terminal.. does openfoam execute some lines of code which are visible in ur window?? If so, the files have been correctly converted.. There are no general guidelines (at least as far as I am aware).. i myself am using OF 2.3.0 and its rather intuitive to implement particle tracking.. you just need to ensure that there are some VTK files being created.. corresponding to each time step.. I know some of these views are rather obtuse, but the idea is that you learn by fiddling around ![]() Added tip, try to use paraview as a stand alone.. dont use parafoam.. At least thats what I did.. try to build ur own paraview.. with instructions in paraview home page.. and then it is sure to work.. (do this at your own risk, building paraview is not very straightforward by any means).... Cheers!!! |
|
![]() |
![]() |
![]() |
![]() |
#8 | |
New Member
James Feng
Join Date: Dec 2013
Posts: 21
Rep Power: 13 ![]() |
Quote:
I actually compiled paraview on my computer (when building the paraFoam). Are you saying that I should go to the individual subdirectories to build paraview? By the way, I'm interested in simulating aerosol particles in gas stream in channels. The "sprayFoam" was what I could find in OpenFOAM Lagrangian tutorials that seems relevant (although more stuff than I need) among others. It sounded like there was an "icoLagrangianFoam" in earlier OF versions. I wonder if you get different LagrangianFoams in OF 2.3.0. Thanks. |
||
![]() |
![]() |
![]() |
![]() |
#9 |
Member
Ananda Kannan
Join Date: Feb 2014
Location: Göteborg, Sweden
Posts: 55
Rep Power: 13 ![]() |
Hi again!!
The way you compile paraview is totally upto you. Just ensure that it works. I compiled it using thirdparty (provided in the source build of OF.. PHP Code:
Regards ansubru |
|
![]() |
![]() |
![]() |
![]() |
#10 | |
New Member
James Feng
Join Date: Dec 2013
Posts: 21
Rep Power: 13 ![]() |
Hi ansubru,
I just installed OpenFOAM 2.3.0 and tried to follow your description. I went to the /tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper directory, and did the following. 1. ./Allclean 2. cd hopperInitial , blockMesh, icoUncoupledKinematicParcelFoam (to get the solver running) 3. foamToVTK (after solver finished) 4. paraview, File > Open > VTK/hopperInitialState_..vtk ("OK", "Apply" so I see the hopper domain image displayed in the paraview window) 5. What's visible are "Properties (hopperInitialState_..*)", "Display (UnstructuredGridRepres", "Representation, Surface", "Coloring", etc. But I do not see the "geometry view" (what is it?) and "Mesh Part" (as what you described). What should I do at this point? Please be patient with me. I think I need some more experienced OF user to lead me through the "baby-steps". Thanks. fengjq Quote:
Last edited by fengjq; March 27, 2014 at 11:12. |
||
![]() |
![]() |
![]() |
![]() |
#11 |
New Member
James Feng
Join Date: Dec 2013
Posts: 21
Rep Power: 13 ![]() |
Hi ansubru,
I just installed OpenFOAM 2.3.0 and tried to follow your description. I went to the /tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper directory, and did the following. 1. ./Allclean 2. cd hopperInitial , blockMesh, icoUncoupledKinematicParcelFoam (to get the solver running) 3. foamToVTK (after solver finished) 4. paraview, File > Open > VTK/hopperInitialState_..vtk ("OK", "Apply" so I see the hopper domain image displayed in the paraview window) 5. What's visible are "Properties (hopperInitialState_..*)", "Display (UnstructuredGridRepres", "Representation, Surface", "Coloring", etc. But I do not see the "geometry view" (what is it?) and "Mesh Part" (as what you described). What should I do at this point? Please be patient with me. I think I need some more experienced OF user to lead me through the "baby-steps". Thanks. fengjq Thanks for the advice. I'll give it a try and let you know how it works.[/QUOTE] |
|
![]() |
![]() |
![]() |
![]() |
#12 |
Member
Ananda Kannan
Join Date: Feb 2014
Location: Göteborg, Sweden
Posts: 55
Rep Power: 13 ![]() |
Hi fengJq!!
![]() Well you got the first bit right. You are able to visualize the domain right that is a foot forward in the right direction. Before i proceed any further, from what you have posted, I can gather that you are able to implement the solver without any errors and there are some computational results being produced as well?? If this is the case then read on... Now, when you opened the vtk files, did you get something like this (look at the screenshot I have attached with this thread). If your foamToVTK has been successful (which i think is the case) you should get a sub-folder as shown in the screenshot (of course with the relevant mesh parts). Along with the mesh parts named sub-folders, you would also get a folder labelled 'lagrangian'... this folder contains all the requisite particle specific data that has been generated. Now in paraview, enter this sub-folder and open kinematiccloud.vtk (which is located inside the subfolder within lagrangian). Once you select this you should get something like this (look at relevant screenshot). click on apply. Now, having highlighted kinematic cloud, generate the glyph (look at screenshot again).. Set up the properties of the glyph (use the screenshot again as a reference.. remember you can alter the settings yourself to see what each value in the glyph means).. You must be able to visualize the glyph (remember to forward the time step from 0 to 1 (look at screen shot carefully).. ![]() If you have followed these steps carefully, I guess you must be able to visualize the hopper case.. Hope this clarifies your doubts ![]() Best regards ansubru PS .. the screenshots are for a case that I have built (where I use the DPMFoam solver.. which is quite similar to the hopper case.. don't get confused by it ![]() ![]() |
|
![]() |
![]() |
![]() |
![]() |
#13 | |
New Member
James Feng
Join Date: Dec 2013
Posts: 21
Rep Power: 13 ![]() |
Hi ansubru,
Thanks for offering more details with screenshots. I first tried with my "hopper" case following your steps and comparing your screenshots and still get what I had before. The ways I saw the difference here is that you said to open the *.vtk file in the "lagrangian" folder whereas I opened the *.vtk file in the VTK folder. But I tried with opening the *.vtk file in the "lagrangian" folder and didn't get what you had. Thus, I went on to tried the "aachenBomb" case as in your example. Please tell me what I did wrong here. 1. cd .../lagrangian/sprayFoam/aachenBomb; 2. blockMesh, and run "sprayFoam" (which took hours on my PC); 3. after the solver finished, I saw data files for each time step were generated in the case directory aachenBomb; 4. foamToVTK, which generated a folder "VTK" where I saw bunch of aachenBomb_..vtk files (apparently at various time steps) and 2 subfolders "walls" (the "mesh parts"?) and "lagrangian"; 5. paraview, Open > VTK > lagrangian > sprayCloud, double click on the "sprayCloud_..vtk" (which has a "+" symbol in front), then "Apply"; 6. there is nothing displayed (not even the domain geometry) in the display window, unlike what you had in your screenshots; Is there some other files I also need to open? For example, if I open the "aachenBomb_..vtk" right under the "VTK" folder, I get the (rectangular) geometry displayed in the paraview window. By the way, what does this "aachenBomb" mean? what's the physical description of this case (which I think OpenFOAM can provide in a README to help the users)? I can understand the "cavity" case for incompressible flow as well as some other tutorial cases (just from the case title), but not "aachenBomb". I noticed some differences in folder names between your screenshots and what I saw on my computer. It seems that you are running on Ubuntu? whereas I'm on OpenSUSE. Should that make any difference (even we both use OpenFOAM 2.3.0)? If so, I can set up a Ubuntu on my vbox and try it there. In my OF 2.3.0 tutorial folder, I found "aachenBomb" under the "sprayFoam", not in the "DPMFoam". Does it matter? Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#14 | ||||
Member
Ananda Kannan
Join Date: Feb 2014
Location: Göteborg, Sweden
Posts: 55
Rep Power: 13 ![]() |
Hi There
![]() Quote:
First, open the .vtk files for each mesh part. and finally the "aachenBomb_..vtk". Now use a representation type for each part, i use "outline" form as the domain is transparent, or the best way to visualize is.. open only "aachenBomb_..vtk" and use "volume" representation.. Once you can visualize your domain, open the .vtk files in "lagrangian" and follow the steps in the previous post. i guess that should be about it. Quote:
HTML Code:
http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2008/PerCarlsson/PC_Tutorial_dieselFoam_peered_NL_HN.pdf Quote:
Quote:
Cheers!! ansubru |
|||||
![]() |
![]() |
![]() |
![]() |
#15 | |
New Member
James Feng
Join Date: Dec 2013
Posts: 21
Rep Power: 13 ![]() |
Hi ansubru,
Thanks for the quick reply. This is great! Now I can see lots of stuff that I could not before, due to the missing steps with details settings (which is probably different with the Lagrangian cases from those of incompressible and compressible flow cases where we simply use parafoam to get everything loaded). However, I still do not get what you showed in your screenshots. I guess now my problem is to figure out what kind of the "representations" to use for "sprayCloud" and "Glyphs". My displayed geometry is a rectangular box whereas yours (in your screenshots) seems different. You seemed to have particles displayed as (blue) spheres; but I don't know how to get that (I guess there must be some kind of settings for the particle size). I couldn't get that webpage on "aachenBomb" to open. So I still don't understand the solver procedures for this case. I guess the solver must try to solve both the CFD problem for the flow field (+ thermodynamics) and the Lagrangian particle motions. With paraview we have to open several *.vtk files. I expect one of those should allow me to view the flow field as well as pressure, temperature, etc. and one to allow me to view particles and particle traces. I saw you seemed to have a display of the "U2" field in one of your screenshots. Would you please offer me further advices? Thank you very much, fengjq Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#16 | |||
Member
Ananda Kannan
Join Date: Feb 2014
Location: Göteborg, Sweden
Posts: 55
Rep Power: 13 ![]() |
Hi!!
Try this for the aachenbomb tutorial.. https://www.google.dk/url?sa=t&rct=j...63934634,d.bGQ Quote:
Quote:
Quote:
Cheers!! ansubru Last edited by ansubru; April 2, 2014 at 04:20. |
||||
![]() |
![]() |
![]() |
![]() |
#17 | |
New Member
James Feng
Join Date: Dec 2013
Posts: 21
Rep Power: 13 ![]() |
Yeah, now I have the spheres displayed. Thanks a lot, ansubru. It appears like a dense plume of fuel droplets is injected into the (combustion?) chamber. After a while (around time step ~30), the droplets disappear (which I guess to evaporate by burning?). Then the rest time steps seem boring (nothing is showing up, probably depending on what I chose for display).
With the particle data files loaded, I guess I can now try the "particle path" filter. It seems that I can only have "particle path" with the "aachenBomb" data. Any advice on that? Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#18 |
Member
Ananda Kannan
Join Date: Feb 2014
Location: Göteborg, Sweden
Posts: 55
Rep Power: 13 ![]() |
Hi Again!!
I have personally not implemented 'particle tracks'.. however, there are loads of threads in this forum for this.. for instance.. i guess this one might help.. http://www.cfd-online.com/Forums/ope...-paraview.html ansubru |
|
![]() |
![]() |
![]() |
![]() |
#19 | |
New Member
James Feng
Join Date: Dec 2013
Posts: 21
Rep Power: 13 ![]() |
Thank you, ansubru. You've been a great help to me.
Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#20 |
New Member
novo
Join Date: Jun 2015
Posts: 11
Rep Power: 11 ![]() |
Hi, I was directed into this thread with the very same problem and for my case I found the solution in this other thread.
So the 0 file in the lagrangian folder converted by foamToVTK should be deleted in order to be able to load the particles into paraview. Cheers |
|
![]() |
![]() |
![]() |
Tags |
parafoam, particle tracing |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF for particle interception with pt_termination fortran routine | abcdefgh | CFX | 6 | October 6, 2019 14:30 |
Particle tracking error | alchem | OpenFOAM Bugs | 5 | May 6, 2017 17:30 |
particles leave domain | Steffen595 | CFX | 9 | March 7, 2016 17:19 |
injection problem | Mark New | FLUENT | 0 | August 4, 2013 02:30 |
DPM UDF particle position using the macro P_POS(p)[i] | dm2747 | FLUENT | 0 | April 17, 2009 02:29 |