|
[Sponsors] |
How to call ignitionSites in combustionProperties dictionary in a solver? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 12, 2012, 11:40 |
How to call ignitionSites in combustionProperties dictionary in a solver?
|
#1 |
New Member
Chen Huang
Join Date: Jul 2009
Location: Gothenburg, Sweden
Posts: 11
Rep Power: 16 |
Does anybody have idea about calling ignitionSites in combustionProperties dictionary in a solver (e.g. XiFoam)?
ignitionSites gives ignition parameters as following, ignitionSites ( { 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 ( IOobject ( "combustionProperties", runTime.constant(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE ) ); PtrList<ignitionSite> ignitionSites ( combustionProperties.lookup("ignitionSites") ); Does anybody know how to call e.g. the start of ignition time (0) in the solver? Thanks! |
|
January 12, 2012, 12:31 |
|
#2 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 21 |
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>.
__________________
~~~ Follow me on twitter @DavidGaden |
|
January 13, 2012, 04:12 |
|
#3 |
New Member
Chen Huang
Join Date: Jul 2009
Location: Gothenburg, Sweden
Posts: 11
Rep Power: 16 |
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! Chen |
|
August 15, 2014, 18:57 |
|
#4 |
New Member
Ricardo Barbosa
Join Date: Jun 2014
Posts: 4
Rep Power: 11 |
Hi people
I'm trying star ignition with this code in this site http://openfoamwiki.net/index.php/Contrib_reactingFoam but i when i start the simulation nohting happens. Can you see if the code are correct and if miss something? Thanks |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
2D CFD code using SIMPLE algorithm | bfan | Main CFD Forum | 3 | June 22, 2002 23:01 |
Setting a B.C using UserFortran in 4.3 | tokai | CFX | 10 | July 17, 2001 17:25 |
Error during Solver | cfd guy | CFX | 4 | May 8, 2001 07:04 |
Open source CFD code development, possible? | Dr. Yazid Bindar | Main CFD Forum | 27 | July 18, 2000 01:18 |
Who's ok for an Open Source CFD project ? | Viet | Main CFD Forum | 16 | July 26, 1999 16:57 |