00001 #ifndef CLIMATCOND2_H 00002 #define CLIMATCOND2_H 00003 00004 #include <stdio.h> 00005 #include "iotools.h" 00006 #include "gfunct.h" 00007 #include "isotherm.h" 00008 00009 class climatcond2 00010 { 00011 public: 00012 climatcond2 (void); 00013 00014 ~climatcond2 (void); 00015 00016 /// function reads data from input files 00017 void read (XFILE *in, long readclimfile=1); 00018 00019 /// function prints data to output file 00020 void print(FILE *out); 00021 00022 /// function reads files with climatic data 00023 void read_climatic_files (char *Cfile, long cod); 00024 00025 /// function prepares the actual values 00026 void prepare_values (double time); 00027 00028 /// function computes values of all external variables 00029 void compute_values (double time); 00030 00031 /// function computes flux densities 00032 double give_flux (long flid, double *nval,long ipp,long nid); 00033 00034 /// function computes the heat flux 00035 double give_heat_flux (double nval_0,double temp,long ipp, long nid); 00036 00037 /// function computes short wave radiation flux 00038 double condit_short_wave_radiat_flux (long swkind, double time); 00039 00040 /// function computes long wave radiation flux 00041 double condit_long_wave_radiat_flux (long lwkind); 00042 00043 /// function computes internal energy of convective liquid water flux (J/m2/s) 00044 double condit_rain_heat_flux (long rainkind,long nid); 00045 00046 /// function returns transmission coefficient for heat flux 00047 double transmission_coefficient_tt (long VDKind); 00048 00049 /// function computes temperature of exterior 00050 double transmission_exterior_value_tt (long VDKind); 00051 00052 /// function computes transmission coefficient tw 00053 double transmission_coefficient_tw (long VDKind,double temp); 00054 00055 00056 /// function computes the moisture flux density 00057 double give_moisture_flux (double nval_0, double nval_1,long ipp, long nid); 00058 00059 /// function computes mass of convective liqiud water flux 00060 double condit_rain_moisture_flux (long rainkind,long nid); 00061 00062 /// function returns transmission coefficient for moisture flux defined by moisture difference 00063 double transmission_coefficient_ww (long VDKind); 00064 00065 /// function computes water vapour pressure in exterior 00066 double transmission_exterior_value_ww (long VDKind); 00067 00068 /// function returns external value of the cid-th variable 00069 double external_nodval (long cid); 00070 00071 /// function returns transmission coefficient for the lcid-th flux caused by the cid-th gradient 00072 double transmission_coeff (long lcid,long cid,double temp); 00073 00074 00075 private: 00076 00077 /// type of heat conduction 00078 /// KIND1 = 0 - no heat conduction 00079 /// KIND1 = 11 - prescribed heat flux (on boundary) 00080 /// KIND1 = 12 - heat transmission 00081 /// KIND1 = 13 - heat transmission extended by the wind factor 00082 /// KIND1 = 16 - constant heat transmission 00083 long KIND1; 00084 00085 /// type of short wave radiation heat flux 00086 /// KIND2 = 0 - no short wave radiation heat flux 00087 /// KIND2 = 21 - short wave radiation heat flux 00088 /// KIND2 = 22 - short wave radiation heat flux extended by the wind 00089 long KIND2; 00090 00091 /// type of long wave radiation heat flux 00092 /// KIND3 = 0 - no long wave radiation heat flux 00093 /// KIND3 = 31 - long wave radiation heat flux 00094 /// KIND3 = 32 - long wave radiation heat flux extended by sky radiation 00095 long KIND3; 00096 00097 00098 /// type of water contact 00099 /// KIND4 = 0 - no water contact 00100 long KIND4; 00101 00102 /// type of rain - mass of convective liquid water flux 00103 /// KIND5 = 0 - no rain 00104 /// KIND5 = 51 - prescribed water flux caused by rain 00105 /// KIND5 = 52 - prescribed water flux caused by rain extended by wind effect 00106 long KIND5; 00107 00108 00109 /// type of mass of diffusive water vapour flux 00110 /// KIND6 = 0 - no mass of diffusive water vapour flux 00111 /// KIND6 = 61 - mass of diffusive water vapour flux 00112 /// KIND6 = 62 - mass of diffusive water vapour flux - extended by wind effect 00113 /// KIND6 = 63 - mass of diffusive water vapour flux - water vapor exchange coefficient is given by function 00114 /// KIND6 = 64 - mass of diffusive water vapour flux - water vapor exchange coefficient is given by function 00115 /// KIND6 = 65 - mass of diffusive water vapour flux - water vapor exchange coefficient is given by function 00116 /// KIND6 = 66 - mass of diffusive water vapour flux - water vapor exchange coefficient is given by a table 00117 /// KIND6 = 67 - mass of diffusive water vapour flux - constant temperature, relative humidity, water vapor exchange coefficient 00118 long KIND6; 00119 00120 00121 /// input files 00122 char *files0,*files1,*files2,*files3,*files4,*files5,*files6,*files7,*files8; 00123 00124 /// last time when values were computed 00125 double last_time; 00126 /// computer zero 00127 double zero; 00128 00129 /// the number of lines in input file 00130 long d; 00131 /// the number of rows in input files with climatic data 00132 long tn; 00133 /// cc = 0 - the classical referential year 00134 /// cc = 1 - measured data with variable length 00135 long cc; 00136 00137 /// type of material model (see alias.h) 00138 long mattyp; 00139 /// wall orientation in radians (rotation around vertical axis) 00140 double basicdirect; 00141 /// wall inclination in radians (rotation around horizontal axis) 00142 double basicinclin; 00143 00144 /// the Ludolf number 00145 //double M_PI; 00146 /// water molecular weight 00147 double M; 00148 /// universal gas constant 00149 double R; 00150 /// Specific heat capacity of pure liquid water 00151 double Cwat; 00152 /// Specific heat capacity of water vapour 00153 double cvap; 00154 /// Specific enthalpy of water vapour at 0 C 00155 double hvap; 00156 /// Reference temperature for enthalpy (0 C) 00157 double T0; 00158 00159 double rhint, rhalfa, rhtemp; 00160 double tint; 00161 00162 /// heat exchange coefficent (W/m^2/K) 00163 double coefAlf; 00164 /// wind factor (-) (greater or equal to zero) 00165 double WindFact; 00166 00167 /// absorption coefficient for short wave radiation (-) (it is between 0 and 1) 00168 double AbsCoef; 00169 /// ground reflextion coefficient 00170 double Albedo; 00171 /// geographical latitude of location in radians 00172 double Latitude; 00173 00174 /// emission coefficient for long wave radiation (-) (it is between 0 and 1) 00175 double EmisCoeff; 00176 00177 /// rain exposure coefficient kg/m^2/s 00178 double ExchCoeff; 00179 /// rain coefficient (it is between 0 and 1) 00180 double RainCoeff; 00181 /// minimum rain temperature from -40 C to 0 C (K) 00182 double MinRainTemp; 00183 /// minimum normal rain intensity (l/m^2/s) 00184 double MinRainFlux; 00185 00186 /// wind factor (-) (greater or equal to zero) 00187 double WindFactVD; 00188 /// water vapor exchange coefficient 00189 double ExchCoeffVD; 00190 /// coeffcient for function of water vapor exchange coefficient 00191 double alfaK, Ax, Bx, Cx; 00192 00193 /// temperature 00194 double TepVal; 00195 /// relative humidity 00196 double RHVal; 00197 /// diffuse radiation flux on a horizontal plane 00198 double DifSVal; 00199 /// direct radiation flux on a horizontal plane 00200 double DirSVal; 00201 /// wind direction 00202 double WDVal; 00203 /// wind velocity 00204 double WSVal; 00205 /// vertical rain flow density, normal to the ground 00206 double VRVal; 00207 /// long wave radiation emitted by a horizontal surface 00208 double LWVal; 00209 ///long wave radiation reflected on a horizontal surface by the clouds and particles in the atmosfere 00210 double SLWVal; 00211 /// rain flow density normal to the surface area of the wall 00212 double NorRainVal; 00213 /// imposed gaseous mass flux (dry air+ water vapor) 00214 double GasFluxVal; 00215 /// imposed heat flux 00216 double HeatFluxVal; 00217 /// imposed short wave radiation flux normal to the wall surface 00218 double ShWRadVal; 00219 /// imposed long wave radiation flux normal to the wall surface 00220 double LoWRadVal; 00221 00222 /// temperature 00223 gfunct TepValue; 00224 /// relative humidity 00225 gfunct RHValue; 00226 /// diffuse radiation flux on a horizontal plane 00227 gfunct DifSValue; 00228 /// direct radiation flux on a horizontal plane 00229 gfunct DirSValue; 00230 /// wind direction 00231 gfunct WDValue; 00232 /// wind velocity 00233 gfunct WSValue; 00234 /// vertical rain flow density, normal to the ground 00235 gfunct VRValue; 00236 /// long wave radiation emitted by a horizontal surface 00237 gfunct LWValue; 00238 ///long wave radiation reflected on a horizontal surface by the clouds and particles in the atmosfere 00239 gfunct SLWValue; 00240 /// rain flow density normal to the surface area of the wall 00241 gfunct NorRainValue; 00242 /// imposed gaseous mass flux (dry air+ water vapor) 00243 gfunct GasFluxValue; 00244 /// imposed heat flux 00245 gfunct HeatFluxValue; 00246 /// imposed short wave radiation flux normal to the wall surface 00247 gfunct ShWRadValue; 00248 /// imposed long wave radiation flux normal to the wall surface 00249 gfunct LoWRadValue; 00250 /// water vapor exchange coefficient 00251 gfunct exchangecoeff; 00252 00253 00254 }; 00255 00256 #endif