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

Turbulent Flow 3-D Cylinder

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 4, 2017, 10:44
Post Turbulent Flow 3-D Cylinder
  #1
Member
 
Fredi Cenci
Join Date: Dec 2016
Posts: 38
Rep Power: 9
fredicenci is on a distinguished road
Hello guys. I am new using openFoam and i am trying to simulate a turbulent flow around a circular cylinder with 1 meter of diameter and 5 of length, the cylinder is fixed on a wall. I would really appreciate some help =).
Well, after around 1000 iterations the drag coefficient start to raise to infinity, and it should converge to around 0.75. Also, the lift coefficient goes crazy. I did this simulation using ansys and i am trying to reproduce it using openfoam.


Some more information: k and omega was calculated according to these equations. https://www.cfd-online.com/Wiki/Turb...ary_conditions


also the nut was calculated with the viscosity ratio of nut/nu = 10.




I am not really sure about the boundary conditions. If someone could take look in my files and give some tips why my simulation is not working i would really appreciate.


link with the files compressed : https://www.dropbox.com/s/nmjdvhjypp...on.tar.gz?dl=0



Thank you guys!

Last edited by fredicenci; January 5, 2017 at 09:09.
fredicenci is offline   Reply With Quote

Old   January 10, 2017, 04:45
Default
  #2
Member
 
jey
Join Date: Nov 2016
Location: Greece
Posts: 30
Rep Power: 10
jeytsav is on a distinguished road
Dear fredicenci

I am new to openFoam and CFD in general but it's been a couple of months that I am dealing with a simple case.

I reviewed your files and I would like state some things


in the 0/U velocity BCs try using fixedValue 0 instead of noSlip at walls. I can not really tell the difference between the two, but for my cases I am using 0 velocity at the walls as listed below.

Code:
    cylinder
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    bottom
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
in the 0/p presuures BCs, try using zeroGradient at inlet instead of fixedValue zero. Since you are already defining the velocity at the inlet, you don't want to define the pressure as well.

Code:
inlet
    {
        type 		zeroGradient;
    }

In the constant/polyMesh/boundary, you are using symmetryPlan for the symmetries of your domain which I think it is not a valid boundary. Use symmetryPlane instead or better use symmetry (which is what I am using for my cases)


Regarding the turbulence properties you are using I am not very familiar with this yet. Maybe you can try solving as a laminar case first to check whether the turbulence setting is the one to blame for the simulation failure.

Could you also provide the postProcessing results in order to have a better picture of the simulation.?

Kind regards
jeytsav is offline   Reply With Quote

Old   January 10, 2017, 18:03
Default
  #3
Member
 
Fredi Cenci
Join Date: Dec 2016
Posts: 38
Rep Power: 9
fredicenci is on a distinguished road
Quote:
Originally Posted by jeytsav View Post
Dear fredicenci

I am new to openFoam and CFD in general but it's been a couple of months that I am dealing with a simple case.

I reviewed your files and I would like state some things


in the 0/U velocity BCs try using fixedValue 0 instead of noSlip at walls. I can not really tell the difference between the two, but for my cases I am using 0 velocity at the walls as listed below.

Code:
    cylinder
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    bottom
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
in the 0/p presuures BCs, try using zeroGradient at inlet instead of fixedValue zero. Since you are already defining the velocity at the inlet, you don't want to define the pressure as well.

Code:
inlet
    {
        type 		zeroGradient;
    }

In the constant/polyMesh/boundary, you are using symmetryPlan for the symmetries of your domain which I think it is not a valid boundary. Use symmetryPlane instead or better use symmetry (which is what I am using for my cases)


Regarding the turbulence properties you are using I am not very familiar with this yet. Maybe you can try solving as a laminar case first to check whether the turbulence setting is the one to blame for the simulation failure.

Could you also provide the postProcessing results in order to have a better picture of the simulation.?

Kind regards
Dear Jeytsav,


I really appreciate your help, I took your advice and I did the changes for the symmetry boundaries (I used symmetry), for the velocity on the walls (uniform (0 0 0)) and the pressure inlet ( I used zeroGradient) . Also i had to change the 0/P and 0/U for the symmetry boundaries from zeroGradient to symmetry.


You can get all the files of my simulation on this link: (Also the log FILE)


