# How to create a case with a karman vortex using openfoam?

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

December 4, 2012, 07:16
How to create a case with a karman vortex using openfoam?
#1
New Member

Join Date: Dec 2012
Posts: 1
Rep Power: 0
Hi guys,

I am a newbie at using openfoam and was recently requested to create a simulation of a flow over a cylinder with karman vortex behind the it and I have no idea how to begin. The geometry of the cylinder is shown below and the length of the no-slip wall on the top and bottom are both 15m. The height of the inlet and outlet are 5m. The inlet velocity of the fluid is 1m/s and the pressure at the outlet is 0 Pa. I would like to know how do I create the above geometry and which solver should I be using (potentialfoam or icofoam?). In addition what is the condition for karman vortex?
Attached Images
 Picture1.png (1.9 KB, 204 views)

 December 4, 2012, 09:06 #2 Senior Member     Ehsan Join Date: Oct 2012 Location: Iran Posts: 2,208 Rep Power: 24 hi top and bottom should be symmetryplane left surface inletoutlet and right zerogradient if you want slip on cylinder must use potentialfoam and symmetryplane on cylinder.if no-slip use icoFoam and fixedValue on cylinder with value uniform (0 0 0).its easier to make mesh in fluent and enter to openfoam with fluentMeshToFoam in command shell. if have any question tell me.

January 28, 2013, 23:24
Hi !!
#3
New Member

jobito_2012
Join Date: Oct 2012
Location: Chile
Posts: 28
Rep Power: 11
Quote:
 Originally Posted by dualshock Hi guys, I am a newbie at using openfoam and was recently requested to create a simulation of a flow over a cylinder with karman vortex behind the it and I have no idea how to begin. The geometry of the cylinder is shown below and the length of the no-slip wall on the top and bottom are both 15m. The height of the inlet and outlet are 5m. The inlet velocity of the fluid is 1m/s and the pressure at the outlet is 0 Pa. I would like to know how do I create the above geometry and which solver should I be using (potentialfoam or icofoam?). In addition what is the condition for karman vortex?

I need to do the same problem, can you send me the file please...I´m learning OpenFoam...thanks!!

my mail is aguilera1623@mail.com

 January 29, 2013, 07:09 #4 Senior Member   Joern Beilke Join Date: Mar 2009 Location: Dresden Posts: 425 Rep Power: 18 Here is a ready to run example where I used pimpleFoam. It contains a coarse and a fine grid created with GridPro. Have fun. www.beilke-cfd.de/Karmann_OpenFoam.tar.gz vaveila_m likes this.

January 29, 2013, 10:38
Ok! :)
#5
New Member

jobito_2012
Join Date: Oct 2012
Location: Chile
Posts: 28
Rep Power: 11
Quote:
 Originally Posted by JBeilke Here is a ready to run example where I used pimpleFoam. It contains a coarse and a fine grid created with GridPro. Have fun. www.beilke-cfd.de/Karmann_OpenFoam.tar.gz

Ok!! thanks a lot...I will review the files

 May 2, 2014, 08:17 #6 Member   Avdeev Evgeniy Join Date: Jan 2011 Location: Togliatty, Russia Posts: 69 Blog Entries: 1 Rep Power: 19 It works! Thanks, JBeilke. http://youtu.be/hZm7lc4sC2o

 May 2, 2014, 08:29 #7 Retired Super Moderator   Bruno Santos Join Date: Mar 2009 Location: Lisbon, Portugal Posts: 10,965 Blog Entries: 45 Rep Power: 126 FYI: I've moved this thread to the OpenFOAM forum, as it was wrongly placed at the Main CFD forum. vaveila_m likes this.

March 17, 2015, 04:22
How to make it work
#8
New Member

Jeremy
Join Date: Oct 2014
Posts: 6
Rep Power: 9
Quote:
 Originally Posted by j-avdeev It works! Thanks, JBeilke. http://youtu.be/hZm7lc4sC2o
Hi j-avdeev,

I am trying to make the tar.gz file that JBeilke uploaded. I did the following commands:
tar -zxvf Karmann_OpenFoam.tar.gz
cd karmann_gridpro_pimple
pimpleFoam

