00001 #ifndef __PACKAGE_H_
00002 #define __PACKAGE_H_
00003
00004 #include "flp.h"
00005 #include "util.h"
00006 #include "temperature.h"
00007
00008
00009
00010
00011
00012 #define R_CONVEC_HIGH 50.0
00013 #define R_CONVEC_LOW 0.01
00014
00015
00016 #define AIR_DSTY 1.059
00017 #define AIR_SPECHT 1007
00018 #define AIR_COND 0.028
00019 #define AIR_DIFF 2.6e-5
00020 #define AIR_DYNVISC 2.0e-5
00021 #define AIR_KINVISC 1.9e-5
00022
00023 #define PRANTDL_NUM 0.73
00024 #define REY_THRESHOLD 3500
00025
00026
00027 #define VOL_EXP_COEFF 3.0e-3
00028 #define GRAVITY 9.8
00029 #define STEFAN 5.67e-8
00030 #define EMISSIVITY 0.95
00031 #define SMALL_FOR_CONVEC 0.01
00032 #define NATURAL_CONVEC_TOL 0.01
00033 #define MAX_SINK_TEMP 1000
00034
00035
00036 #define KC 0.42
00037 #define KE 1.0
00038 #define PI 3.1416
00039
00040
00041 #define FAN_ALPHA 1
00042 #define FAN_BETA 4
00043 #define FAN_POWER_COEFF 2.8
00044 #define RPM_TO_RAD 0.105
00045 #define RAD_TO_RPM 9.55
00046
00047
00048 typedef struct package_config_t_st
00049 {
00050
00051 int natural_convec;
00052
00053
00054 int flow_type;
00055
00056
00057 int sink_type;
00058
00059
00060
00061
00062 double fin_height;
00063 double fin_width;
00064 double channel_width;
00065
00066 double pin_height;
00067 double pin_diam;
00068 double pin_dist;
00069
00070
00071 double fan_radius;
00072 double motor_radius;
00073 int rpm;
00074 }package_config_t;
00075
00076
00077 package_config_t default_package_config(void);
00078
00079
00080
00081
00082 void package_config_add_from_strs(package_config_t *package_config, str_pair *package_table, int size);
00083
00084
00085
00086
00087 int package_config_to_strs(package_config_t *package_config, str_pair *package_table, int max_entries);
00088
00089
00090 typedef struct convection_t_st
00091 {
00092 double n_fin;
00093 double sur_area_fin;
00094
00095 double n_pin;
00096 double sur_area_pin;
00097
00098
00099 double reynolds;
00100 double nusselt;
00101 double h_coeff;
00102 double v;
00103 double r_th;
00104 }convection_t;
00105
00106
00107 void calculate_flow(convection_t *p, package_config_t *package_config, thermal_config_t *thermal_config);
00108
00109
00110 void debug_print_convection(convection_t *p);
00111
00112
00113 int package_model(thermal_config_t *thermal_config, str_pair *table, int size, double sink_temp);
00114
00115 #endif