CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

Problem implementing runTime Selection

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 2, 2011, 22:48
Default Problem implementing runTime Selection
  #1
Senior Member
 
Adhiraj
Join Date: Sep 2010
Location: Pennsylvania, United States
Posts: 101
Rep Power: 6
adhiraj is on a distinguished road
Hi all,
I am trying to implement a model using runTimeSelection as per this link http://openfoamwiki.net/index.php/Op...tion_mechanism, especially section using section 4.3 as a guide.
But the subsection http://openfoamwiki.net/index.php/Op...es_to_registercauses a compilation error:
Code:
no matching function for call to ‘Foam::basicIgnitionModel::basicIgnitionModel(Foam::NoIgnition*)’
Here basicIgnitionModel is my base class, and NoIgnition is one of the derived ones.
Is there an implementation in OpenFOAM source that I can look at?
adhiraj is offline   Reply With Quote

Old   November 3, 2011, 10:52
Default
  #2
Senior Member
 
Kathrin Kissling
Join Date: Mar 2009
Location: Besigheim, Germany
Posts: 134
Rep Power: 8
kathrin_kissling is on a distinguished road
Hi!

Can you post the code line which is causing the error?


Best
Kathrin
kathrin_kissling is offline   Reply With Quote

Old   November 3, 2011, 12:15
Default
  #3
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 397
Rep Power: 12
marupio is on a distinguished road
Hi Adhiraj,

The actual implementation of runTimeSelection (RTS) is hidden in OpenFOAM using a series of macros, such as addToRunTimeSelectionTable and defineRunTimeSelectionTable. So you never actually see it. This page of the wiki pulls out these sections and reconstructs them for all to see.

Section 4.3 of the wiki was not intended to be directly implemented in your code. It's just supposed to show you what's going on. But I have managed to get RTS working this way - so it is possible. What I suggest is you try using the macros. The basic ones outlined in the first few sections of the wiki page should work. If your base class or derived classes are templates, then things get more challenging.

Examples are everywhere in OpenFOAM.

Straightforward to follow:
Base: src/turbulenceModels/incompressible/RAS/RASModel
Derived: src/turbulenceModels/incompressible/RAS/kEpsilon,
Derived: src/turbulenceModels/incompressible/RAS/kOmega

Buried deep in other macros - hard to figure out:
Base: src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver
Derived: src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit
Derived: src/thermophysicalModels/chemistryModel/chemistrySolver/ode

Hope this helps!
__________________
~~~
Follow me on twitter @DavidGaden
marupio is offline   Reply With Quote

Old   November 4, 2011, 13:05
Default
  #4
Senior Member
 
Adhiraj
Join Date: Sep 2010
Location: Pennsylvania, United States
Posts: 101
Rep Power: 6
adhiraj is on a distinguished road
Thanks to both of you
Quote:
The actual implementation of runTimeSelection (RTS) is hidden in OpenFOAM using a series of macros, such as addToRunTimeSelectionTable and defineRunTimeSelectionTable. So you never actually see it. This page of the wiki pulls out these sections and reconstructs them for all to see.
Yes, and thanks for the guide. The Wiki guide was enough for my earlier work.

Code:
Section 4.3 of the wiki was not intended to be directly implemented in your code.  It's just supposed to show you what's going on.  But I have managed to get RTS working this way - so it is possible.  What I suggest is you try using the macros.  The basic ones outlined in the first few sections of the wiki page should work.  If your base class or derived classes are templates, then things get more challenging.
I tried using that part because I wanted to use templated bases and derived objects. I changed my mind and figured out a different way. So once again the first few sections should suffice.

Code:
Examples are everywhere in OpenFOAM.

Straightforward to follow:
Base: src/turbulenceModels/incompressible/RAS/RASModel
Derived: src/turbulenceModels/incompressible/RAS/kEpsilon,
Derived: src/turbulenceModels/incompressible/RAS/kOmega

Buried deep in other macros - hard to figure out:
Base: src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver
Derived: src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit
Derived: src/thermophysicalModels/chemistryModel/chemistrySolver/ode
Yes, I agree. These are indeed the functions/files I looked at before implementing the runtime selection for my earlier model.
adhiraj is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
conduction problem venkataramana OpenFOAM 3 December 1, 2013 08:30
Problem Importing Geometry ProE to CFX fatb0y CFX 3 January 14, 2012 20:42
area does not match neighbour by ... % -- possible face ordering problem St.Pacholak OpenFOAM 9 November 22, 2011 11:02
Solver Selection with COMSOL S. Gatzka Main CFD Forum 1 January 27, 2008 17:35
Problem implementing DETAILED REACTION MECHANISM Phil FLUENT 0 May 5, 2007 11:38


All times are GMT -4. The time now is 01:48.