CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (http://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Problem in setting the values of k and omega (http://www.cfd-online.com/Forums/openfoam-pre-processing/120538-problem-setting-values-k-omega.html)

Naruto July 9, 2013 06:19

Problem in setting the values of k and omega
 
Dear Foamers,
Hello. Currently I am using pimpleDyMFoam solver of OpenFOAM to simulate a 3-D 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 k-omega settings. The value of omega is very unstable. I have used this http://www.cfd-online.com/Wiki/SST_k-omega_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.

Artur July 10, 2013 07:02

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.cfd-online.com/Wiki/Turbu...ary_conditions

http://www.cfd-online.com/Wiki/Turbulence_intensity

http://www.cfd-online.com/Wiki/Turbulent_length_scale

Naruto July 10, 2013 10:59

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 k-omega 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 k-omega? 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 k-omega? 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 6-8.

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 (3-5)% k=(3/2)*(UI)*(UI) U=5m/s

boundaryField
{
blade-1
{
type kqRWallFunction;
value uniform 0.103; // Different for blades
}
Rotor-AMI
{
type cyclicAMI;
value $internalField;
}
Rotor
{
type cyclicAMI;
value $internalField;
}
blade-3
{
type kqRWallFunction;
value uniform 0.103;
}
blade-2
{
type kqRWallFunction;
value uniform 0.103;
}
topAndBottom
{
type slip;
}
Stator-AMI
{
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
{
blade-1
{
type omegaWallFunction;
value uniform 0.214;
}
Rotor-AMI
{
type cyclicAMI;
value $internalField;
}
Rotor
{
type cyclicAMI;
value $internalField;
}
blade-3
{
type omegaWallFunction;
value uniform 0.214;
}
blade-2
{
type omegaWallFunction;
value uniform 0.214;
}
topAndBottom
{
type slip;
}
Stator-AMI
{
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

Artur July 10, 2013 11:20

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
    {
        type            cyclicAMI;
        value          uniform 0;
    }

it should behave properly. (I set one of my simulations this way and it messed up the wake of my propeller)

Naruto July 10, 2013 12:08

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. :)

Artur July 11, 2013 03:09

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.

Naruto July 11, 2013 12:18

Thank you very much. Currently my simulation is working fine. But the problem is time step got very small i.e. 6e-06. 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 z-axis. 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?

Artur July 12, 2013 03:09

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.

Naruto July 12, 2013 08:33

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.

Artur July 12, 2013 08:38

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 re-read it and update the control parameter values.


All times are GMT -4. The time now is 00:41.