|
[Sponsors] |
How to run in transient the airFoil2D (simpleFoam) tutorial case? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 19, 2017, 05:38 |
How to run in transient the airFoil2D (simpleFoam) tutorial case?
|
#1 |
New Member
Join Date: Sep 2016
Posts: 5
Rep Power: 10 |
I am a beginner OpenFOAM user but it is clear that the simpleFoam solver is a steady one and the pimpleFoam or pisoFoam has to be used for incompressible transients simulations. I would like to run the airFoil2D case in transient and I need some help for it. I tried to modificate the controlDict, fvSchemes, fvSolution files in accordance with the pitzDaily pimpleFoam version with no success. Is there anyone who could explain what to modificate in this case exactly?
|
|
June 19, 2017, 05:58 |
|
#2 |
Senior Member
Alex
Join Date: Jan 2014
Posts: 126
Rep Power: 12 |
Hi and welcome!
How did you modify the files and what error does OpenFOAM give you? Can you post your files as code? Cheers Alex |
|
June 19, 2017, 06:38 |
|
#3 |
New Member
Join Date: Sep 2016
Posts: 5
Rep Power: 10 |
No error message
. /Allrun then commander says that "Running pimpleFoam on ..." then it returns after some seconds, no solution files controlDict: application pimpleFoam (from simpleFoam) and i added the following row to the end: maxCo 5; fvschemes: here i changed the ddtSchemes to Euler fvsolution: here i changed Simple to Pimple method My codes: controlDict: FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application pimpleFoam; startFrom latestTime; startTime 0; stopAt endTime; endTime 500; deltaT 1; writeControl timeStep; writeInterval 50; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable true; adjustTimeStep yes; maxCo 5; // ************************************************** *********************** // fvschemes: FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { default none; div(phi,U) bounded Gauss linearUpwind grad(U); div(phi,nuTilda) bounded Gauss linearUpwind grad(nuTilda); div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } wallDist { method meshWave; } // ************************************************** *********************** // fvsolution: FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { p { solver GAMG; tolerance 1e-06; relTol 0.1; smoother GaussSeidel; } U { solver smoothSolver; smoother GaussSeidel; nSweeps 2; tolerance 1e-08; relTol 0.1; } nuTilda { solver smoothSolver; smoother GaussSeidel; nSweeps 2; tolerance 1e-08; relTol 0.1; } } PIMPLE { nNonOrthogonalCorrectors 0; nCorrectors 2; } // ************************************************** *********************** // |
|
June 19, 2017, 07:49 |
|
#4 |
Senior Member
Alex
Join Date: Jan 2014
Posts: 126
Rep Power: 12 |
You didn't define a pRefCell and a pRefValue for PIMPLE, which is sometimes needed when running with freestreamPressure BCs. I modified your fvSolution a little so you can see a better converged solution.
Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { p { solver GAMG; tolerance 1e-06; relTol 0.1; smoother GaussSeidel; } U { solver smoothSolver; smoother GaussSeidel; nSweeps 2; tolerance 1e-08; relTol 0.1; } nuTilda { solver smoothSolver; smoother GaussSeidel; nSweeps 2; tolerance 1e-08; relTol 0.1; } pFinal { $p; relTol 0; } UFinal { $U; relTol 0; } nuTildaFinal { $nuTilda; relTol 0; } } PIMPLE { nNonOrthogonalCorrectors 0; nCorrectors 2; nOuterCorrectors 50; pRefCell 0; pRefValue 0; residualControl { p { relTol 0; tolerance 0.0001; } U { relTol 0; tolerance 0.0001; } } } relaxationFactors { fields { p 0.3; } equations { U 0.7; nuTilda 0.7; } } // ************************************************************************* // |
|
June 19, 2017, 09:08 |
|
#5 |
New Member
Join Date: Sep 2016
Posts: 5
Rep Power: 10 |
Thank you very much, it works. There is weird thing that I obtain results at random time steps such as 1.23234, 2.324234, 3.3159923, 4.25559, 5.157234...and so on
Meanwhile : deltaT is 1 and writeInterval is every 50th timestep |
|
June 19, 2017, 09:45 |
|
#6 |
Senior Member
Alex
Join Date: Jan 2014
Posts: 126
Rep Power: 12 |
Yeah, this is because you initially set deltaT to 1 but then limit the whole thing by the MaxCo. This means that the initial time step will be 1, but then it gets much lower because of the Courant number. As you output the results not by information of time but timesteps, you get weird output times.
Put in your controlDict: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application pimpleFoam; startFrom latestTime; startTime 0; stopAt endTime; endTime 1; deltaT 0.025; writeControl adjustableRunTime; writeInterval 0.025; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable yes; adjustTimeStep yes; maxCo 5; // ************************************************************************* // |
|
Tags |
airfoil2d, beginner, openfoam, transient |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
implementation of mapFields into parallel transient case | simpomann | OpenFOAM Pre-Processing | 4 | August 2, 2016 05:41 |
Unable to run the case parallel using foam-extend in the cluster | farahaqilah | OpenFOAM | 0 | July 28, 2016 00:49 |
Use XiFoam to run a laminar spherical flame case. | fcrl-zxr | OpenFOAM Running, Solving & CFD | 0 | June 8, 2015 12:11 |
Can't run a case in HelyxOS with an imported mesh from Fluent | HHOS | OpenFOAM Running, Solving & CFD | 0 | July 2, 2013 07:25 |
PS3 tutorial results | mgarcia | OpenFOAM | 4 | January 21, 2008 13:04 |