CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Rotating Mesh (http://www.cfd-online.com/Forums/openfoam-solving/65630-rotating-mesh.html)

hansel June 22, 2009 00:16

Rotating Mesh
 
Hello this is my first post to this forum. I have been experimenting with OpenFOAM 1.5 for about a month now, and am attempting to simulate a wind turbine using a rotating mesh. I believe the tool I need to consider using is either icoDyMFoam or MRFSimpleFoam. (at least as far as I can figure out those two can at least handle the dynamic mesh.) I can't seem to find much information on either program. I appreciate how this group hates stupid quiestions so I've been through the user manaual several times and searched for info on the web and in these forums.

Can anyone point me to a place where I can get more information on these tools? For instance I have no idea what the options are for the dynamicMeshDict. An example that works in OF1.5 would really be great.

Also MRFSimpleFoam doesn't even appear to be compliled in my release. Is that normal or a problem with my installation?

Thanks
Steve

jaswi June 22, 2009 19:36

Hi Steve

Welcome to OpenFOAM :)

Let me try to answer some questions:

Quote:

I believe the tool I need to consider using is either icoDyMFoam or MRFSimpleFoam. (at least as far as I can figure out those two can at least handle the dynamic mesh.) I can't seem to find much information on either program.
icoDymFOAM - does moves the mesh
MRFSimpleFOAM - no explicit mesh movement, uses moving reference frame approach to account for the effect of rotation by adding a source term to the momentum equation. Please look for threads by deepBlue and posts on openfoamwiki, he has documented it very well.


Quote:

Can anyone point me to a place where I can get more information on these tools? For instance I have no idea what the options are for the dynamicMeshDict. An example that works in OF1.5 would really be great.
AFAIK if you search for the keyword MRFSimpleFOAM nearly 60 posts show up. It is a bit difficult to go through all of them but believe me it is worth the time. You will find your answers that I am sure off :)

Quote:

Also MRFSimpleFoam doesn't even appear to be compliled in my release. Is that normal or a problem with my installation?
No my dear friend. It is not a problem with your installation. This solver lives in the tutorial under the folder with the same name as the solver itself. There you will also find a tutorial which will clarify all your doubts. Please do not forget to compile the solver by typing wmake at the command prompt. Once done run the Allrun script inside the mixer2d tutorial folder and you wll be very please to see how all works . The constant folder has the dynamicMeshDict you have asked for.

Once again welcome to OpenFOAM and I wish you an healthy and productive Foaming.

Best Regards
Jaswi

hansel June 22, 2009 23:46

Thanks jaswi. That was the start I needed. I compiled MRFSimpleFoam and ran the demo. I have much learning to do, but thanks to you, I have some ideas of where you look.

Steve

paulo June 24, 2009 08:39

Hi Steve,

We are also working with wind turbines, and have some comments:

- icoDymfoam (sorry for the mistyping), AFAIK, was written for laminar flows (like icoFoam). I don't think this is your case;
- We've been using the rotationBC utility, for steady state simulations (simpleFoam). It compiles well in both 1.4.1 and 1.5.

Hope that helps,

Best Regards,

Paulo Rocha

hansel June 24, 2009 11:25

