CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Flow Past a cylinder- Re-1000-PisoFoam Solver

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 27, 2015, 15:21
Default Flow Past a cylinder- Re-1000-PisoFoam Solver
  #1
New Member
 
vito
Join Date: Jun 2015
Posts: 22
Rep Power: 10
vitocorleone is on a distinguished road
Hello All,

I know this is awell discussed topic with a lot of posts in the forum. I believe I have done due diligence about going through the posts. I am also new to OpenFoam. So please bear with any incompetence if any.
I am trying to simulate the 3D flow past cylinder at re=1000 using scalable and no wall functions but with little success. I am using RANS modelling K-epsilon and SST k-Omega.
My drag values are around 0.84 but I dont capture any vortex shedding and my cl values are very low. I know that for that no wall fucntion my Y+ should be less than 6 and I have checked that using YplusRAS utility in openfoam. FOr scalable wall functions my Y plus is around ~ 12. I am using gmsh to create my mesh. Please find below all the value that I have used for scalable wall function.

k is calculated as 1.5(Velocity*Intensity)^2
Intensity=0.16*RE)^-1/8 ( http://www.cfd-online.com/Wiki/Turbu...ary_conditions)
Epsilon - as calculated in the above refernce and has a valueof 5.17E-07
Omega =1.347 and
Omega near wall 200

I am attaching my geo file as mesh.txt
p at 0 seconds

boundaryField
{
top
{
type zeroGradient;
}
bottom
{
type zeroGradient;

}
inlet
{
type zeroGradient;
}
outlet
{
type fixedValue;
value uniform 0;
}
frontAndBack
{
type zeroGradient;
}
cylinder
{
type zeroGradient;
}
}
U=0
boundaryField
{
top
{
type slip;
}
bottom
{
type slip;

}
inlet
{
type freestream;
freestreamValue uniform (0.025 0 0);
}
outlet
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}
frontAndBack
{
type slip;
}
cylinder
{
type fixedValue;
value uniform (0 0 0);
}
}

k=
boundaryField
{
top
{
type kqRWallFunction;
value uniform 0;

}
bottom
{
type kqRWallFunction;
value uniform 0;

}
inlet
{
type fixedValue;
value uniform 4.286E-06;
}
outlet
{
type zeroGradient;

}
frontAndBack
{
type kqRWallFunction;
value uniform 0;
}

cylinder
{
type kqRWallFunction;
value uniform 0;
}
}

Epsilon
boundaryField
{
top
{
type epsilonWallFunction;
value uniform 5.174E-07;

}
bottom
{
type epsilonWallFunction;
value uniform 5.174E-07;
}
inlet
{
type fixedValue;
value uniform 5.174E-07;
}
outlet
{
type zeroGradient;

}
frontAndBack
{
type epsilonWallFunction;
value uniform 5.174E-07;
}

cylinder
{
type epsilonWallFunction;
value uniform 5.174E-07;
}
}

Will appreciate nay suggestions
Attached Files
File Type: txt mesh.txt (5.3 KB, 11 views)
vitocorleone is offline   Reply With Quote

Old   August 28, 2015, 10:32
Default
  #2
New Member
 
vito
Join Date: Jun 2015
Posts: 22
Rep Power: 10
vitocorleone is on a distinguished road
Any thing wrong with the way I have posted my question??.. Just wondering about the lack of response.. Please let me know if any specific information is required.
vitocorleone is offline   Reply With Quote

Old   September 16, 2015, 18:19
Default
  #3
Member
 
Davi Barreira
Join Date: Apr 2014
Location: Fortaleza
Posts: 76
Rep Power: 11
davibarreira is on a distinguished road
Hey Vito,

Sometimes the questions get lost in the forums and nobody answers them :/ ... Don't know if you are still interested in the solution for your problem since it has been a while, but anyways. I've been doing simulations with flow past cylinder using k-epsilon. What I found out is that it can take a very long time to the vortex-street to form, so perhaps leave your simulation running for quite a bit and check if the instability gradually building up (look for wiggles at the nut variable).
In my case, I simulated flow past a cylinder with Re 3900, with an inlet velocity of 1 m/s and the appropriate kinamtic viscosity (to match the Re), and I only saw the vortices after the 80th second or so.
I havent looked at your mesh, but if this doesnt work let me know.

Regards
vitocorleone likes this.
davibarreira is offline   Reply With Quote

Old   September 16, 2015, 18:27
Default
  #4
New Member
 
vito
Join Date: Jun 2015
Posts: 22
Rep Power: 10
vitocorleone is on a distinguished road
Thanks for getting back davi. Thi sis interesting becasuse I used k omega for re =3900 and simulated the flow up to 120 seconds and saw the formation of vortex street. I have not tried k epsilon, but after you have mentioned that you do indeed see the formation os the street I am curiopus to try it now.

There is another post where I have plotted the variation of cd with time find below

http://www.cfd-online.com/Forums/showthread.php?t=158661&goto=newpost

I am not quite sure if the value of cd has converged as I see some divergence later on. What is your take on the plot ??
vitocorleone is offline   Reply With Quote

