00001 #ifndef CLIMATCOND_H 00002 #define CLIMATCOND_H 00003 00004 #include <stdio.h> 00005 #include "iotools.h" 00006 #include "gfunct.h" 00007 #include "isotherm.h" 00008 00009 # ifndef M_PI 00010 # define M_PI 3.14159265358979323846 00011 # endif 00012 00013 class climatcond 00014 { 00015 public: 00016 climatcond(void); 00017 ~climatcond(void); 00018 void read(XFILE *in, long readclimfile=1); 00019 void print(FILE *out); 00020 void read_climatic_files (char * Cfile, long cod); 00021 00022 double give_flux(long icid, double * nval,long ipp,long nid); 00023 00024 double give_heat_flux(double nval_0,double nval_1,long ipp, long nid); 00025 double condit_heat_flux(long tkind, double temperstr); 00026 double condit_short_wave_radiat_flux(long swkind,double time); 00027 double condit_long_wave_radiat_flux (long lwkind); 00028 double condit_rain_heat_flux(long rainkind, double nval_0,long nid); 00029 double condit_vapour_diffusion_heat_flux(long vdkind,double nval_0 , double nval_1,long ipp, long nid); 00030 00031 00032 double give_moisture_flux(double nval_0, double nval_1,long ipp, long nid); 00033 double condit_water_contact (); 00034 double condit_rain_moisture_flux(long rainkind, double nval_0,long nid); 00035 double condit_vapour_diffusion_moisture_flux(long VDKind,double nval_0, double nval_1,long ipp, long nid); 00036 00037 00038 00039 double give_salt_flux(double w, double cf, double t, long nid); 00040 00041 00042 void compute_values (double time); 00043 void prepare_values (double time); 00044 00045 00046 double condit_vapour_diffusion_moisture_flux_salt(long VDKind,double w, double cf, double temp, long nid); 00047 00048 00049 00050 long MatCharC[3]; 00051 double MatConstC[3]; 00052 long numd; 00053 00054 00055 private: 00056 00057 /// type of heat conduction 00058 /// KIND1 = 0 - no heat conduction 00059 /// KIND1 = 11 - prescribed heat flux (on boundary) 00060 /// KIND1 = 12 - heat transmission 00061 /// KIND1 = 13 - heat transmission extended by the wind factor 00062 /// KIND1 = 14 - JK+Tomaschko 00063 /// KIND1 = 15 - JK+Klier 00064 /// KIND1 = 16 - constant heat transmission 00065 long KIND1; 00066 00067 /// type of short wave radiation heat flux 00068 /// KIND2 = 0 - no short wave radiation heat flux 00069 /// KIND2 = 21 - short wave radiation heat flux 00070 /// KIND2 = 22 - short wave radiation heat flux extended by the wind 00071 long KIND2; 00072 00073 /// type of long wave radiation heat flux 00074 /// KIND3 = 0 - no long wave radiation heat flux 00075 /// KIND3 = 31 - long wave radiation heat flux 00076 /// KIND3 = 32 - long wave radiation heat flux extended by sky radiation 00077 long KIND3; 00078 00079 00080 /// type of water contact 00081 /// KIND4 = 0 - no water contact 00082 long KIND4; 00083 00084 /// type of rain - mass of convective liquid water flux 00085 /// KIND5 = 0 - no rain 00086 /// KIND5 = 51 - prescribed water flux caused by rain 00087 /// KIND5 = 52 - prescribed water flux caused by rain extended by wind effect 00088 long KIND5; 00089 00090 00091 /// type of mass of diffusive water vapour flux 00092 /// KIND6 = 0 - no mass of diffusive water vapour flux 00093 /// KIND6 = 61 - mass of diffusive water vapour flux 00094 /// KIND6 = 62 - mass of diffusive water vapour flux - extended by wind effect 00095 /// KIND6 = 63 - mass of diffusive water vapour flux - water vapor exchange coefficient is given by function 00096 /// KIND6 = 64 - mass of diffusive water vapour flux - water vapor exchange coefficient is given by function 00097 /// KIND6 = 65 - mass of diffusive water vapour flux - water vapor exchange coefficient is given by function 00098 /// KIND6 = 66 - mass of diffusive water vapour flux - water vapor exchange coefficient is given by a table 00099 /// KIND6 = 67 - mass of diffusive water vapour flux - constant temperature, relative humidity, water vapor exchange coefficient 00100 long KIND6; 00101 00102 00103 /// last time when values were computed 00104 double last_time; 00105 /// computer zero 00106 double zero; 00107 /// the Ludolf number 00108 //double M_PI; 00109 00110 00111 /// heat exchange coefficent (W/m^2/K) 00112 double coefAlf; 00113 /// wind factor (-) (greater or equal to zero) 00114 double WindFact; 00115 /// coefficients for computation of transmission coefficent 00116 double aa,b; 00117 /// coefficients for Stefan-Boltzmann law 00118 double eps,sig; 00119 /// coefficients for radiation 00120 double alpha,m; 00121 00122 /// absorption coefficient for short wave radiation (-) (it is between 0 and 1) 00123 double AbsCoef; 00124 /// ground reflextion coefficient 00125 double Albedo; 00126 /// geographical latitude of location in radians 00127 double Latitude; 00128 00129 00130 /// emission coefficient for long wave radiation (-) (it is between 0 and 1) 00131 double EmisCoeff; 00132 00133 00134 /// rain exposure coefficient kg/m^2/s 00135 double ExchCoeff; 00136 /// rain coefficient (it is between 0 and 1) 00137 double RainCoeff; 00138 /// minimum rain temperature from -40 C to 0 C (K) 00139 double MinRainTemp; 00140 /// minimum normal rain intensity (l/m^2/s) 00141 double MinRainFlux; 00142 00143 /// wind factor (-) (greater or equal to zero) 00144 double WindFactVD; 00145 /// water vapor exchange coefficient 00146 double ExchCoeffVD; 00147 /// coeffcient for function of water vapor exchange coefficient 00148 double alfaK, Ax, Bx, Cx; 00149 00150 double rhint, rhalfa, rhtemp; 00151 double tint; 00152 /// temperature 00153 gfunct TepValue; 00154 /// relative humidity 00155 gfunct RHValue; 00156 /// diffuse radiation flux on a horizontal plane 00157 gfunct DifSValue; 00158 /// direct radiation flux on a horizontal plane 00159 gfunct DirSValue; 00160 /// wind direction 00161 gfunct WDValue; 00162 /// wind velocity 00163 gfunct WSValue; 00164 /// vertical rain flow density, normal to the ground 00165 gfunct VRValue; 00166 /// long wave radiation emitted by a horizontal surface 00167 gfunct LWValue; 00168 ///long wave radiation reflected on a horizontal surface by the clouds and particles in the atmosfere 00169 gfunct SLWValue; 00170 /// rain flow density normal to the surface area of the wall 00171 gfunct NorRainValue; 00172 /// imposed gaseous mass flux (dry air+ water vapor) 00173 gfunct GasFluxValue; 00174 /// imposed heat flux 00175 gfunct HeatFluxValue; 00176 /// imposed short wave radiation flux normal to the wall surface 00177 gfunct ShWRadValue; 00178 /// imposed long wave radiation flux normal to the wall surface 00179 gfunct LoWRadValue; 00180 /// array containing radiation (JK+Tomaschko) 00181 gfunct RadValue; 00182 /// array containing temperature Tb (JK+Klier) 00183 gfunct TempbValue; 00184 00185 /// water vapor exchange coefficient 00186 gfunct exchangecoeff; 00187 00188 /// temperature 00189 double TepVal; 00190 /// relative humidity 00191 double RHVal; 00192 /// diffuse radiation flux on a horizontal plane 00193 double DifSVal; 00194 /// direct radiation flux on a horizontal plane 00195 double DirSVal; 00196 /// wind direction 00197 double WDVal; 00198 /// wind velocity 00199 double WSVal; 00200 /// vertical rain flow density, normal to the ground 00201 double VRVal; 00202 /// long wave radiation emitted by a horizontal surface 00203 double LWVal; 00204 ///long wave radiation reflected on a horizontal surface by the clouds and particles in the atmosfere 00205 double SLWVal; 00206 /// rain flow density normal to the surface area of the wall 00207 double NorRainVal; 00208 /// imposed gaseous mass flux (dry air+ water vapor) 00209 double GasFluxVal; 00210 /// imposed heat flux 00211 double HeatFluxVal; 00212 /// imposed short wave radiation flux normal to the wall surface 00213 double ShWRadVal; 00214 /// imposed long wave radiation flux normal to the wall surface 00215 double LoWRadVal; 00216 /// array containing radiation (JK+Tomaschko) 00217 double RadVal; 00218 /// array containing temperature Tb (JK+Klier) 00219 double TempbVal; 00220 00221 00222 /// type of material model (see alias.h) 00223 long mattyp; 00224 /// wall orientation in radians (rotation around vertical axis) 00225 double basicdirect; 00226 /// wall inclination in radians (rotation around horizontal axis) 00227 double basicinclin; 00228 00229 00230 00231 00232 double Jkq; 00233 double Cwat; 00234 double T0; 00235 double hvap; 00236 double cvap; 00237 00238 //.... toto musim nacist ze vstup souboru 00239 00240 long WCorPH;// pouziva se to, ale necte se to! 00241 long RHorVP; 00242 00243 double cfmax; 00244 00245 double u, a, n; 00246 //double tint; // pro interier HEMOT 00247 //double rhint,rhtemp; // pro interier HEMOT 00248 00249 // double rhint, rhalfa, rhtemp; 00250 00251 double **SIdata; 00252 00253 long SI, numberSI; 00254 long d; 00255 long tn,cc; // tn je pocet radku climatickych hodnot, cc je 0 pro TRY a 1 pro namerena klim data ruzne delky 00256 00257 char *files0,*files1,*files2,*files3,*files4,*files5,*files6,*files7,*files8,*files14,*files15; 00258 00259 00260 }; 00261 00262 00263 #endif