My wind turbines are VAWTs, and there is so much that is time dependent I'm not sure a steady state solver will be useful. The blade's (wing's) AOA changes with position, one wing diverts the stream toward / away from another wing, etc.

I was hoping icoDyMFoam might do the job. I see there is also a turbDyMFoam that might be better. (Although I don't see any tutorials for it.)

I'm no fluid dynamics expert. Maybe steady state is good enough. I guess it depends if the propagation time for air movement from the front of the VAWT to the back of the VAWT is significant compared to the speed of the blades or not.

I'll check out rotationBC just to keep my options open.

paulo June 24, 2009 16:24

Hi Steve,

Yes, you are right about VAWTs, I mean that you will have to use transient simulation.

We still didn't try here, but maybe GGI is also a good option for your problem.

Best Regards,

Paulo Rocha

yuhai June 24, 2009 16:56

Hi~
I am doing a savonius turbine on turbDyMFoam solver.
I think you turbine should also be run in a turbulent environment, so it is turbdymfoam, not icodymfoam.
and i think MRF is not suitable for a side-blow turbine.

Two dynamic mesh models are possible: Sliding Interface & GGI.
The latter could be run parallelly.

icodymfoam has tutorials for both these two models, they can be modified slightly to fit turbdymfoam.

I don't know what pre-processing software you are using, for me, the mesh conversion process had be a little hard. If it is Gambit or Gmsh, I am now successful.

I am currently using the realizableKE RANS model, it now shows the best fit for Fluent result, but still about 7% difference on Torque.
I hope when you finish, we can discuss a little about the result between turbulent models.
you can also write to me, if you like (*o*) , mryuhai@gmail.com

Regards.
Hai

hansel June 24, 2009 18:26

Quote:

Originally Posted by yuhai (Post 220387)
Hi~


I don't know what pre-processing software you are using, for me, the mesh conversion process had be a little hard. If it is Gambit or Gmsh, I am now successful.



Regards.
Hai

This is how I'm making my mesh:

1) Created the model in solid works and exported the STL file.

2) Created the base mesh (cylinder and surrounding block with hole for cylinder) using blockMesh.

3) Cut the model out out of the cylinder with snappyHexMesh. (very cool program!). Unfortunately snappyHexMesh eliminates the surrounding block.

4) Made another base mesh of only the block with hole with blockMesh.

5) Added it into the cylinder mesh using MergeMesh (which had to be patched to make it work in OF1.5).

You might ask why I bothered to put the block in step 2 if it was just going to be removed. The answer is that the boundary names all get entered at that step. If you don't put it in, when you merge the block back in, then it complains that it had to add boundaries and it refuses to do it.

So now I have my model in a cylinder with a surrounding block ready (i think) for turning and sliding meshes. (I think). I still need to figure that part out.

I did this mostly with trial and error. There is probably a much simpler way to do it, but I haven't found it yet.

Steve

waynezw0618 June 25, 2009 01:34

Hi.YuHai
do you mean if i want make a unsteady calculation for turbine what i need is
1 turbDyMFoam (make some modification like MRFSimpleFoam to add centrifugal force and Coriolis force and so on)
2 ggi interface

but what is the difference between ggi and slidinginterface?

thanks..

BTW..would you mind add to our online group..openfoam@hotmail.com.

wayne
Quote:

Originally Posted by yuhai (Post 220387)
Hi~
I am doing a savonius turbine on turbDyMFoam solver.
I think you turbine should also be run in a turbulent environment, so it is turbdymfoam, not icodymfoam.
and i think MRF is not suitable for a side-blow turbine.

Two dynamic mesh models are possible: Sliding Interface & GGI.
The latter could be run parallelly.

icodymfoam has tutorials for both these two models, they can be modified slightly to fit turbdymfoam.

I don't know what pre-processing software you are using, for me, the mesh conversion process had be a little hard. If it is Gambit or Gmsh, I am now successful.

I am currently using the realizableKE RANS model, it now shows the best fit for Fluent result, but still about 7% difference on Torque.
I hope when you finish, we can discuss a little about the result between turbulent models.
you can also write to me, if you like (*o*) , mryuhai@gmail.com

Regards.
Hai


yuhai June 25, 2009 05:53

hi~, I am not familar with solid works, but I am sure Gambit can do it, and doesn't need MergeMesh.
Only you have to pay attention to the treatment of the interface.
there is a utility for it, and you can find the script for it in the forum.
btw,you mesh is in 3D?

Quote:

Originally Posted by hansel (Post 220390)
This is how I'm making my mesh:

1) Created the model in solid works and exported the STL file.

2) Created the base mesh (cylinder and surrounding block with hole for cylinder) using blockMesh.

3) Cut the model out out of the cylinder with snappyHexMesh. (very cool program!). Unfortunately snappyHexMesh eliminates the surrounding block.

