• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

sst/core/techModels/libHotSpot/package.h

00001 #ifndef __PACKAGE_H_
00002 #define __PACKAGE_H_
00003 
00004 #include "flp.h"
00005 #include "util.h"
00006 #include "temperature.h"
00007 
00008 /* santity check convection resistance boundary values.
00009          if outside this range, most likely some settings of 
00010          the heat sink or the fan are unreasonable.
00011 */
00012 #define R_CONVEC_HIGH   50.0 /* upper-bound value for natural convection without heat sink */
00013 #define R_CONVEC_LOW    0.01 /* lower-bound value for best cooling solution, e.g. liquid cooling */
00014 
00015 /* fluid (air) properties       */
00016 #define AIR_DSTY                1.059   /* density */
00017 #define AIR_SPECHT              1007 /* specific heat */
00018 #define AIR_COND        0.028   /* thermal conductivity */
00019 #define AIR_DIFF        2.6e-5  /* thermal diffusivity */
00020 #define AIR_DYNVISC             2.0e-5  /* dynamic viscosity */
00021 #define AIR_KINVISC             1.9e-5  /* kinetic viscosity */
00022 
00023 #define PRANTDL_NUM     0.73    /* Prantdl Number of air */
00024 #define REY_THRESHOLD   3500 /* laminar/turbulent reynolds threshold */ 
00025 
00026 /* parameters specific to natural convection and radiation */
00027 #define VOL_EXP_COEFF   3.0e-3 /* volume expansion coefficient */
00028 #define GRAVITY 9.8     /* gravity acceleration rate */
00029 #define STEFAN  5.67e-8 /* Stefan-Boltzmann constant */
00030 #define EMISSIVITY      0.95 /* emissivity, typical value for most heatsink materials */
00031 #define SMALL_FOR_CONVEC 0.01 /* initial small temperature diff b/w heatsink and ambient, to avoid sigular matrices */
00032 #define NATURAL_CONVEC_TOL 0.01 /* r_convec convergence criterion for natural convection calculations */
00033 #define MAX_SINK_TEMP 1000      /* max avg sink temperature during iteration for natural convection. if exceeded, report thermal runaway*/
00034 
00035 /* flow resistance constants */
00036 #define KC      0.42
00037 #define KE      1.0
00038 #define PI      3.1416
00039 
00040 /* fan constants */
00041 #define FAN_ALPHA       1 /* 1 for laminar flow, >=2 for turbulent flow */
00042 #define FAN_BETA 4 /* 4 for laminar flow, 4.6 for turbulent flow */
00043 #define FAN_POWER_COEFF 2.8 /* fan_power=b*omega^2.8 */
00044 #define RPM_TO_RAD 0.105        /* convert rpm to radians per sec */
00045 #define RAD_TO_RPM      9.55 /* convert radians per sec to rpm */
00046 
00047 /* package model configuration  */
00048 typedef struct package_config_t_st
00049 {
00050         /* natural convection or not - 0: forced convection, 1: natural convection*/
00051         int natural_convec;
00052         
00053         /* airflow type - 0: lateral airflow from sink side, 1: impinging airflow       from sink top*/
00054         int flow_type;
00055         
00056         /* heatsink type - 0: fin-channel sink, 1: pin-fin sink */
00057         int sink_type;
00058         
00059         /* sink specs */
00060                 /* sink base size is defined in thermal_config */
00061                 /* 1) fin-channel sink */
00062         double fin_height;
00063         double fin_width;
00064         double channel_width;
00065                 /* 2) pin-fin sink */
00066         double pin_height;
00067         double pin_diam;
00068         double pin_dist; /* distance between pins */ 
00069         
00070         /* fan specs */
00071         double fan_radius;
00072         double motor_radius;
00073         int rpm;
00074 }package_config_t;
00075 
00076 /* defaults     */
00077 package_config_t default_package_config(void);
00078 /* 
00079  * parse a table of name-value string pairs and add the configuration
00080  * parameters to 'package_config'
00081  */
00082 void package_config_add_from_strs(package_config_t *package_config, str_pair *package_table, int size);
00083 /* 
00084  * convert package_config into a table of name-value pairs. returns the no.
00085  * of parameters converted
00086  */
00087 int package_config_to_strs(package_config_t *package_config, str_pair *package_table, int max_entries);
00088 
00089 /* airflow parameters   */
00090 typedef struct convection_t_st
00091 {
00092         double n_fin; /* number of fins */
00093         double sur_area_fin; /* total surface area */ 
00094 
00095         double n_pin; /* number of pins */
00096         double sur_area_pin; /* total surface area */ 
00097 
00098         /* flow charateristics */
00099         double reynolds;
00100         double nusselt;
00101         double h_coeff; /* heat transfer coefficient */
00102         double v; /* air velocity */
00103         double r_th; /* lumped convection thermal resistance */
00104 }convection_t;
00105 
00106 /*  airflow parameter routines  */
00107 void calculate_flow(convection_t *p, package_config_t *package_config, thermal_config_t *thermal_config);
00108 
00109 /* debug print  */
00110 void debug_print_convection(convection_t *p);
00111 
00112 /* parse thermal config table and update r_conv if needed */
00113 int package_model(thermal_config_t *thermal_config, str_pair *table, int size, double sink_temp);
00114 
00115 #endif

Generated on Fri Oct 22 2010 11:02:14 for SST by  doxygen 1.7.1