CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

paraview pb

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 9, 2011, 06:30
Default paraview pb
  #1
Member
 
lynda
Join Date: Oct 2009
Posts: 48
Rep Power: 9
lyna is on a distinguished road
Hi
after plotting the results (two fluids flow in a pipe 2D) using paraview, how can I split my geometry (length) by 4 parts to analyze each part alone? and how I can save it, or export it directly?. help me please? (I do not master the paraview).
lyna is offline   Reply With Quote

Old   April 9, 2011, 06:53
Default
  #2
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 252
Rep Power: 13
MartinB is on a distinguished road
Hi lyna,

use the "Filters->Alphabetical->Clip" utility. You can clip the clipped parts, too, so you can easily subdivide your mesh.

You can export each part of your clipped mesh by selecting the "Clipxyz" filter in the Pipeline Browser, then use "File->Save Data->your_name.vtm" (use VTK Multi Block Files), Data Mode "binary".

Now you can import each part independently for further visualization and postprocessing.

Martin
MartinB is offline   Reply With Quote

Old   April 10, 2011, 07:45
Default
  #3
Member
 
lynda
Join Date: Oct 2009
Posts: 48
Rep Power: 9
lyna is on a distinguished road
Hi Martin

thank you very much

Lyna
lyna is offline   Reply With Quote

Old   April 17, 2011, 10:31
Default
  #4
Member
 
lynda
Join Date: Oct 2009
Posts: 48
Rep Power: 9
lyna is on a distinguished road
hello,
how saved my animated figures (plots paraview) to open them using other software (eg vedeo or presentation. ppt).
thank you

Lyna
lyna is offline   Reply With Quote

Old   May 2, 2011, 04:09
Default
  #5
Member
 
lynda
Join Date: Oct 2009
Posts: 48
Rep Power: 9
lyna is on a distinguished road
hello,
I traced the curve u = f (y) using paraFoam, but I want to reverse the axes, how can I change the axes? ie: in the x-axis I set the speed U and the y-axis I set the Y.
thank you
Lyna
lyna is offline   Reply With Quote

Old   May 2, 2011, 06:17
Default
  #6
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 252
Rep Power: 13
MartinB is on a distinguished road
Hi lyna,

I would export the values as .csv file and make the plots in OpenOffice Calc, Excel, GnuPlot or matPlotLib, because it looks much smarter than the chart module ParaView...

But here is a way to switch axes:
- define your line.
- click "Filters->Alphabetical->Plot Over Line"
- in "Display" tab select "Use Data Array" and in drop down menu "U (Magnitude)"
- in "Line Series" select exclusively "Points (1)"

Don't know if your previous question is still valid (concerning the animations):
- use "File->Save animations" and save it as a series of .png images
- use mencode or another tool (google for png to avi) to make the animation

Martin
Attached Images
File Type: jpg screenshot.jpg (45.2 KB, 56 views)
MartinB is offline   Reply With Quote

Old   May 2, 2011, 10:57
Default
  #7
Member
 
lynda
Join Date: Oct 2009
Posts: 48
Rep Power: 9
lyna is on a distinguished road
Thank you
comment je peux tracer les profils des vitesses dans la conduite (par exemple écoulement poiseille 2D )?
lyna is offline   Reply With Quote

Old   May 2, 2011, 11:04
Default
  #8
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 252
Rep Power: 13
MartinB is on a distinguished road
???

Sorry, I don't speak greek ;-)

Martin
MartinB is offline   Reply With Quote

Old   May 2, 2011, 12:09
Default
  #9
Member
 
lynda
Join Date: Oct 2009
Posts: 48
Rep Power: 9
lyna is on a distinguished road
I am sorry

how I can plot the velocity profiles in the duct (eg flow poiseille 2D)?

thank you
lyna is offline   Reply With Quote

Old   May 2, 2011, 12:30
Default
  #10
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 252
Rep Power: 13
MartinB is on a distinguished road
Hmmhhh, I assume you want to reproduce the left part of my screenshot...