Old   September 16, 2015, 18:37
Default
  #5
Member
 
Davi Barreira
Join Date: Apr 2014
Location: Fortaleza
Posts: 76
Rep Power: 11
davibarreira is on a distinguished road
Ok, so I will post some of my results in a bit. By the looks of your graph, it actually seems to be going correctly. In my results, the drag starts out with a jump, than stays steady, then grows until it reaches a steady point and stops (but the wiggles continues due to the vortex street). So you should just run the simulation for larger times. I ran my for 200 seconds, so just I could be sure the results had finally settled.

Your simulation is 3D right? Have you tried a 2D or did you start with 3D?
If you are going to use k-epsilon, the wall function is a very important and to get results close to the experimental ones you should get a really refined mesh around the cylinder.
davibarreira is offline   Reply With Quote

Old   September 16, 2015, 18:41
Default
  #6
New Member
 
vito
Join Date: Jun 2015
Posts: 22
Rep Power: 10
vitocorleone is on a distinguished road
My simulation is 3d. Yes I am trying to keep a refined mesh around my wall. In the case of K omega where I used no wall functions my y plus values are around 6 , Oh and btw The plot that i have put up is with a pimple foam solver, i found out that pimplefoam is faster than pisofoam ofcourse when the number of outercorrectors is one then pisofoam is same as pimplefoam
vitocorleone is offline   Reply With Quote

Old   September 16, 2015, 18:53
Default
  #7
Member
 
Davi Barreira
Join Date: Apr 2014
Location: Fortaleza
Posts: 76
Rep Power: 11
davibarreira is on a distinguished road
I havent played much with k-omega. Regarding k-epsilon, I used the same values of inlet as you did based on the cfd-online formulations. I also used pimpleFoam to run my cases.

As you can see in the graph, my drag coeff follows a similar trend as the one you posted, so just run during a longer period. By the way, these are for 2D cases, but it shouldnt be much of a difference.

Let me know how it goes.

Oh, and if you manage to get the fluid to behave properly, but the final values of drag and lift are different from the literature, you might want to try to increase the size of your domain. I found out that if you put your boundaries somewhat close to the cylinder, they have a big impact on the final result.
Attached Images
File Type: png DragLift-Re3900.png (18.7 KB, 40 views)
davibarreira is offline   Reply With Quote

Old   September 16, 2015, 19:03
Default
  #8
New Member
 
vito
Join Date: Jun 2015
Posts: 22
Rep Power: 10
vitocorleone is on a distinguished road
Davi Lookin gat your plots they seem to follow the behavior correctly trendwise, Albeit value of cd is a little less than what it should be but then RANS also underpredicts cd slightly correct??

Now I have my completed plot below. You see how it wiggles but does not folow a straight path as in it has a low frequency motion to it as well, nO wi am not sure how to explain that. My Cl plot howver looks ok to me. It is just that cd is not reaching steady state and i have run ot up to 120 seconds, i just did not want to run any longer as i did not believe it would make a difference. Btw 2d and 3d modelling and simulation does not accoutn for diffrence in the results I would say. Sorry I did not crop the image.

Your thoughts
Attached Images
File Type: jpg Cd and Cl 3900_pisofoam.jpg (73.9 KB, 33 views)
vitocorleone is offline   Reply With Quote

Old   September 16, 2015, 19:24
Default
  #9
Member
 
Davi Barreira
Join Date: Apr 2014
Location: Fortaleza
Posts: 76
Rep Power: 11
davibarreira is on a distinguished road
You seem to have a second harmonic going on... How many cells does your mesh have? Can you post a picture of the whole domain from paraview? As I said, the domain size impact greatly in the results. Also, in my boundary conditons, I use kqRWallFunction with the same value as the inlet.

Indeed, the Cd is a bit lower, but not by much. Comparing with other numerical simulations and considering the experimental variability, it is pretty spot on. Also, in the papers I have read they say that the 3D simulations do differ a bit from 2D due to tri-dimensional vortices formations... Here is the plot of the simulations I ran with different Re, with low re I just ran laminar cases, as you can see, the results are pretty reasonable to me (the results are also close when comparing Strouhal and Lift).
Attached Images
File Type: png DragComparison.png (12.9 KB, 33 views)
davibarreira is offline   Reply With Quote

Old   September 16, 2015, 19:32
Default
  #10
New Member
 
vito
Join Date: Jun 2015
Posts: 22
Rep Power: 10
vitocorleone is on a distinguished road
Please find attached my meshes. I mean if were to go finer what is the point of RANS itself when i can go ahead and use LES??.
So i guess instead of using 0 k everywhere else I should the same value as inlet right which is th eorder od e^-05
What is impressive is you have seemd to get it spot on even at 10^6 reynolds number ..
Attached Images
File Type: png mesh_Longview.png (41.0 KB, 24 views)
File Type: png mesh_close_view.png (125.3 KB, 22 views)
vitocorleone is offline   Reply With Quote

Old   September 16, 2015, 19:50
Default
  #11
Member
 
