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