veryInhomogeneousMixture.C
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 #include "veryInhomogeneousMixture.H"
00028 #include "fvMesh.H"
00029
00030
00031
00032 template<class ThermoType>
00033 const char* Foam::veryInhomogeneousMixture<ThermoType>::specieNames_[3] =
00034 {"ft", "fu", "b"};
00035
00036
00037
00038
00039 template<class ThermoType>
00040 Foam::veryInhomogeneousMixture<ThermoType>::veryInhomogeneousMixture
00041 (
00042 const dictionary& thermoDict,
00043 const fvMesh& mesh
00044 )
00045 :
00046 basicMultiComponentMixture
00047 (
00048 thermoDict,
00049 speciesTable(nSpecies_, specieNames_),
00050 mesh
00051 ),
00052
00053 stoicRatio_(thermoDict.lookup("stoichiometricAirFuelMassRatio")),
00054
00055 fuel_(thermoDict.lookup("fuel")),
00056 oxidant_(thermoDict.lookup("oxidant")),
00057 products_(thermoDict.lookup("burntProducts")),
00058
00059 mixture_("mixture", fuel_),
00060
00061 ft_(Y("ft")),
00062 fu_(Y("fu")),
00063 b_(Y("b"))
00064 {}
00065
00066
00067
00068
00069 template<class ThermoType>
00070 const ThermoType& Foam::veryInhomogeneousMixture<ThermoType>::mixture
00071 (
00072 const scalar ft,
00073 const scalar fu
00074 ) const
00075 {
00076 if (ft < 0.0001)
00077 {
00078 return oxidant_;
00079 }
00080 else
00081 {
00082 scalar ox = 1 - ft - (ft - fu)*stoicRatio().value();
00083 scalar pr = 1 - fu - ox;
00084
00085 mixture_ = fu/fuel_.W()*fuel_;
00086 mixture_ += ox/oxidant_.W()*oxidant_;
00087 mixture_ += pr/products_.W()*products_;
00088
00089 return mixture_;
00090 }
00091 }
00092
00093
00094 template<class ThermoType>
00095 void Foam::veryInhomogeneousMixture<ThermoType>::read
00096 (
00097 const dictionary& thermoDict
00098 )
00099 {
00100 fuel_ = ThermoType(thermoDict.lookup("fuel"));
00101 oxidant_ = ThermoType(thermoDict.lookup("oxidant"));
00102 products_ = ThermoType(thermoDict.lookup("burntProducts"));
00103 }
00104
00105
00106
Copyright © 2000-2009 OpenCFD Ltd