turbine rotation

Hello guys,
I’m new to the forum. I am currently trying to simulate 2d flow over a savonius turbine, and I am interested in using LBM.
I would like to know if anyone did that with Palabos or can guide me to the making of the simulation.
I currently made the geometry with gmsh, which consist of a duct and a turbine.
I will need to set inlet, outlet and wall BCs as common fluid flow problems + I should impose angular velocity to the turbine.
Thanks in advance for any help!

I’ve done this for 3D systems. Not sure if you are still interested in working on this problem since it’s been a few months since the original post.

My code began with the moving wall sample file provided in the examples directory. This code is very illustrative, I’d recommend a careful study. I replaced the rectangular mesh generated in this example file with a structure I created using Solidworks. Note that the STL import algorithm in Palabos is very specific, so I had to make the STL mesh in rhino before importing into palabos. Rhino allowed me to control the mesh resolution, which is important for the immersed boundary method. You can learn how to import STL files from the external flow around obstacle code, among other places. It also has good practices for supplying inlet/outlet conditions.

A couple of things to note: the STL mesh size should be comparable to your lattice resolution. Also, make sure that the maximum tangential velocity of your object remains well below the speed of sound (like 5% or lower).

Thank you very much for your recommendations, I’ll follow your instructions and let you know.
Do you have also any other recommendations for STL import?
and did you find any guidelines for matching STL with lattice size?

Do you have also any other recommendations for STL import?

Just make sure it’s manifold. Rhino should take care of this, but it can cause Palabos to fail.

and did you find any guidelines for matching STL with lattice size?

I just knew what my LBM model resolution was going to be—and just make sure the stl mesh was sufficient. Rhino is really useful for this:

http://www.rhino3d.com/

and they have a free 90 day trial. You can also use meshlab, which is free.

Let me know how it goes…

surely I will, it will take me a while but I’ll keep you updated!

I went through the movingWall example and got the main points.
unfortunately after make and launching the application I got a bad:alloc problem immediately at start-up similar to this one
http://www.palabos.org/forum/read.php?4,4924
did you have the same issue? it seems to be an stl problem, but I can’t understand how to solve it, any tips?

I had problems like that when my mesh was non-mainfold. I started with something really simple—a sphere. I just made it in Solidworks, then converted to an STL mesh in Rhino. See if something really simple works first. It’s easy to test if the STL is manifold in Meshlab—just tell it to show you the non-manifold edges. If there is none, it will tell you none was found.

Thank you for the advise, I was able to import a static turbine in ExternalFlowAroundObstacle.
It gives problems though when I try to increase the grid resolution, maybe because I have to refine more the stl again (the mesh seems very refined to me!) ?

I cannot even start the default movingWall example because of the bad alloc problem, should I make some changes to the code?

By the way if you or anyone else wants to help me making the code and make it available for newest Palabos releases you are more than welcome!

I went through the movingWall and the ExternalFlowAroundObject example.
The first uses the IBm approach, the second a voxelized domain approach - it seems to me that they are two different ways of solving the same problem right?

Also, in the movingWall example, in runProgram it states():

// The initial geometry of the immersed surface can be created analyticaly or, alternatively,
// it can be loaded by reading a user provided STL file. 

I am struggling to understand how to get vertex and area from an imported STL, can anyone provide an example?
Thanks in advance!

Hello!

First you need to load your STL geometry into a TriangleSet data structure:

TriangleSet myGeometry(“myFile.stl”, DBL);

Then you need to transform your geometry to lattice units. You can see an example of this at lines 301-318 of the externalFlowAroundObstacle.cpp example. Then, you use the DEFscaledMesh data structure to get the information you ask for, as this happens in the movingWall.cpp example at lines 437-444. The methods you need from the DEFscaledMesh class are: “getMesh().getNumVertices()”, “getMesh().getVertex(iVertex)”, “getMesh().computeVertexArea(iVertex)”.

Hope this helps…
Dimitris

Hi Dimitris,
thank you for your help, that’s what I was looking for.
I now removed voxelization from ExternalForceAroundObject and implemented IBM from movingWall.
I realized that in ExternalForceAroundObject force is calculated over boundaryCondition.
Is there a workaround to make it calculate over areas? any tips?

Dear all,
making big progresses - I was able to compile a new version of movingWall with rotating geometry - when I will be able to stabilize it I could also release an example if you want!