Problem in setting the values of k and omega
Dear Foamers,
Hello. Currently I am using pimpleDyMFoam solver of OpenFOAM to simulate a 3D wind turbine. The inlet wind velocity is 2.3 m/s and the rotational speed is around 120 deg/sec. The chord length of the blade is 0.2m and the span length is 2m. I am having problems in setting up the value of k and omega. By careful investigation of the messages appearing in terminal I found out that there is something wrong with my komega settings. The value of omega is very unstable. I have used this http://www.cfdonline.com/Wiki/SST_komega_model thread for calculating turbulence model. I assumed a turbulence intensity of 4% and turbulent length scale of 0.07 times of chord length. Are my assumptions correct? I would really appreciate any kind of help. I studied the book of J.H. Ferziger and other basic fluid mechanics related books. Even if anyone could direct me to the right literature, this would be good enough for me. 
Can you be a bit more clear as to what you mean by "omega value is very unstable"? Have you tried the guidelines in these links:
http://www.cfdonline.com/Wiki/Turbu...ary_conditions http://www.cfdonline.com/Wiki/Turbulence_intensity http://www.cfdonline.com/Wiki/Turbulent_length_scale 
Thanks for your kind reply. Yes I followed the instructions carefully earlier. I set up the values of my k and omega on the basis of these links. But the provided literature described the pattern of komega model for very simple geometry. More importantly the pattern of the flow is not that complex. But in case of rotating turbine things get a little bit complicated. There will be two types of flow. One is simple inflow of incoming fluid. Another one is the large relative velocity of fluid around blades.
My question is do I need to setup two separate sets of values for komega? I mean: one for the incoming flow and another one is for the rotating blades. If so, then my question is how do I calculate the values of komega? That is what(setting two sets of values) I did today and the simulation got stable. Although I am always having high Courant number like 68. My current simulation condition: inflow velocity= 5m/s rotation speed= 240rpm The settings of k and omega are shown below: internalField uniform 0.011094; // turbulent intensity (35)% k=(3/2)*(UI)*(UI) U=5m/s boundaryField { blade1 { type kqRWallFunction; value uniform 0.103; // Different for blades } RotorAMI { type cyclicAMI; value $internalField; } Rotor { type cyclicAMI; value $internalField; } blade3 { type kqRWallFunction; value uniform 0.103; } blade2 { type kqRWallFunction; value uniform 0.103; } topAndBottom { type slip; } StatorAMI { type cyclicAMI; value $internalField; } Stator { type cyclicAMI; value $internalField; } inlet { type fixedValue; value $internalField; } sides { type slip; } outlet { type inletOutlet; inletValue $internalField; value $internalField; } } and for omega internalField uniform 0.0702; // omega =root (k)/ l l=turbulent length boundaryField { blade1 { type omegaWallFunction; value uniform 0.214; } RotorAMI { type cyclicAMI; value $internalField; } Rotor { type cyclicAMI; value $internalField; } blade3 { type omegaWallFunction; value uniform 0.214; } blade2 { type omegaWallFunction; value uniform 0.214; } topAndBottom { type slip; } StatorAMI { type cyclicAMI; value $internalField; } Stator { type cyclicAMI; value $internalField; } inlet { type fixedValue; value $internalField; } sides { type slip; } outlet { type inletOutlet; inletValue $internalField; value $internalField; } } Are these settings correct? Thank you 
As far as I understand it, the k, omega and epsilon values specified on the body are just a starting point for the iteration and hence usually are set to the free stream value which is then changed by the solver. If you look at the propeller tutorial that's what it shows. I am currently running simulations of marine propellers using pimpleDyMFoam and following the same guidelines I am getting accurate results. The way I do it: assume characteristic length and turbulence intensity, compute the values using the equations you used and set it for the respective patches.
I've noticed that you specified a value for the AMI patches. I think it will break your case because you will have a fixed value there always. If you set it to 0, like this: Code:
AMI1 
Thank you very much. I will try your method. I am afraid if I am asking for too much. Could you please upload your '0' folder?
Again thanks. :) 
1 Attachment(s)
Here it is. I don't guarantee that what is inside is completely correct but so far it seems to be working OK for me.

Thank you very much. Currently my simulation is working fine. But the problem is time step got very small i.e. 6e06. But I guess it is ok.
I want to ask you one more question. I know it is kind of basic and childish. But still I am asking for assurance. Currently my terminal window is showing two sets of forces pressure (x,y,z) and viscous (x,y,z) force. The axis of rotation is zaxis. Now if I want to calculate the power it should be like= (root(pressure(x)*pressure(x)+ viscous(x)*viscous(x)))* radius of the turbine* omega (rad/sec). Is this correct? 
P = omega*Q = 2*pi*rps*(sum of moments around the axis of rotation)
The first ((val,val,val),(val,val,val)) is forces (pressure and viscous) and the second bracket like that is moments around the principle axes (x,y,z) due to pressure and viscous forces, respectively. So if z is your axis of rotation you need to take the 3rd value from the brackets in the 2nd set. So your expression is partially correct but there is no need for taking the mean square of forces. If your time step is very low you may want to try increasing your maxCo (Courant number) in the controlDict. Be warned though, if this gets too high your solution will diverge and probably crash :P I usually go for something like 1.5  2.0 for the first few hundred time steps and then ramp it up slowly to about 3.0  3.5, sometimes more depending on other settings I use. 
Thank you very much. Your guidance is helping me a lot. I have one last question. In my controldict file I found out that maxCo is set to 2. How could I increase it slowly after some time steps?
Thanks again for sparing your precious time. 
if you have the runtime modifiable option set to on in the controlDict file (I think most tutorial cases have that by default) you can simply edit the file while the simulation is running and save it. The solver will detect that file has been modified and reread it and update the control parameter values.

All times are GMT 4. The time now is 11:15. 