Download as pdf or txt
Download as pdf or txt
You are on page 1of 54

Introduction to post-processing

with ParaView
Basic Training
Philip Cardiff
26th to 30th June 2016 11th OpenFOAM Workshop
Vila Flor Cultural Centre
Guimarães, Portugal

Introduction to post-processing
with ParaView
Basic Training
Philip Cardiff

School of Mechanical & Materials Engineering


University College Dublin
!
!

!
Training Outline

Basic Usage
Loading data, navigation, controls, toolbars

Visualisation Techniques
Streamlines, glyphs, contours, representations, calculator, clip,
slice, threshold, plot over line, temporal interpolator

Exporting Images, Animations & Data


Creating animations, exporting PDF mesh, exporting data
Requirements (if you want to follow along)

ParaView 4.3 or 4.4 (or any 4.x or 5.x version)

Working OpenFOAM installation


Any version will do: ESI-OpenFOAM or foam-extend or other

If you are using the workshop USB installation, you can find instructions here:
https://openfoamwiki.net/index.php/Installation/Live_Images/USB-Stick_for_OFW11/
User_Guide#Live_Boot_menu

After booting to the USB Ubuntu, open the terminal and type:
$> fe40
to load foam-extend-4.0 (or “of30x” to load OpenFOAM-3.0.x)
See also: ParaView User’s Guide

ParaView User’s guide

Freely download from:


http://www.paraview.org/download/
Basic Usage
Basic Usage
Starting ParaView
Copy elbow tutorial case
cp -r $FOAM_TUTORIALS/incompressible/icoFoam/elbow $FOAM_RUN/
cd $FOAM_RUN/elbow

Create the mesh


fluentMeshToFoam elbow.msh

Run the solver


icoFoam

View results
paraFoam
or
paraFoam -nativeReader
Starting ParaView
Copy elbow tutorial case
cp -r $FOAM_TUTORIALS/incompressible/icoFoam/elbow $FOAM_RUN/
cd $FOAM_RUN/elbow

Create the mesh


fluentMeshToFoam elbow.msh

Run the solver


icoFoam

View results
paraFoam
or
paraFoam -nativeReader
Starting ParaView
Copy elbow tutorial case
cp -r $FOAM_TUTORIALS/incompressible/icoFoam/elbow $FOAM_RUN/
cd $FOAM_RUN/elbow

Create the mesh


fluentMeshToFoam elbow.msh

Run the solver


icoFoam

View results
paraFoam
or
paraFoam -nativeReader
Starting ParaView
Copy elbow tutorial case
cp -r $FOAM_TUTORIALS/incompressible/icoFoam/elbow $FOAM_RUN/
cd $FOAM_RUN/elbow

Create the mesh


fluentMeshToFoam elbow.msh

Run the solver


icoFoam

View results
paraFoam
or
paraFoam -nativeReader
Starting ParaView
Copy elbow tutorial case
cp -r $FOAM_TUTORIALS/incompressible/icoFoam/elbow $FOAM_RUN/
cd $FOAM_RUN/elbow

Create the mesh


fluentMeshToFoam elbow.msh

Run the solver


icoFoam

View results
paraFoam
or
paraFoam -nativeReader
Starting ParaView
Copy elbow tutorial case
cp -r $FOAM_TUTORIALS/incompressible/icoFoam/elbow $FOAM_RUN/
cd $FOAM_RUN/elbow

Create the mesh


fluentMeshToFoam elbow.msh

Run the solver


icoFoam

View results
paraFoam
or
paraFoam -nativeReader
Starting ParaView
Copy elbow tutorial case
cp -r $FOAM_TUTORIALS/incompressible/icoFoam/elbow $FOAM_RUN/
cd $FOAM_RUN/elbow

Create the mesh


fluentMeshToFoam elbow.msh

Run the solver


icoFoam

View results
paraFoam
or
paraFoam -nativeReader
Starting ParaView
Copy elbow tutorial case
cp -r $FOAM_TUTORIALS/incompressible/icoFoam/elbow $FOAM_RUN/
cd $FOAM_RUN/elbow

Create the mesh


fluentMeshToFoam elbow.msh

Run the solver


icoFoam

View results
paraFoam
Have a look in ParaView
or
paraFoam -nativeReader touch case.foam && paraview --data=case.foam &
toolbar
time controls
pipeline browser
object inspector
graphic window
Visualisation Techniques
Visualisation Techniques
Colours and Contours
Representation Outline/Points/Surface/Surface With Edges/Volume/Wireframe
Calculator

Filters -> Calculator

we will use this later to calculate


flux!
Contour

Filters -> Contour


Clip/Slice

Filters -> Clip Filters -> Slice


Threshold
Filters -> Threshold
Glyph

Filters -> Glyph


Stream Tracer (and Tube)

Filters -> Stream Tracer


Filters -> Tube (or Ribbons)
Warp by Vector (and Scalar)

Filters -> Warp By Vector Filters -> Warp By Scalar


Extract Selection

Select cells on the Select cells all the


surface way through

Then:
Filters -> Extract Selection
Plot Over Line

Filters -> Plot Over Line


Probe Location

Filters -> Probe Location


Filters ? help menu
Filters mesh quality

Filters -> Mesh Quality


Temporal Interpolator (and Time Annotation)

Filters -> Temporal Interpolator


Calculate Flux Through a Plane

Filters -> Slice


Filters -> Generate normals
Filters -> Calculator
Calculate the dot product of the normals and velocity
“Normals.U”
Filters -> Integrate variables
Filters -> Plot selection over time
Sources e.g. Ruler, Sphere, Cone, etc.

Sources -> Ruler


Load/Save States
File -> Save State
and
File -> Load State

Allows post-processing setup to


be saved and loaded
Images, Animations & Scenes

File -> Save Screenshot

Note: this will be pixellated/rasterised


Images, Animations & Scenes PDF of mesh

File -> Export Scene

Filename: myMesh
Files of type: PDF files (*.pdf)

Uptick “Rasterize 3D geometry”

Click “Save”

Note: this will be vectorised


(you can keep zooming in!)

Be careful for big meshes: the PDF


will be large!
Images, Animations & Scenes

ffmpeg -i myVideo.ogv -q:v 0 myVideo.avi


Images, Animations & Scenes
File -> Save Animation

Set “Frame Rate (fps)” to produce


the desired length animation e.g. if
you have ten frames (time-steps),
then a frame rate of “1” would
produce a 10 second animation

Note: the “*.ogv” animation files


can be played in a web-browser

Note 2: use in conjunction with


“Temporal Interpolator” filter
Camera Manipulation for Animations
View -> Animation View
Change option to “Camera” with “Orbit”
and click “+”

Change to camera
Accept defaults,
and click OK
Double click on “Camera”
Double click on “Path …”
Click on “Camera Position” &
manipulation the orbit widget in the graphic window
Camera Manipulation for Animations
Shift+Click to remove a point

ctrl (or cmd) + Click to add a point

Note: you can also animation most filters e.g. moving


the cutting plane when using a “slice” or a “clip”
26th to 30th June 2016 11th OpenFOAM Workshop
Vila Flor Cultural Centre
Guimarães, Portugal

Introduction to post-processing
with ParaView
Basic Training
Philip Cardiff

School of Mechanical & Materials Engineering


University College Dublin
!
!

You might also like