|
[Sponsors] |
February 22, 2012, 18:00 |
simpleFunctionObjects in paraFoam
|
#1 |
New Member
Javier Garcia
Join Date: Sep 2009
Posts: 7
Rep Power: 17 |
Hello Foamers,
I have made simpleFunctionObjects, namely a patchAverage. called averageVelocity in the patch atmosphere. I have a nice file in the directory ./patchAverage_averageVelocity/0 but I don't know how to visualize it with paraFoam. Could any one, please, offer a step-by-step explanation on how to visualize this patchAverage in paraFoam? Thanks and best regards. Javier Garcia |
|
February 22, 2012, 20:18 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
The fastest way to plot this data is Gnuplot (the chances are good that it is already installed on your workstation). Starting it with "gnuplot" will bring you to a shell and there the command plot "patchAverage_averageVelocity/0/atmosphere" should plot the data. Gnuplot may be a bit frightening for the beginner but it is scriptable and thus makes it easy to generate plots with minimal intervention (once you've set up a script of course) The pyFoam-utilities have a utility that generate the gnuplot-commands for you. In your case pyFoamTimelinePlot.py . --dir=patchAverage_averageVelocity --basic-mode=lines Piping that output directly into gnuplot gives you a PNG pyFoamTimelinePlot.py . --dir=patchAverage_averageVelocity --basic-mode=lines | gnuplot When you look at the online-help of the command you will find a number of other options. One of them is --csv-file. If you say pyFoamTimelinePlot.py . --dir=patchAverage_averageVelocity --basic-mode=lines --csv=velocity.csv then you will get a CSV file. This format is quite popular. It can be read into Excel, OpenOffice and other plotting programs and .... paraview. But doing 2D-plots is not Paraviews strong foot. You'll have to try that yourself |
||
February 22, 2012, 20:37 |
|
#3 |
New Member
Javier Garcia
Join Date: Sep 2009
Posts: 7
Rep Power: 17 |
Thank you very much Bernhard. I shall follow your recommendations.
I have already tried gnuplot, but the file I have created is an area average of U (a vector) and gnuplot does not perform a good job. I can run my case again with patchAverage of vector components, rather than with the full vector. In any case, it is now my turn to experiment. Again, thanks a lot. You have been most helpful. Javier Garcia |
|
February 23, 2012, 03:15 |
|
#4 |
Member
Timo K.
Join Date: Feb 2010
Location: University of Stuttgart
Posts: 66
Rep Power: 16 |
Try something like this:
plot '<sed -e "s/[()]//g" ../patchAverage_avg_InOut/0/U' using 1:2 title "U_x" w l lw 2 If you want the magnitude of U, you can use: foamCalc mag U Best |
|
February 23, 2012, 05:21 |
|
#5 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Code:
plot "patchToFile" using 1:(sqrt($2*$2+$3*$3+$4*$4)) with lines BTW: pyFoamTimelinePlot.py does that automatically for you if it detects a vector-value in your file Last edited by gschaider; February 23, 2012 at 05:23. Reason: Add code-tag to remove smileys |
||
February 23, 2012, 18:41 |
|
#6 |
New Member
Javier Garcia
Join Date: Sep 2009
Posts: 7
Rep Power: 17 |
Thanks Bernhard and Timo for your advices. I shall try them and I'll post here the results.
Incidentally, is there a Manual or something for those programms? Thanks and best regards. Javier Garcia |
|
February 23, 2012, 20:01 |
|
#7 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
- the Wiki-page - 2 presentations (referenced on the Wiki-page) - every PyFoam-command gives information about its usage if tickled with the --help-option |
||
Tags |
parafoam, simplefunctionobjects |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM] Unable to launch parafoam & | boonhow | ParaView | 5 | March 23, 2022 09:09 |
[OpenFOAM.com] paraFoam cannot open due to Qt issues - [Solved/Information] | u2berggeist | OpenFOAM Installation | 2 | July 2, 2018 18:03 |
[OpenFOAM] How to use paraFoam on a cluster | andreas | ParaView | 1 | March 6, 2013 18:11 |
[OpenFOAM] OpenFoam (Ubuntu): paraFoam via Xming+PuTTY | raketenmaid | ParaView | 4 | February 5, 2013 06:20 |
[OpenFOAM] Parafoam basic questions | qtian | ParaView | 0 | July 20, 2007 12:52 |