chemistrySolver.H
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
00033
00034
00035
00036 #ifndef chemistrySolver_H
00037 #define chemistrySolver_H
00038
00039 #include "ODEChemistryModel.H"
00040 #include "IOdictionary.H"
00041 #include "scalarField.H"
00042 #include "autoPtr.H"
00043 #include "runTimeSelectionTables.H"
00044
00045
00046
00047 namespace Foam
00048 {
00049
00050
00051 template<class CompType, class ThermoType>
00052 class chemistrySolver;
00053
00054
00055
00056
00057
00058 template<class CompType, class ThermoType>
00059 class chemistrySolver
00060 {
00061 protected:
00062
00063
00064
00065
00066 ODEChemistryModel<CompType, ThermoType>& model_;
00067
00068
00069 const word name_;
00070
00071
00072 public:
00073
00074
00075 TypeName("chemistrySolver");
00076
00077
00078
00079 declareRunTimeSelectionTable
00080 (
00081 autoPtr,
00082 chemistrySolver,
00083 dictionary,
00084 (
00085 ODEChemistryModel<CompType, ThermoType>& model,
00086 const word& modelName
00087 ),
00088 (model, modelName)
00089 );
00090
00091
00092
00093
00094
00095 chemistrySolver
00096 (
00097 ODEChemistryModel<CompType, ThermoType>& model,
00098 const word& modelName
00099 );
00100
00101
00102
00103 static autoPtr<chemistrySolver> New
00104 (
00105 ODEChemistryModel<CompType, ThermoType>& model,
00106 const word& compTypeName,
00107 const word& thermoTypeName
00108 );
00109
00110
00111
00112 virtual ~chemistrySolver();
00113
00114
00115
00116
00117
00118 virtual scalar solve
00119 (
00120 scalarField &c,
00121 const scalar T,
00122 const scalar p,
00123 const scalar t0,
00124 const scalar dt
00125 ) const = 0;
00126 };
00127
00128
00129
00130
00131 }
00132
00133
00134
00135 #define makeChemistrySolver(Comp, Thermo) \
00136 \
00137 typedef chemistrySolver<Comp, Thermo> \
00138 chemistrySolver##Comp##Thermo; \
00139 \
00140 defineTemplateTypeNameAndDebugWithName \
00141 ( \
00142 chemistrySolver##Comp##Thermo, \
00143 "chemistryModel<"#Comp","#Thermo">", \
00144 0 \
00145 ); \
00146 \
00147 defineTemplateRunTimeSelectionTable \
00148 ( \
00149 chemistrySolver##Comp##Thermo, \
00150 dictionary \
00151 );
00152
00153
00154 #define makeChemistrySolverType(SS, Comp, Thermo) \
00155 \
00156 typedef SS<Comp, Thermo> SS##Comp##Thermo; \
00157 \
00158 defineTemplateTypeNameAndDebugWithName \
00159 ( \
00160 SS##Comp##Thermo, \
00161 #SS"<"#Comp","#Thermo">", \
00162 0 \
00163 ); \
00164 \
00165 chemistrySolver<Comp, Thermo>:: \
00166 adddictionaryConstructorToTable<SS<Comp, Thermo> > \
00167 add##SS##Comp##Thermo##ConstructorToTable_;
00168
00169
00170
00171
00172 #ifdef NoRepository
00173 # include "chemistrySolver.C"
00174 # include "newChemistrySolver.C"
00175 #endif
00176
00177
00178
00179 #endif
00180
00181
Copyright © 2000-2009 OpenCFD Ltd