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 #ifndef egrMixture_H
00036 #define egrMixture_H
00037
00038 #include "combustionMixture.H"
00039
00040
00041
00042 namespace Foam
00043 {
00044
00045
00046
00047
00048
00049 template<class ThermoType>
00050 class egrMixture
00051 :
00052 public combustionMixture
00053 {
00054
00055
00056 static const int nSpecies_ = 3;
00057 static const char* specieNames_[3];
00058
00059 dimensionedScalar stoicRatio_;
00060
00061 ThermoType fuel_;
00062 ThermoType oxidant_;
00063 ThermoType products_;
00064
00065 mutable ThermoType mixture_;
00066
00067
00068 volScalarField& ft_;
00069
00070
00071 volScalarField& b_;
00072
00073
00074 volScalarField& egr_;
00075
00076
00077 egrMixture(const egrMixture<ThermoType>&);
00078
00079
00080 public:
00081
00082
00083 typedef ThermoType thermoType;
00084
00085
00086
00087
00088
00089 egrMixture(const dictionary&, const fvMesh&);
00090
00091
00092
00093
00094 const dimensionedScalar& stoicRatio() const
00095 {
00096 return stoicRatio_;
00097 }
00098
00099 const ThermoType& mixture
00100 (
00101 const scalar,
00102 const scalar,
00103 const scalar
00104 ) const;
00105
00106 const ThermoType& cellMixture(const label celli) const
00107 {
00108 return mixture(ft_[celli], b_[celli], egr_[celli]);
00109 }
00110
00111 const ThermoType& patchFaceMixture
00112 (
00113 const label patchi,
00114 const label facei
00115 ) const
00116 {
00117 return mixture
00118 (
00119 ft_.boundaryField()[patchi][facei],
00120 b_.boundaryField()[patchi][facei],
00121 egr_.boundaryField()[patchi][facei]
00122 );
00123 }
00124
00125 const ThermoType& cellReactants(const label celli) const
00126 {
00127 return mixture(ft_[celli], 1, egr_[celli]);
00128 }
00129
00130 const ThermoType& patchFaceReactants
00131 (
00132 const label patchi,
00133 const label facei
00134 ) const
00135 {
00136 return mixture
00137 (
00138 ft_.boundaryField()[patchi][facei],
00139 1,
00140 egr_.boundaryField()[patchi][facei]
00141 );
00142 }
00143
00144 const ThermoType& cellProducts(const label celli) const
00145 {
00146 return mixture(ft_[celli], 0, 0);
00147 }
00148
00149 const ThermoType& patchFaceProducts
00150 (
00151 const label patchi,
00152 const label facei
00153 ) const
00154 {
00155 return mixture
00156 (
00157 ft_.boundaryField()[patchi][facei],
00158 0,
00159 0
00160 );
00161 }
00162
00163
00164 void read(const dictionary&);
00165 };
00166
00167
00168
00169
00170 }
00171
00172
00173
00174 #ifdef NoRepository
00175 # include "egrMixture.C"
00176 #endif
00177
00178
00179
00180 #endif
00181
00182