4) Made another base mesh of only the block with hole with blockMesh.

5) Added it into the cylinder mesh using MergeMesh (which had to be patched to make it work in OF1.5).

You might ask why I bothered to put the block in step 2 if it was just going to be removed. The answer is that the boundary names all get entered at that step. If you don't put it in, when you merge the block back in, then it complains that it had to add boundaries and it refuses to do it.

So now I have my model in a cylinder with a surrounding block ready (i think) for turning and sliding meshes. (I think). I still need to figure that part out.

I did this mostly with trial and error. There is probably a much simpler way to do it, but I haven't found it yet.

Steve


yuhai June 25, 2009 05:58

sorry, I am not quite well understanded you first question?

for the second, GGI uses a aglorism on the interface, and SI remeshes the interface, the result on my experience is the same. the only differece is that SI doesn't support parallel running.
not in parallel, the speed is also quite alike.
My geometry is in 2D, and GGI gives the fastest speed on 8-way parallel;
And for SI, you can use GAMG linear solver to speed up to like GGI 2-way parallel. And GAMG performs not well on parallel on GGI.
I am not sure about all the remarks, it is only my experience.


Quote:

Originally Posted by waynezw0618 (Post 220411)
Hi.YuHai
do you mean if i want make a unsteady calculation for turbine what i need is
1 turbDyMFoam (make some modification like MRFSimpleFoam to add centrifugal force and Coriolis force and so on)
2 ggi interface

but what is the difference between ggi and slidinginterface?

thanks..

BTW..would you mind add to our online group..openfoam@hotmail.com.

wayne


hansel June 25, 2009 18:11

Quote:

Originally Posted by yuhai (Post 220439)
hi~, I am not familar with solid works, but I am sure Gambit can do it, and doesn't need MergeMesh.
Only you have to pay attention to the treatment of the interface.
there is a utility for it, and you can find the script for it in the forum.
btw,you mesh is in 3D?

Solid Works is a mechanical design program used by a lot of Mechanical Engineers. It's handy to start with SW because the same designs that were used for the model can be used to make real parts.

My mesh is 3d.

I'll have to check out Gambt sometime.

Steve

waynezw0618 June 25, 2009 22:30

Hi
for the first question.i mean the MRFSimpleFOAM in OF is a steady solver. I am not quiet sure what i will do if i want to do a unsteady simulation. i guess first thing is to add "ddt" term and then rotating mesh with time steps..but is that ok or need more??

BTW. when you adding to us it is time to have dinner.so. :) ..i am sorry.
thanks

wayne


Quote:

Originally Posted by yuhai (Post 220440)
sorry, I am not quite well understanded you first question?

for the second, GGI uses a aglorism on the interface, and SI remeshes the interface, the result on my experience is the same. the only differece is that SI doesn't support parallel running.
not in parallel, the speed is also quite alike.
My geometry is in 2D, and GGI gives the fastest speed on 8-way parallel;
And for SI, you can use GAMG linear solver to speed up to like GGI 2-way parallel. And GAMG performs not well on parallel on GGI.
I am not sure about all the remarks, it is only my experience.


wolle1982 June 26, 2009 09:03

Hi,

if you only want to get the thing rotation without any unsteady irregulary effect, you also can use SRFSimpleFOAM. this is the rotation version of SimpleFOAM that makes the illusion of rotation. in MRF you have 2 zones. But if you only want to get like wing aerodynamics in a rotation system of a mono-wing, SRFSimpleFOAM is perfect. and it runs faster.

greets

yuhai June 26, 2009 14:06

Well, I think not only the ddt item.
Suppose you get a turbine which rotates around the z-axis.
if the wind is from exactly z-axis, it would be OK, without ddt for steady, and with ddt for unsteady.
if the wind is from x direction, I guess the the interface treatment method of MRF will counter trouble, both steady and unsteady.

am I right? ................I am not sure.



Quote:

