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

anyone used setFields for igniting a flame (reactingFoam) ?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 3, 2015, 21:22
Default anyone used setFields for igniting a flame (reactingFoam) ?
  #1
Member
 
Daniel
Join Date: Jun 2014
Posts: 60
Rep Power: 11
Dan1788 is on a distinguished road
Hello all,

I am using reactingFOAM for an LES of premixed flame calculation (methane+air premixture) in OF-2.2.x. To ignite the flame, I set a patch of temperature using setFields like this: (I also set mass fraction of CO2 and H2O in this patch)



When I ran the simulation for a couple of time steps, the temperature field became something like this:



Ultimately however, the temperature in some cells went past 3500 K and the code produced NAN

Could someone tell me how to use the setFields utility correctly for a premixed flame ? Which zone should we patch with a temperature field ? Please help
Dan1788 is offline   Reply With Quote

Old   March 5, 2015, 21:06
Default
  #2
Member
 
Daniel
Join Date: Jun 2014
Posts: 60
Rep Power: 11
Dan1788 is on a distinguished road
Anyone who might know how to use setFields for flame ignition ??
Dan1788 is offline   Reply With Quote

Old   March 6, 2015, 07:23
Default
  #3
New Member
 
Join Date: Feb 2014
Posts: 24
Rep Power: 12
hajott is on a distinguished road
reactingFoam crashes with NaNs when the temperature exceeds the maximum temperature which thermodynamic data are available for.

I don't think the problem is your setFieldsDict, but you would have to attach your case directory if you want feedback on your approach.
hajott is offline   Reply With Quote

Old   March 9, 2015, 12:57
Default
  #4
Member
 
Daniel
Join Date: Jun 2014
Posts: 60
Rep Power: 11
Dan1788 is on a distinguished road
Hi Hajott,

Thanks for your reply. Basically a schematic of my flow domain looks like this:



My fvSchemes are the following:
Code:
ddtSchemes
{
    default         backward;
}

gradSchemes
{
    default         Gauss linear;
    grad(pd)        Gauss linear;
}

divSchemes
{
    default         none;

    div(phi,U)      Gauss limitedLinearV 1;
    div(phi,h)      Gauss limitedLinear 1;
    div(phi,Yi_h)   Gauss limitedLinear 1;
    div(phi,K)      Gauss limitedLinear 1;
    div(phid,pd)    Gauss limitedLinear 1;
    div(phi,epsilon) Gauss limitedLinear 1;
    div(phi,k)      Gauss limitedLinear 1;
    div((muEff*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    //default         Gauss linear orthogonal;
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
   //default         orthogonal;
   default          corrected;
}

fluxRequired
{
    default         no;
    pd;
}
The fvSolution file is as follows:

Code:
solvers
{
    rho
    {
        solver           PCG;
        preconditioner   DIC;
        tolerance        1e-06;
        relTol           0.1;
    }

    rhoFinal
    {
        $rho;
        tolerance        1e-06;
        relTol           0;
    }

    pd
    {
        solver           GAMG;
        tolerance        1e-6;
        relTol           0.1;

	    maxIter		     100;	

        smoother         DICGaussSeidel;
	
        nPreSweeps       0;
        nPostSweeps      1;
	    nFinestSweeps    2;

        cacheAgglomeration true;

        nCellsInCoarsestLevel 50;
        agglomerator     faceAreaPair;
        mergeLevels      1;
    };

    pdFinal
    {
        solver           GAMG;
        tolerance        1e-6;
        relTol           1.0e-2;

	    maxIter		     100;	

        smoother         DICGaussSeidel;

        nPreSweeps       0;
        nPostSweeps      1;
	    nFinestSweeps    2;

        cacheAgglomeration true;

        nCellsInCoarsestLevel 50;
        agglomerator     faceAreaPair;
        mergeLevels      1;
    };

    "(U|h|k|epsilon)"
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-06;
        relTol          0.1;
    }

    "(U|h|k|epsilon)Final"
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-06;
        relTol          0;
    }

    Yi
    {
        $hFinal;
    }
}

PIMPLE
{
    momentumPredictor   yes;
    nOuterCorrectors    2;
    nCorrectors         3;
    nNonOrthogonalCorrectors 0;
}
For the boundary conditions, I use fixedValue for atmospheric pressure at outlet, inletOutlet for velocity and scalars at outlet, and slip wall boundary at the sides of my domain.

I have also attached my case in the zip file. Any comments or suggestions would be really appreciated
Attached Files
File Type: zip test_setFields.zip (16.9 KB, 27 views)
Dan1788 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
how to achieve ignition of premixed flame using ReactingFoam Dan1788 OpenFOAM Running, Solving & CFD 25 June 12, 2022 04:52
how to use setFields for flame ignition?? Dan1788 OpenFOAM Running, Solving & CFD 5 September 25, 2014 20:26
calculate flame speed using reactingFoam IColin OpenFOAM Running, Solving & CFD 0 February 4, 2014 15:14
Flame gets flushed away in reactingFoam megacrout OpenFOAM 7 November 7, 2011 05:33
Crosswind flame with reactingFoam torvic OpenFOAM Running, Solving & CFD 1 September 10, 2007 17:48


All times are GMT -4. The time now is 09:05.