|
[Sponsors] |
May 2, 2008, 17:15 |
Mesh generation for Wind Tunnel
|
#1 |
Member
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 17 |
Hi,
I am trying to use OpenFOAM/paraview to implement a simple virtual wind tunnel for testing a Greenpower electric racing car. I have got a simple 3D case to work from a 3D example with a cube in the airflow from and example in an OpenFOAM forum. Now I need to be able to create a suitable mesh from a CAD packages STL file. I have created some simple meshes using netgen however I need to generate and "inverted" mesh, ie one with a hole where the STL surface is. Does any one know of a simple way I can achieve this ? Cheers Terry |
|
May 3, 2008, 13:20 |
That's a good question.
You n
|
#2 |
Senior Member
Francesco Del Citto
Join Date: Mar 2009
Location: Zürich Area, Switzerland
Posts: 237
Rep Power: 18 |
That's a good question.
You need a meshing tool that fits your needs/experiences. There are a lot of commercial softwares, like ANSA, Tgrid or Harpoon, for example. On the free software side, I don't know anything really complete yet. What I can say is that OpenFOAM is a really good tool for this kind of applications! Francesco |
|
May 3, 2008, 15:53 |
I need to do this on the cheap
|
#3 |
Member
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 17 |
I need to do this on the cheap as the Greenpower electric car racing is for secondary schools in the UK where pupils and the parents design, build and race electric cars. http://portal.beam.ltd.uk/greenpower...cer/index.html
I was hoping I could create a mesh as follows: 1. Create a simple car design using Pro/Designer CAD or Blender and export the design as an STL file. 2. Use blockMesh to generate a basic wind tunnel mesh with inlet and outlet with an appropriate number of blocks. 3. Use the cellSet utility to remove the cells from the wind tunnel inside the CAD STL surface. 4. Use cellSet ? to create a named patch (wall ?) from internal STL surface. 5. Use this resulting mesh with the turbFoam solver. I am new to this. Is this sort of approach likely to work (I only need basic results, accuracy is not required) ? If so any pointers on how to do this ? I have managed to generate the wind tunnel mesh and have removed the inside of the STL surface. The documentation for the mesh utilities seems very spartan ... I am unclear on: 1. How to set the default mesh from the mesh and the cell sets created. I have used subsetMesh and then copied the "0.005" directory created over "0". Is there a correct way to do this ? 2. How to create the named patch/walls for the internal STL surface. Cheers Terry |
|
May 6, 2008, 17:19 |
1. Yes. Or just set system/con
|
#4 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
1. Yes. Or just set system/controlDict to latestTime. It will read the mesh from 0.005 instead of constant.
2. Not terribly easy. For simple geometries use autoPatch. Determines regions closed by feature edges (based on feature angle) and puts every region into a different patch. Alternatively create a single surface (e.g. STL) with multiple regions ('solid' for STL). Use surfaceToPatch to take over the region information as patch information. |
|
May 7, 2008, 05:36 |
Thanks for the info.
I have m
|
#5 |
Member
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 17 |
Thanks for the info.
I have managed to create a basic block mesh and have created a single wall for the entire STL surface using the "oldInternalFaces" boundary generated by cellSet and changing its type to "wall" renaming it to "car" using simple text editing. This appears to work and I see some results from my OpenFOAM VWT simulation although the blockMesh is very coarse ... For other peoples information my current case (although probably wrong ) is at: ftp://portal.beam.ltd.uk/pub/meshTest2.tar.gz I am now trying to refine this mesh using autoRefineMesh. Issues with this are in the "Recommended way of generating mesh from cad" thread ... Cheers Terry |
|
May 7, 2008, 05:57 |
Hi Terry
Thanks for provid
|
#6 |
Senior Member
Join Date: Mar 2009
Posts: 248
Rep Power: 18 |
Hi Terry
Thanks for providing the test case for others to learn. I have downloaded your case and will go through the steps you have executed. Might lead to some questions ;-). Thanks once again !! Regards Jaswi |
|
May 7, 2008, 06:08 |
Hi Jaswi,
Don't thank me ye
|
#7 |
Member
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 17 |
Hi Jaswi,
Don't thank me yet. I am a complete novice and what I have done could be completely wrong ... Cheers Terry |
|
May 7, 2008, 07:05 |
Hi Jaswi,
I have placed my
|
#8 |
Member
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 17 |
Hi Jaswi,
I have placed my current test case for the VWT for simulating our car at: ftp://portal.beam.ltd.uk/pub/vwtTest1.tar.gz It is setup to use a cube as the default object although there is also an STL file for our car in the test case as well that can be used. This provides a more reasonable test case than my meshTest2 example that might be of more use to people. It is still probably completely wrong though ... Cheers Terry |
|
May 9, 2008, 19:13 |
Terry/ Foamers,
You might b
|
#9 |
Senior Member
Mark Couwenberg
Join Date: Mar 2009
Location: Netherlands
Posts: 130
Rep Power: 17 |
Terry/ Foamers,
You might be a newbie but you brought me to fresh ideas regarding creating meshes. I tried your case, am specially interested in the method of cutting some form in a full blockMesh using (e.g.) a stl file. Your case: cellSet failed on my computer. I have OF 1.4.1. Did it actually succeed on your computer (I mean: using surfaceToCell and a stl file)? First I get a warning:cannot find bounding box for zero sized pointFieldreturning. Next a lot of errors: Foam fatal error ===> could not find (0 0 0) in octree and next a lot of #0... #1..., without any clues for me. So I am curious whether you actually succceed? Compliments for your work already and for sharing it, Mark |
|
May 10, 2008, 04:11 |
Yes, I believe I have succeede
|
#10 |
Member
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 17 |
Yes, I believe I have succeeded in creating a basic VWT. Mattijs Janssens helped in the "Recommended way of generating mesh from cad" forum subject by fixing a problem in the autoRefineMesh program. This source needs to be compiled within the OpenFOAM tree. I am using the OpenFOAM-1.4.1_patch SVN sources although I think it worked with the standard OpenFOAM-1.4.1 sources as well.
My test STL files and there Blender sources are in the following test case. Note that the VWT is sized (-4, -2, 0) (4, 2, 3) and that the object has to be within that space. Also, I suspect, that there should be one STL volume with no holes or breaks. I guess you error message relates to a very small sized bit of STL surface on its own somewhere in your CAD STL file ... My current test case is at: ftp://portal.beam.ltd.uk/pub/vwtTest2.tar.gz Note that this could be completely wrong (but it does give nice pictures (in the test case archive) ! ... |
|
May 10, 2008, 13:44 |
Hi Terry,
Thanks for the repl
|
#11 |
Senior Member
Mark Couwenberg
Join Date: Mar 2009
Location: Netherlands
Posts: 130
Rep Power: 17 |
Hi Terry,
Thanks for the reply. I got those errors on your testcase and on ny testcase. I get them both using the cellset and autorefine, exactly the same. Unfortunately I do not know how to copy the error messages here. However it seems it has something to do with toposetsource. The final error message is: From function octreeDataTriSurface::getSampleType(octree<octreed atatrisurface>&, const point&) in file triSurface/octreeData/octreeDataTriSurface.C at line 348. I will try your recommendation regarding OF patch. This seems as a reasonable explanation about what went wrong. Thanks, Mark |
|
May 10, 2008, 16:15 |
Update: I tried the autoRefine
|
#12 |
Senior Member
Mark Couwenberg
Join Date: Mar 2009
Location: Netherlands
Posts: 130
Rep Power: 17 |
Update: I tried the autoRefineMesh patch but without result. I got the same errors with respect to octreeData.
Any ideas? Brgds, Mark |
|
May 12, 2008, 06:37 |
Hi,
I notice that in my vwt
|
#13 |
Member
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 17 |
Hi,
I notice that in my vwtTest2.tar.gz example I had set the default STL file to car-2.stl. This is the STL file I am having problems with at the moment. If you edit the Makefile to use cube.stl or car-1.stl it works Ok here. I have updated the vwtTest2.tar.gz test case to use cuve.stl as the default STL object. My current status is that with a more complex STL file (car-2.stl) I get "multiply connected surface"/"Writing 12 conflicting points to set nonManifoldPoints" warnings/errors? from checkMesh. When this happens a run of the solver will crash. This error seems to be introduced when subSetMesh is run ... |
|
May 12, 2008, 17:52 |
Although I have got a mesh gen
|
#14 |
Member
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 17 |
Although I have got a mesh generated for a virtual wind tunnel with a simple STL object in it, I am having problems with a slightly more complex object.
In my vwtTest2.tar.gz example, when meshing the car-2.stl object, I get a warning or error? in checkMesh: "multiply connected surface" followed by "Writing xxx conflicting points to set nonManifoldPoints". Running the simpleFoam solver results in a crash. The mesh error seems to get introduced when I use subsetMesh to remove the cells within the STL object. This creates a set of faces and patch for the boundary between the wind and STL object. I have been playing around with the original blender object, with autoRefineMesh settings and other things with no success. 1. Can anyone enlighten me what these errors mean and where to look for the problem ? 2. Is there a better way to take out the STL objects cells and create the wall patch for the STL object ? 3. Is there a good tool to look at the resulting mesh and the "nonManifoldPoints" ? Cheers Terry |
|
May 13, 2008, 07:13 |
I have managed to get my mesh
|
#15 |
Member
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 17 |
I have managed to get my mesh better, simply by making autoRefineMesh refine the blocks more.
I have changed the solver parameters and the turbulence model and now I get results. If these are reasonable, I have no idea as yet. For peoples info my current test case is at: ftp://portal.beam.ltd.uk/pub/vwtTest4.tar.gz Cheers Terry |
|
December 11, 2008, 04:38 |
Hi dear foamers
I'm also wo
|
#16 |
Member
fabrizio
Join Date: Mar 2009
Posts: 33
Rep Power: 17 |
Hi dear foamers
I'm also working on a wind tunnel project, and I use snappyHexMesh to create the mesh starting from BlockMesh and the stl geometry. I must use icoFoam and all is fine. My problem is how to extract the pressure insisting on the wall that represents my object. Can you help me? Thanks to all Fabrizio |
|
December 11, 2008, 11:34 |
Hi fabrizio,
I am working
|
#17 |
Member
Leonardo Honfi Camilo
Join Date: Mar 2009
Location: Delft, Zuid Holland, The Netherlands
Posts: 60
Rep Power: 17 |
Hi fabrizio,
I am working on a similar project, I have been trying to build a windtunnel for a car model, with a moving "road" patch underneath the model. What sort of wind tunnel are you building? As for your question, I have been trying to do something similar, I guess you should take a look at the sampleDict function(eg present at the User manual's stress plate case). That means that you may have to create extra patches from your geometry. The easiest way I have found so far was to use salome-meca (ready to use at the CAE Linux live CD). It is able to import igs and step files.you then can use the explode feature to separate them surfaces or cut them yourself, assemble them in a group and then export them as a separate .stl, which you can then associate as a patch which you may extract the pressure from (Also add different boundary conditions to). There may be an easier way but so far this is the way I have found. good luck leo |
|
December 12, 2008, 11:13 |
Hi Leo,
I found all I need
|
#18 |
Member
fabrizio
Join Date: Mar 2009
Posts: 33
Rep Power: 17 |
Hi Leo,
I found all I need after converting all the simulation in Paraview; the converter create a .vtk file for each patch including points, cells and pressure. Infact Snappy add automatically a patch related to the stl geometry. I'm studying the deformation due to the interaction of fluid-structure for an object invested by a flux. Thank you Fabrizio |
|
November 12, 2009, 02:32 |
vwtTest1,vwtTest2 and vwtTest4 in OpenFOAM 1.6
|
#19 |
New Member
yoshihisa aoyagi
Join Date: Oct 2009
Posts: 4
Rep Power: 17 |
Dear Sir,
I 'Ve tried to run vwtTest1,vwtTest2,vwtTest4 in OpenFOAM 1.6. But I got the errors to run both programs. If anyone know the final version of these program, I'm very appriciated. Regards, yoshi |
|
November 12, 2009, 04:13 |
|
#20 | |
Member
Nugroho Adi
Join Date: Mar 2009
Location: norway
Posts: 79
Rep Power: 17 |
Quote:
Hi Yoshi as it mentioned by Terry he run the cases by OpenFOAM-1.4.1. Cheers Nugie |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 08:38 |
[snappyHexMesh] No layers in a small gap | bobburnquist | OpenFOAM Meshing & Mesh Conversion | 6 | August 26, 2015 10:38 |
[ICEM] Generating Mesh for STL Car in Windtunnel Simulation | tommymoose | ANSYS Meshing & Geometry | 48 | April 15, 2013 05:24 |
[Gmsh] 2D Mesh Generation Tutorial for GMSH | aeroslacker | OpenFOAM Meshing & Mesh Conversion | 12 | January 19, 2012 04:52 |
Convergence moving mesh | lr103476 | OpenFOAM Running, Solving & CFD | 30 | November 19, 2007 15:09 |