I also tried simpleFoam command but it didnt work. =(

Here is the error code:

--> FOAM FATAL IO ERROR:
keyword laplacian(rAUf,p) is undefined in dictionary "/home/JeremyVM/OpenFOAM/JeremyVM-2.3.1/run/karmann_gridpro_pimple/system/fvSchemes.laplacianSchemes"

file: /home/JeremyVM/OpenFOAM/JeremyVM-2.3.1/run/karmann_gridpro_pimple/system/fvSchemes.laplacianSchemes from line 44 to line 50.

From function dictionary::lookupEntry(const word&, bool, bool) const
in file db/dictionary/dictionary.C at line 437.

FOAM exiting

Is it more complicated than this? Please help. I really new to OpenFoam and I need to run some tests that is computationally and process intensive. This is a really good example but I can't get it to work.

Jeremy

March 17, 2015, 05:49
#9
Member

Avdeev Evgeniy
Join Date: Jan 2011
Location: Togliatty, Russia
Posts: 69
Blog Entries: 1
Rep Power: 19
Quote:
 Originally Posted by jemz Here is the error code: --> FOAM FATAL IO ERROR: keyword laplacian(rAUf,p) is undefined in dictionary "/home/JeremyVM/OpenFOAM/JeremyVM-2.3.1/run/karmann_gridpro_pimple/system/fvSchemes.laplacianSchemes"
It says that "keyword laplacian(rAUf,p) is undefined" and if you open system/fvSchemes you will not find it.
It is happen because case was made and worked on older OpenFOAM version - I see you use the newest 2.3.1. And OpenFOAM developers have changed some variables-fields names (I hope they had reasons, becaue it happens frequently, almost every release ).

So. I think if you add

Code:
`laplacian(rAUf,p) Gauss linear corrected;`

Code:
`laplacian((1|A(U)),p) Gauss linear corrected;`
to file system/fvSchemes it will start work fine.

March 17, 2015, 07:07
#10
New Member

Jeremy
Join Date: Oct 2014
Posts: 6
Rep Power: 9
Quote:
 Originally Posted by j-avdeev It says that "keyword laplacian(rAUf,p) is undefined" and if you open system/fvSchemes you will not find it. It is happen because case was made and worked on older OpenFOAM version - I see you use the newest 2.3.1. And OpenFOAM developers have changed some variables-fields names (I hope they had reasons, becaue it happens frequently, almost every release ). So. I think if you add Code: `laplacian(rAUf,p) Gauss linear corrected;` instead of Code: `laplacian((1|A(U)),p) Gauss linear corrected;` to file system/fvSchemes it will start work fine.

Sorry I misunderstood. I got what you mean. Its working now. Thanks!

Last edited by jemz; March 17, 2015 at 14:31.

 March 17, 2015, 14:05 #11 Member   Avdeev Evgeniy Join Date: Jan 2011 Location: Togliatty, Russia Posts: 69 Blog Entries: 1 Rep Power: 19 Hi, jemz I have tryed and it works in OpenFOAM 2.3.1 with following system/fvSchemes: Code: ```FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default Euler; } gradSchemes { default Gauss linear; grad(p) Gauss linear; grad(U) Gauss linear; } divSchemes { default none; div(phi,U) Gauss limitedLinearV 1; div(phi,k) Gauss limitedLinear 1; div(phi,epsilon) Gauss limitedLinear 1; div(phi,R) Gauss limitedLinear 1; div(R) Gauss linear; div(phi,nuTilda) Gauss limitedLinear 1; div((nuEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes { default none; laplacian(nuEff,U) Gauss linear corrected; // laplacian((1|A(U)),p) Gauss linear corrected; laplacian(rAUf,p) Gauss linear corrected; laplacian(DkEff,k) Gauss linear corrected; laplacian(DepsilonEff,epsilon) Gauss linear corrected; laplacian(DREff,R) Gauss linear corrected; laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; } interpolationSchemes { default linear; interpolate(U) linear; } snGradSchemes { default corrected; } fluxRequired { default no; p ; }``` jemz likes this.

 August 24, 2015, 17:53 piso/pimple vs. ico? #12 New Member   Paul W. Fontana Join Date: Jul 2013 Posts: 5 Rep Power: 11 I've seen examples using pisoFoam, and now pimpleFoam. What's the advantage over using icoFoam? In any solver, is it necessary to generate an initial fluctuation to stimulate the instability?

August 26, 2015, 18:17
#13
Retired Super Moderator

Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,965
Blog Entries: 45
Rep Power: 126
Quote:
 Originally Posted by pfontana I've seen examples using pisoFoam, and now pimpleFoam. What's the advantage over using icoFoam?

Quote:
 Originally Posted by pfontana In any solver, is it necessary to generate an initial fluctuation to stimulate the instability?
Depends on what you want to do?!

 August 26, 2015, 18:43 #14 New Member   Paul W. Fontana Join Date: Jul 2013 Posts: 5 Rep Power: 11 @wyldckat Thanks. I'm aware of the differences in principle. I was wondering about application to this particular case. Since pisoFoam with turbulence set to "laminar" is the same as icoFoam, is there some reason not to simulate vortex shedding with icoFoam? Some time ago I was working on a DNS of vortex shedding from a CFD text/workbook, not in openFoam. Because a symmetrical flow is a solution, it was necessary to give the flow a kick in the form of a small random perturbation in order to cause the vortex shedding instability to be excited. I was wondering if people do that in their openFoam simulations of vortex shedding, or if not, why it's not necessary? Is numerical error enough to seed the instability? (I thought maybe that was what people used pisoFoam for - to include some small initial turbulence to get the shedding going.)

 August 30, 2015, 16:56 #15 Retired Super Moderator   Bruno Santos Join Date: Mar 2009 Location: Lisbon, Portugal Posts: 10,965 Blog Entries: 45 Rep Power: 126 Quick answers: I was hoping someone else on this thread would answer, but since not, here's what I know: http://openfoamwiki.net/index.php/Contrib/perturbU - this utility for initializing the flow field with perturbed flow is more commonly used for LES simulations. icoFoam is sort-of considered an "example solver": http://www.openfoam.org/mantisbt/view.php?id=791#c2023 - you can still use it, but keep in mind what it is... Not requiring initialization with icoFoam in symmetric cases might have to do with the meshes rarely being numerically perfect symmetric meshes. In other words: even if it seems perfect, it's probably not and it will reveal itself sooner or later if not perfect.

 December 23, 2016, 05:47 Case Request #16 New Member   Kevin Join Date: Mar 2012 Posts: 10 Rep Power: 12 Hello, is it possible that the files with a tutorial case on karman vortex street may be uploaded once again? I don't really know how to setup the problem but I would like to learn from an example, maybe in icoFoam and pimpleFoam for comparision turbulent vs. laminar solver?? Thx in advance Kevin

December 23, 2016, 07:19
#17
Member

Avdeev Evgeniy
Join Date: Jan 2011
Location: Togliatty, Russia
Posts: 69
Blog Entries: 1
Rep Power: 19
Quote:
 Originally Posted by kevinlipps Hello, is it possible that the files with a tutorial case on karman vortex street may be uploaded once again? I don't really know how to setup the problem but I would like to learn from an example, maybe in icoFoam and pimpleFoam for comparision turbulent vs. laminar solver?? Thx in advance Kevin

https://github.com/j-avdeev/KarmanPimple

 December 24, 2016, 04:32 #18 New Member   Kevin Join Date: Mar 2012 Posts: 10 Rep Power: 12 Hi there, thanks! But it doesnt seem to run on my system... what do I need? I only have OpenFOAM 4.1 installed, do I need anymore software to be able to run your programm? I guess I must execute the Allrun script? But nothing really happens when I do that... One more question, how do I reset paraView? It seems like I messed up the standard layout and now I dont know how to get the left side part of the programm window back. Merry X-Mas, btw.

 December 24, 2016, 05:20 #19 Senior Member   Join Date: Jun 2012 Location: Germany, Bochum Posts: 230 Rep Power: 14 The tutorial can only be used for older version of OpenFOAM. You would need to adjust some files according to the new file structure. Check a similar tutorial of the solver and readjust the entries in the files.

December 24, 2016, 05:30
#20
Member

Avdeev Evgeniy
Join Date: Jan 2011
Location: Togliatty, Russia
Posts: 69
Blog Entries: 1
Rep Power: 19
Quote:
 Originally Posted by kevinlipps Hi there, thanks! But it doesnt seem to run on my system... what do I need? I only have OpenFOAM 4.1 installed, do I need anymore software to be able to run your programm? I guess I must execute the Allrun script? But nothing really happens when I do that...
Yes, you have to just execute Allrun.
This cas works on OpenFOAM 2.1.x. So you probably can get some errors during OpenFOAM 4.1, but usually it is easy to correct, because error output usually detailed enough.
If you have no output after Allrun ececution - have you run OpenFOAM environment setting script before it?

Code:
`\$ of41`
Also you can open Allrun file in text editor and run it line by line. It will something like:

Code:
```decomposePar
mpirun -np 3 simpleFoam -parallel
reconstructPar```
Quote:
 Originally Posted by kevinlipps One more question, how do I reset paraView? It seems like I messed up the standard layout and now I dont know how to get the left side part of the programm window back. Merry X-Mas, btw.
It seems like you closed your Papeline Browser, Properties and Information tabs - you can turn on them back under View top menu.
Thank you, happy foam-holidays you too