|
[Sponsors] |
January 21, 2021, 12:58 |
Convergence problem with simpleFoam
|
#1 |
New Member
NewtonianGuy
Join Date: Jun 2020
Posts: 10
Rep Power: 6 |
Hello! I am having an issue with simpleFoam (and am new to openFoam). In fact, the solution doesnt want to converge, specially the pressure. My case used the tutorial incompressible/simpleFoam/windaroundbuilding, and even this tutorial doesnt converge (didnt change anything...). If anyone can help or guide me I would really appreciate it!
case : flow around a structure (turbulence k-epsilon) Below are my nschemes/fvsolution/controlDict files and 0 files. There's also the residuals plot (attached). Thanks! fschemes Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2006 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default steadyState; } gradSchemes { default Gauss linear; limited cellLimited Gauss linear 1; grad(U) $limited; grad(k) $limited; grad(epsilon) $limited; } divSchemes { default none; div(phi,U) bounded Gauss linearUpwind limited; turbulence bounded Gauss limitedLinear 1; div(phi,k) $turbulence; div(phi,epsilon) $turbulence; div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } wallDist { method meshWave; } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2006 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { p { solver GAMG; smoother GaussSeidel; tolerance 1e-6; relTol 0.1; } "(U|k|omega|epsilon)" { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-6; relTol 0.1; } } SIMPLE { residualControl { p 1e-4; U 1e-4; "(k|omega|epsilon)" 1e-4; } nNonOrthogonalCorrectors 0; pRefCell 0; pRefValue 0; } potentialFlow { nNonOrthogonalCorrectors 10; } relaxationFactors { fields { p 0.3; } equations { U 0.7; "(k|omega|epsilon).*" 0.7; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2006 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application simpleFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 2000; deltaT 1; writeControl timeStep; writeInterval 100; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable true; functions { //#includeFunc streamlines } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2006 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // //Uinlet (10 0 0); dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { "inlet_bot|inlet_top" { /*type fixedValue; value uniform $Uinlet;*/ type fixedProfile; profile csvFile; profileCoeffs { nHeaderLine 0; // Number of header lines refColumn 0; // Reference column index componentColumns (1 2 3); // Component column indices separator ","; // Optional (defaults to ",") mergeSeparators no; // Merge multiple separators file "$FOAM_CASE/0/Uprofile3.csv"; // name of csv data file outOfBounds clamp; // Optional out-of-bounds handling interpolationScheme linear; // Optional interpolation scheme } direction (0 1 0); origin 0; } outlet { type pressureInletOutletVelocity; value uniform (0 0 0); } wall { type noSlip; } #includeEtc "caseDicts/setConstraintTypes" } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2006 | | \\ / A nd | Website: 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 { "inlet_bot|inlet_top" { type zeroGradient; } outlet { type totalPressure; p0 uniform 0; } wall { type zeroGradient; } #includeEtc "caseDicts/setConstraintTypes" } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2006 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object k; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // kInlet 0.015; // approx k = 1.5*(I*U)^2 ; I = 0.1 dimensions [0 2 -2 0 0 0 0]; internalField uniform $kInlet; boundaryField { "inlet_bot|inlet_top" { type fixedValue; value uniform $kInlet; } outlet { type inletOutlet; inletValue uniform $kInlet; value uniform $kInlet; } wall { type kqRWallFunction; value uniform $kInlet; } #includeEtc "caseDicts/setConstraintTypes" } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2006 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object epsilon; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // epsilonInlet 2.755675961e-03; // Cmu^0.75 * k^1.5 / L ; L =10 dimensions [0 2 -3 0 0 0 0]; internalField uniform $epsilonInlet; boundaryField { "inlet_bot|inlet_top" { type fixedValue; value uniform $epsilonInlet; } outlet { type inletOutlet; inletValue uniform $epsilonInlet; value uniform $epsilonInlet; } wall { type epsilonWallFunction; value uniform $epsilonInlet; } #includeEtc "caseDicts/setConstraintTypes" } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2006 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; boundaryField { "inlet_bot|inlet_top" { type calculated; value uniform 0; } outlet { type calculated; value uniform 0; } wall { type nutkWallFunction; value uniform 0; } #includeEtc "caseDicts/setConstraintTypes" } // ************************************************************************* // |
|
January 21, 2021, 17:00 |
|
#2 |
Member
Petros Ampatzidis
Join Date: Oct 2018
Location: Bath, UK
Posts: 64
Rep Power: 8 |
Hi,
The residuals seem that have reached convergence as they do not change any more. But that's only an indicator for a converged solution. Although, 0.1 might seem large, there other factors in that tutorial which may have an influence, e.g. the mesh, which is rather coarse. To understand convergence, you should monitor flow variables, mass flows etc. as well. Best, Petros |
|
Tags |
pressure, simplefoam convergence |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
convergence problem with simpleFoam | Ahmed Khattab | OpenFOAM Running, Solving & CFD | 1 | July 20, 2017 11:23 |
simpleFoam - Convergence problem - Simple rectangular prism domain | HakikiCanakkaleli | OpenFOAM Running, Solving & CFD | 5 | May 9, 2013 05:59 |
Swirl flow convergence problem with simpleFoam | iqbalsk8 | OpenFOAM Running, Solving & CFD | 7 | November 28, 2012 01:54 |
simplefoam convergence problem | Matt1986 | OpenFOAM Running, Solving & CFD | 6 | October 16, 2012 09:32 |
Submerged fin, Convergence problem | supermouniette | FLUENT | 10 | July 6, 2009 11:47 |