Do a cut through your results with "Filters->Alphabetical->Slice" and choose "X Normal".
Then do a cut through the first cut in the same way, but by choosing "Y Normal". There will be a warning, but you can minimize the window and ignore it.
Now you have a line which you can deform with "Filters->Alphabetical->Warp By Vector". Define an appropriate scale factor.
In the display tab choose "Color by" U (or a solid color of your choice), and increase the "Line width" to 5 or above.

Martin
MartinB is offline   Reply With Quote

Old   May 11, 2011, 06:27
Default
  #11
Member
 
lynda
Join Date: Oct 2009
Posts: 48
Rep Power: 9
lyna is on a distinguished road
Hi
How do I calculate the average P along the y-axis? . because I want draw a profile of average pressure versus X using paFoam

Last edited by lyna; May 11, 2011 at 07:26.
lyna is offline   Reply With Quote

Old   May 12, 2011, 04:46
Default
  #12
Member
 
lynda
Join Date: Oct 2009
Posts: 48
Rep Power: 9
lyna is on a distinguished road
Hi
How do I calculate the average P along the y-axis? . ie I set a horizontal axis X and am calculating the average pressure along Y at this position. because I want draw a profile of average pressure (along y) versus X using paFoam.
lyna is offline   Reply With Quote

Old   May 12, 2011, 08:19
Default
  #13
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 252
Rep Power: 13
MartinB is on a distinguished road
Hi lyna,

I don't know if there is a direct method in paraview, but I don't think so... however it can be done with a little tool for OpenFOAM, see attachment.

The idea of the tool is:
- read the scalarfield "p" from the desired time step
- make cuts along the x-Axis with x-Normal direction
- for each cut get the cells in a cellSet
- loop over this cellSet and calculate the averages
- store the averages back to a new volScalarField that can be postprocessed in paraview
- as a bonus write out a csv-file for further evaluation in OpenOffice Calc

The tool is roughly tested with OpenFOAM-1.7.x, but it should work with other versions, too. There is a good chance that it can even be used in parallel.

Usage:
- download and unpack the lynaAverage.tar.gz into your user directory
- compile with wmake, this will make the tool available as "lynaAverage" in the FOAM_USER_APPBIN
- the tool will read the scalar field "p". If you have "pd" just copy "pd" to "p" for a moment, or change the source code to handle other volScalarFields as well
- the tool will write a "meanPx" volScalarField that can be postprocessed in paraview
- further more the tool will write a "countHits" volScalarField for debugging purposes
- the sample rate for the cuts along the x-Axis can be adjusted. Every cell in x direction should be hit at least once. If the countHits field gives you cells with zero hits, decrease the sample rate!
- the command line option "[-dx 0.0001]" can be used to decrease the sample rate
- the command line option "[-lastestTime]" can be used to evaluate only the last time step

Example:
Code:
lynaAverage -dx 0.000025 -latestTime
Example usage in paraview (see screenshot below):
- make a slice with x-Normal
- make a slice of this slice with y-Normal and ignore warnings
- call "Filters->Alphabetical->Warp By Scalar", select "meanPx" from drop down menu "Scalars" in the Object Inspector, choose an appropriate "Scale Factor", use Normal "0 0 1" or "0 1 0"
- increase "Line width" in Display tab

Have fun

Martin
Attached Images
File Type: jpg lynaAverage.jpg (40.9 KB, 27 views)
Attached Files
File Type: gz lynaAverage.tar.gz (2.9 KB, 6 views)
MartinB is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paraview nice animation PyGloo ParaView 4 June 7, 2012 12:34
Newbie: Install ParaView 3.81 on OF-1.6-ext/OpenSuse 11.2? lentschi OpenFOAM Installation 1 March 9, 2011 03:32
Paraview not found fusij OpenFOAM Installation 2 January 1, 2011 21:44
paraFoam reader for OpenFOAM 1.6 smart OpenFOAM Installation 13 November 16, 2009 22:41
Paraview installation troubles jjhall OpenFOAM Installation 3 April 17, 2008 12:59


All times are GMT -4. The time now is 17:12.