openfoam visualisation rendering using blender
Post on 22-Nov-2014
1.398 Views
Preview:
DESCRIPTION
TRANSCRIPT
openFoam Visulation Rendering using BlenderopenFoam Brisbane Users' Group
19th June 2014
Objectives
• Learn how to generate high resolution render of openFoam CFD results using Blender
Thanks
• CAEdevice www.caedevice.net for enabling the use of his design geometry
• KVRC www.khamsinvirtualracecarchallenge.com and its partners: Competition Car Engineering and Hibou Scientific Software
• Matt Cragun, Total Sim USA for his presentation "Data Visualisation and Rendering with Blender and VTK"
Blender
• A few basics - please refer to Matt Cragun's presentation:
http://www.openfoamworkshop.org/6th_OpenFOAM_Workshop_2011/Program/Training/cragun_slides.pdf
Be prepared, the learning curve is steep...
Shortcut Action
RMB Select
Shift+MMB Pan
Shift+D Duplicate
G Grab (to move an object)
R Rotate
(G, R) >> (X, Y, Z) Specify the axis to be used to
move/rotate object
X Delete
F12 Render
F3 Save image
The Workflow
Rendered image
Blender
X3D 3DS
SketchUp GeometryParaView
VTK
openFoam
Files Provided SketchUp and 3DS files,
including textures
openFoam CFDresults converted
to VTK format.
Download from:https://s3.amazonaws.com/cfdresultspublic/oF+Rendering+using+Blender.zip
ParaView
• Start ParaView;• Open files:
– bc_body_480.vtk– bc_frontwing_480.vtk– bc_rearwing_480.vtk– bc_wheelback1_480.vtk– bc_wheelback2_480.vtk– bc_wheelfront1_480.vtk– bc_wheelfront2_480.vtk
ParaView
Let's create streamlines:• Open file: internalMesh.vtk• Select the internalMesh.vtk
object;• Activate the Steam Tracer
filter;• Change the Steam Tracer
parameters to:– High Resolution Line
Source– Point1: (-1.0; -1.2; 0.25)– Point2: (1.0; -1.2; 0.25)
ParaView
And color them:
• Select the StreamTracer object;
• Select the Tube filter;
– Radius: 0.005
• Change the color variable to "U"
Then do a little bit of house keeping and export:
• Hide the car geometry;
• Select Edit View Option:– Turn off Orientation Axes
• Export scene as X3D
Blender
• Start Blender• Delete the default cube in
the middle• Import
RenderingRoom.3ds• Import CAEdevice.3ds
• Rotate (R) and move (G) the car to align properly:– R >> Z >> -90– G >> X >> 1.5– G >> Y >> 5
Blender• Import results.x3d saved from
ParaView• Delete by right-click in the
object view and select Delete:– TODO to TODO.006– ViewPoint
• Select the ParaView object (ShapeIndexedFaceSet);
• Rotate and position:– R >> X >> 90– R >> Z >> 90– G >> X >> 1.5– G >> Y >> 5
Blender
• Position camera– G >> X >> -8.5– G >> Z >> -4– G >> Y >> 8.5– R >> Z >> -90– Rotate so that car is in
the camera view point using View>Camera
And Render (F12)
Blender
Let's remove the tube shadows:
• Select ShapeIndexesFaceSet
• Select Material panel• Untick Traceable
Blender
Add lighting:• Select existing
light;• Copy (Shift+D);• Move the copied
light (X, Y, Z);• Repeat above step
twice for key and fill lights
Fill Key
Blender
• Set the lights as follows:– Initial light (lamp):
• R >> Z >> -90• Sun• Energy: 1
– Key light:• Energy: 0.4
– Fill light:• Energy: 0.1
And Render (F12)
Blender
Modify as desired to improve camera position, lighting position and intensity.
Then:• Change resolution to
100% (Render panel)• Render (F12)• And Save (F3)
Blender
• Repeat with showing the pressure distribution on the car.
• Tricks:– In ParaView:
• Group the various car parts in one dataset
• Coarsen the mesh using Quadratic Clustering filter
Happy Rendering
Thank you for your time and attention...
Please, tweet your rendering pictures to @HibouSoftware
and
on Fridays use #simulationfriday
top related