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

convergence of QUICK scheme - simpleFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree4Likes
  • 4 Post By fredo490

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 7, 2013, 08:22
Default convergence of QUICK scheme - simpleFoam
  #1
New Member
 
Luis Batista
Join Date: Mar 2013
Location: Lisboa / Setúbal
Posts: 17
Rep Power: 13
Luis Batista is on a distinguished road
Hello,

I am using SimpleFoam for a Laminar cavity flow model.

I am doing a grid refinement study and to improve my convergence, I want to use a higher order convection scheme QUICK.

The plotted residuals are not looking very nice and after I have changed the relaxation parameters, it seems that this is not being sensitive to my changes.

I here post my controlDict; fvSchemes and fvSolution and send plot the residuals in attachment.

Please help!

controlDict:

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

application simpleFoam;

startFrom latestTime;

startTime 0;

stopAt endTime;

endTime 1000;

deltaT 1;

writeControl timeStep;

writeInterval 50;

purgeWrite 1;

writeFormat ascii;

writePrecision 12;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;


}

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


fvSchemes:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.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;
grad(p) Gauss linear;
grad(U) Gauss linear;
}

divSchemes
{
default none;
div(phi,U) bounded Gauss QUICK;
div(phi,k) bounded Gauss upwind;
div(phi,epsilon) bounded Gauss upwind;
div(phi,R) bounded Gauss upwind;
div(R) Gauss linear;
div(phi,nuTilda) bounded Gauss upwind;
div((nuEff*dev(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
laplacian(DREff,R) Gauss linear corrected;
laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
}

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

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p ;
}


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

fvSolution:

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

solvers
{
p
{
solver PCG;
preconditioner DIC;
tolerance 1e-6;
relTol 0.01;
}

U
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-5;
relTol 0.1;
}


}

SIMPLE
{
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;


residualControl
{
p 1e-2;
U 1e-3;

}
}

relaxationFactors
{
fields
{
p 0.3;

}
equations
{
U 0.7;

}
}


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

Regards,
Luis Batista
Attached Images
File Type: png res_Ux_Uy_p_ini_Fin.png (7.9 KB, 109 views)
Luis Batista is offline   Reply With Quote

Old   May 7, 2013, 09:30
Default
  #2
Senior Member
 
T. Chourushi
Join Date: Jul 2009
Posts: 321
Blog Entries: 1
Rep Power: 17
Tushar@cfd is on a distinguished road
Quote:
Originally Posted by Luis Batista View Post
Hello,

I am using SimpleFoam for a Laminar cavity flow model.

I am doing a grid refinement study and to improve my convergence, I want to use a higher order convection scheme QUICK.

The plotted residuals are not looking very nice and after I have changed the relaxation parameters, it seems that this is not being sensitive to my changes.

I here post my controlDict; fvSchemes and fvSolution and send plot the residuals in attachment.

Please help!



controlDict:

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

application simpleFoam;

startFrom latestTime;

startTime 0;

stopAt endTime;

endTime 1000;

deltaT 1;

writeControl timeStep;

writeInterval 50;

purgeWrite 1;

writeFormat ascii;

writePrecision 12;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;


}

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


fvSchemes:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.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;
grad(p) Gauss linear;
grad(U) Gauss linear;
}

