CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [OpenFOAM] Paraview and VTK (https://www.cfd-online.com/Forums/paraview/61108-paraview-vtk.html)

mattijs March 10, 2005 03:51

As you point out it seems as i
 
As you point out it seems as if the directory $ParaView_DIR points to is empty or non-existent.

It is set in .OpenFOAM-1.0.2/apps/paraview/cshrc (or baskrc)

Mattijs

mattos March 10, 2005 09:07

Hi Mattijs Tank you in adva
 
Hi Mattijs

Tank you in advance for your help. How you can see in my last message, the variable ParaView_DIR is correctly set (I suppose) :-[ and checked it again:
[wladimyr@geitt4 ~]% echo $ParaView_DIR
/home/wladimyr/OpenFOAM/linux/paraview-1.8.0/lib/paraview-1.8

I ran the prompt command "ls $ParaView_DIR" and this directory exist and contains the ParaViewConfig.cmake file, as is demanded in CMakeCache.txt file.

Could you or somebody help me?

Many Tanks anyway

Wladimyr

hemph March 12, 2005 06:02

Hi! I would like to recompi
 
Hi!

I would like to recompile the PVFoamReader utility for Paraview (linux,i686). Is that possible at all without also recompiling paraview from source?
Following the instructions in this forum I have done

md8hemra@haif~/.../graphics/PVFoamReader> wclean PVFoamReader/
md8hemra@haif~/.../graphics/PVFoamReader> wclean vtkFoam/
md8hemra@haif~/.../graphics/PVFoamReader>./Allwmake

But this gives the error message:
..
..
..

CMake Error: Error in cmake code at
/home/md8hemra/OpenFOAM/linux/paraview-1.8.5/lib/paraview-1.8/ParaViewConfig.cma ke:25:
INCLUDE Could not find include file: /home/dm2/henry/OpenFOAM/linux/paraview-1.8.5/lib/paraview-1.8/ParaViewLibraryDe pends.cmake
CMake Error: Error in cmake code at
/home/md8hemra/OpenFOAM/OpenFOAM-1.1/applications/utilities/postProcessing/graph ics/PVFoamReader/PVFoamReader/CMakeLists.txt:37:
INCLUDE Could not find include file: /home/dm2/henry/OpenFOAM/linux/paraview-1.8.5/lib/paraview-1.8/ParaViewUse.cmake
CMake Error: Error in cmake code at
/home/md8hemra/OpenFOAM/OpenFOAM-1.1/applications/utilities/postProcessing/graph ics/PVFoamReader/PVFoamReader/CMakeLists.txt:51:
Unknown CMake command "VTK_WRAP_ClientServer".
-- Configuring done
make: *** No targets specified and no makefile found. Stop.

The file "...lib/paraview-1.8/ParaViewConfig.cmake"
does contain paths to Henry's build. If I replace those paths with the ones corresponding to the OpenFoam installation, I get into more path problems later on.

I am wondering if it is of any use to keep looking to fix the path problems or if I should just give up and recompile paraview.


Best Regards
Rasmus Hemph

henry March 12, 2005 06:19

It is annoying the cmake prese
 
It is annoying the cmake preserves full paths in it's configuration files rather than relative paths which makes it difficult to transfer the builds. It should be possible for you to substitute your paths for mine in the relevant files but if that proves difficult it might be easier to compile paraview from scratch which is quite easy.

hemph March 12, 2005 06:42

Ah, got it to work. Thanks for
 
Ah, got it to work. Thanks for the help.
The problem I face at home is that compilation of Paraview takes a long time on my old computer..

Anyway, for future reference: To recompile the PVFoamReader class I had to
change the paths from /home/henry/ to /home/myUserName/ in

OpenFOAM/linux/paraview-1.8.5/lib/paraview-1.8.5/ParaViewConfig.cmake

I also needed to change

"paraview-1.8.5" to "ParaView" on line 26 in the same file.

old:
SET(VTKCS_SOURCE_DIR
"/home/myUserName/OpenFOAM/linuxSrc/paraview-1.8.5/Utilities/VTKClientServer")

new:
SET(VTKCS_SOURCE_DIR
"/home/myUserName/OpenFOAM/linuxSrc/ParaView/Utilities/VTKClientServer")

hemph March 12, 2005 11:11

Well. it is actually not worki
 
Well. it is actually not working. Got PVFoamReader to compile, with the result that ParaFoam segfaults at start. I will try recompiling Paraview instead..

//Rasmus H

mattijs March 16, 2005 11:02

Hi, does anyone know how to
 
Hi,

does anyone know how to load Ensight result files into paraview? I just get a coredump all the time (but then I did try a polyhedral mesh)

Mattijs

mattijs March 23, 2005 06:13

Is there anyone out there with
 
Is there anyone out there with some VTK experience who could help putting polyhedral support into paraFoam? I am having to postprocess meshes with lots of refinement and the automatic decomposition we use (tets and pyramids) causes much too many cells.

Mattijs

rybakov April 12, 2005 08:33

Hi all, Excuse me for dummy q
 
Hi all,
Excuse me for dummy quiston.
I can not resieve Graph in ParaView in example with Cavity becouse of Filer "Probe" is inaccesseble.
I have choose Scalar Vx, make step by step Example but no result. Does anybody now where is problem can be?

mattijs April 12, 2005 09:54

Sounds like you do not have an
 
Sounds like you do not have any results. Check in the 'Display' tab under 'Property'. It should give you a list of 'U', 'p' etc. or whatever fields you have.

Paraview will disable the filters that require fields if there are no fields.

rybakov April 12, 2005 10:19

A have made calculations and U
 
A have made calculations and Ucomponents. I have in Display all, what I choose (Ux, Uy, P), I make beutiful pictures for P, Ux, Uy, but can not make Probe.

duderino April 15, 2005 08:43

Hi I want to add the time (
 
Hi

I want to add the time (real time of actual time step) as text in into an animation in Paraview. Is there any possibility to do this?

hsieh April 18, 2005 08:37

Hi, To generate mpg movies,
 
Hi,

To generate mpg movies, I now used foamToVTK to convert all the data to VTK and then read them back using paraview.

Can someone here post the steps how to generate mpg movie when invoking the paraview using paraFoam?

When I used paraFoam, I got all the time steps, but, I cannot get animation to work properly (slide bar of time steps moves, but, no redraw of the plot).

Thanks!

Pei

eugene April 18, 2005 08:43

This sometimes happens with bi
 
This sometimes happens with big cases. Switch off "cache geometry" and "record all properties" in the animation settings dialogue.

To make mpeg movies you need to dump each timestep as a jpg and then turn those into mpegs with a 3rd party utility (mainactor or convert for example).

chris April 18, 2005 08:44

Pei, When you run the anima
 
Pei,

When you run the animation, you need to deselect all the checkboxes in the Time panel of the case module. Did you do this?

rybakov April 18, 2005 10:43

Hallo all, I can make movie w
 
Hallo all,
I can make movie with yours advise, but I still can not reсieve Probe. Do you konw possible reasons?

rybakov April 18, 2005 10:44

Hallo all, I can make movie w
 
Hallo all,
I can make movie with yours advise, but I still can not recieve Probe. Do you konw possible reasons?

hsieh April 18, 2005 17:08

Hi, Chris, Thanks! That wa
 
Hi, Chris,

Thanks! That was the problem - I had one time step selected.

Pei

luckyluke April 20, 2005 22:08

The VTK file generated by foam
 
The VTK file generated by foamToVTK untility can be read using vtkUnstructuredGridReader, right?

Can anybody show me a simple code to do this,i.e. read the VTK file with some vtk classes.

Thanks.

luckyluke April 21, 2005 04:08

Hi,all. An urgent question whi
 
Hi,all. An urgent question which I have fighted to for a few days. Who will help me?

In the 'main' function of the solver, we have defined fvMesh mesh, volscalarField gamma.
Then is it possible to convert the mesh and field to VTK format(not use an intermediate file)?It seems to be easy,but I failed to do it.

I have trying to do it. But I am not clever enough to solve it with the help provided by the source files of foamToVTK and foamReader.

Thank all.

hemph April 21, 2005 05:19

I do this (in tcl) to get the
 
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...

mattijs April 21, 2005 05:30

Hi Luke, when using the -fi
 
Hi Luke,

when using the -fields option supply the fields
between brackets as in

-fields (gamma U p)

luckyluke April 21, 2005 07:05

Now,foamToVTK has been modifie
 
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.

luckyluke April 21, 2005 07:56

Another question, I want to kn
 
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?

mattijs April 21, 2005 13:56

Yes, when you construct a vtkM
 
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!

luckyluke April 22, 2005 10:19

Hi, Mattijs, thanks for your h
 
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.

mattijs April 22, 2005 10:26

No idea. This is what I would
 
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.

braennstroem April 25, 2005 02:22

Hi, can anybody tell me wha
 
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

mattijs April 25, 2005 04:19

- paraview runs without any us
 
- 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.

oevermann April 27, 2005 06:21

Hi, I'm having problems using
 
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

henry April 27, 2005 06:27

You will have to rebuild the O
 
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.

eugene April 27, 2005 06:33

I have similar problems. I ins
 
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.

oevermann April 27, 2005 06:36

Henry, thanks for the note! I
 
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

henry April 27, 2005 06:46

First change the environment v
 
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.

luckyluke April 27, 2005 08:09

Hi,all. I want to use the VTK
 
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.

oevermann April 27, 2005 13:23

I have rebuild the ParaView re
 
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

henry April 27, 2005 13:35

Sorry I haven't tried the read
 
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.

aap May 4, 2005 05:37

Hi! I have run the tutorial c
 
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

hjasak May 4, 2005 05:58

Use the "laminar" turbulence m
 
Use the "laminar" turbulence model.

in constant/turbulenceProperties:

turbulenceModel laminar;

Enjoy,

Hrv

chris May 4, 2005 06:27

Streamlines are documented in
 
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.


All times are GMT -4. The time now is 11:05.