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