|
[Sponsors] |
Sudden Expansion with SimpleFoam - Convergence Issue and cumulative error. |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Dan
Join Date: Sep 2016
Posts: 20
Rep Power: 10 ![]() |
I'm simulating the flow in a capillary with a sudden expansion with OF 2.4.0. The small capillary has a diamater of 250 µm. The big capillar has a diamater of 1000 µm. My flow rate ist $ 1\frac{ml}{min} $. Using standard properties of water I have a Reynolds number of 85 in my small pipe. For my mesh I choose one similar to this case: https://openfoamwiki.net/index.php/S...rupt_Expansion. I am using a low-Re mesh. I simulated it laminar first, but it seems unphysical to me, because I couldn't see any vortex, but because of the high expansion ratio one would expect a vortex after the sudden diameter change.
Now I'm using k-omega-SST and get a vortex, but after the expansion the flow isn't going back to a full developed profile.( I had the same issue with laminar simulation) I tried to make the second part of my geometry longer, but it doesn't effect the result. What seems strange to me: GAMG: Solving for p, Initial residual = 0.00667948, Final residual = 6.67903e-06, No Iterations 927 time step continuity errors : sum local = 8.36257e-10, global = 2.7631e-10, cumulative = -0.00370942 First I need a lot of iterations for pressure and second only the cumulative error is much higher than the others. Also have to say, that it doesn't really change much with more iterations. I attached some pictures of the solution below. Line plots are through the centerline. Right now I'm really stuck and don't have any ideas what to change. Here are my boundary conditions: k: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.5 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object k; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 3.65e-04; boundaryField { inlet { type fixedValue; value uniform 3.65e-04; } outlet { type zeroGradient; } /*walls { type fixedValue; value uniform 1e-11; } */ walls { type kqRWallFunction; value uniform 1e-11; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.5 | | \\ / A nd | Web: http://www.openfoam.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object omega; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 -1 0 0 0 0]; internalField uniform 5000.15; boundaryField { inlet { type fixedValue; value uniform 5000.15; } outlet { type zeroGradient; } walls { //type fixedValue; //value uniform 1e-11; type omegaWallFunction; value uniform 1e-11; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ 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 { type zeroGradient; } outlet { type fixedValue; value uniform 0; } walls { type zeroGradient; } } // ************************************************************************* // Code:
U: /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { /*inlet { type flowRateInletVelocity; volumetricFlowRate 1.6646690e-08; value uniform (0 0 0); } */ inlet { type groovyBC; value uniform (0 0 0); variables ( "profile= ( - 1*6.78e-01 / pow(max(pts().x),2) * (pow(pos().y,2) + pow(pos().x,2)) + 1*6.78e-01);" ); valueExpression "-normal()*profile"; } /*inlet { type fixedValue; value uniform (0 0 0.001); } */ outlet { type zeroGradient; } walls { type fixedValue; value uniform (0 0 0); } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Ziel: Cumulative Error Roundabout 1e-08 zum Schluss! solvers { p { solver GAMG; tolerance 1e-06; // 1.)1e-04 2.) 1e-05 3.)1e-06 4.) 1e-07 relTol 0.01; //1.)0.2, 2.)0.01 smoother GaussSeidel; nPreSweeps 1;//1 nPostSweeps 2; cacheAgglomeration on; agglomerator faceAreaPair; nCellsInCoarsestLevel 10; // 10 mergeLevels 1; maxIter 1000; } "(U|k|epsilon|R|nuTilda|omega)" { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-06; // 3.) 1e-06 4.) 1e-07 relTol 0.1; // 0.1 } } SIMPLE { nNonOrthogonalCorrectors 0; //1 residualControl { p 1e-3; U 1e-3; "(k|epsilon|omega)" 1e-3; } } relaxationFactors { fields { p 0.5; //1).0.62.)3.)0.4 } equations { U 0.7; k 0.7; epsilon 0.7; R 0.7; nuTilda 0.7; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default steadyState; } gradSchemes { default Gauss linear; } divSchemes { default none; div(phi,U) bounded Gauss upwind; div(phi,nuTilda) bounded Gauss upwind; div(phi,omega) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; div(phi,epsilon) bounded Gauss upwind; div((nuEff*dev(T(grad(U))))) Gauss linear; div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } fluxRequired { default no; p ; } // ************************************************************************* // Gesetzt ![]() ![]() ![]() ![]() |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Time Step Continuity Errors simpleFoam | Dorian1504 | OpenFOAM Running, Solving & CFD | 1 | October 9, 2022 09:23 |
LES, Courant Number, Crash, Sudden | Alhasan | OpenFOAM Running, Solving & CFD | 5 | November 22, 2019 02:05 |