
[Sponsors] 
April 15, 2013, 12:42 
no solution in second order schemes

#1 
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 18 
my problem is running well by first order schemes like upwind but when change schemes to higher order like limitedLinear 1.0 it crashes.
the results seem fine so far should I necessarily have a run with second order to ensure accuracy or not? 

April 16, 2013, 09:55 

#2 
New Member
Hĺkon Bartnes Line
Join Date: Mar 2013
Posts: 27
Rep Power: 5 
First order upwind schemes are very diffusive, and this added "numerical viscosity" can sometimes have a big impact on the solution. It's therefore highly recommended to use at least 2nd order upwind schemes. What matters, of course, is how close you get to matching your verification/validation data, so if that's satisfactory, then there's no need to go for higher order schemes.
If stability is an issue, you could try decreasing the relaxation factors for one or more of your flow variables. You could also try using the first order solution as an initial condition by switching to a second order scheme once your first order solution has converged. 

April 16, 2013, 10:27 

#3 
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 18 
thank you Hakon.my case is unsteady compressible.so what are your advices?


April 16, 2013, 11:55 

#4 
Senior Member
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 237
Rep Power: 9 
If you start with a upwind (first order), you can use a linearUpwind (second order). In some cases a linearUpwindV (second order) can be more robust because it is a pure upwind second order.
To use a linearUpwind, you need to give a gradient or a flux (to tell the scheme what is the direction of the flow). it can be for example: Code:
div(phi,U) Gauss upwind; Code:
div(phi,U) Gauss linearUpwind grad(U); Code:
default Gauss linear; Code:
default leastSquares; Code:
default cellLimited leastSquares; 

April 16, 2013, 12:01 

#5 
Senior Member
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 237
Rep Power: 9 
Ps. Take a look at the cases I've sent on my post:
Manual limiter of velocity doesn't work I put my cases with all the schemes. You can look at this case to get an example. http://www.fredo490.fr/public/rhoLTS...aca12AOA4.zip 

May 22, 2013, 10:37 

#6 
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 18 
Hi Heckman and others!
sorry for long delay,other necessary to solve problems occurred. could you please help me with these subjects: 1)what does a "convection dominated" problem mean?mean when we call a flow simulation convective term dominated in return of diffusive dominated? 2)when a problem is called second order?mean what terms in fvSchemes at least be second order so that whole the numerical system be second order?is it sufficient to have div(phi,U) in second order scheme? 3)in rhoCentralFoam I haven't a div(phi,U),then how change it to second order schame?which terms should be changed? Code:
fluxScheme Kurganov; ddtSchemes { default none; ddt(rho) Euler; ddt(rhoU) Euler; ddt(rhoE) Euler; ddt(rho,U) Euler; ddt(rho,e) Euler; ddt(rho,h) Euler; ddt(rho,omega) Euler; ddt(rho,k) Euler; ddt(rho,gas) Euler; } gradSchemes { default none; grad(U) Gauss linear; grad(rho) Gauss linear; grad(rhoU) Gauss linear; grad((1psi)) Gauss linear; grad(e) Gauss linear; grad((1thermo:psi)) Gauss linear; grad(h) Gauss linear; grad(sqrt(((CpCv)*(1psi)))) Gauss linear; grad(sqrt(((CpCv)*(1thermo:psi)))) Gauss linear; grad(T) Gauss linear; grad(omega) Gauss linear; grad(k) Gauss linear; grad(gas) Gauss linear; } divSchemes { default none; div(tauMC) Gauss linear; div(phi) Gauss upwind; div(phi,omega) Gauss upwind; div(phi,k) Gauss upwind; div(phi,gas) Gauss upwind; } laplacianSchemes { default none; laplacian(muEff,U) Gauss linear corrected; laplacian(alphaEff,e) Gauss linear corrected; laplacian(alpha,e) Gauss linear corrected; laplacian(k,T) Gauss linear corrected; laplacian(DepsilonEff,omega) Gauss linear corrected; laplacian(DkEff,k) Gauss linear corrected; laplacian(DomegaEff,omega) Gauss linear corrected; laplacian(alphaEff,h) Gauss linear corrected; laplacian(muEff,gas) Gauss linear corrected; } interpolationSchemes { default none; reconstruct(rho) vanLeer; reconstruct(U) vanLeerV; reconstruct(T) vanLeer; interpolate(rho) linear; interpolate(U) linear; interpolate(rhoU) linear; interpolate(muEff) linear; interpolate(tauMC) linear; } snGradSchemes { default none; snGrad(U) corrected; }
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. 

May 22, 2013, 11:07 

#7 
Senior Member
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 237
Rep Power: 9 
1) see page 10 of this pdf : http://www.bakker.org/dartmouth06/engs150/04clsfn.pdf
2) a second order scheme is highly recommended in all simulations. Many phenomenon cannot "appear" with a first order. When you have shear regions, a second order scheme can give beautiful vortex while a first order might stay "laminar". Example here : http://www.innovativecfd.com/comput...modeling.html It is also important for the shock waves, page 31 of this doc: http://www.bakker.org/dartmouth06/engs150/05solv.pdf 3) As I know, rhoCentralFoam only use "linear" scheme so it is natural second order solver (except for time if you use "Euler"). 