Davi Barreira
Join Date: Apr 2014
Location: Fortaleza
Posts: 76
Rep Power: 11
davibarreira is on a distinguished road
Your mesh seems fine enough to be getting the correct flow behavior, although, it would need finner cells close to the cylinder to get a Cd around 5% of the experimental (just a guess). So I'm posting my mesh, so you can take a look. I think the height (y-axis) of your mesh might be a bit too low...
What about the Z-axis? What is the size of it?
I saw that you put frontAndback with velocity 'slip', but for k and epsilon you chose frontAndback with wall functions (kRWallFunction)... I think you should try zeroGradient. I would guess that this boundary condition is the culprit.
Attached Images
File Type: png meshFlowPastCylinder.png (14.8 KB, 33 views)
File Type: png meshFlowPastCylinder2.png (36.6 KB, 34 views)
davibarreira is offline   Reply With Quote

Old   September 17, 2015, 10:40
Default
  #12
New Member
 
vito
Join Date: Jun 2015
Posts: 22
Rep Power: 10
vitocorleone is on a distinguished road
My mesh size in the z direction may be little coarse so I have 20 cells over a length of 0.4 units.

I am going to try and implement all the suggestions that you have given me and will post how it all goes. Would like to thank you for your time and effort.

vito
vitocorleone is offline   Reply With Quote

Old   September 17, 2015, 22:50
Default
  #13
Member
 
Davi Barreira
Join Date: Apr 2014
Location: Fortaleza
Posts: 76
Rep Power: 11
davibarreira is on a distinguished road
Your Z is only 0.4 ? Isnt that too small? I think these might be causing the problems in your simulation. You should try 2D, or 3D with a larger Z.
davibarreira is offline   Reply With Quote

Old   September 29, 2015, 20:24
Default
  #14
Member
 
Davi Barreira
Join Date: Apr 2014
Location: Fortaleza
Posts: 76
Rep Power: 11
davibarreira is on a distinguished road
Did you manage to get the proper results?
davibarreira is offline   Reply With Quote

Old   September 29, 2015, 22:41
Default
  #15
New Member
 
vito
Join Date: Jun 2015
Posts: 22
Rep Power: 10
vitocorleone is on a distinguished road
Hi Davi,

I am sorry I could not reply earlier. I refined the mesh both streamwise and spanwise and used LES one eqn eddy and i got good results. I suspect all my trouble was due to coarse mesh which caused all the issues.. I am beginning to explore LES now.
vitocorleone is offline   Reply With Quote

Old   September 29, 2015, 22:52
Default
  #16
Member
 
Davi Barreira
Join Date: Apr 2014
Location: Fortaleza
Posts: 76
Rep Power: 11
davibarreira is on a distinguished road
Good to know. Good luck on your work!
davibarreira is offline   Reply With Quote

Old   September 29, 2015, 22:54
Default
  #17
New Member
 
vito
Join Date: Jun 2015
Posts: 22
Rep Power: 10
vitocorleone is on a distinguished road
Thanks a lot for your help once again davi..
vitocorleone is offline   Reply With Quote

Old   October 24, 2015, 13:08
Default
  #18
Member
 
Davi Barreira
Join Date: Apr 2014
Location: Fortaleza
Posts: 76
Rep Power: 11
davibarreira is on a distinguished road
Hey Vito, could you post your case here? Im thinking of trying some LES too, but my early results are not coming out good.
davibarreira is offline   Reply With Quote

Old   October 24, 2015, 13:32
Default
  #19
New Member
 
vito
Join Date: Jun 2015
Posts: 22
Rep Power: 10
vitocorleone is on a distinguished road
Hey Davi,

Sure, When you say post your case, do you mean the problem statement or anything else in particular ??

Are you trying 3d or 2d ??
vitocorleone is offline   Reply With Quote

Old   October 24, 2015, 13:51
Default
  #20
Member
 
Davi Barreira
Join Date: Apr 2014
Location: Fortaleza
Posts: 76
Rep Power: 11
davibarreira is on a distinguished road
Im still doing some 2D, but slowly trying 3D cases, cause I read that for flows around Re 1000 to 1e5 the tridimensional effects are considerable and in this range the RANS models are not predicting well (in literature are many reports saying that rans do not perform well in such region).

But what Im looking for now is just the set up for the LES case, but somethings I still havent figured, like: how refined should be the mesh and the impact of local refinement in the overall result; and what time-step should I use. Perhaps you can help me with those. Could you post your mesh (3D or 2D)?


Cheers
davibarreira is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fluent + flow past cylinder at Re=40 m.vegad Main CFD Forum 25 January 9, 2018 01:34
Flow past a cylinder. Help needed Lurapa Main CFD Forum 1 August 18, 2013 12:25
[ICEM] Flow past a 2D cylinder arun7328 ANSYS Meshing & Geometry 0 February 15, 2013 13:17
Drag coefficient of flow past cylinder vs time pedroxramos FLUENT 0 January 14, 2013 13:39
Flow past 2 smooth circular cylinder slip FLUENT 0 July 8, 2010 19:45


All times are GMT -4. The time now is 23:45.