CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Numerical schemes settings of Scramjet combustion case

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 16, 2016, 22:48
Unhappy Numerical schemes settings of Scramjet combustion case
  #1
New Member
 
WilsonLee
Join Date: Jan 2016
Posts: 7
Rep Power: 10
killer2234 is on a distinguished road
Hello, I am still new to OF and try to building up a Scramjet combustion case.
I have several questions for my fvSchemes and fvSolutions settings
(I have already looked over the OF user guide)
But I still don't know whether the following settings is appropriate or not.
I am using my own solver which was similar with the rhoReactingFoam solver.
Now, i am focusing on the numerical schemes settings.

fvSchemes:

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

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    default         Gauss limitedLinear 1;
    div(phi,U)      Gauss limitedLinearV 1;
    div(phi,Yi_h)   Gauss limitedLinear01 1;
    div(phi,h)      Gauss limitedLinear 1;
    div(phid,p)     Gauss limitedLinear 1;
    div(phi,K)      Gauss limitedLinear 1;
    div(phiv,p)     Gauss limitedLinear 1;
    div(phi,k)      Gauss limitedLinear 1;   
    div(phi,omega)  Gauss limitedLinear 1; 

    div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;

    div(U)          Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

wallDist
{
    method meshWave;
}
// ************************************************************************* //
fvSolutions:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
    "(rho|rhoFinal)"
    {
        solver              PCG;
        preconditioner      DIC;
        tolerance           1e-6;
        relTol              0;
    };

    p
    {
        solver           PBiCG;
        preconditioner   DILU;
        tolerance        1e-8;
        relTol           0.1;
    }

    pFinal
    {
        $p;
        tolerance        1e-6;
        relTol           0.0;
    }
    "(U|h).*"//
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-6;
        relTol          0.1;
    }

    "(k|omega).*"
    {
        $U;
        tolerance       1e-08;
    }

    Yi
    {
        $hFinal;
    }
}

PIMPLE
{
    momentumPredictor no;
    nOuterCorrectors  1;
    nCorrectors     2;
    nNonOrthogonalCorrectors 0;
}
// ************************************************************************* //
Please help me if anyone could give me some advise.
Thanks for your suggestion !!!!!
Wilson
Sincerely yours!
killer2234 is offline   Reply With Quote

Old   March 14, 2016, 09:01
Default
  #2
Member
 
Join Date: Oct 2014
Posts: 43
Rep Power: 11
lisa_china is on a distinguished road
Hi,Wilson,
did you find some instructions about how to set these parameters? I also focused on this point now.

could you give me some help?
lisa_china is offline   Reply With Quote

Old   March 14, 2016, 10:04
Default
  #3
New Member
 
Wilson Lee
Join Date: Oct 2015
Posts: 7
Rep Power: 10
Wilson Lee is on a distinguished road
Nice to meet you, Lisa!
I still working on it , but I still facing some problems:
1.
I have tried the "rhoReactingFoam solver", and make a little change on my fvSolution and fvSchemes file settings, but the solver still getting diverge on the very beginning. I have looked up with the error message, which was mainly about the "attempt to use janafThermo<equationOfState> out of temperature range 200 -> 5000; "
and the temperature was going crazy(ex: 1.0e+18 or 1.e3-23)
2.
I have also add the relaxation factor in my fvSolutions , and also set up the residual control, but it still don't work.
3.
I think this paper may give you some good instructions!
Large eddy simulation of flame structure and combustion mode in a h2 supersonic combustor
I have tried to set up the files based on this paper, but it still doesn't work.Maybe some of my settings was wrong or being ignored.

I am very glad to discuss with you ,maybe you could describe more details on your work, then we can have a further discuss on this topic!
Sorry for my poor english, haha
Thanks~Lisa
Wilson Lee is offline   Reply With Quote

Old   March 19, 2016, 21:55
Default
  #4
Member
 
Join Date: Oct 2014
Posts: 43
Rep Power: 11
lisa_china is on a distinguished road
Hi Wilson,
How is every thing going?
In fact, OpenFOAM has provided many tutorials for users. My friend told me to use tutorials which were similar to my problem as a reference.
But these cannot help us to understand the meaning of of this fvScheme.
Keep contacting.

Best.
Shan
lisa_china is offline   Reply With Quote

Old   March 22, 2016, 11:52
Default
  #5
New Member
 
Wilson Lee
Join Date: Oct 2015
Posts: 7
Rep Power: 10
Wilson Lee is on a distinguished road
Hi ,Lisa
So which tutorial case are you studying now?Or which solver is being used of you study?
Recently, I was looking on the "rhoReactingFoam "solver, but I didn't find any related tutorial case which provided by OF. It seems that OF didn't provide this tutorial case.
So I've tried to set up this case by myself, but it still being unstable and diverge in the very beginning of the simulation, maybe something was wrong on my settings.
So, how about your work?
Wilson
Wilson Lee is offline   Reply With Quote

Old   March 24, 2016, 20:10
Default
  #6
Member
 
Join Date: Oct 2014
Posts: 43
Rep Power: 11
lisa_china is on a distinguished road
Hi Wilson,
I'm trying to install OpenFOAM on a cluster recently. And the study on fvScheme has been stopped for one week .
After the installation, I will return to study the settings in fvSchemes file.

Best
Shan
lisa_china is offline   Reply With Quote

Old   March 30, 2016, 01:41
Default
  #7
Senior Member
 
