|
[Sponsors] |
I am seeing a 1 percent difference between simpleFoam and StarCCM in a simple case. |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 1, 2018, 19:04 |
I am seeing a 1 percent difference between simpleFoam and StarCCM in a simple case.
|
#1 |
New Member
Join Date: May 2018
Posts: 9
Rep Power: 8 |
I am simulating air flow through a pipe that is 0.3 m long and 0.00498117 m in radius (very simple problem). The flow is laminar. Boundary condition is uniform1 m/s air flow through the inlet and 0 pressure at outlet. The exact same mesh is used in both programs (not too coarse but not fine ~895k cells). I generated the mesh in StarCCM and converted it to OpenFOAM using ccm26ToFoam. The material properties specified in both programs are the same.
transportModel Newtonian; nu nu [ 0 2 -1 0 0 0 0 ] 1.566592e-05; rhoRef 1.18415; I am seeing a ~1% discrepancy between the center line velocity in x direction at the end of the pipe (see attached). Both cases were run for 1000+ steps. What could explain this discrepancy? Thanks! |
|
June 2, 2018, 12:02 |
|
#2 | |
Senior Member
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15 |
Quote:
|
||
June 2, 2018, 15:17 |
|
#3 |
New Member
Join Date: May 2018
Posts: 9
Rep Power: 8 |
The numerical schemes used on both cases are not exactly the same. The mesh, material properties, boundary conditions, etc are the same. The case considered here is a very simple flow problem, so one wouldn't expect different numerical schemes to produce different results.
|
|
June 2, 2018, 17:32 |
|
#4 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
What are the "not exactly the same schemes" exactly?
And what about the residuals? You reached the convergence in both cases? |
|
June 2, 2018, 20:01 |
|
#5 |
New Member
Join Date: May 2018
Posts: 9
Rep Power: 8 |
OpenFOAM:
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 fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default steadyState; } gradSchemes { default Gauss linear; } divSchemes { default none; div(phi,U) bounded Gauss linearUpwind grad(U); div(phi,T) Gauss upwind; div(phi,k) bounded Gauss limitedLinear 1; div(phi,epsilon) bounded Gauss limitedLinear 1; div(phi,R) bounded Gauss limitedLinear 1; div(R) bounded Gauss limitedLinear 1; div((nuEff*dev2(T(grad(U))))) Gauss linear; div(nonlinearStress) 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: 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-08; relTol 0.0; smoother GaussSeidel; } "(U|T|k|epsilon|R)" { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-8; relTol 0.0; } "(U|T|k|epsilon|R)Final" { $U; relTol 0; } } relaxationFactors { fields { p 0.3; } equations { U 0.7; } } SIMPLE { nNonOrthogonalCorrectors 0; residualControl { p 1e-5; U 1e-5; "(k|epsilon)" 1e-5; } } // ************************************************************************* // Gradients: Gradient Method: Hybrid Gauss-LSQ Limiter Method: Venkatakrishnan Custom Accuracy Level Selector: 2.0 No verbose. Least-Squares Quality Criterion activated Flat Cells Curvature Criterion activated Cell Skewness Criterion activated Chevron-Cell Criterion activated Least-Squares Tensor Minimum Eignenvalues Ratio 0.1 Normalized Flat Cells Curvature Factor 1.0 Maximum safe skewness angle (deg) 75 Minimum unsafe skewness angle (deg) 88 TVB Gradient Limited: No Acceptable Field Variation (Factor) 0.05 The residuals decrease until they reach 1E-5 and then an oscillating flat residuals profile is observed. The fluctuations in the velocity profiles are likely because the mesh is not fine enough as mentioned and as the values are taken on the centerline and not averaged over a surface or so. But the same mesh is used in both programs, so one would expect the same results still? |
|
June 2, 2018, 20:05 |
|
#6 | |
Senior Member
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Experimental data vs SimpleFoam sphere test case : Cd do not match | alsdia | OpenFOAM Verification & Validation | 1 | November 2, 2012 05:37 |