|
[Sponsors] |
April 21, 2005, 05:19 |
I do this (in tcl) to get the
|
#61 |
Senior Member
Rasmus Hemph
Join Date: Mar 2009
Location: Sweden
Posts: 108
Rep Power: 17 |
I do this (in tcl) to get the U-velocity field.
I got a lot of info from the VTK-books, 'VTK User's Guide' and 'The Visualization Toolkit'. //Rasmus Hemph #------------------------------ #READ THE GRID #------------------------------ vtkUnstructuredGridReader gridreader append fileName $GRIDPATH $FILEPREFIX "1000.vtk" gridreader SetFileName $fileName #------------------------------ #----------------------------------- #EXTRACT THE U-VECTOR VOLUME FIELD #----------------------------------- vtkFieldDataToAttributeDataFilter gfilter gfilter SetInput [gridreader GetOutput] gfilter SetInputFieldToPointDataField gfilter DefaultNormalizeOff gfilter SetVectorComponent 0 U 0 gfilter SetVectorComponent 1 U 1 gfilter SetVectorComponent 2 U 2 #----------------------------------- #------------------------------ #OUTLINE OF THE DOMAIN #---------------------------- #extract the outline of the domain vtkOutlineFilter outline outline SetInput [gridreader GetOutput] #..and create a mapper and actor vtkPolyDataMapper outlineMapper outlineMapper SetInput [outline GetOutput] set center [outlineMapper GetCenter] ...MORE CODE TO GET GRAPHICS... |
|
April 21, 2005, 05:30 |
Hi Luke,
when using the -fi
|
#62 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
Hi Luke,
when using the -fields option supply the fields between brackets as in -fields (gamma U p) |
|
April 21, 2005, 07:05 |
Now,foamToVTK has been modifie
|
#63 |
Member
Luckyluke
Join Date: Mar 2009
Posts: 51
Rep Power: 17 |
Now,foamToVTK has been modified to meet my need and a likely right VTK file was got.
I don't know exactly the difference between vtkMesh and fvMesh. The vMesh is defined as follows: vtkMesh vMesh ( IOobject ( meshName, runTime.timeName(), runTime, IOobject::MUST_READ ), cellSetName ); I want to know if the point and cell data have been read into vMesh with the above code? If the mesh of my solver keep the same along the time, then whether the code "polyMesh::readUpdateState meshState = vMesh.readUpdate();......" in the time loop of my solver "while (runTime.run()){......}" should be removed? Help me. |
|
April 21, 2005, 07:56 |
Another question, I want to kn
|
#64 |
Member
Luckyluke
Join Date: Mar 2009
Posts: 51
Rep Power: 17 |
Another question, I want to know if vtkMesh vMesh can be constructed dircetly from fvMesh mesh? Or if we can convert foam data to VTK format without vtkMesh class?
|
|
April 21, 2005, 13:56 |
Yes, when you construct a vtkM
|
#65 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
Yes, when you construct a vtkMesh with an IOobject with MUST_READ flag it will read the whole mesh. (leave cellSetName an empty string)
It behaves exactly like a normal fvMesh with the difference that it holds the vtk representation (accessible through topo()). You do not need the readUpdate if your mesh is static. The vtk representation (vtkTopo) holds the vtk cell types and vertices and does automatic decomposition of polyhedral cells. Sounds as if you're trying to do something hard. Good luck! |
|
April 22, 2005, 10:19 |
Hi, Mattijs, thanks for your h
|
#66 |
Member
Luckyluke
Join Date: Mar 2009
Posts: 51
Rep Power: 17 |
Hi, Mattijs, thanks for your help.
The VTK file achieved has the following lines. CELL_DATA 12800 FIELD attributes 2 cellID 1 12800 int gamma 1 12800 float //1 for scalar? In my Visualization Toolkit, I can only find POINT_DATA instead of CELL_DATA. Which vtk class should be used? vtkUnstructuredGridReader,vtkUnstructuredGrid, or vtkFieldData? Can you tell me how to get the gamma field out in VTK? Help me. Thanks. |
|
April 22, 2005, 10:26 |
No idea. This is what I would
|
#67 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
No idea. This is what I would do:
1. get a valid case with a gamma field and convert it with foamToVTK with the -ascii option and compare the output. 2. the name of the reader is displayed somewhere on the tab it creates when you read your file. |
|
April 25, 2005, 02:22 |
Hi,
can anybody tell me wha
|
#68 |
Senior Member
Fabian Braennstroem
Join Date: Mar 2009
Posts: 407
Rep Power: 19 |
Hi,
can anybody tell me what advantages paraview has compared to Opendx; and disadvantages. I mean there must be some good reasons, not to support OpenDX anymore!? Until now, I use OpenDX which is in my eyes pretty powerfull, but I am thinking about leaving OpenDX and just go deeper into paraview. Greetings! Fabian |
|
April 25, 2005, 04:19 |
- paraview runs without any us
|
#69 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
- paraview runs without any user programming in combination with the foamToVTK converter
- paraFoam requires much less programming than the Open-DX reader (have a look at the complexity of the postFoam network) - paraview uses much less memory. - paraview can do distributed data. There was never too much of a problem with Open-DX itself, it was all the programming nessecary to read and display OpenFOAM data. Paraview is setup to be a CFD postprocessor, OpenDX is an environment to quickly generate one's own postprocessor. |
|
April 27, 2005, 06:21 |
Hi, I'm having problems using
|
#70 |
New Member
Michael Oevermann
Join Date: Mar 2009
Posts: 15
Rep Power: 17 |
Hi, I'm having problems using paraview 2.0. Since I have an installed version of paraview 2.0 aleady running on my machine, I don't want to compile it again in openfoam. However, when I call
paraFoam icoFoam cavity on the tutorial example, I get the following error message with paraview crashing /home/oevermann/OpenFOAM/OpenFOAM-1.1/bin/paraFoam: line 57: 5357 Segmentation fault paraview paraFoam.pvs Question: how do I get openfoam work neatly with a pre-installed paraview? Which environmental variables and configuration files do I need to set? Thanks for any help michael |
|
April 27, 2005, 06:27 |
You will have to rebuild the O
|
#71 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
You will have to rebuild the OpenFOAM ParaView reader module for your pre-installed version of ParaView but the binaries released from KitWare do not include all the necessary build scripts to do this which is why we release ParaView binaries with OpenFOAM which include everything necessary to build the reader module. So the easiest way forward is for you to use the ParaView we release with OpenFOAM or if for some reason you are unable to you will probably have to build from sources.
|
|
April 27, 2005, 06:33 |
I have similar problems. I ins
|
#72 |
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21 |
I have similar problems. I installed paraview 2.0 to take advantage of the new animation and parallel post-processing capabilities and it is no longer compatible with the reader module.
If you do not want to downgrade to the supported paraview version, I suggest you use the foamToVTK utility to convert your cases to vtk format before post processing. At least that is what I am doing at the moment. |
|
April 27, 2005, 06:36 |
Henry, thanks for the note! I
|
#73 |
New Member
Michael Oevermann
Join Date: Mar 2009
Posts: 15
Rep Power: 17 |
Henry, thanks for the note! I did built Paraview from source because there is no binary for G5 Mac's running Debian Gnu Linux. So, everything should be OK. How do I rebuild the reader module?
Thanks, michael |
|
April 27, 2005, 06:46 |
First change the environment v
|
#74 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
First change the environment variable for the location and version of ParaView in
.OpenFOAM-1.1/apps/paraview/bashrc or cshrc depending on what shell you are using and source your ~/.bashrc or ~/.cshrc. Then goto OpenFOAM-1.1/applications/utilities/postProcessing/graphics/PVFoamReader and remove the directories for your platform from PVFoamReader/Make and vtkFoam/Make and type Allwmake and that should build the reader module for you. |
|
April 27, 2005, 08:09 |
Hi,all. I want to use the VTK
|
#75 |
Member
Luckyluke
Join Date: Mar 2009
Posts: 51
Rep Power: 17 |
Hi,all. I want to use the VTK lib in this directory "OpenFOAM/linux/paraview-1.8.5/". Whether the VTK contained in paraview has any difference to the original version from the web site of VTK? What is the version of my VTK located in "OpenFOAM/linux/paraview-1.8.5/"?
Under this folder "\OpenFOAM-1.1\applications\utilities\postProcessing\graphics \PVFoamReader\vtkFo am\Make", I found the option file EXE_INC = \ -I$(ParaView_INST_DIR)/include/vtk \ -I../PVFoamReader LIB_LIBS = $(GLIBS). What is the value of $(GLIBS)? I type "echo $GLIBS", it shows nothing. What should "GLIBS" be replaced by? Thanks. |
|
April 27, 2005, 13:23 |
I have rebuild the ParaView re
|
#76 |
New Member
Michael Oevermann
Join Date: Mar 2009
Posts: 15
Rep Power: 17 |
I have rebuild the ParaView reader and paraview 2.0 starts up normally. However, on the console I get the following error message and Paraview crashes when I hit e.g the accept button:
ErrorMessage # Error or warning: There was a VTK Error in file: /home/oevermann/ftp/paraview-2.0.1/VTK/Filtering/vtkDemandDrivenPipeline.cxx (544) Algorithm vtkFoamReader(0x117da848) did not create output for port 0 when asked by REQUEST_DATA_OBJECT and does not specify a concrete DATA_TYPE_NAME. ErrorMessage end ErrorMessage # Error or warning: There was a VTK Error in file: /home/oevermann/ftp/paraview-2.0.1/VTK/Filtering/vtkDemandDrivenPipeline.cxx (544) Algorithm vtkFoamReader(0x117da848) did not create output for port 0 when asked by REQUEST_DATA_OBJECT and does not specify a concrete DATA_TYPE_NAME. ErrorMessage end ErrorMessage # Error or warning: There was a VTK Error in file: /home/oevermann/ftp/paraview-2.0.1/VTK/Filtering/vtkDemandDrivenPipeline.cxx (544) Algorithm vtkFoamReader(0x117da848) did not create output for port 0 when asked by REQUEST_DATA_OBJECT and does not specify a concrete DATA_TYPE_NAME. ErrorMessage end ErrorMessage # Error or warning: There was a VTK Error in file: /home/oevermann/ftp/paraview-2.0.1/VTK/Filtering/vtkDemandDrivenPipeline.cxx (544) Algorithm vtkFoamReader(0x117da848) did not create output for port 0 when asked by REQUEST_DATA_OBJECT and does not specify a concrete DATA_TYPE_NAME. ErrorMessage end Paraview works fine with other (non openfoam) applications. Any suggestions what's going wrong here? Thanks again for any help Michael |
|
April 27, 2005, 13:35 |
Sorry I haven't tried the read
|
#77 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
Sorry I haven't tried the reader module with anything beyond paraview-1.8.5 but we will try paraview-2.0.1 for the next release.
|
|
May 4, 2005, 05:37 |
Hi!
I have run the tutorial c
|
#78 |
New Member
Amalia Apalategui
Join Date: Mar 2009
Posts: 13
Rep Power: 17 |
Hi!
I have run the tutorial case simpleFoam/pitzDaily. I have seen the results with paraview. Do you know how to picture the streamlines? And other question, if I want to use simpleFoam for laminar regime, how could I "eliminate" the turbulence? Thanks Amalia |
|
May 4, 2005, 05:58 |
Use the "laminar" turbulence m
|
#79 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33 |
Use the "laminar" turbulence model.
in constant/turbulenceProperties: turbulenceModel laminar; Enjoy, Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
May 4, 2005, 06:27 |
Streamlines are documented in
|
#80 |
New Member
Chris Greenshields
Join Date: Mar 2009
Posts: 28
Rep Power: 17 |
Streamlines are documented in the user guide:
http://www.opencfd.co.uk/openfoam/do...36-2000007.1.7 Alternatively, just experiment with the Filters. They are very easy and intuitive to use. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM] Paraview problem: loading the VTK cellSets changes the time | anon_q | ParaView | 1 | November 3, 2018 20:53 |
[General] How to relate tensor data in vtk file to Paraview | awa5114 | ParaView | 0 | March 7, 2017 04:56 |
[General] Creating VTK image compatible to Paraview Visualizer | het | ParaView | 0 | January 7, 2016 08:20 |
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 | keepfit | ParaView | 60 | September 18, 2013 03:23 |
[General] paraview ignores SPACING in STRUCTURED_POINTS vtk data? | jaffar | ParaView | 0 | November 27, 2012 09:36 |