Alex
Join Date: Jan 2014
Posts: 126
Rep Power: 12
Kina is on a distinguished road
Hi all,
maybe, I can clarify some things for you. The fvSchemes file contains information about the solution discretization of the variables. Sometimes, the schemes you use can have a huge impact on the solution, but as far as I got with OpenFOAM, this is what I can tell you.
There are not really right or wrong schemes for a particular case and you have to adjust them well to receive a stable and correct solution. Schemes are a trade-off of convergence speed, stability and accuracy. For the grad schemes, I'd start with default linear. For the divSchemes I'd choose upwind and then try setting the schemes to linearUpwind *during* the solution and see how your residuals behave.

Try the following:

Code:
ddtSchemes 
{
     default         CrankNicolson 0.5; // why not pure Euler? 
}  

gradSchemes 
{
     default         Gauss linear; 
}  

divSchemes 
{
     default         Gauss linear;     
div(phi,U)      Gauss Gauss linearUpwindV grad(U);     
div(phi,Yi_h)   Gauss linearUpwind;     
div(phi,h)      Gauss linearUpwind;     
div(phid,p)     Gauss linearUpwind;     
div(phi,K)      Gauss linearUpwind;     
div(phiv,p)     Gauss linearUpwind;     
div(phi,k)      Gauss upwind;     
div(phi,omega)  Gauss upwind;      
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;      
div(U)          Gauss linear; 
}  

laplacianSchemes
{     
default         Gauss linear corrected; 
}  

interpolationSchemes 
{
     default         linear; 
}  

snGradSchemes {
     default         corrected; 
}  

wallDist 
{
     method meshWave; 
} 

// ************************************************************************* //
If the solution is not converging, you should have a closer look at your mesh.

Cheers,
Alex
Kina is offline   Reply With Quote

Old   April 3, 2016, 11:04
Default
  #8
New Member
 
Wilson Lee
Join Date: Oct 2015
Posts: 7
Rep Power: 10
Wilson Lee is on a distinguished road
Quote:
Originally Posted by lisa_china View Post
Hi Wilson,
I'm trying to install OpenFOAM on a cluster recently. And the study on fvScheme has been stopped for one week .
After the installation, I will return to study the settings in fvSchemes file.

Best
Shan
OK!If you have any question, we can have a further discussion!
Good luck for building up the cluster!
Wilson Lee is offline   Reply With Quote

Old   April 3, 2016, 11:23
Default
  #9
New Member
 
Wilson Lee
Join Date: Oct 2015
Posts: 7
Rep Power: 10
Wilson Lee is on a distinguished road
Quote:
Originally Posted by Kina View Post
Hi all,
maybe, I can clarify some things for you. The fvSchemes file contains information about the solution discretization of the variables. Sometimes, the schemes you use can have a huge impact on the solution, but as far as I got with OpenFOAM, this is what I can tell you.
There are not really right or wrong schemes for a particular case and you have to adjust them well to receive a stable and correct solution. Schemes are a trade-off of convergence speed, stability and accuracy. For the grad schemes, I'd start with default linear. For the divSchemes I'd choose upwind and then try setting the schemes to linearUpwind *during* the solution and see how your residuals behave.

Try the following:

Code:
ddtSchemes 
{
     default         CrankNicolson 0.5; // why not pure Euler? 
}  

gradSchemes 
{
     default         Gauss linear; 
}  

divSchemes 
{
     default         Gauss linear;     
div(phi,U)      Gauss Gauss linearUpwindV grad(U);     
div(phi,Yi_h)   Gauss linearUpwind;     
div(phi,h)      Gauss linearUpwind;     
div(phid,p)     Gauss linearUpwind;     
div(phi,K)      Gauss linearUpwind;     
div(phiv,p)     Gauss linearUpwind;     
div(phi,k)      Gauss upwind;     
div(phi,omega)  Gauss upwind;      
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;      
div(U)          Gauss linear; 
}  

laplacianSchemes
{     
default         Gauss linear corrected; 
}  

interpolationSchemes 
{
     default         linear; 
}  

snGradSchemes {
     default         corrected; 
}  

wallDist 
{
     method meshWave; 
} 

// ************************************************************************* //
If the solution is not converging, you should have a closer look at your mesh.

Cheers,
Alex
Thanks you very much, Alex!
I will take it a try on this settings next week! Maybe it will work fine!
Thanks~

Furthermore, I have found a paper related to scramjet combustion and it applied the numerical methods below:
1.time-integration scheme -- second-order semi-implicit Crank-Nicholson (CN)
2.convective fluxes -- second-order (flux limiter-based) TVD scheme
3.central differencing of the inner derivatives in the viscous and sub-grid fluxes is adopted for spatial discretization.

I am still trying on it but i don't even know how to set the schemes based on point 3.
So,where is the inner derivatives in the viscous being set up?(ex: in divergence term?)
And,what does "sub-grid fluxes is adopted for spatial discretization."mean?
Sorry for the lengthy contents.
Wilson Lee 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
Sharing >choose numerical schemes in OF -I found a interesting material about it vitorspadetoventurin OpenFOAM Pre-Processing 2 April 15, 2016 03:52
Numerical schemes available in OF 2.x batta31 OpenFOAM Running, Solving & CFD 11 January 23, 2013 12:41
Combustion Test Case A.S. Main CFD Forum 1 May 31, 2005 09:22
Kinetic schemes and numerical dissipation Praveen Main CFD Forum 0 September 6, 2002 07:09
gas combustion test case Tomasx Ochrymiuk Main CFD Forum 2 June 20, 2000 02:42


All times are GMT -4. The time now is 01:08.