|
[Sponsors] |
What does the 'makeChemistryModel.H' file do? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 31, 2011, 13:50 |
What does the 'makeChemistryModel.H' file do?
|
#1 | |
Senior Member
Adhiraj
Join Date: Sep 2010
Location: Karnataka, India
Posts: 187
Rep Power: 15 |
Hi all,
I am talking about the file Quote:
|
||
November 14, 2013, 12:02 |
ODE Solvers for Chemistry Models
|
#2 |
Member
Manuel
Join Date: Jan 2013
Location: Bremen
Posts: 33
Rep Power: 13 |
I have the same question; ODEChemistryModel class appears as argument of makeChemistryModel, but looking at the source files it doesn't seem connected to any derived class among basicChemistryModel, psiChemistryModel and rhoChemistryModel.
Thanks |
|
November 14, 2013, 13:45 |
|
#3 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22 |
In 1.6 it makes sense, I'm not sure if it was removed from 1.7 and left the macro definition file by accident... but this file defines a macro that other files invoke to create their instantiations.
Look for derived chemistry models ending in "s.C", such as psiChemistryModels.C.
__________________
~~~ Follow me on twitter @DavidGaden |
|
November 15, 2013, 05:25 |
|
#4 |
Member
Manuel
Join Date: Jan 2013
Location: Bremen
Posts: 33
Rep Power: 13 |
Thank you a lot for your answer.
Only to be more precise: this means that virtual functions defined in .H files (such as solve() and calculate() virtual methods inserted in psiChemistryModel.H) can be explicited in other .H files (ODEChemistryModel.H), not directly connected to the previous ones (psiChemistryModel.H doesnt include any link to ODEChemistryModel.H)?? If I understood well the psiChemistryModels.C establishes this kind of connection between ODEChemistryModel class and psiChemistryModel one?? Furthermore let consider the following lines appearing in psiChemistryModels.H (OpenFoam version 2.1.1): namespace Foam { makeChemistryModel ( ODEChemistryModel, psiChemistryModel, gasThermoPhysics ); } When the compiler reads these lines, what does it do? Is it correct to say that it creates a common space where the three arguments share their functions/methods??? I thank you a lot in advance. Manuel |
|
November 15, 2013, 16:40 |
|
#5 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22 |
ODEChemistryModel is entirely different from the other derived classes in the folder. It doesn't inherit basicChemistryModel. If you expand the makeChemistryModel define, you will see. Take psiChemistry, for instance:
Code:
makeChemistryModel ( ODEChemistryModel, psiChemistryModel, gasThermoPhysics ); Code:
typedef ODEChemistryModel<psiChemistryModel, gasThermoPhysics> ODEChemistryModelpsiChemistryModelgasThermoPhysics; defineTemplateTypeNameAndDebugWithName ( ODEChemistryModelpsiChemistryModelgasThermoPhysics, "ODEChemistryModel<psiChemistryModel,gasThermoPhysics>", 0 ); addToRunTimeSelectionTable ( psiChemistryModel, ODEChemistryModelpsiChemistryModelgasThermoPhysics, fvMesh ); I'm sure I'm being confusing. Also running out of time before I have to jet! -Dave
__________________
~~~ Follow me on twitter @DavidGaden |
|
November 18, 2013, 05:06 |
|
#6 |
Member
Manuel
Join Date: Jan 2013
Location: Bremen
Posts: 33
Rep Power: 13 |
Hi marupio,
Thanks a lot for your explanation. This feature is now clear to me. Anyway I have still a doubt: what is the product of the following lines makeChemistryModel ( ODEChemistryModel, psiChemistryModel, gasThermoPhysics ); ?? Are the 3 classes gathered in a single class?? Because if it does not happen, I can't understand how a function/method of psiChemistryModel class could be specified in ODEChemistryModel class, since ODEChemistryModel does not inherit psiChemistryModel. Thank you. Manuel |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh | gschaider | OpenFOAM Community Contributions | 300 | October 29, 2014 18:00 |
channelFoam for a 3D pipe | AlmostSurelyRob | OpenFOAM | 3 | June 24, 2011 13:06 |
1.7.x Environment Variables on Linux 10.04 | rasma | OpenFOAM Installation | 9 | July 30, 2010 04:43 |
[blockMesh] BlockMesh FOAM warning | gaottino | OpenFOAM Meshing & Mesh Conversion | 7 | July 19, 2010 14:11 |
ParaView Compilation | jakaranda | OpenFOAM Installation | 3 | October 27, 2008 11:46 |