|
[Sponsors] |
how to add radiation model into OpenFOAM1.5-dev+cantera? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 7, 2011, 05:30 |
how to add radiation model into OpenFOAM1.5-dev+cantera?
|
#1 |
New Member
Join Date: Nov 2010
Posts: 16
Rep Power: 15 |
Hi,Foamers, can you help me?
I want to add radiation model into OpenFOAM1.5-dev+cantera (alternateReactingFoam) , but I have no idea. or if you have added radiation models into reactingFOAM, please share your experience with me . thank you in advance. dahlia |
|
July 7, 2011, 12:15 |
|
#2 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24 |
its a document which shows how radiation model has been added to simpleFoam and make simpleRadiationFoam, maybe its helpful
http://www.google.com/url?sa=t&source=web&cd=4&sqi=2&ved=0CDEQFjAD&url=h ttp%3A%2F%2Fwww.tfd.chalmers.se%2F~hani%2Fkurser%2 FOS_CFD_2009%2FAlexeyVdovin%2FRadiation_in_OpenFoa m_final.pdf&rct=j&q=Radiation%20heat%20transfer%20 in%20openFOAm&ei=2toVTsPiIovG-QbQ_LUv&usg=AFQjCNGhBHaJavPcTtxBAmmN8q1mQE8Xlw&sig 2=J3LsuEJJUpGWhhp0TbLkFw&cad=rja |
|
July 8, 2011, 10:28 |
|
#3 |
New Member
Join Date: Nov 2010
Posts: 16
Rep Power: 15 |
thanks a lot, nimasam.
I modified the alternateReactingFoam according to the document, but when I wmake this solver, there are some errors as follows, SOURCE=alternateReactingFoam.C ; g++ -m32 -Dlinux -DDP -DFOAM_DEV_REVISION_NUMBER=exported -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O0 -fdefault-inline -ggdb3 -DFULLDEBUG -DNoRepository -ftemplate-depth-40 -I../XiFoam -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/finiteVolume/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/turbulenceModels/RAS -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/specie/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/combustion/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/basic/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/chemistryModel/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/ODE/lnInclude -I/home/hly/OpenFOAM/hly-1.5-dev/Libraries/alternateChemistryModels/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/radiation/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/reactionThermo/lnInclude -IlnInclude -I. -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxGccDPDebug/alternateReactingFoam.o In file included from alternateReactingFoam.C:62: createRadiationModel.H: In function ‘int main(int, char**)’: createRadiationModel.H:3: error: ‘class Foam::autoPtr<Foam::hCombustionThermo>’ has no member named ‘T’ In file included from alternateReactingFoam.C:87: hEqn.H:11: error: no matching function for call to ‘Foam::radiation::radiationModel::Sh(Foam::autoPtr <Foam::hCombustionThermo>&)’ radiationModel.H:177: note: candidates are: virtual Foam::tmp<Foam::fvMatrix<double> > Foam::radiation::radiationModel::Sh(Foam::basicThe rmo&) const createFields.H:43: warning: unused variable ‘T’ make: *** [Make/linuxGccDPDebug/alternateReactingFoam.o] error 1 can anyone give me some suggestion? |
|
July 8, 2011, 10:56 |
|
#4 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24 |
from here you can find suitable candidate:
note: candidates are: virtual Foam::tmp<Foam::fvMatrix<double> > Foam::radiation::radiationModel::Sh(Foam::basicThermo&) const 1)add into alternateReactingFoam.C #include "basicPsiThermo.H" 2) add in creatFields.H autoPtr<basicPsiThermo> pThermo ( basicPsiThermo::New(mesh) ); basicPsiThermo& thermo1 = pThermo(); 2) then in energy equation add radiation->Sh(thermo1) Last edited by nimasam; July 8, 2011 at 13:54. |
|
July 8, 2011, 13:36 |
|
#5 |
New Member
Join Date: Nov 2010
Posts: 16
Rep Power: 15 |
nima, many thanks to you.
"2) then in energy equation add radiation->Sh(thermo1) " -------------------Do you mean " radiation->Sh(thermo)"? yes, I add the three sentences in creatFields.H, but the result is as follows: Making dependency list for source file alternateReactingFoam.C SOURCE=alternateReactingFoam.C ; g++ -m32 -Dlinux -DDP -DFOAM_DEV_REVISION_NUMBER=exported -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O0 -fdefault-inline -ggdb3 -DFULLDEBUG -DNoRepository -ftemplate-depth-40 -I../XiFoam -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/finiteVolume/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/turbulenceModels/RAS -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/specie/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/combustion/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/basic/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/chemistryModel/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/ODE/lnInclude -I/home/hly/OpenFOAM/hly-1.5-dev/Libraries/alternateChemistryModels/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/radiation/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/reactionThermo/lnInclude -IlnInclude -I. -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxGccDPDebug/alternateReactingFoam.o In file included from alternateReactingFoam.C:57: createFields.H: In function ‘int main(int, char**)’: createFields.H:108: error: ‘basicPsiThermo’ was not declared in this scope createFields.H:108: error: template argument 1 is invalid createFields.H:109: error: invalid type in declaration before ‘(’ token createFields.H:110: error: ‘basicPsiThermo’ is not a class or namespace createFields.H:113: error: ‘pThermo’ cannot be used as a function In file included from alternateReactingFoam.C:62: createRadiationModel.H:3: error: ‘class Foam::autoPtr<Foam::hCombustionThermo>’ has no member named ‘T’ In file included from alternateReactingFoam.C:87: hEqn.H:11: error: no matching function for call to ‘Foam::radiation::radiationModel::Sh(Foam::autoPtr <Foam::hCombustionThermo>&)’ radiationModel.H:177: note: candidates are: virtual Foam::tmp<Foam::fvMatrix<double> > Foam::radiation::radiationModel::Sh(Foam::basicThe rmo&) const createFields.H:43: warning: unused variable ‘T’ make: *** [Make/linuxGccDPDebug/alternateReactingFoam.o] error 1 Do you know the reason? |
|
July 10, 2011, 05:48 |
|
#7 |
New Member
Join Date: Nov 2010
Posts: 16
Rep Power: 15 |
nima, thank you very much! sorry for the late reply.
I have modified alternateReactingFoam.C, creatFields.H , and hEqn.H according to your suggestions. The result seems better, but there still are some errors as follows: SOURCE=alternateReactingFoam.C ; g++ -m32 -Dlinux -DDP -DFOAM_DEV_REVISION_NUMBER=exported -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O0 -fdefault-inline -ggdb3 -DFULLDEBUG -DNoRepository -ftemplate-depth-40 -I../XiFoam -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/finiteVolume/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/turbulenceModels/RAS -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/specie/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/combustion/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/basic/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/chemistryModel/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/ODE/lnInclude -I/home/hly/OpenFOAM/hly-1.5-dev/Libraries/alternateChemistryModels/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/radiation/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/reactionThermo/lnInclude -IlnInclude -I. -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxGccDPDebug/alternateReactingFoam.o In file included from alternateReactingFoam.C:64: createRadiationModel.H: In function ‘int main(int, char**)’: createRadiationModel.H:3: error: ‘class Foam::autoPtr<Foam::hCombustionThermo>’ has no member named ‘T’ createFields.H:43: warning: unused variable ‘T’ make: *** [Make/linuxGccDPDebug/alternateReactingFoam.o] error 1 Thanks again. |
|
July 10, 2011, 07:46 |
|
#8 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24 |
look into error:
error: ‘class Foam::autoPtr<Foam::hCombustionThermo>’ has no member named ‘T’ so in createRadiationModel.H: line 3 there should be thermo, am i right? change it in thermo1 |
|
July 11, 2011, 04:00 |
|
#9 |
New Member
Join Date: Nov 2010
Posts: 16
Rep Power: 15 |
nima, thanks a million!
Yes, you are right, now I have changed "thermo" to ''thermo1'' in createRadiationModel.H. The result is as follows: Making dependency list for source file alternateReactingFoam.C SOURCE=alternateReactingFoam.C ; g++ -m32 -Dlinux -DDP -DFOAM_DEV_REVISION_NUMBER=exported -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O0 -fdefault-inline -ggdb3 -DFULLDEBUG -DNoRepository -ftemplate-depth-40 -I../XiFoam -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/finiteVolume/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/turbulenceModels/RAS -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/specie/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/combustion/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/basic/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/chemistryModel/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/ODE/lnInclude -I/home/hly/OpenFOAM/hly-1.5-dev/Libraries/alternateChemistryModels/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/radiation/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/reactionThermo/lnInclude -IlnInclude -I. -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxGccDPDebug/alternateReactingFoam.o createFields.H: In function ‘int main(int, char**)’: createFields.H:43: warning: unused variable ‘T’ g++ -m32 -Dlinux -DDP -DFOAM_DEV_REVISION_NUMBER=exported -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O0 -fdefault-inline -ggdb3 -DFULLDEBUG -DNoRepository -ftemplate-depth-40 -I../XiFoam -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/finiteVolume/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/turbulenceModels/RAS -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/specie/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/combustion/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/basic/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/chemistryModel/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/ODE/lnInclude -I/home/hly/OpenFOAM/hly-1.5-dev/Libraries/alternateChemistryModels/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/radiation/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/reactionThermo/lnInclude -IlnInclude -I. -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/home/hly/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude -fPIC -pthread Make/linuxGccDPDebug/alternateReactingFoam.o -L/home/hly/OpenFOAM/OpenFOAM-1.5-dev/lib/linuxGccDPDebug \ -lcompressibleRASModels -lcombustionThermophysicalModels -lfiniteVolume -lspecie -lbasicThermophysicalModels -lchemistryModel -lODE -L/home/hly/OpenFOAM/hly-1.5-dev/lib/linuxGccDPDebug -lradiation -lalternateChemistryModels -lOpenFOAM -ldl -ggdb3 -DFULLDEBUG -lm -o /home/hly/OpenFOAM/hly-1.5-dev/applications/bin/linuxGccDPDebug/alternateReactingFoam Make/linuxGccDPDebug/alternateReactingFoam.o: In function `main': /home/hly/OpenFOAM/hly-1.5-dev/Libraries/AlternateChemistry/Transient/alternateReactingFoam/createFields.H:111: undefined reference to `Foam::basicPsiThermo::New(Foam::fvMesh const&)' collect2: ld returned 1 exit status make: *** [/home/hly/OpenFOAM/hly-1.5-dev/applications/bin/linuxGccDPDebug/alternateReactingFoam] error 1 in fact, I have added #include "basicPsiThermo.H" into alternateReactingFoam.C. what should I do ................... |
|
July 13, 2011, 04:33 |
|
#10 |
New Member
Join Date: Nov 2010
Posts: 17
Rep Power: 15 |
Hi Nimasam
I am just starting to explore openfoam. I have a quick question in the following. autoPtr<basicThermo> pThermo I understand that in above line pThermo is an object of the template class autoptr. basicThermo& thermo = pThermo(); But I don't understand is that how the object pThermo is used as pThermo(). I understand that thermo is a reference variable of type basicThermo. Please explain the use of pThermo(). Regards |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Use of k-epsilon and k-omega Models | Jade M | Main CFD Forum | 40 | January 27, 2023 07:18 |
Selecting the appropriate multiphase model and radiation model | panos_metal | FLUENT | 0 | June 18, 2010 07:58 |
P1 radiation model and 2D calculation | autumn1012 | OpenFOAM Running, Solving & CFD | 6 | November 11, 2009 02:52 |
heat transfer with s2s radiation model in fluent | D. L. | FLUENT | 3 | July 31, 2008 07:40 |
radiation model | brian | FLUENT | 0 | July 27, 2007 10:57 |