CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   How to call ignitionSites in combustionProperties dictionary in a solver? (

chenhu January 12, 2012 11:40

How to call ignitionSites in combustionProperties dictionary in a solver?
Does anybody have idea about calling ignitionSites in combustionProperties dictionary in a solver (e.g. XiFoam)?

ignitionSites gives ignition parameters as following,

{ location ( 0 0.005 0.01 ) ;
diameter 0.0001 ;
start 0 ;
duration 0.0001 ;
strength 1 ; }

Since ignitionSites has a special data structure (maybe it's a list, but I haven't figured out), which is different from a normal dimensionedScalar (it is easy to be called in a solver).

I tried many ways, but they did not work properly:(. One unsuccessful example,

IOdictinary combustionProperties
PtrList<ignitionSite> ignitionSites

Does anybody know how to call e.g. the start of ignition time (0) in the solver?


marupio January 12, 2012 12:31

That is a strange format. It is probably a custom object type with its own read / write functions. It looks like a list of dictionaries, actually.

( this is a list );
{ this is a subdictionary }

( {is this a list of dictionaries?} );

If there's no dictionaryList, try PtrList<dictionary>.

chenhu January 13, 2012 04:12

Hello marupio,

As you have guessed:
({this is a list of dictionaries!});
and I tried PtrList<dictionary>, it works:)!

Then the following code is needed for calling the scalar in a list of dictionaries,

scalar start(readScalar(ignitionSites[0].lookup("start"))); // here only the first dictionary in the list is called.

Thanks a lot for the help!


RCB123456 August 15, 2014 17:57

Hi people

I'm trying star ignition with this code in this site

but i when i start the simulation nohting happens. Can you see if the code are correct and if miss something?

All times are GMT -4. The time now is 02:56.