CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Preparing sail testing wind tunnel using OpenOFAM (

btgyd November 7, 2010 09:19

Preparing sail testing wind tunnel using OpenOFAM
Do you have any ideas how to edit the tutorial ,,motorBike" case in order to investigate various geometries (which calls for diffirent .stl files), in particular to research on yacht sails.

So generally speaking what I want to do is just simply swap the .stl file of motorBike from the tutorial with a .stl file describing the sails geometry I want to investigate.

I tried several times to make this, but I fail to properly edit the SnappyHexMeshdict file from motorBike case to my ,,sail" case. Consequently my questions are as follow:

Could you provide a step- by step procedure of editing the case in order to swap the motorbike stl with sails stl file and how to edit the SnappyHexMeshDict to create the mesh based on that sails stl files? ( motorBike had multiple layers written in the snappyHexMeshdict, in sake of simplicity I want the hole model to be recognized as a single player, if possible).

Answering my issue will be essential for me since my CFD research will mainly use the swaping of the files in motorBike case, because this case has an already predefined wind tunnel.

Best Regards,


colinB November 8, 2010 11:59

Dear Kuba,

unfortunately it is not that easy to serve your request since you have many parameters in sHMD (what you surely recognized) and you have to specify what you actually want/are capable to do.

To give you some hints for the beginning:

replace the motorBike.stl file with your stl file in the trisurface folder.

replace the names of the motorbike.stl file within the sHMD with your names of the stl file.

delete all layers and leave just one as an example and give it the name of your patch (usually stl file name wo the stl ending plus '_patch0' wo the inverted commas.

check where you have to put the patch name and where you have to put the name of the stl file (that was one of my problems understanding sHMD)

you can as a beginning also delete the refinement box and later when you understand the other parameters bring it back into the game.

some keywords you should carefully study in the UserDoc:


these are the most important ones. It took me some time till I got through all this and I had to read the manual more than 3 times to start understanding something. So I highly recommend you to do so, too, though I guess you have done that already.

I know that I couldn't answer your request sufficently but I hope I could bring you a little further to where you want to go.
If you have further specific questions do not hesitate to ask,
but with a general question like you asked in the beginning it is unlikely that you will get an answer.

best regards and good luck


elvis November 8, 2010 14:26

maybe a little bit offtopic, but sails & OF FSI in sail design by Rosario Russo of ESTECO s.r.l. Sail optimization through evolutionary algorithms by Vicente Diaz Casas of Universidade da CoruñaAbstract Slides


btgyd November 8, 2010 14:45

Colin, I'm very grateful for your answer. It really helped me a lot.

I have a question concerning the practical application and practical meaning of "locationInMesh" parameter. In the manual there's an example value proposed to be (5 0 0). Of course this represents the coordinates of a point in cartesian XYZ coordinate system. However, when I tried to understand where should I place this point in my particular case, I started from figureing out why in the manual this specific value was presented and how does it match with the manual example of meshing the outer region of car 2D case. According to fig. 5.10 , the point is located somewhere at the bottom of 2D grid (according to the coordinates provided).
How should I interpret then this parameter and how should I locate this point in my final case (so 2 objects, fore sail and mainsail)? What is the general rule here?

and yes, I do spend many time trying to understand the snappyHexMeshDict and ,,swapig .stl file" issue, along with the manual, but I know that rather no one will do this instead of me :) and I'll have hard time to make through it to succeed.

I though of some sketchy and smart(?) concept with playing with the .stl file. So, while everything in the sHMD is prenamed corresponding to ,,motorBike.stl" why not to instead of uploading a new file (so with diffirent name, and ,,stupid" snappyHexMesh crashes to make a mesh ;p ), overwrite the existing motorBike.stl with a file of same name but diffirent geometry? This may, as I think, some problems with changing names in sHMD, but I guess that some problems with the layers will remain, since motorBike has lots of them, probably somehow assigned to certain geomtry parts...
Could you comment my idea?

The optimistic part is that i realise that probably many users before me had to go through the same issue and also were very confused trying to figure out how to make the program work properly, as the user intends it to work like :D

Best Regards, and once again many thanks for feedback,


colinB November 9, 2010 04:38

Hi Kuba,

locationInMesh is a very simple thing. Usually the mesh is diveded into two parts one you want to keep and one you want to get rid of. The surface of these two regions is usually represented by the stl file.
The locationInMesh parameter now defines the part of the mesh which you want to keep and therefore has to be in the part of the mesh you want to have. If you have a pipe geometry it usually would be in the pipe, in the motorbike tutorial it is the part around the biker.
Despite that it must not coincidence with a face of the geometry.

A comment on your idea. I hope that I got it right that you suggested to replace the motorBike tutorial by some more general case one can use to get into sHM(?). Well it probably would make things easier, but then you don't have to go really deep into things and the learning out come would be less.
The Layers however are just assigned to some geometry of the motorCycle case. I usually have just one layer and so the layer management becomes much easier.
Anyway this is an issue of the developers and so I don't really care about that. In my opinion it is good like it is,
I hope I got your intention right. If not please correct me.

best regards


All times are GMT -4. The time now is 20:01.