CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   reactingFoam fvOption ignition (https://www.cfd-online.com/Forums/openfoam-programming-development/159698-reactingfoam-fvoption-ignition.html)

khalifa September 20, 2015 21:03

reactingFoam fvOption ignition
 
Hello dear Foamers,

I am simulating 1-d premixed laminar flame with reactingFoam and need to ignite the process using fvOption file. I need to set the ignition strength of 5 e9 J/m3·s for 0.0002 s. how can I translate these paramters to fvOption file ?

Thanks

kaaaixx September 25, 2015 21:05

ignition parameters
 
Hello khalifa,

I am stucking nearly at the same point.. :confused: Did you find a answer of how the ignition parameters are linked to "the real" ignition energy?

Thanks in advance,
Kai

khalifa September 30, 2015 05:52

Quote:

Originally Posted by kaaaixx (Post 565585)
Hello khalifa,

I am stucking nearly at the same point.. :confused: Did you find a answer of how the ignition parameters are linked to "the real" ignition energy?

Thanks in advance,
Kai

Hello Kai,

actually I found this

Code:

-----------------------------*- 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      fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
source1
{
    type            fixedTemperatureConstraint;
    active          true;
    timeStart      1e-7;
    duration        1e-7;
    selectionMode  cellSet;
    cellSet        ignitionCells;

    fixedTemperatureConstraintCoeffs
    {
        mode            uniform;
        temperature    3000;
    }
}


/*energySource1
{
    type            scalarSemiImplicitSource;
    active          true;
    timeStart      0;
    duration        0.0002;
  selectionMode  cellSet; //cellSet // points //cellZone
    cellSet        ignitionCells;

    scalarSemiImplicitSourceCoeffs
    {
        volumeMode      absolute;
        injectionRateSuSp
        {
            h          (10 0);
        }
    }
}


but to be honest , both criteria (modifieng h or t) did not deliver reasonable results at the end. I mean , combustion occurred, but I think the energy equation was effected and the final temperature that I got is not really correct. in addition, I really dont know what is the unit of 10 in h (10 0); I just kept trying value until the mixture ignited without exceeding the 3000 k limit.

could you please try it and share your experience with it ?

mkraposhin September 30, 2015 06:00

Hi, if i'm right, then you want to insert energy source in energy equation.

You can do this with next two types of fvOption objects:
- SemiImplicitSource
- CodedSource

khalifa September 30, 2015 06:15

Quote:

Originally Posted by mkraposhin (Post 565948)
Hi, if i'm right, then you want to insert energy source in energy equation.

You can do this with next two types of fvOption objects:
- SemiImplicitSource
- CodedSource

Thank you for your kind response.

Actually this is what I am trying to do, and this is the energy source implementation in my fvOptions file

Code:

/*energySource1
{
    type            scalarSemiImplicitSource;
    active          true;
    timeStart      0;
    duration        0.0002;
  selectionMode  cellSet; //cellSet // points //cellZone
    cellSet        ignitionCells;

    scalarSemiImplicitSourceCoeffs
    {
        volumeMode      absolute;
        injectionRateSuSp
        {
            h          (10 0);
        }
    }

now if you colud please help me further, as I am still a beginner with openFoam, is it correct to specify h as the energy source ? wont it be confused with any other term of the energy equationo ? and secondly, do you know what is the 0 value stands for ?

mkraposhin September 30, 2015 06:37

Quote:

Originally Posted by khalifa (Post 565950)
Thank you for your kind response.

Actually this is what I am trying to do, and this is the energy source implementation in my fvOptions file

Code:

/*energySource1
{
    type            scalarSemiImplicitSource;
    active          true;
    timeStart      0;
    duration        0.0002;
  selectionMode  cellSet; //cellSet // points //cellZone
    cellSet        ignitionCells;

    scalarSemiImplicitSourceCoeffs
    {
        volumeMode      absolute;
        injectionRateSuSp
        {
            h          (10 0);
        }
    }

now if you colud please help me further, as I am still a beginner with openFoam, is it correct to specify h as the energy source ? wont it be confused with any other term of the energy equationo ? and secondly, do you know what is the 0 value stands for ?

Well, sorry, i didn't saw piece of code, related to energy.

So, you must select options as follows:
1. volumeMode should be changed from absolute to specific, because, as i see from starting post, your source have dims: J/m3/s
If you will leave volumeMode as absolute, then values of sources will be normalized by volume of cell sets, that you specified in cellSet.

2. h specifies only name for which balance equation is applied. energy equation can be applied both to specific internal energy (e) or specific enthalpy (h). You can check correct variable in file thermophysicalProperties:
energy sensibleEnthalpy; - that means, that you are solving energy equation with primary variable specific enthalpy
3. Values in brackets are sources:
- first value is an explicit source (Su), must be 5 e9 J/m3·s, but you specified 10 J/s
- second value is an implicit source (Sp), it will be substituted to equation of energy as follows: Dh/Dt = Sp*h

khalifa September 30, 2015 06:49

Quote:

Originally Posted by mkraposhin (Post 565954)
Well, sorry, i didn't saw piece of code, related to energy.

So, you must select options as follows:
1. volumeMode should be changed from absolute to specific, because, as i see from starting post, your source have dims: J/m3/s
If you will leave volumeMode as absolute, then values of sources will be normalized by volume of cell sets, that you specified in cellSet.

2. h specifies only name for which balance equation is applied. energy equation can be applied both to specific internal energy (e) or specific enthalpy (h). You can check correct variable in file thermophysicalProperties:
energy sensibleEnthalpy; - that means, that you are solving energy equation with primary variable specific enthalpy
3. Values in brackets are sources:
- first value is an explicit source (Su), must be 5 e9 J/m3·s, but you specified 10 J/s
- second value is an implicit source (Sp), it will be substituted to equation of energy as follows: Dh/Dt = Sp*h

Thank you alot.

this my thermophyiscalProperties related code

Quote:

thermoType
{
type hePsiThermo;
mixture reactingMixture;
transport sutherland;
thermo janaf;
energy sensibleEnthalpy;
equationOfState perfectGas;
specie specie;
}
so yes you are correct it uses sensibleEnthalpy. As far as I understood for what I should do , is to use this snesibleEnthalpy in the fvOptions file instead of h?

Code:

energySource1
{
    type            scalarSemiImplicitSource;
    active          true;
    timeStart      0;
    duration        0.0001;
  selectionMode  cellSet; //cellSet // points //cellZone
    cellSet        ignitionCells;

    scalarSemiImplicitSourceCoeffs
    {
        volumeMode      specific;
        injectionRateSuSp
        {
          h        (5e9 0);
        }
    }
}

Thanks again

khalifa September 30, 2015 06:52

Quote:

Originally Posted by khalifa (Post 565955)
Thank you alot.

this my thermophyiscalProperties related code



so yes you are correct it uses sensibleEnthalpy. As far as I understood for what I should do , is to use this snesibleEnthalpy in the fvOptions file instead of h?

Code:

energySource1
{
    type            scalarSemiImplicitSource;
    active          true;
    timeStart      0;
    duration        0.0001;
  selectionMode  cellSet; //cellSet // points //cellZone
    cellSet        ignitionCells;

    scalarSemiImplicitSourceCoeffs
    {
        volumeMode      specific;
        injectionRateSuSp
        {
          h          (5e9 0);
        }
    }
}

Thanks again


I guess I got it now, it should be kept h. and the solver will solve it for sensible enthalpy. sorry for the too many silly questions

I really appreciate your help . it works perfect

olivierdambron January 6, 2019 18:45

Hi there, I am facing the same challenge without really undertanding how to set the sensible enthalpy h.
I am trying to set a temperature or w/m2 as the injecitonRateSup for buoyantPimpleFoam.

Any small tip would be greatly appreciated.

Best


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