vtk to OpenFoam (or something else that can reach after OpenFoam)
I have a vtk file - unstructered grid type (with points and cells - I don't no exactly if it is mesh or only geometry and I should to obtain the mesh firstly - I'm beginer). However I want to do a simulation with OpenFoam - but no idea how to change the .vtk file in .OpenFoam file - I tryed many ways, but is to complicated. Last time I tried to obtain .stl from .vtk with vtkSTLWriter and after that I would change .stl in gambit to OpenFoam. But it seems to me that I can't write the unstructured grid to a .stl file (it requires vtkPolyData and I see I can't obtain this - it pass the compilation step but it has problems at running).
If I generate the mesh with blockMesh then I need a blockMeshDict and i don't know how to obtain it from the vtk file...
i wrote a pythonvtk script to convert unstructuredgrid vtk-files into STL-files.
If you send me your VTK-file in an email elvis-the-pelvis (at) hotmail dot de i will try to convert your vtk-file into an STL-file. I will also post my script here when i come back from work.
From the STL-file you can take several ways to get a mesh for CFD-simulations with Openfoam.
=>SnappyHexMesh (SHM) http://www.openfoam.com/docs/user/sn...#x26-1490005.4
http://www.discretizer.org/node/21 (a screencast)
and lots of other ways (salome , blender, calculix)
there used to be some descriptions on the http://www.openfoamworkshop.org
but the milano workshop`s page is broken!
maybe you look through http://www.tfd.chalmers.se/~hani/kurser/OS_CFD/
# -*- coding: utf-8 -*-
reader = vtk.vtkUnstructuredGridReader()
filter = vtk.vtkDataSetSurfaceFilter()
clean = vtk.vtkCleanPolyData()
triangles = vtk.vtkTriangleFilter()
write = vtk.vtkSTLWriter()
what mesh generator to use for huge .stl file?
Thank you for help. I resolved with vtkGeometryFilter and it's works :P Now I have a .stl file but I don't know how to generate the mesh. I tried with Discretizer but it seems that the file is to large(I have a complex geometry there) and sometimes it blocks - even when it works I didn't find exactly the comand to generate the mesh.
I tried to install Harpoon (I read it is for complex geometries) but I don't find a version for linux x86... It is only for linux 64 bit and for windows (and in windows I don't have installed any solver and I receive an error when I try to open it).
Do you know where can I find harpoon for linux x86 or a solver for it to install on windows? Or what other mesh generator for complex geometry do you know? I tried also with engrid but it's horrible to install it on ubuntu ...
parser for vtk file to obtain blockMeshDict or vtkDealuny3D it's enough to obtain mes
It doesn't seem to useful to have the .stl format... To obtain the mesh I still need to construct the blockMeshDict for the blockMesh utility and I really don't know how to do because I have a huge geometry with 4 buildings (and I don't know how to identify exactly the corners and the edges of the buildings only from the vtk file - there is a large list of points). If someone has already write a parser for vtk files(ubstructured grid) in order to obtain the dictionary for block mesh can please give me some clues?
Now I'm trying with Delauny3D algorithm - as I understood it generates somehow a mesh... It's good for my future simulation? (I will aply after that a solver on my mesh)
there are some publications and discusions related to terrain meshing
=>Modelling of wind flow over complex terrain
using OpenFoam , Xabier Pedruelo Tapia June 2009 Master’s Thesis in Energy Systems
===>Take a look at page 81 to understand what SHM makes for meshing
you have two volumes (Volume Blockmesh=Rectangle) - (Volume STL=Terrain surface)
this is your CFD-simulation-Mesh
http://www.aij.or.jp/jpn/publish/cfdguide/index_e.htm Guidebook for Practical Applications of CFD to Pedestrian Wind Environment around Buildings
A blockMeshDict for a rectangle (8 points) is not a big challange!
there is even a tutorial with terrain meshing
I currently have the same problem with the conversion my vtk mesh to OpenFoam, but my vtk format is xml, does your script accept this kind of format?
if paraview can load/visualize your file, you should be able to write STL-file from Paraview http://www.paraview.org/Wiki/The_ParaView_Tutorial
http://www.paraview.org/Wiki/Convert...rom_PLY_to_VTP just a starter
http://www.vtk.org/doc/release/6.0/html/classes.html => http://www.vtk.org/doc/release/6.0/h...ataReader.html or what kind of Data
|All times are GMT -4. The time now is 18:07.|