CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] How to Display multiple Velocity Profiles?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By piu58

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 16, 2017, 13:08
Default How to Display multiple Velocity Profiles?
  #1
New Member
 
Join Date: Apr 2017
Posts: 2
Rep Power: 0
ocin199 is on a distinguished road
Hi All,

I'm pretty new to Paraview/Openfoam and I currently need a little bit of help.

What I want to show:
-Velocity Profiles like in the picture below
-Only lines and no arrows (arrows would be to confusing)
-The profiles should be created for example every 0.1 meter
-The relative velocity (U/U0) (I already solved this problem)

I tried it with PlotOverLine and Glyph, but the result was not what i expected.

I hope someone can help me with that.

Thanks a lot in advance.

ocin199 is offline   Reply With Quote

Old   May 16, 2017, 15:10
Default
  #2
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
May be am an not a paraFoam expert enough, but I assume this is a task too hard for that program. I recommend gnuplot.

In the first step the data for each profile has to be stored in a file. Therfore you may use the sample utility. You need to write a sampleDict which contains the lines along which you wish to extract the data. This is easy in your case. The sample Dict should look similar to this:
Code:
sets (
    w0 {  type uniform; axis distance; nPoints 500;
	start (-0.5 0 0); 
	end   (-1 0 0);
    }
    w10 {  type uniform; axis distance; nPoints 300;
	start (-0.492404 0.0868241 0); 
	end   (-0.689365 0.121554 0);
    }
	: (more samples)
}
	
);
Your lines need to be different of course. You get files with the names you gave in the postProcessing-sets-yourTimestep directory.

Maybe you have to calculate some things before printing, for instance the total value of the velocity from the components. This can be done with awk in the form:

Code:
cat myfile | awk '// {print $1, sqrt($2*$2+$3*$3+$4'*$4)}' > anotherFile
$1 is the first "word" in each line, $2 the second one and so on.

In your case you need at least to shift the U data along the axis and scale the velocity range so it fits to the diagram.

Eventual you may prepare a gnuplot file which prints these data. This may look like
Code:
set yrange [0:5] 
set xrange [0:190] 
set xlabel "U, m/s"
set ylabel "l, cm" 
plot "firstfile title "" with lines 1,"secondfile" title "" with lines 1,.....
pause -1
This gives the velocity "shells" form your example, not the lines/ arrows. This looks not bad and is similar to the graphs in textbooks. I found it helpful to add U=0-Achse (simple lines) and a measure vor the U velocity. This ma be done with prepared lines (files).

I made s script file for the flow around a sphere which gives a result similar to yours. I append a graphic of that.

hwangpo likes this.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   May 17, 2017, 04:47
Default
  #3
New Member
 
Join Date: Apr 2017
Posts: 2
Rep Power: 0
ocin199 is on a distinguished road

Thank you very very much!
This is exactly what i was looking for!
ocin199 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 07:09
Theoretical question on dimensionless velocity profiles eduhmaia FLOW-3D 0 September 17, 2015 00:37
VELOCITY vs VELOCITY IN STN FRAME vs RELATIVE VELOCITY everest20 FLUENT 1 July 13, 2015 09:35
Drag coefficient and velocity profiles in behind the model aja1345 FLUENT 0 June 30, 2014 03:31
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 13:21


All times are GMT -4. The time now is 14:06.