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