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 DevolatilisationModel_H
00037 #define DevolatilisationModel_H
00038 
00039 #include <OpenFOAM/IOdictionary.H>
00040 #include <OpenFOAM/autoPtr.H>
00041 #include <OpenFOAM/runTimeSelectionTables.H>
00042 
00043 
00044 
00045 namespace Foam
00046 {
00047 
00048 
00049 
00050 
00051 
00052 template<class CloudType>
00053 class DevolatilisationModel
00054 {
00055 protected:
00056 
00057     
00058 
00059         
00060         const dictionary& dict_;
00061 
00062         
00063         CloudType& owner_;
00064 
00065         
00066         const dictionary coeffDict_;
00067 
00068 
00069 public:
00070 
00071     
00072     TypeName("DevolatilisationModel");
00073 
00074     
00075     declareRunTimeSelectionTable
00076     (
00077         autoPtr,
00078         DevolatilisationModel,
00079         dictionary,
00080         (
00081             const dictionary& dict,
00082             CloudType& owner
00083         ),
00084         (dict, owner)
00085     );
00086 
00087 
00088     
00089 
00090         
00091         DevolatilisationModel(CloudType& owner);
00092 
00093         
00094         DevolatilisationModel
00095         (
00096             const dictionary& dict,
00097             CloudType& owner,
00098             const word& type
00099         );
00100 
00101 
00102     
00103     virtual ~DevolatilisationModel();
00104 
00105 
00106     
00107     static autoPtr<DevolatilisationModel<CloudType> > New
00108     (
00109         const dictionary& dict,
00110         CloudType& owner
00111     );
00112 
00113 
00114     
00115 
00116         
00117         const CloudType& owner() const;
00118 
00119         
00120         const dictionary& dict() const;
00121 
00122         
00123         const dictionary& coeffDict() const;
00124 
00125 
00126     
00127 
00128         
00129         virtual bool active() const = 0;
00130 
00131         
00132         virtual scalar calculate
00133         (
00134             const scalar dt,
00135             const scalar mass0,
00136             const scalar mass,
00137             const scalar T,
00138             const scalar YVolatile0,
00139             const scalar YVolatile,
00140             bool& canCombust
00141         ) const = 0;
00142 };
00143 
00144 
00145 
00146 
00147 } 
00148 
00149 
00150 
00151 #define makeDevolatilisationModel(CloudType)                                  \
00152                                                                               \
00153     defineNamedTemplateTypeNameAndDebug(DevolatilisationModel<CloudType>, 0); \
00154                                                                               \
00155     defineTemplateRunTimeSelectionTable                                       \
00156     (                                                                         \
00157         DevolatilisationModel<CloudType>,                                     \
00158         dictionary                                                            \
00159     );
00160 
00161 
00162 #define makeDevolatilisationModelThermoType(SS, CloudType, ParcelType, ThermoType)\
00163                                                                               \
00164     defineNamedTemplateTypeNameAndDebug                                       \
00165     (                                                                         \
00166         SS<CloudType<ParcelType<ThermoType> > >,                              \
00167         0                                                                     \
00168     );                                                                        \
00169                                                                               \
00170     DevolatilisationModel<CloudType<ParcelType<ThermoType> > >::              \
00171         adddictionaryConstructorToTable                                       \
00172             <SS<CloudType<ParcelType<ThermoType> > > >                        \
00173             add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_;
00174 
00175 
00176 
00177 
00178 #ifdef NoRepository
00179 #   include "DevolatilisationModel.C"
00180 #endif
00181 
00182 
00183 
00184 #endif
00185 
00186