2nd Order Schemes

I have solved a case with satisfactory convergence ,that includes an fsae car using the recommended schemes in the numerics tab.But i noticed that these are mainly 1st order schemes in the divergence discretisation.Simultaneously I have solved the same case using OpenFOAM with 2nd orded schmes and noticed a 22% difference in force coeffs which is significant.Now I am trying to solve the same case in SimScale with 2nd order schemes but seems that I have done something wrong because of the fact that the case did not converge.I am attaching images with the convergence plot and the numerics settings of the case both with the 1st order schemes and the 2nd order that I used.

Thank you for your time!

1st order schemes:

Convergence plot of 1st order schemes

2nd order schemes:

Convergence plot of 2nd order schemes

Hi @kkotsarinis and thanks for your question(s)!

Do you mind sharing your project link with us in the comment section? Makes it easier for us to see what settings you have chosen for your model, how the mesh looks like etc. - I will have a look at your project then and get back to you as soon as I have found a solution to this problem.

Cheers and thanks!

Jousef

This is the link of the simulation: https://www.simscale.com/workbench/?pid=3405221848583193277#tab_0-0

@kkotsarinis, I also think it would be beneficial if you share your setup for your OpenFOAM run also, I presume the SimScale setup is identical to your OpenFOAM setup?

Kind regards,
Darren

Here are the files of the OpenFOAM case:

fvSchemes:

/--------------------------------- C++ -----------------------------------
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.6 |
| \ / 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;
grad(p) Gauss linear;
grad(U) cellLimited Gauss linear 1;
// gradU cellLimited Gauss linear 1;
// grad(nuTilda) cellLimited Gauss linear 1;
// gradNuTilda cellLimited Gauss linear 1;
}

divSchemes
{
default Gauss linear;
div(phi,U) bounded Gauss linearUpwind gradU;
div(phi,nuTilda) bounded Gauss linearUpwind gradU;
//div(phi,nuTilda) bounded Gauss upwind;
div((nuEff*dev(grad(U).T()))) Gauss linear;
}

laplacianSchemes
{
default Gauss linear corrected; // Gauss linear limited corrected 0.33;
}

interpolationSchemes
{
default linear;
interpolate(U) linear;
}

snGradSchemes
{
default corrected; //limited corrected 0.33;
}

fluxRequired
{
default no;
p ;
Phi ;
}

// ************************************************************************* //

fvSolution:

/--------------------------------- 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;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
“(p)”
{
solver GAMG;
agglomerator faceAreaPair;
mergeLevels 1;
cacheAgglomeration on;
nCellsInCoarsestLevel 200;
tolerance 1e-11;
relTol 0.01;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
nFinestSweeps 2;
minIter 1;
}

"(U|nuTilda)"
{
    solver          PBiCG;
preconditioner  DILU;
tolerance 	1e-15;
relTol		0.01;
}

// Phi
// {
// $p;
// }
}

SIMPLE
{
nNonOrthogonalCorrectors 0;
}

potentialFlow
{
nNonOrthogonalCorrectors 10;
}

relaxationFactors
{
fields
{
p 0.2;
}
equations
{
U 0.5;
nuTilda 0.5;
}
}

cache
{
grad(U);
}

// ************************************************************************* //

Yes, I am trying to make an idetical setup and compare the results.

@kkotsarinis, Could you also show me your turbulenceProperties?

Cheers,
Darren

@1318980 these are the files
turbulence properties:

/--------------------------------- C++ -----------------------------------
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 2.1.x |
| \ / A nd | Web: www.OpenFOAM.org |
| \/ M anipulation | |
*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

simulationType RASModel;

// ************************************************************************* //
transport properties:
/--------------------------------- 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;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

transportModel Newtonian;

nu nu [0 2 -1 0 0 0 0] 1.511e-05;

// ************************************************************************* //
RASProperties:
/--------------------------------- 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;
object RASProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

RASModel kOmegaSST;

turbulence on;

printCoeffs on;

// ************************************************************************* //

1 Like

In these days I tried some other combinations of 2nd order schemes, but none of them worked.I also searched in public projects and the forum for a tutorial or another study that I could refer that uses 2nd order schemes but I did not find anything similar.From my experience using first order schemes is really sacrificing accuracy on results ,which makes me wonder why there is no documentation on them in this site and everyone uses the first order schemes. Thanks again for your time!

Hi @kkotsarinis,

Just my two cents on 2nd order schemes using SimScale.

2nd order schemes are indeed much better and I would use them for all my runs if possible. With that being said, so far the projects that I’ve encountered and simulated tend to produce sufficiently accurate results (typically at most 1%-5% error at worst) using first order schemes. Likely, the projects are insufficiently complex which hence the need to not use 2nd order schemes.

With being said, I’ve also encountered the other end of the spectrum where 2nd order schemes should be used but due to how drastically complex the geometry is, the simulation just instantly becomes unstable and crashes.

I suggest finding a sweet spot in terms of project complexity that you can then test where the instability of the second order schemes comes from and then improving on that before increasing complexity to see if the simulation holds up. From my experience, the mesh quality is the biggest factor where things like skewness ratio, low or zero illegal cells and very high mesh definition play into the eventual stability of the simulation when using 2nd order schemes.

Apologies for no direct solution to the problem. But if you do try it out and get something do let us all know!

Cheers.

Regards,
Barry

1 Like

@kkotsarinis, firstly I apologise for not getting back to you sooner.

The default numerics are tried and tested to give the most stable, fast accurate results. However, you can obviously change all setting, and documentation is provided by open foam (which brings us full circle as to why the setup reportedly works on open foam and not SimScale).

The first thing I noticed was that you posted the logs for an SA turbulence model and was comparing to a different model in SimScale but it looks like you changed them as it was a mistake.

Secondly, the changes in the divergence schemes from limited upwind to upwind means you actually were using second order but then changed it to first order:

Gauss limited upwind (second order)
https://holzmann-cfd.de/numerical-schemes/standard-schemes/gauss-linearupwind

Gauss upwind (1st order)
https://holzmann-cfd.de/numerical-schemes/standard-schemes/gauss-upwind

But the problem persists, if it works on openfoam it should work on SimScale, have you tried downloading the SimScale case file and running it locally and comparing it to you OpenFOAM setup? this will highlight any discrepancies in the setup.

Kind regards,
Darren

3 Likes