Main Page   Compound List   File List   Compound Members   File Members  

RothFuelModel.h

Go to the documentation of this file.
00001 
00026 #ifndef RothFuelModel_H
00027 #define RothFuelModel_H
00028 
00029 #include <stdlib.h>
00030 #include <stdio.h>
00031 #include <math.h>
00032 
00033 #include "Units.h"
00034 #include "FStreamIO.h"
00035 #include "Err.h"
00036 #include "FuelSizeClasses.h"
00037 #include "RothPipeline.h"
00038 
00039 /*
00040  *********************************************************
00041  * DEFINES, ENUMS
00042  *********************************************************
00043  */
00044 
00045 /* fmd file constants */
00046 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00047 
00048 #define ROTH_FM_FMD_SEPARATOR_CHARS         (" =,\t")
00049 #define ROTH_FM_FMD_COMMENT_CHAR            ("#")
00050 #define ROTH_FM_FMD_KEYWORD_METRIC          ("METRIC")
00051 #define ROTH_FM_FMD_KEYWORD_ENGLISH         ("ENGLISH")
00052 
00053 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00054 
00055 /* sequence of FMD file variables expected to be:                               */
00056 /* 1H  10H  100H  LiveH LiveW  1HSAV LiveHSAV LiveWSAV Depth  XtMoist  DHt  LHt */
00057 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00058 
00059 #define ROTH_FM_FMD_D1H_LOAD                (0)
00060 #define ROTH_FM_FMD_D10H_LOAD               (1)
00061 #define ROTH_FM_FMD_D100H_LOAD              (2)
00062 #define ROTH_FM_FMD_LH_LOAD                 (3)
00063 #define ROTH_FM_FMD_LW_LOAD                 (4)
00064 #define ROTH_FM_FMD_1H_SAV                  (5)
00065 #define ROTH_FM_FMD_LH_SAV                  (6)
00066 #define ROTH_FM_FMD_LW_SAV                  (7)
00067 #define ROTH_FM_FMD_FBED_DEPTH              (8)
00068 #define ROTH_FM_FMD_EXT_MOIST               (9)
00069 #define ROTH_FM_FMD_DHC                     (10)
00070 #define ROTH_FM_FMD_LHC                     (11)
00071 #define ROTH_FM_FMD_NUM_VALUES              (12)
00072 
00073 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00074  
00080 #define ROTH_FM_STD_TOTAL_SILICA_UNITLESS   (0.0555)
00081 
00086 #define ROTH_FM_STD_EFF_SILICA_UNITLESS     (0.0100)
00087 
00092 #define ROTH_FM_STD_FP_DENSITY_ENGLISH      (32.0)
00093 
00098 #define ROTH_FM_D10H_STD_SAV_ENGLISH        (109.0)
00099 
00104 #define ROTH_FM_D100H_STD_SAV_ENGLISH       (30.0)
00105 
00110 #define ROTH_FM_ZERO_ROS_ADJ_FACTOR         (0.0)
00111 
00118 enum EnumRothFuelType_  {
00119     EnumRothBurnable        = 0,
00120     EnumRothUnBurnable      = 1
00121     };
00122  
00123 /*
00124  *********************************************************
00125  * STRUCTS, TYPEDEFS
00126  *********************************************************
00127  */
00128 
00132 typedef enum EnumRothFuelType_ EnumRothFuelType;
00133 
00137 typedef struct RothFuelModel_ RothFuelModel;
00138     
00142 struct RothFuelModel_   {
00144     EnumRothFuelType brntype;               
00146     EnumUnitType units;                     
00148     float fdepth;                           
00150     float mex;                              
00152     float ros_adj;                          
00154     int   num_fp;                           
00156     float fdens;                            
00158     float fsav;                 
00160     float pkrat;                            
00162     float load  [EnumNumSizeClasses];       
00164     float sav   [EnumNumSizeClasses];       
00166     float dens  [EnumNumSizeClasses];       
00168     float hc    [EnumNumSizeClasses];       
00170     float stot  [EnumNumSizeClasses];       
00172     float seff  [EnumNumSizeClasses];       
00174     float sarea [EnumNumSizeClasses];       
00176     float effhn [EnumNumSizeClasses];
00178     float awtg  [EnumNumSizeClasses];
00180     float larea;                            
00182     float darea;
00184     float fm    [EnumNumSizeClasses];       
00186     RothPipeline * rp;                      
00187     };
00188      
00189 /*
00190  *********************************************************
00191  * MACROS
00192  *********************************************************
00193  */
00194  
00195 /*
00196  *********************************************************
00197  * PUBLIC FUNCTIONS
00198  *********************************************************
00199  */
00200 
00207 RothFuelModel * InitRothFuelModelEmpty();
00208 
00218 RothFuelModel * InitRothFuelModelFMDFile(FILE * fstream, int model_num);
00219 
00225 RothFuelModel * InitRothFuelModelUnBurnable();
00226 
00242 int RothFuelModelMetricToEnglish(RothFuelModel * rfm);
00243 
00260 int RothFuelModelEnglishToMetric(RothFuelModel * rfm);
00261 
00268 void RothFuelModelDumpToStream(RothFuelModel * rfm, FILE * fstream);
00269 
00277 void FreeRothFuelModel(void * vptr);
00278   
00279 #endif RothFuelModel_H      /* end of RothFuelModel.h */

Generated at Fri Jun 22 00:46:51 2001 for HFire by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000