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

no solution in second order schemes

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

Like Tree1Likes
  • 1 Post By fredo490

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 15, 2013, 12:42
Default no solution in second order schemes
  #1
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
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?
immortality is offline   Reply With Quote

Old   April 16, 2013, 09:55
Default
  #2
New Member
 
Hĺkon Bartnes Line
Join Date: Mar 2013
Posts: 27
Rep Power: 14
hakonbar is on a distinguished road
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.
hakonbar is offline   Reply With Quote

Old   April 16, 2013, 10:27
Default
  #3
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
thank you Hakon.my case is unsteady compressible.so what are your advices?
immortality is offline   Reply With Quote

Old   April 16, 2013, 11:55
Default
  #4
Senior Member
 
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 249
Rep Power: 16
fredo490 is on a distinguished road
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;
becomes
Code:
    div(phi,U)      Gauss linearUpwind grad(U);
if you want to use the leastSquare method for the grad scheme, you can also change:
Code:
    default         Gauss linear;
to become
Code:
    default         leastSquares;
or even:
Code:
    default         cellLimited  leastSquares;
fredo490 is offline   Reply With Quote

Old   April 16, 2013, 12:01
Default
  #5
Senior Member
 
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 249
Rep Power: 16
fredo490 is on a distinguished road
Ps. Take a look at the cases I've sent on my post:
http://www.cfd-online.com/Forums/ope...nt-work-3.html

I put my cases with all the schemes. You can look at this case to get an example.
http://www.fredo490.fr/public/rhoLTS...aca12-AOA4.zip
fredo490 is offline   Reply With Quote

Old   May 22, 2013, 10:37
Default
  #6
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
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((1|psi)) Gauss linear;
    grad(e) Gauss linear;
    grad((1|thermo:psi)) Gauss linear;
    grad(h) Gauss linear;
    grad(sqrt(((Cp|Cv)*(1|psi)))) Gauss linear;
    grad(sqrt(((Cp|Cv)*(1|thermo: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;

}
thanks.
__________________
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.
immortality is offline   Reply With Quote

Old   May 22, 2013, 11:07
Default
  #7
Senior Member
 
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 249
Rep Power: 16
fredo490 is on a distinguished road
1) see page 10 of this pdf : http://www.bakker.org/dartmouth06/engs150/04-clsfn.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.innovative-cfd.com/comput...-modeling.html
It is also important for the shock waves, page 31 of this doc: http://www.bakker.org/dartmouth06/engs150/05-solv.pdf

3) As I know, rhoCentralFoam only use "linear" scheme so it is natural second order solver (except for time if you use "Euler").
fredo490 is offline   Reply With Quote

Old   May 22, 2013, 11:23
Default
  #8
Member
 
Eric Robertson
Join Date: Jul 2012
Posts: 95
Rep Power: 14
msuaeronautics is on a distinguished road
Quote:
Originally Posted by fredo490 View Post
In some cases a linearUpwindV (second order) can be more robust because it is a pure upwind second order.
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?
msuaeronautics is offline   Reply With Quote

Old   May 22, 2013, 11:44
Default
  #9
Senior Member
 
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 249
Rep Power: 16
fredo490 is on a distinguished road
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 non-orthogonal 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.
fredo490 is offline   Reply With Quote

Old   May 22, 2013, 12:28
Default
  #10
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
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;
}
thanks.
__________________
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.
immortality is offline   Reply With Quote

Old   May 22, 2013, 12:40
Default
  #11
Senior Member
 
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 249
Rep Power: 16
fredo490 is on a distinguished road
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
fredo490 is offline   Reply With Quote

Old   May 22, 2013, 12:40
Default
  #12
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
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.
immortality is offline   Reply With Quote

Old   May 22, 2013, 12:57
Default
  #13
Senior Member
 
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 249
Rep Power: 16
fredo490 is on a distinguished road
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.
immortality likes this.
fredo490 is offline   Reply With Quote

Old   May 22, 2013, 14:37
Default
  #14
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
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.
immortality is offline   Reply With Quote

Old   May 23, 2013, 01:39
Default
  #15
Senior Member
 
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 249
Rep Power: 16
fredo490 is on a distinguished road
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.
fredo490 is offline   Reply With Quote

Reply

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
second order schemes marine OpenFOAM 67 April 11, 2022 18:19
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 14:24
High order compact finite difference schemes Mikhail Main CFD Forum 6 August 5, 2003 10:36


All times are GMT -4. The time now is 18:52.