how to accurately simulate flow around cylinder
hi everyone!
I've been doing simulation about flow around cylinder recently. Some information about the case is listed below. 2D simulation; U=1, D=1, rho=1, nu=0.01, so Re=100; domain size: upstream 20D, downstream 40D, topwall and bottom wall 20D. mesh size: about 40000 vertices The problem is that no matter how I tried, I can not get the accurate result in terms of strouhal number, which in my case is 1.44. An accurate St for RE100 should be 1.65. Could someone send me a similar case file which has been verified and yields accurate results so I can check what went wrong in my own case? I will be very grateful! my email address is kai-zhang-kf@ynu.ac.jp |
Hi ,
I think you use icoFoam as a solver. So I think two parameters have vital role for getting the exact result : 1) discretization method of terms in equations 2)Mesh generation. So change your fvSchemes and fvSolution as below : Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
/*--------------------------------*- C++ -*----------------------------------*\ Hope this helps, Sasan. |
dear sasan
thanks very much! your post solved the problem, I used icoFoam this time, now my St number is 1.62, which is much better than the previous ones. Now it is clear that it is not the problem of my mesh, but the discretization method of terms in equations that is giving me bad results. However, in my previous simulations, I used pimpleFoam because for the long run I need to do much higher Re simulations, for which icoFoam is not appropriate. Here is my fvschemes and fvsolutions, which is for pimpleFoam and did not give right result. Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
/*--------------------------------*- C++ -*----------------------------------*\ |
I just tried changing the settings in pimpleFoam to the ones you provided, hoping that it would also give good result, but it did not.
It seems in my case ,icoFoam does a better job than pimpleFoam. or pimpleFoam requires something other different settings? |
dear sasan
I think I found the cause for the inaccuracy of the Str number in pimpleFoam. HTML Code:
http://www.cfd-online.com/Forums/openfoam-solving/94785-icofoam-vs-pisofoam-laminar.html it is found out that for unsteady cases relaxation is more than necessary. however, in pimpleFoam relaxation is allowable, should we never use relaxation in pimpleFoam when dealing with unsteady cases? |
Hi kia ,
You are welcome . I tried to simulate turbulent flow around a cylinder with pisoFoam 6-7 month ago.But I had some problems and the case didn't converge and amplitude of Lift didn't get a fix value(oscillation was not regular ). Actually I didn't succeed to simulate the flow accurately. About relaxation factor I should say that I have heard when you use PISO algorithm for solving equations if you use relaxation factor only final result (after convergence) is accurate. Anyway I am interested in simulation of turbulent flow around a cylinder and I will try to do it. Let me know your progress. Thanks and best regards, Sasan. |
Help
Hi Sasan,
Thank you for your help very much. This is my error. When time is 1.45s. I have no idea why this is happenning, Would you like to enlighten me a little bit? Courant Number mean: 1.11225e+91 max: 2.80651e+96 #0 Foam::error::printStack(Foam::Ostream&) in "/home/yzhou/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64Gcc44DPOpt/lib/libOpenFOAM.so" #1 Foam::sigFpe::sigHandler(int) in "/home/yzhou/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64Gcc44DPOpt/lib/libOpenFOAM.so" #2 __restore_rt at sigaction.c:0 #3 Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/home/yzhou/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64Gcc44DPOpt/lib/libOpenFOAM.so" #4 Foam::fvMatrix<Foam::Vector<double> >::solve(Foam::dictionary const&) in "/home/yzhou/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64Gcc44DPOpt/bin/icoFoam" #5 Foam::fvMatrix<Foam::Vector<double> >::solve() in "/home/yzhou/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64Gcc44DPOpt/bin/icoFoam" #6 main in "/home/yzhou/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64Gcc44DPOpt/bin/icoFoam" #7 __libc_start_main in "/lib64/libc.so.6" #8 Foam::UOPstream::write(char) in "/home/yzhou/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64Gcc44DPOpt/bin/icoFoam" Floating exception |
Hi sherandlock ,
Your case has diverged . The Courant number is very high . So I only have one idea , Try to use adjustTimeStep in the controlDict. Add below lines in the controlDict : Code:
adjustTimeStep yes; |
flow past a circular cylinder
Dear Sasan,
I'm try to implement flow past circular cylinder in pimpleFoam solver. I attached the case that I'm looking for (pdf file). I blocked and checked mesh everything was fine. I run the case without any problem. But, when I plotted drag and lift forces (using Matlab), it gave me inconvenience result. I don't know where is my mistake. Anyway, I attached my case if you could please go through all files and checked please what are my mistakes. NT: D = 1, Re = 100. I'm trying to fix nu in transportProperties file and change u in the attached file because I didn't know where are my errors so I'm trying to do different ways. Also, might blockMeshDict affects my results if you could check please. Many thanks in advanced. |
Hi,
There is no attached file, honestly! best regards. |
2 Attachment(s)
Hi Sasan,
sorry, I attached them again. Looking forward for your help. |
I think at Re=100, turbulence model will jeopardize your result. In this regime the flow is mainly 2 dimensional and could be regarded as not turbulent.
Quote:
|
Dear Kai Zhang,
I'm working in laminar not turbulence model. Have I changed my solver from pimpleFoam to another solver or that does not affect? What other changes would be supposed? Regards |
Quote:
1. Put RASModel in constant/turbulenceProperties 2. Put Code:
RASModel laminar; Also I'd suggest you to change fvSolution: Code:
PIMPLE |
Dear Alexey,
many thanks for your reply. I did all changes that you supposed. After typing pimpleFoam in the command window, I got this error [QUOTE] Quote:
|
Well,
Post your RASProperties file, otherwise I can only suggest that RASProperties file is incorrect ;) |
This is RASProperties file
Quote:
|
Well, can you please tell me the difference between what you've posted and what I've suggested to put into RASProperties?
Can you create a file with just Code:
/*--------------------------------*- C++ -*----------------------------------*\ The error you've got tells you that there's no turbulence keyword in RASProperties files, and in fact there's no such keyword in your file. |
Dear Alexey,
sorry for that mistakes. I is running now. I will let you know about the result. Many thanks |
1 Attachment(s)
Dear Alexy,
the running is done. I have two questions please 1. in cotrolDict file (attached) startTime 0; endTime 25.0; deltaT 0.01; but the running is completed after 1.4, why? Code:
/*--------------------------------*- C++ -*----------------------------------*\ 2. the drag chart is given as attached. Why? I know the drag coefficient figure is tottaly different, whats the wrong? Best regards |
All times are GMT -4. The time now is 10:30. |