CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Meshing & Mesh Conversion

Mesh generation for Wind Tunnel

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 2, 2008, 16:15
Default Hi, I am trying to use Open
  #1
Member
 
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 8
terrybarnaby is on a distinguished road
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
terrybarnaby is offline   Reply With Quote

Old   May 3, 2008, 12:20
Default That's a good question. You n
  #2
Senior Member
 
Francesco Del Citto
Join Date: Mar 2009
Location: Zürich Area, Switzerland
Posts: 215
Rep Power: 9
fra76 is on a distinguished road
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
fra76 is offline   Reply With Quote

Old   May 3, 2008, 14:53
Default I need to do this on the cheap
  #3
Member
 
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 8
terrybarnaby is on a distinguished road
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
terrybarnaby is offline   Reply With Quote

Old   May 6, 2008, 16:19
Default 1. Yes. Or just set system/con
  #4
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
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.
mattijs is offline   Reply With Quote

Old   May 7, 2008, 04:36
Default Thanks for the info. I have m
  #5
Member
 
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 8
terrybarnaby is on a distinguished road
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
terrybarnaby is offline   Reply With Quote

Old   May 7, 2008, 04:57
Default Hi Terry Thanks for provid
  #6
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 9
jaswi is on a distinguished road
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
jaswi is offline   Reply With Quote

Old   May 7, 2008, 05:08
Default Hi Jaswi, Don't thank me ye
  #7
Member
 
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 8
terrybarnaby is on a distinguished road
Hi Jaswi,

Don't thank me yet. I am a complete novice and what I have done could be completely wrong ...

Cheers

Terry
terrybarnaby is offline   Reply With Quote

Old   May 7, 2008, 06:05
Default Hi Jaswi, I have placed my
  #8
Member
 
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 8
terrybarnaby is on a distinguished road
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
terrybarnaby is offline   Reply With Quote

Old   May 9, 2008, 18:13
Default Terry/ Foamers, You might b
  #9
Senior Member
 
Mark Couwenberg
Join Date: Mar 2009
Location: Netherlands
Posts: 130
Rep Power: 8
markc is on a distinguished road
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
markc is offline   Reply With Quote

Old   May 10, 2008, 03:11
Default Yes, I believe I have succeede
  #10
Member
 
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 8
terrybarnaby is on a distinguished road
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) ! ...
terrybarnaby is offline   Reply With Quote

Old   May 10, 2008, 12:44
Default Hi Terry, Thanks for the repl
  #11
Senior Member
 
Mark Couwenberg
Join Date: Mar 2009
Location: Netherlands
Posts: 130
Rep Power: 8
markc is on a distinguished road
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
markc is offline   Reply With Quote

Old   May 10, 2008, 15:15
Default Update: I tried the autoRefine
  #12
Senior Member
 
Mark Couwenberg
Join Date: Mar 2009
Location: Netherlands
Posts: 130
Rep Power: 8
markc is on a distinguished road
Update: I tried the autoRefineMesh patch but without result. I got the same errors with respect to octreeData.
Any ideas?
Brgds,

Mark
markc is offline   Reply With Quote

Old   May 12, 2008, 05:37
Default Hi, I notice that in my vwt
  #13
Member
 
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 8
terrybarnaby is on a distinguished road
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 ...
terrybarnaby is offline   Reply With Quote

Old   May 12, 2008, 16:52
Default Although I have got a mesh gen
  #14
Member
 
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 8
terrybarnaby is on a distinguished road
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
terrybarnaby is offline   Reply With Quote

Old   May 13, 2008, 06:13
Default I have managed to get my mesh
  #15
Member
 
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 8
terrybarnaby is on a distinguished road
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
terrybarnaby is offline   Reply With Quote

Old   December 11, 2008, 04:38
Default Hi dear foamers I'm also wo
  #16
Member
 
fabrizio
Join Date: Mar 2009
Posts: 33
Rep Power: 8
fabrizio is on a distinguished road
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
fabrizio is offline   Reply With Quote

Old   December 11, 2008, 11:34
Default Hi fabrizio, I am working
  #17
Member
 
Leonardo Honfi Camilo
Join Date: Mar 2009
Location: Delft, Zuid Holland, The Netherlands
Posts: 48
Rep Power: 8
lhcamilo is on a distinguished road
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
lhcamilo is offline   Reply With Quote

Old   December 12, 2008, 11:13
Default Hi Leo, I found all I need
  #18
Member
 
fabrizio
Join Date: Mar 2009
Posts: 33
Rep Power: 8
fabrizio is on a distinguished road
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
fabrizio is offline   Reply With Quote

Old   November 12, 2009, 02:32
Default vwtTest1,vwtTest2 and vwtTest4 in OpenFOAM 1.6
  #19
New Member
 
yoshihisa aoyagi
Join Date: Oct 2009
Posts: 4
Rep Power: 7
a_yoshi is on a distinguished road
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
a_yoshi is offline   Reply With Quote

Old   November 12, 2009, 04:13
Default
  #20
Member
 
Nugroho Adi
Join Date: Mar 2009
Location: norway
Posts: 79
Rep Power: 8
mahaputra is on a distinguished road
Quote:
Originally Posted by a_yoshi View Post
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
おはようございます


Hi Yoshi


as it mentioned by Terry

he run the cases by OpenFOAM-1.4.1.



Cheers

Nugie
mahaputra is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cp drops along the wind tunnel Francis FLUENT 0 August 1, 2008 13:31
BC for a wind tunnel spepsicho FLUENT 3 March 8, 2006 07:23
wind tunnel with spires Neelima FLUENT 0 January 24, 2006 21:37
cfd gives Cd more than wind tunnel wilson CFX 5 July 4, 2005 19:16
CFD in wind tunnel Anders Hagberg Main CFD Forum 9 June 1, 2004 17:42


All times are GMT -4. The time now is 19:18.