divSchemes
{
default none;
div(phi,U) bounded Gauss QUICK;
div(phi,k) bounded Gauss upwind;
div(phi,epsilon) bounded Gauss upwind;
div(phi,R) bounded Gauss upwind;
div(R) Gauss linear;
div(phi,nuTilda) bounded Gauss upwind;
div((nuEff*dev(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
laplacian(DREff,R) Gauss linear corrected;
laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
}

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

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p ;
}


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

fvSolution:

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

solvers
{
p
{
solver PCG;
preconditioner DIC;
tolerance 1e-6;
relTol 0.01;
}

U
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-5;
relTol 0.1;
}


}

SIMPLE
{
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;


residualControl
{
p 1e-2;
U 1e-3;

}
}

relaxationFactors
{
fields
{
p 0.3;

}
equations
{
U 0.7;

}
}


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

Regards,
Luis Batista


It seems, your pressure is not converging after some time iterations. Well, for your particular problem case why don't you go for icoFoam (laminar).

simpleFoam is Steady-state solver for incompressible, turbulent flow.

As for the files are concerned it seems all OK to me. I think you are using the already available case files with OF.

Tushar@cfd is offline   Reply With Quote

Old   May 7, 2013, 09:59
Default
  #3
New Member
 
Luis Batista
Join Date: Mar 2013
Location: Lisboa / Setúbal
Posts: 17
Rep Power: 13
Luis Batista is on a distinguished road
Quote:
Originally Posted by Tushar@cfd View Post
It seems, your pressure is not converging after some time iterations. Well, for your particular problem case why don't you go for icoFoam (laminar).

simpleFoam is Steady-state solver for incompressible, turbulent flow.

As for the files are concerned it seems all OK to me. I think you are using the already available case files with OF.

Hello,

thanks for your support.

I share the same impression as you, that it, the pressure is not converging (and the velocities are also not converging monotonically).

About IcoFoam:

I am using SimpleFoam since from my previous experience with IcoFoam, I have not managed to use under-relaxation factors for p and U. I have tried to use them previously and the solution was not reacting at all. I concluded that the convergence cannot be controled in IcoFoam thry this. (please correct me if I am wrong).

From my POV, icoFoam is meant to produce a time-accurate solution and the only way to control the algorithm convergence is by the local linear system residual (there is no outer loop convergence criteria). (correct me if I am wrong).

Additionally, I also inform that the convergence problem herefound was also happening in Icofoam.

About simpleFoam:

With respect to the problem here reported, it seems that the QUICK scheme is always trying to solve the algorithm for a source term (maybe coming from deferration´from previous time step)...I don´t know.

Did I add any further information that you find helpful to understand my problem?

thanks,
Luis
Luis Batista is offline   Reply With Quote

Old   May 8, 2013, 02:48
Default
  #4
Senior Member
 
T. Chourushi
Join Date: Jul 2009
Posts: 321
Blog Entries: 1
Rep Power: 17
Tushar@cfd is on a distinguished road
Quote:
Originally Posted by Luis Batista View Post
Hello,

thanks for your support.

I share the same impression as you, that it, the pressure is not converging (and the velocities are also not converging monotonically).

About IcoFoam:

I am using SimpleFoam since from my previous experience with IcoFoam, I have not managed to use under-relaxation factors for p and U. I have tried to use them previously and the solution was not reacting at all. I concluded that the convergence cannot be controled in IcoFoam thry this. (please correct me if I am wrong).

From my POV, icoFoam is meant to produce a time-accurate solution and the only way to control the algorithm convergence is by the local linear system residual (there is no outer loop convergence criteria). (correct me if I am wrong).

Additionally, I also inform that the convergence problem herefound was also happening in Icofoam.

About simpleFoam:

With respect to the problem here reported, it seems that the QUICK scheme is always trying to solve the algorithm for a source term (maybe coming from deferration´from previous time step)...I don´t know.

Did I add any further information that you find helpful to understand my problem?

thanks,
Luis

You are correct, about both the IcoFoam & SimpleFoam solvers.
Since, you are using QUICK scheme then why don't you check with coarse mesh first, as the convergence depends on source term (deffered correction). If you are successful then try with fine mesh.
I would suggest you to try with different solver, may be it will be beneficial in getting convergence.

Tushar@cfd is offline   Reply With Quote

Old   May 8, 2013, 03:39
Default
  #5
Senior Member
 
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 249
Rep Power: 16
fredo490 is on a distinguished road
Why don't you use a linearUpwind Scheme ? It's the second order of the upwind scheme You can also use the linearUpwindV that is the pure upwind scheme of linearUpwind (the difference is in the "V" at the end).

div(phi,U) bounded Gauss upwind;
becomes
div(phi,U) Gauss linearUpwind grad(U);

You can also put all your other scheme to second order. Be careful, the gradient term must have the corresponding variable (= the second variable in the div() that correspond to the one solved).

So div(phi,k) bounded Gauss upwind; becomes div(phi,k) Gauss linearUpwind grad(k);
fredo490 is offline   Reply With Quote

Old   May 8, 2013, 05:55
Default
  #6
New Member
 
Luis Batista
Join Date: Mar 2013
Location: Lisboa / Setúbal
Posts: 17
Rep Power: 13
Luis Batista is on a distinguished road
Quote:
Originally Posted by Tushar@cfd View Post
You are correct, about both the IcoFoam & SimpleFoam solvers.
Since, you are using QUICK scheme then why don't you check with coarse mesh first, as the convergence depends on source term (deffered correction). If you are successful then try with fine mesh.
I would suggest you to try with different solver, may be it will be beneficial in getting convergence.

Hello,

I have tried this scheme up to grid refinement ratios of 4, that is, from 50x50 up to 400x400. It is the same problem....

I believe I am going to try a different scheme for now, p.e., Linear Upwind and leave this issue for when I understand better how the deferred correction is working for QUICK scheme.

If you now where I can find this type of information please let me know.

Best Regards,
Luis
Luis Batista is offline   Reply With Quote

Old   May 8, 2013, 06:08
Default
  #7
New Member
 
Luis Batista
Join Date: Mar 2013
Location: Lisboa / Setúbal
Posts: 17
Rep Power: 13
Luis Batista is on a distinguished road
Quote:
Originally Posted by fredo490 View Post
Why don't you use a linearUpwind Scheme ? It's the second order of the upwind scheme You can also use the linearUpwindV that is the pure upwind scheme of linearUpwind (the difference is in the "V" at the end).

div(phi,U) bounded Gauss upwind;
becomes
div(phi,U) Gauss linearUpwind grad(U);

You can also put all your other scheme to second order. Be careful, the gradient term must have the corresponding variable (= the second variable in the div() that correspond to the one solved).

So div(phi,k) bounded Gauss upwind; becomes div(phi,k) Gauss linearUpwind grad(k);
I appreciate your comment. I am really looking forward to move away (for now from QUICK) and already started to do some tests which duly converge as expected.

However, I have not implemented exactly as you wrote, let me recapitulate what I believe I now in order that you can give me a further push

div(phi,U) - means the discretization of the convection term where phi is denominates as flux of the dependent variable U thru velocitycell faces and U is the dependent variable (unknown).

so, I do no understand why you mention:
"
div(phi, U) Gauss linearUpwind grad(U);
"

1) Isn´t it enough to write?
"
div(phi, U) Gauss linearUpwind
"
Luis Batista is offline   Reply With Quote

