equilibriumCO.C
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #include "argList.H"
00033 #include "Time.H"
00034 #include "dictionary.H"
00035 #include "IFstream.H"
00036 #include "OSspecific.H"
00037 #include "IOmanip.H"
00038
00039 #include "specieThermo.H"
00040 #include "janafThermo.H"
00041 #include "perfectGas.H"
00042 #include "SLPtrList.H"
00043
00044 using namespace Foam;
00045
00046 typedef specieThermo<janafThermo<perfectGas> > thermo;
00047
00048
00049
00050
00051 int main(int argc, char *argv[])
00052 {
00053
00054 # include "setRootCase.H"
00055
00056 # include "createTime.H"
00057
00058 Info<< nl << "Reading Burcat data IOdictionary" << endl;
00059
00060 IOdictionary CpData
00061 (
00062 IOobject
00063 (
00064 "BurcatCpData",
00065 runTime.constant(),
00066 runTime,
00067 IOobject::MUST_READ,
00068 IOobject::NO_WRITE,
00069 false
00070 )
00071 );
00072
00073
00074
00075 scalar T = 3000.0;
00076
00077 SLPtrList<thermo> EQreactions;
00078
00079 EQreactions.append
00080 (
00081 new thermo
00082 (
00083 thermo(CpData.lookup("CO2"))
00084 ==
00085 thermo(CpData.lookup("CO"))
00086 + 0.5*thermo(CpData.lookup("O2"))
00087 )
00088 );
00089
00090 EQreactions.append
00091 (
00092 new thermo
00093 (
00094 thermo(CpData.lookup("O2"))
00095 ==
00096 2.0*thermo(CpData.lookup("O"))
00097 )
00098 );
00099
00100 EQreactions.append
00101 (
00102 new thermo
00103 (
00104 thermo(CpData.lookup("H2O"))
00105 ==
00106 thermo(CpData.lookup("H2"))
00107 + 0.5*thermo(CpData.lookup("O2"))
00108 )
00109 );
00110
00111 EQreactions.append
00112 (
00113 new thermo
00114 (
00115 thermo(CpData.lookup("H2O"))
00116 ==
00117 thermo(CpData.lookup("H"))
00118 + thermo(CpData.lookup("OH"))
00119 )
00120 );
00121
00122
00123 for
00124 (
00125 SLPtrList<thermo>::iterator EQreactionsIter = EQreactions.begin();
00126 EQreactionsIter != EQreactions.end();
00127 ++EQreactionsIter
00128 )
00129 {
00130 Info<< "Kc(EQreactions) = " << EQreactionsIter().Kc(T) << endl;
00131 }
00132
00133
00134 Info<< nl << "end" << endl;
00135
00136 return 0;
00137 }
00138
00139
00140
00141
Copyright © 2000-2009 OpenCFD Ltd