|
[Sponsors] |
August 14, 2018, 13:01 |
Tutorial: flow around a cylinder
|
#1 |
New Member
Lukas
Join Date: Jul 2018
Posts: 20
Rep Power: 8 |
Hey i am currently working through this Openfoam tutorial, its about a flow around a cylinder. I generated the mesh using blockMesh, run the case with potentialFoam. If I open paraFoam i cant plot any variables (like u, p). Since there were no errors during potentialFoam i have no idea why there seems to be "no data".
any suggestions what to do? Greetings |
|
August 14, 2018, 17:29 |
|
#2 |
Member
Cyrille Bonamy
Join Date: Mar 2015
Location: Grenoble, France
Posts: 86
Rep Power: 11 |
please can you write the output of the "ls" command?
Do you have results directory (at least "0" directory containing p and U files)? It is possible that paraFoam doesn't show the "0" result (by default in the very new versions) |
|
August 14, 2018, 18:04 |
|
#3 |
New Member
Lukas
Join Date: Jul 2018
Posts: 20
Rep Power: 8 |
hey cyss38,
Thank you for your reply. there are two folders, "0", "0.orig". both contain p and U. "orig" is short for origin and contains something previous, I assume? I compared the p(U) files to the p(U) files of the cavity case, the cavity case contained data, while the cylinder only contained following. What to do next? Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1806 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { down { type symmetryPlane; } right { type fixedValue; value uniform 0; } up { type symmetryPlane; } left { type zeroGradient; } cylinder { type symmetry; } defaultFaces { type empty; } } // ************************************************************************* // |
|
August 14, 2018, 19:00 |
|
#4 |
Member
Cyrille Bonamy
Join Date: Mar 2015
Location: Grenoble, France
Posts: 86
Rep Power: 11 |
There is a problem with the potentialFoam solver, because if it runs correctly you must have the result directory "1".
So have you execute the binary "potentialFoam" in the case directory, and if yes what is the output of the "potentialFoam" command? |
|
August 15, 2018, 06:09 |
|
#5 |
New Member
Lukas
Join Date: Jul 2018
Posts: 20
Rep Power: 8 |
Hey, while trying to repair it i made it somehow worse, at least i think so. running potentialFoam gives this:
Code:
--> FOAM FATAL IO ERROR: 'potentialFlow' not found in dictionary "/home/hgl/OpenFOAM/hgl-v1806/run/tutorials/basic/potentialFoam/cylinder/system/fvSolution" file: /home/hgl/OpenFOAM/hgl-v1806/run/tutorials/basic/potentialFoam/cylinder/system/fvSolution From function const Foam::dictionary& Foam::dictionary::subDict(const Foam::word&) const in file db/dictionary/dictionary.C at line 456. FOAM exiting Greetings Last edited by TU_Hiwi; August 15, 2018 at 13:52. |
|
August 15, 2018, 07:18 |
|
#6 |
Member
Cyrille Bonamy
Join Date: Mar 2015
Location: Grenoble, France
Posts: 86
Rep Power: 11 |
it is not the original files of the tutorial... and so it doesn't work.
If you read the error message, you understand that the keyword 'potentialFlow' is not found in file fvSolution. You can download the good files here : https://github.com/OpenFOAM/OpenFOAM...ylinder/system |
|
August 15, 2018, 14:05 |
|
#7 |
New Member
Lukas
Join Date: Jul 2018
Posts: 20
Rep Power: 8 |
Thank you! works like it should.
Another quick question, just assume I want to simulate the same scenario with another solver like simpleFoam. Is there anyway to download another (roughly prepared) fvSchemes and fvSoltions? Or do i have to take a totally different way? |
|
August 15, 2018, 16:42 |
|
#8 |
Member
Cyrille Bonamy
Join Date: Mar 2015
Location: Grenoble, France
Posts: 86
Rep Power: 11 |
you can use and adapt the fvSolution and fvScheme files of the pimpleFoam tutorials, or just adapt yours.
Read carefully the error/output message of openfoam and in case of error adapt the files. |
|
September 18, 2019, 10:35 |
|
#9 |
New Member
Alessia Perilli
Join Date: Sep 2019
Posts: 2
Rep Power: 0 |
Hello folks,
I am very new to OpenFOAM, still trying to understand how it works. I have the same problem as TU_Hiwi: in the tutorial "Flow around a cylinder" I don't get the result directory "1/". I checked the files and everything seems to be as it is supposed to. I didn't change anything, I just played a bit with the writeControl and writeInterval parameters but nothing changes. The files I get in the end of the simulation in the 0/ directory are: U.orig UA U streamFunction p.orig Phi phi p error Does anybody have any idea of what's going on? What can it be the problem? Thank you all! |
|
September 18, 2019, 10:50 |
|
#10 |
Member
Cyrille Bonamy
Join Date: Mar 2015
Location: Grenoble, France
Posts: 86
Rep Power: 11 |
can you display the standard output of the Allrun command (or of the solver used) and attach your controlDict file?
|
|
September 19, 2019, 04:51 |
|
#11 |
New Member
Alessia Perilli
Join Date: Sep 2019
Posts: 2
Rep Power: 0 |
So this is the log.potentialFoam file (not sure this is what you asked for):
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Reading velocity field U Constructing pressure field p Constructing velocity potential field Phi No MRF models present Calculating potential flow Using dynamicCode for functionObject error at line 53 in "/home/alessiap/OpenFOAM/alessiap-dev/run/cylinder/system/controlDict/functions/error" Creating new library in "dynamicCode/error/platforms/linux64GccDPInt32Opt/lib/liberror_8d7789146a57fafafadf6156cb75f06a0fe8e37b. so" Invoking "wmake -s libso /home/alessiap/OpenFOAM/alessiap-dev/run/cylinder/dynamicCode/error" wmake libso /home/alessiap/OpenFOAM/alessiap-dev/run/cylinder/dynamicCode/error ln: ./lnInclude wmkdep: functionObjectTemplate.C Ctoo: functionObjectTemplate.C ld: /home/alessiap/OpenFOAM/alessiap-dev/run/cylinder/dynamicCode/error/../platforms/linux64GccDPInt32Opt/lib/liberror_8d7789146a57fafafadf6156cb75f06a0fe8e37b. so GAMG: Solving for Phi, Initial residual = 1, Final residual = 0.00645988, No Iterations 5 GAMG: Solving for Phi, Initial residual = 0.0126268, Final residual = 6.6182e-05, No Iterations 4 GAMG: Solving for Phi, Initial residual = 0.00260623, Final residual = 2.0189e-05, No Iterations 3 GAMG: Solving for Phi, Initial residual = 0.000910968, Final residual = 3.41138e-06, No Iterations 4 Continuity error = 0.000135471 Interpolated velocity error = 1.18729e-05 Calculating approximate pressure field GAMG: Solving for p, Initial residual = 1, Final residual = 0.00462909, No Iterations 4 GAMG: Solving for p, Initial residual = 0.0659642, Final residual = 0.000285859, No Iterations 5 GAMG: Solving for p, Initial residual = 0.0131468, Final residual = 9.02039e-05, No Iterations 3 GAMG: Solving for p, Initial residual = 0.00414426, Final residual = 3.4852e-05, No Iterations 4 Looking up field U Reading inlet velocity uInfX U at inlet = 1 m/s Cylinder radius = 0.499614 m Evaluating analytical solution Writing relative error in U to "/home/alessiap/OpenFOAM/alessiap-dev/run/cylinder/0/error" ExecutionTime = 0.03 s ClockTime = 10 s End while the controlDict isattached. |
|
September 19, 2019, 11:30 |
|
#12 |
Member
Cyrille Bonamy
Join Date: Mar 2015
Location: Grenoble, France
Posts: 86
Rep Power: 11 |
ok, i see 2 problems.
The first one is that you have an error compiling your functionobject. You have to look in detail why... The second one : You use potentialFoam. This solver is suitable to generate initial conditions for more advanced solvers. That explains why you have no solution at time "1". You just solve a potential flow: https://openfoamwiki.net/index.php/PotentialFoam Try looking at wiki tutorials to find a similar one to your problem : https://wiki.openfoam.com/Tutorials |
|
May 29, 2020, 08:35 |
Tutorial: flow around a cylinder
|
#13 |
Senior Member
Asmaa
Join Date: Mar 2016
Posts: 102
Rep Power: 10 |
For simplified simulation of flow around a cylinder using OpenFoam and postprocessing in paraview, please check:
https://www.youtube.com/watch?v=YfK53PKpdgE |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Issues on the simulation of high-speed compressible flow within turbomachinery | dowlee | OpenFOAM Running, Solving & CFD | 11 | August 6, 2021 07:40 |
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 |
benchmark: flow over a circular cylinder | goodegg | Main CFD Forum | 12 | January 22, 2013 12:47 |
flow around a cylinder | pXYZ | Main CFD Forum | 14 | July 25, 2011 11:05 |
1 Was FSI for a flow over a cylinder | vmlxb6 | CFX | 17 | May 16, 2011 03:29 |