CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

I am seeing a 1 percent difference between simpleFoam and StarCCM in a simple case.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 1, 2018, 19:04
Default 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
Talaat is on a distinguished road
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!
Attached Images
File Type: png ccmfoam.png (12.0 KB, 35 views)
Talaat is offline   Reply With Quote

Old   June 2, 2018, 12:02
Default
  #2
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15
Santiago is on a distinguished road
Quote:
Originally Posted by Talaat View Post
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!
The centerline velocity is 1.5 times the mean velocity, so it seems starCCM is a bit closer. Are you sure you used the same schemes on both cases?
Santiago is offline   Reply With Quote

Old   June 2, 2018, 15:17
Default
  #3
New Member
 
Join Date: May 2018
Posts: 9
Rep Power: 8
Talaat is on a distinguished road
Quote:
Originally Posted by Santiago View Post
The centerline velocity is 1.5 times the mean velocity, so it seems starCCM is a bit closer. Are you sure you used the same schemes on both cases?
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.
Talaat is offline   Reply With Quote

Old   June 2, 2018, 17:32
Default
  #4
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
What are the "not exactly the same schemes" exactly?
And what about the residuals? You reached the convergence in both cases?
simrego is offline   Reply With Quote

Old   June 2, 2018, 20:01
Default
  #5
New Member
 
Join Date: May 2018
Posts: 9
Rep Power: 8
Talaat is on a distinguished road
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;
    }
}

// ************************************************************************* //
StarCCM:

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?
Attached Images
File Type: jpg ccmresiduals.jpg (82.9 KB, 20 views)
Talaat is offline   Reply With Quote

Old   June 2, 2018, 20:05
Default
  #6
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15
Santiago is on a distinguished road
Quote:
Originally Posted by Talaat View Post
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.
You cannot compare in such conditions. It is fundamental that your schemes (time space) are exactly the same. Otherwise us just lemons vs pears kind of analogy.
Santiago is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 20:46.