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

How to call ignitionSites in combustionProperties dictionary in a solver?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 12, 2012, 11:40
Question 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
chenhu is on a distinguished road
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!
chenhu is offline   Reply With Quote

Old   January 12, 2012, 12:31
Default
  #2
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 21
marupio is on a distinguished road
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
marupio is offline   Reply With Quote

Old   January 13, 2012, 04:12
Smile
  #3
New Member
 
Chen Huang
Join Date: Jul 2009
Location: Gothenburg, Sweden
Posts: 11
Rep Power: 16
chenhu is on a distinguished road
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
chenhu is offline   Reply With Quote

Old   August 15, 2014, 18:57
Default
  #4
New Member
 
Ricardo Barbosa
Join Date: Jun 2014
Posts: 4
Rep Power: 11
RCB123456 is on a distinguished road
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
RCB123456 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
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


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