Originally Posted by waynezw0618 (Post 220539)
Hi
for the first question.i mean the MRFSimpleFOAM in OF is a steady solver. I am not quiet sure what i will do if i want to do a unsteady simulation. i guess first thing is to add "ddt" term and then rotating mesh with time steps..but is that ok or need more??

BTW. when you adding to us it is time to have dinner.so. :) ..i am sorry.
thanks

wayne


yuhai June 26, 2009 14:19

1 Attachment(s)
Does MRF with GGI have a "jumping mapping" ability?

hansel June 26, 2009 18:24

Quote:

Originally Posted by yuhai (Post 220646)
Does MRF with GGI have a "jumping mapping" ability?

Even though my outside section is made of 4 chunks like your drawing, that inner surface is defined as a single patch. I hope that's good enough.

waynezw0618 June 28, 2009 22:33

rotating
 
Hi wolle and Yuhai
thanks for your reply! for "unsteay" i don`t mean irregular effect of turbulence.i mean the relative position change of rotor and stator.it need the dynamic mesh dictionary i guess .
you may find something in tutorial of MRFSimpleFOAM

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMeshLib "libtopoChangerFvMesh.so";
dynamicFvMesh mixerFvMesh;

mixerFvMeshCoeffs
{
coordinateSystem
{
type cylindrical;
origin (0 0 0);
axis (0 0 1);
direction (1 0 0);
}

rpm 10;

slider
{
inside insideSlider;
outside outsideSlider;
}
}

// ************************************************** *********************** //

but it is useless now. i think it need support in MRFSimpleFoam code.

that is i wish some want to tell me how to.

thanks

waynezw0618 June 29, 2009 04:41

BTW
i add MRF to turbFoam like what MRFSimpleFoam do ,i want to do the unsteady calculation of pump.but i face the error messages like:
Time = 0

Courant Number mean: 0.0502405 max: 0.5
deltaT = 0.000246692
//after add coriolis
//Ueqn relax
smoothSolver: Solving for Ux, Initial residual = 8.88095e-06, Final residual = 6.33714e-08, No Iterations 2
smoothSolver: Solving for Uy, Initial residual = 9.06538e-06, Final residual = 6.39123e-08, No Iterations 2
solve


temporary deallocated

From function T& tmp<T>::operator()()
in file /root/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/tmpI.H at line 164.

FOAM aborting

is there anyone can help me

wayne

enry March 13, 2010 04:46

Hi yuhai, I'm trying to simulate a flow around a VAWT in order to comprare OF results with FLUENT results, but OF Torque in three times less than FLUENT one. Could you help me? I set realizablekE model, Ggi and to obtain force on the blades I add this function in controlDict:

forces
{
type forces;
functionObjectLibs ("libforces.so"); //Lib to load
patches (blades); // change to your patch name
rhoName rhoInf;
rhoInf 1.225; //Reference density for fluid
CofR (0 0 0); //Origin for moment calculations
outputControl timeStep;
outputInterval 1;
}
forceCoeffs
{
// rhoInf - reference density
// CofR - Centre of rotation
// dragDir - Direction of drag coefficient
// liftDir - Direction of lift coefficient
// pitchAxis - Pitching moment axis
// magUinf - free stream velocity magnitude
// lRef - reference length
// Aref - reference area
type forceCoeffs;
functionObjectLibs ("libforces.so");
patches (blades);
rhoName rhoInf;
rhoInf 1.225;
CofR (0 0 0);
liftDir (0 1 0);
dragDir (1 0 0);
pitchAxis (0 0 1);
magUInf 6;
lRef 1;
Aref 1;

outputControl timeStep;
outputInterval 1;
}


ggiCheck
{
// Type of functionObject
type ggiCheck;

phi phi;

// Where to load it from (if not already in solver)
functionObjectLibs ("libsampling.so");
}
);


I use turbDyMFoam solver, and all the fvScheme and fvSolution I used is the same used in turbFoam tutorial. I think that I set up well the interface because postprocessing the solution I can see the blade rotate, and the flow go through interface.
Thanks in advance!


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