CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   terrain import openFoam (https://www.cfd-online.com/Forums/openfoam/75578-terrain-import-openfoam.html)

snippsnuske April 29, 2010 06:47

terrain import openFoam
 
Dear Foamers
I’m a newcomer to this forum&openfoam and I hope to get tips where to start with complex terrain import in openfoam (for wind flow simulations). I have a grid ascii (.grd file) file and would like to mesh that with the use of Salome. Is there any tutorial I can use as a start? Thanks!

elvis April 29, 2010 08:42

Quote:

Originally Posted by snippsnuske (Post 256815)
Dear Foamers
I’m a newcomer to this forum&openfoam and I hope to get tips where to start with complex terrain import in openfoam (for wind flow simulations). I have a grid ascii (.grd file) file and would like to mesh that with the use of Salome. Is there any tutorial I can use as a start? Thanks!

Hi,

i do not know how you can import your grid.:confused:
But the flash videos http://www.caelinux.org/wiki/index.p...ELinux_2007.29
might help you with the usage Salome -> OF in general

another way might be creating a STL from the (.grd file) grid plus a cuboid with Blockmesh, and as an next step let snappyhexmesh create the mesh for you. That is what they did at Icon
http://openfoamfoorumi.com/wordpress...ON_v1.3mod.pdf Slide 18

with an STL from your grid you (.grd file) could use discretizer http://www.discretizer.org/ as a cheap/free of charge replacement of Icon FOAMpro

elvis

AlanR April 30, 2010 00:06

There's a terrain meshing tutorial: tutorials/mesh/moveDyamicMesh/SnakeRiverCanyon that uses a different approach than the one you're using.
Terrain digital elevation maps (DEMs) are processed using mapping software and saved as .obj files. The .obj is converted into a .stl file using the surfaceConvert utility in OF. Then you either use the tutorial method (moveDynamicMesh), or snappyHexMesh to mesh the terrain surface (as was suggested by elvis). I worked with the tutorial method for a while, then switched to using snappy. Look through the blockMesh part of the tutorial to see how to make a domain around the surface. To use snappy, you need to enter a point above the surface (locationInMesh) in the snappyHexMeshDict file along with the name of the surface file. To generate a boundary layer, use refinementSurfaces (2 2) and nSurfaceLayers 4 to get two layers of 1/2 size and 2 layers of 1/4 size refined cells at the surface. Look through the motorBike tutorial to see how to set up the snappy Dict file. Use the fvSolution and fvSchemes files from the dynamicMesh tutorial.
One big advantage is that all meshing is done within OF. I use MicroDEM to open maps, save the map area of interest and generate the .obj files. It takes a while to figure out the details, but the mesh generation only takes a few minutes for a 1 square kilometer area. Good luck,

Alan

snippsnuske May 12, 2010 04:09


Thanks a lot Alan R! ..but where is this tutorial located? Can’t find it..
tutorials/mesh/moveDyamicMesh/SnakeRiverCanyon
Snipp

elvis May 12, 2010 09:42

Hi,

http://repo.or.cz/w/OpenFOAM-1.6.x.g...akeRiverCanyon

I didnīt know of this tutorial either.

elvis

Thom May 27, 2010 07:13

Hi, I've been trying to snappyHexMesh the AcrossRiver.stl file from the dynamic Mesh tutorial using Alan's instruction for the past couple of days. SnappyHexMesh runs but it doesn't seem to 'pick up' and snap the presence of the stl file. Has anyone else been successful in doing this or could share their snappyHexMeshDict of this example?

Thanks for your help,
Thomas

Thom May 28, 2010 11:10

Sorry problem solved. See here.

snippsnuske July 13, 2010 02:55

From .grd to .stl
 
I realized that GlobalMapper can easely import and export various geographical formats and that includes export in STL. So I used this software for my terrain file. The software is not freeware though. So I guess AlanRs suggestion is better but I have not tested this yet.

kerim November 4, 2010 14:38

surfaceConvert utility in OF
 
Dear all!
Where can I find surfaceConvert utility in OF?


All times are GMT -4. The time now is 00:58.