https://www.dropbox.com/s/rt4x6yz24y...AR.tar.gz?dl=0


I ran the simulation for the laminar case and came out the following error after the time 1.2.


#0 Foam::errorrrintStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const at ??:?
#4 Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMa trix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const at ??:?
#5 Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#6 Foam::fvMatrix<double>::solveSegregated(Foam::dict ionary const&) at ??:?
#7 Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:?
#8 Foam::fvMatrix<double>::solve() at ??:?
#9 ? at ??:?
#10 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#11 ? at ??:?
Floating point exception (core dumped)



So, what do you believe the problem is? Maybe the mesh? I meshed it on Salome and imported as UNV file to openFom. When I use the command checkMesh it returns Mesh OK.


Thanks again!
fredicenci is offline   Reply With Quote

Old   January 11, 2017, 17:34
Default
  #4
Member
 
jey
Join Date: Nov 2016
Location: Greece
Posts: 30
Rep Power: 10
jeytsav is on a distinguished road
Dear fredicenci

It seems like your simulation is exploding due to velocity.

I tried to reduce the relaxation factor of velocity from 1 to 0.7 into the system/fvSolution file.

I solved for SteadyState and the simulation seemed to oscillate around Cd = 1.85 (After 1000 iterations) which is probably not what you were expecting as you mentioned.

I also switched to CrackNicolson (exactly like the case you uploaded) and just changed the relaxation factor as mentioned above. The simulation seems to be following the same behavior.

You can try running it for much more iterations to see if something changes.

Switching to turbulent flow we can expect an increase in drag.

I have not tested the turbulent case of yours, let me know if there are any further problems.

Questions: Why do you expect a Cd of 0.75? Do you have any experimental results? Or it is just a prediction ?




Some tips

You can sacrifice some accuracy in order to get faster results by changing the relTol setting into the solvers from 0 to 0.01. In my opinion this will lead to faster solution without affecting that much the accuracy. You can try on your own and see what happens.

You can also try using potentialFoam before running simpleFoam in order to achieve faster solution and decrease the chance of simulation explosion. It seems that in this small mesh, the use of potentialFoam is not that necessary but in larger meshes (in terms of cell count) and finer meshes, maybe its needed.

You can also try adding into the system/fvSolution file, some residual controls in order your simulation automatically stops when the residuals reach below the set value.

Residual Controls

Code:
SIMPLE
{
    nNonOrthogonalCorrectors 1;
    residualControl
    {
        p               1e-5;
        U               1e-5;
	k         	1e-5;
	omega	1e-5;
    }
}
Kind regards
jeytsav is offline   Reply With Quote

Old   January 11, 2017, 19:46
Default
  #5
Member
 
Fredi Cenci
Join Date: Dec 2016
Posts: 38
Rep Power: 9
fredicenci is on a distinguished road
Dear Jeytsav,

I was reducing the relaxation factors and i was getting the results just like you. I got the Drag value of 0.75 from experimental experiments, and i have already gotten the same drag coefficient value using ansys. Well, i will try run more iterations. Thanks for the tips to achieve faster solutions.

You helped me a lot already, I really appreciate. I will post further results. =)
fredicenci is offline   Reply With Quote

Old   January 12, 2017, 04:44
Default
  #6
Member
 
jey
Join Date: Nov 2016
Location: Greece
Posts: 30
Rep Power: 10
jeytsav is on a distinguished road
Dear fredicenci

No problem!
I wish you good luck with the simulation! Please let me know if you manage to get the correct results and what settings did you finally use!

Kind regards
jeytsav is offline   Reply With Quote

Reply


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
k-omega SST simulation of turbulent flow around a circular cylinder DanM OpenFOAM Running, Solving & CFD 17 October 13, 2016 14:29
Drag force coefficient too high for a flow past a cylinder using komega sst Scabbard OpenFOAM Running, Solving & CFD 37 March 21, 2016 17:16
Flow over 2D Cylinder, Laminar and Turbulent Tsr63 FLUENT 5 November 13, 2014 13:13
Compare the pressure of potential flow and a turbulent case of cylinder ooo OpenFOAM Running, Solving & CFD 0 August 2, 2013 08:25
Incompressible, Unsteady Cylinder Flow startingcfd Main CFD Forum 1 March 15, 2011 02:12


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