Old   May 8, 2013, 06:16
Default
  #8
Senior Member
 
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 249
Rep Power: 16
fredo490 is on a distinguished road
no it's not enough because the linearUpwind needs to know what is the direction of your "flow" or variable your study. The linearUpwind only consider the flow from where it comes and not from where it goes. Therefor you need to tell the scheme in which direction he needs to make the computation.

Originally you could write: "div(phi, U) Gauss linearUpwind phi" where phi tells the direction of the flow. But with the new versions of OpenFoam, people got use to write the gradient of the variable, which is the same as giving phi (the flux at the face).


I'm not sure if the solver accept "div(phi, U) Gauss linearUpwind". Maybe the scheme takes a default value defined as "phi". However, this is only true for the velocity scheme. For the other, you need to specify the corresponding flux (by using the gradient).
fredo490 is offline   Reply With Quote

Old   May 8, 2013, 06:28
Default
  #9
New Member
 
Luis Batista
Join Date: Mar 2013
Location: Lisboa / Setúbal
Posts: 17
Rep Power: 13
Luis Batista is on a distinguished road
Quote:
Originally Posted by fredo490 View Post
no it's not enough because the linearUpwind needs to know what is the direction of your "flow" or variable your study. The linearUpwind only consider the flow from where it comes and not from where it goes. Therefor you need to tell the scheme in which direction he needs to make the computation.

Originally you could write: "div(phi, U) Gauss linearUpwind phi" where phi tells the direction of the flow. But with the new versions of OpenFoam, people got use to write the gradient of the variable, which is the same as giving phi (the flux at the face).


I'm not sure if the solver accept "div(phi, U) Gauss linearUpwind". Maybe the scheme takes a default value defined as "phi". However, this is only true for the velocity scheme. For the other, you need to specify the corresponding flux (by using the gradient).
Thanks. Your explanation is very clear.
Luis Batista is offline   Reply With Quote

Old   May 8, 2013, 10:19
Default
  #10
Senior Member
 
T. Chourushi
Join Date: Jul 2009
Posts: 321
Blog Entries: 1
Rep Power: 17
Tushar@cfd is on a distinguished road
Are you able to get convergence? @Luis

Thanks fredo, for your valuable post even I was not aware of these.

Tushar@cfd is offline   Reply With Quote

Old   May 11, 2013, 18:35
Default
  #11
New Member
 
Luis Batista
Join Date: Mar 2013
Location: Lisboa / Setúbal
Posts: 17
Rep Power: 13
Luis Batista is on a distinguished road
Quote:
Originally Posted by Tushar@cfd View Post
Are you able to get convergence? @Luis

Thanks fredo, for your valuable post even I was not aware of these.

Hello,

I am having success with LinearUpwind, however, I was expecting a better order of convergence...

Anyhow, I will try to run tests and see what are the variables that I must use to have convergence with QUICK.

Regards,
Luis
Luis Batista is offline   Reply With Quote

Reply

Tags
simplefoam;quick

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
QUICK scheme paper by T. Hayase 1992 bouloumag Main CFD Forum 2 March 31, 2019 18:04
Implementation of QUICK scheme Romuald Skoda Main CFD Forum 11 November 6, 2017 22:20
2nd order boundary condition for QUICK scheme Jafarnia Main CFD Forum 0 February 25, 2004 10:03
Quick Scheme Mikel A. Main CFD Forum 2 February 23, 2004 13:58
Quick Scheme Ahmad Falahat Pisheh Main CFD Forum 0 January 10, 2004 12:38


All times are GMT -4. The time now is 12:37.