|
[Sponsors] |
Visualizing OpenFOAM VTK-files using mayavi/mlab in Python |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 16, 2013, 09:39 |
Visualizing OpenFOAM VTK-files using mayavi/mlab in Python
|
#1 |
Member
Bas Nieuwboer
Join Date: Mar 2013
Posts: 32
Rep Power: 13 |
Hi All,
I am trying to visualize my model results from OpenFOAM in python using mayavi/mlab. I am able to plot the surfaces of my model. However, I would like to make a quiverplot of my velocity field and a volume plot of my pressures. I found some documentation this. However, this documentation did not state anything on the combination with loaded VTK-files. The code beneath is the one I use for plotting the surfaces. Could anyone help me extend this to plotting the velocities and pressures using python? Code:
import os from mayavi.core.api import Engine from mayavi.sources.vtk_file_reader import VTKFileReader from mayavi.modules.surface import Surface from mayavi import mlab vtkFile_tot = os.path.normpath('D:/Bas/python/VTK/131023cutterBlended08RelVel_0.vtk') engine = Engine() engine.start() scene = engine.new_scene() reader = VTKFileReader() reader.initialize(vtkFile_tot) engine.add_source(reader) surface = Surface() engine.add_module(surface) Last edited by bjnieuwboer; December 16, 2013 at 09:40. Reason: typo in title |
|
Tags |
mayavi, mlab, openfoam, vtk |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Superlinear speedup in OpenFOAM 13 | msrinath80 | OpenFOAM Running, Solving & CFD | 18 | March 3, 2015 05:36 |
64bitrhel5 OF installation instructions | mirko | OpenFOAM Installation | 2 | August 12, 2008 18:07 |
Adventure of fisrst openfoam installation on Ubuntu 710 | jussi | OpenFOAM Installation | 0 | April 24, 2008 14:25 |
OpenFOAM Debian packaging current status problems and TODOs | oseen | OpenFOAM Installation | 9 | August 26, 2007 13:50 |
Results saving in CFD | hawk | Main CFD Forum | 16 | July 21, 2005 20:51 |