May 22, 2013, 11:23 

#8 
Member
Eric Robertson
Join Date: Jul 2012
Posts: 95
Rep Power: 6 
Please explain. I have done a simple study comparing the convergence of linearUpwind vs. linearUpwindV (of course, using the limiting helps). But, I do not understand the theory behind the difference between the two. You say one is pure 2nd order then what is the other?


May 22, 2013, 11:44 

#9 
Senior Member
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 237
Rep Power: 9 
The difference is in how the scheme correct the value. The linearUpwind uses a "simple" correction that is not very accurate for some meshes (I would say some nonorthogonal meshes). The linearUpwindV improve the correction factor so that the correction factor also consider the direction of the flow.
To make it simple, from what I know, the linearUpwindV is an upwind scheme with an upwind corrector while the linearUpwind is an upwind scheme with a simple corrector So when I say that linearUpwindV is a "pure" upwind, it is because all the concepts of the scheme are of upwind type. 

May 22, 2013, 12:28 

#10 
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 18 
thank you
but I didn't take the answer of 2 and 3 questions exactly,is it sufficient to change div(rho,phi) to a second order scheme so that our problem be second order?(when a run is called second order does it mean its div(phi,U) is second order? and in rhoCentralFoam there are other divergence terms.should all of them be for example linearUpvindV?(and does linearUpwindV is used for when we have U in div like div(phi,U)?or can be udes for other div terms too?) Code:
divSchemes { default none; div(tauMC) Gauss linear; div(phi) Gauss upwind; div(phi,omega) Gauss upwind; div(phi,k) Gauss upwind; div(phi,gas) Gauss upwind; }
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. 

May 22, 2013, 12:40 

#11 
Senior Member
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 237
Rep Power: 9 
As I said rhoCentralFoam is a little special... I'm not familiar with the code.
Everybody can choose what is a second order problem. There is no official definition. Ideally ALL schemes must be of second order... But because some cases are unstable with the second order turbulence some papers "forget" to say that they used all second order except for some variables 

May 22, 2013, 12:40 

#12 
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 18 
and also in rhoPimpleFoam what changes seems better to be done to have a better second order solution?(for example in div(phi,K) its better to be limitedLinear or linearUpwind?)
Code:
ddtSchemes { default none;//CrankNicolson 0.5 ddt(rho,U) CrankNicolson 0.5; ddt(rho,K) CrankNicolson 0.5; ddt(rho,h) CrankNicolson 0.5; ddt(thermo:psi,p) CrankNicolson 0.5; ddt(rho) CrankNicolson 0.5; ddt(p) CrankNicolson 0.5; ddt(rho,gas) CrankNicolson 0.5; } gradSchemes { default none;//Gauss linear grad(p) Gauss linear;//faceLimited leastSquares 1.0 grad(U) cellLimited leastSquares 1.0; grad(h) Gauss linear; } divSchemes { default none; div(phi,U) Gauss linearUpwind grad(U); div(phid,p) Gauss limitedLinear 1; div(phi,K) Gauss upwind; div(phi,h) Gauss limitedLinear 1; div(U) Gauss linearUpwind; div((muEff*dev2(T(grad(U))))) Gauss linear; div(phi,gas) Gauss upwind; } laplacianSchemes { default none; laplacian(Dp,p) Gauss linear uncorrected; laplacian(muEff,U) Gauss linear uncorrected; laplacian(alphaEff,h) Gauss linear uncorrected; laplacian(muEff,gas) Gauss linear uncorrected; } interpolationSchemes { default linear; } snGradSchemes { default uncorrected; } fluxRequired { default no; p ;
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. 

May 22, 2013, 12:57 

#13 
Senior Member
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 237
Rep Power: 9 
I don't know, you need to try... As K is the kinetic energy, so it depends of U, I would say that the same second order scheme as U can be applied (linearupwind). But if your case diverge or over predict the temperature, you can try to use a limited linear scheme.


May 22, 2013, 14:37 

#14 
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 18 
then whats your opinion about this fvScheme has been used for rhoCentralFoam,is it first order or second order:
Code:
divSchemes { default none; div(tauMC) Gauss linear; div(phi) Gauss upwind; div(phi,omega) Gauss upwind; div(phi,k) Gauss upwind; div(phi,gas) Gauss upwind; }
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. 

May 23, 2013, 01:39 

#15 
Senior Member
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 237
Rep Power: 9 
I have no idea... I don't know this solver. Part of it is hard coded. At first look Iwould ssay that it is second order with first order turbulence model.


Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
second order schemes  marine  OpenFOAM  66  October 26, 2014 12:10 
Visualization of higher order solution  shyamdsundar  Main CFD Forum  1  July 23, 2010 03:55 
Pade type higher order schemes  RameshK  Main CFD Forum  0  July 17, 2010 14:19 
CFL condition for higher order schemes  Shyam  Main CFD Forum  2  February 14, 2008 15:24 
High order compact finite difference schemes  Mikhail  Main CFD Forum  6  August 5, 2003 10:36 