Changeset 4148
- Timestamp:
- Aug 8, 2019 11:26:00 AM (5 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/indoor_model_mod.f90
r4144 r4148 25 25 ! Former revisions: 26 26 ! ----------------- 27 ! $Id$ 28 ! relational operators .EQ., .NE., etc. replaced by ==, /=, etc. 27 ! $Id: indoor_model_mod.f90 28 ! - change calculation of a_m and c_m 29 ! - change calculation of u-values (use h_es in building array) 30 ! - rename h_tr_... to h_t_... 31 ! h_tr_em to h_t_wm 32 ! h_tr_op to h_t_wall 33 ! h_tr_w to h_t_es 34 ! - rename h_ve to h_v 35 ! - rename h_is to h_ms 36 ! - inserted net_floor_area 37 ! - inserted params_waste_heat_h, params_waste_heat_c from building database 38 ! in building array 39 ! - change calculation of q_waste_heat 40 ! - bugfix in averaging mean indoor temperature 29 41 ! 30 ! 3885 2019-04-11 11:29:34Z kanani31 ! Changes related to global restructuring of location messages and introduction32 ! of additional debug messages33 42 ! 34 ! 3786 2019-03-06 16:58:03Z raasch 35 ! unused variables removed 36 ! 37 ! 3759 2019-02-21 15:53:45Z suehring 43 ! 3759 2019-02-21 15:53:45Z suehring $ 38 44 ! - Calculation of total building volume 39 45 ! - Several bugfixes … … 85 91 !> @todo Replace window_area_per_facade by %frac(1,m) for window 86 92 !> @todo emissivity change for window blinds if solar_protection_on=1 87 !> @todo write datas in netcdf file as output data 88 !> @todo reduce the building volume with netto ground surface to take respect costruction areas like walls and ceilings. Have effect on factor_a, factor_c, airchange and lambda_at 89 !> 93 90 94 !> @note Do we allow use of integer flags, or only logical flags? (concerns e.g. cooling_on, heating_on) 91 95 !> @note How to write indoor temperature output to pt array? … … 96 100 97 101 USE control_parameters, & 98 ONLY: debug_output,initializing_actions102 ONLY: initializing_actions 99 103 100 104 USE kinds … … 120 124 INTEGER(iwp) :: num_facades_per_building_v = 0 !< total number of vertical facades elements 121 125 INTEGER(iwp) :: num_facades_per_building_v_l = 0 !< number of vertical facade elements on local subdomain 126 INTEGER(iwp) :: ventilation_int_loads !< [-] allocation of activity in the building 122 127 123 128 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: l_v !< index array linking surface-element orientation index … … 131 136 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: num_facade_v !< number of vertical facades elements per buidling 132 137 !< and height level 133 134 INTEGER(iwp) :: ventilation_int_loads 138 135 139 136 140 LOGICAL :: on_pe = .FALSE. !< flag indicating whether a building with certain ID is on local subdomain 137 141 138 REAL(wp) :: building_height !< building height 139 REAL(wp) :: lambda_layer3 !< [W/(m*K)] Thermal conductivity of the inner layer 140 REAL(wp) :: s_layer3 !< [m] half thickness of the inner layer (layer_3) 141 REAL(wp) :: f_c_win !< [-] shading factor 142 REAL(wp) :: g_value_win !< [-] SHGC factor 143 REAL(wp) :: u_value_win !< [W/(m2*K)] transmittance 144 REAL(wp) :: air_change_low !< [1/h] air changes per time_utc_hour 145 REAL(wp) :: air_change_high !< [1/h] air changes per time_utc_hour 146 REAL(wp) :: eta_ve !< [-] heat recovery efficiency 147 REAL(wp) :: factor_a !< [-] Dynamic parameters specific effective surface according to Table 12; 2.5 148 !< (very light, light and medium), 3.0 (heavy), 3.5 (very heavy) 149 REAL(wp) :: factor_c !< [J/(m2 K)] Dynamic parameters inner heatstorage according to Table 12; 80000 150 !< (very light), 110000 (light), 165000 (medium), 260000 (heavy), 370000 (very heavy) 151 REAL(wp) :: lambda_at !< [-] ratio internal surface/floor area chap. 7.2.2.2. 152 REAL(wp) :: theta_int_h_set !< [degree_C] Max. Setpoint temperature (winter) 153 REAL(wp) :: theta_int_c_set !< [degree_C] Max. Setpoint temperature (summer) 154 REAL(wp) :: phi_h_max !< [W] Max. Heating capacity (negative) 155 REAL(wp) :: phi_c_max !< [W] Max. Cooling capacity (negative) 156 REAL(wp) :: qint_high !< [W/m2] internal heat gains, option Database qint_0-23 157 REAL(wp) :: qint_low !< [W/m2] internal heat gains, option Database qint_0-23 158 REAL(wp) :: height_storey !< [m] storey heigth 159 REAL(wp) :: height_cei_con !< [m] ceiling construction heigth 160 REAL(wp) :: vol_tot !< total building volume 142 REAL(wp) :: air_change_high !< [1/h] air changes per time_utc_hour 143 REAL(wp) :: air_change_low !< [1/h] air changes per time_utc_hour 144 REAL(wp) :: area_facade !< [m2] area of total facade 145 REAL(wp) :: building_height !< building height 146 REAL(wp) :: eta_ve !< [-] heat recovery efficiency 147 REAL(wp) :: factor_a !< [-] Dynamic parameters specific effective surface according to Table 12; 2.5 148 !< (very light, light and medium), 3.0 (heavy), 3.5 (very heavy) 149 REAL(wp) :: factor_c !< [J/(m2 K)] Dynamic parameters inner heatstorage according to Table 12; 80000 150 !< (very light), 110000 (light), 165000 (medium), 260000 (heavy), 370000 (very heavy) 151 REAL(wp) :: f_c_win !< [-] shading factor 152 REAL(wp) :: g_value_win !< [-] SHGC factor 153 REAL(wp) :: h_es !< [W/(m2 K)] surface-related heat transfer coefficient between extern and surface 154 REAL(wp) :: height_cei_con !< [m] ceiling construction heigth 155 REAL(wp) :: height_storey !< [m] storey heigth 156 REAL(wp) :: params_waste_heat_c !< [-] anthropogenic heat outputs for cooling e.g. 1.33 for KKM with COP = 3 157 REAL(wp) :: params_waste_heat_h !< [-] anthropogenic heat outputs for heating e.g. 1 - 0.9 = 0.1 for combustion with eta = 0.9 or -2 for WP with COP = 3 158 REAL(wp) :: phi_c_max !< [W] Max. Cooling capacity (negative) 159 REAL(wp) :: phi_h_max !< [W] Max. Heating capacity (positive) 160 REAL(wp) :: q_c_max !< [W/m2] Max. Cooling heat flux per netto floor area (negative) 161 REAL(wp) :: q_h_max !< [W/m2] Max. Heating heat flux per netto floor area (positive) 162 REAL(wp) :: qint_high !< [W/m2] internal heat gains, option Database qint_0-23 163 REAL(wp) :: qint_low !< [W/m2] internal heat gains, option Database qint_0-23 164 REAL(wp) :: lambda_at !< [-] ratio internal surface/floor area chap. 7.2.2.2. 165 REAL(wp) :: lambda_layer3 !< [W/(m*K)] Thermal conductivity of the inner layer 166 REAL(wp) :: net_floor_area !< [m2] netto ground area 167 REAL(wp) :: s_layer3 !< [m] half thickness of the inner layer (layer_3) 168 REAL(wp) :: theta_int_c_set !< [degree_C] Max. Setpoint temperature (summer) 169 REAL(wp) :: theta_int_h_set !< [degree_C] Max. Setpoint temperature (winter) 170 REAL(wp) :: u_value_win !< [W/(m2*K)] transmittance 171 REAL(wp) :: vol_tot !< [m3] total building volume 161 172 162 173 REAL(wp), DIMENSION(:), ALLOCATABLE :: t_in !< mean building indoor temperature, height dependent … … 171 182 172 183 INTEGER(iwp) :: num_build !< total number of buildings in domain 173 174 184 ! 175 185 !-- Declare all global variables within the module … … 179 189 INTEGER(iwp) :: solar_protection_on !< Solar protection on 180 190 181 REAL(wp) :: eff_mass_area !< [m2] the effective mass-related area 182 REAL(wp) :: floor_area_per_facade !< [m2] net floor area (Sum of all floors) 183 REAL(wp) :: total_area !<! [m2] area of all surfaces pointing to zone 184 REAL(wp) :: window_area_per_facade !< [m2] window area per facade element 185 REAL(wp) :: air_change !< [1/h] Airflow 186 REAL(wp) :: facade_element_area !< [m2_facade] building surface facade 187 REAL(wp) :: indoor_volume_per_facade !< [m3] indoor air volume per facade element 188 REAL(wp) :: c_m !< [J/K] internal heat storage capacity 189 REAL(wp) :: dt_indoor = 3600.0_wp !< [s] namelist parameter: time interval for indoor-model application 190 REAL(wp) :: h_tr_1 !<! [W/K] Heat transfer coefficient auxiliary variable 1 191 REAL(wp) :: h_tr_2 !<! [W/K] Heat transfer coefficient auxiliary variable 2 192 REAL(wp) :: h_tr_3 !<! [W/K] Heat transfer coefficient auxiliary variable 3 193 REAL(wp) :: h_tr_em !<! [W/K] Heat transfer coefficient of the emmision (got with h_tr_ms the thermal mass) 194 REAL(wp) :: h_tr_is !<! [W/K] thermal coupling conductance (Thermischer Kopplungsleitwert) 195 REAL(wp) :: h_tr_ms !<! [W/K] Heat transfer conductance term (got with h_tr_em the thermal mass) 196 REAL(wp) :: h_tr_op !<! [W/K] heat transfer coefficient of opaque components (assumption: got all thermal mass) contains of h_tr_em and h_tr_ms 197 REAL(wp) :: h_tr_w !<! [W/K] heat transfer coefficient of doors, windows, curtain walls and glazed walls (assumption: thermal mass=0) 198 REAL(wp) :: h_ve !<! [W/K] heat transfer of ventilation 199 REAL(wp) :: initial_indoor_temperature !< namelist parameter 200 REAL(wp) :: net_sw_in !< net short-wave radiation (in - out; was i_global --> CORRECT?) 201 REAL(wp) :: phi_hc_nd !<! [W] heating demand and/or cooling demand 202 REAL(wp) :: phi_hc_nd_10 !<! [W] heating demand and/or cooling demand for heating or cooling 203 REAL(wp) :: phi_hc_nd_ac !<! [W] actual heating demand and/or cooling demand 204 REAL(wp) :: phi_hc_nd_un !<! [W] unlimited heating demand and/or cooling demand which is necessary to reach the demanded required temperature (heating is positive, cooling is negative) 205 REAL(wp) :: phi_ia !< [W] internal air load = internal loads * 0.5, Eq. (C.1) 206 REAL(wp) :: phi_m !<! [W] mass specific thermal load (internal and external) 207 REAL(wp) :: phi_mtot !<! [W] total mass specific thermal load (internal and external) 208 REAL(wp) :: phi_sol !< [W] solar loads 209 REAL(wp) :: phi_st !<! [W] mass specific thermal load implied non thermal mass 210 ! REAL(wp) :: q_emission !< emissions, in first version = 0, option for second part of the project 211 REAL(wp) :: q_wall_win !< heat flux from indoor into wall/window 212 REAL(wp) :: q_waste_heat !< waste heat, sum of waste heat over the roof to Palm 213 ! REAL(wp) :: q_waste_heat_bldg !< [W/building] waste heat of the complete building, in Palm sum of all indoor_model-calculations 214 REAL(wp) :: schedule_d !< activation for internal loads (low or high + low) 191 REAL(wp) :: a_m !< [m2] the effective mass-related area 192 REAL(wp) :: air_change !< [1/h] Airflow 193 REAL(wp) :: c_m !< [J/K] internal heat storage capacity 194 REAL(wp) :: dt_indoor = 3600.0_wp !< [s] namelist parameter: time interval for indoor-model application 195 REAL(wp) :: facade_element_area !< [m2_facade] building surface facade 196 REAL(wp) :: floor_area_per_facade !< [m2/m2] floor area per facade area 197 REAL(wp) :: h_t_1 !< [W/K] Heat transfer coefficient auxiliary variable 1 198 REAL(wp) :: h_t_2 !< [W/K] Heat transfer coefficient auxiliary variable 2 199 REAL(wp) :: h_t_3 !< [W/K] Heat transfer coefficient auxiliary variable 3 200 REAL(wp) :: h_t_wm !< [W/K] Heat transfer coefficient of the emmision (got with h_t_ms the thermal mass) 201 REAL(wp) :: h_t_is !< [W/K] thermal coupling conductance (Thermischer Kopplungsleitwert) 202 REAL(wp) :: h_t_ms !< [W/K] Heat transfer conductance term (got with h_t_wm the thermal mass) 203 REAL(wp) :: h_t_wall !< [W/K] heat transfer coefficient of opaque components (assumption: got all thermal mass) contains of h_t_wm and h_t_ms 204 REAL(wp) :: h_t_es !< [W/K] heat transfer coefficient of doors, windows, curtain walls and glazed walls (assumption: thermal mass=0) 205 REAL(wp) :: h_v !< [W/K] heat transfer of ventilation 206 REAL(wp) :: indoor_volume_per_facade !< [m3] indoor air volume per facade element 207 REAL(wp) :: initial_indoor_temperature !< [K] initial indoor temperature (namelist parameter) 208 REAL(wp) :: net_sw_in !< [W/m2] net short-wave radiation 209 REAL(wp) :: phi_hc_nd !< [W] heating demand and/or cooling demand 210 REAL(wp) :: phi_hc_nd_10 !< [W] heating demand and/or cooling demand for heating or cooling 211 REAL(wp) :: phi_hc_nd_ac !< [W] actual heating demand and/or cooling demand 212 REAL(wp) :: phi_hc_nd_un !< [W] unlimited heating demand and/or cooling demand which is necessary to reach the demanded required temperature (heating is positive, cooling is negative) 213 REAL(wp) :: phi_ia !< [W] internal air load = internal loads * 0.5, Eq. (C.1) 214 REAL(wp) :: phi_m !< [W] mass specific thermal load (internal and external) 215 REAL(wp) :: phi_mtot !< [W] total mass specific thermal load (internal and external) 216 REAL(wp) :: phi_sol !< [W] solar loads 217 REAL(wp) :: phi_st !< [W] mass specific thermal load implied non thermal mass 218 REAL(wp) :: q_wall_win !< [W/m2]heat flux from indoor into wall/window 219 REAL(wp) :: q_waste_heat !< [W/m2]waste heat, sum of waste heat over the roof to Palm 220 221 REAL(wp) :: q_c_m !< [W] Energy of thermal storage mass specific thermal load for internal and external heatsources (for energy bilanz) 222 REAL(wp) :: q_c_st !< [W] Energy of thermal storage mass specific thermal load implied non thermal mass (for energy bilanz) 223 REAL(wp) :: q_int !< [W] Energy of internal air load (for energy bilanz) 224 REAL(wp) :: q_sol !< [W] Energy of solar (for energy bilanz) 225 REAL(wp) :: q_trans !< [W] Energy of transmission (for energy bilanz) 226 REAL(wp) :: q_vent !< [W] Energy of ventilation (for energy bilanz) 227 228 REAL(wp) :: schedule_d !< [-] activation for internal loads (low or high + low) 215 229 REAL(wp) :: skip_time_do_indoor = 0.0_wp !< [s] Indoor model is not called before this time 216 REAL(wp) :: theta_air !<! [degree_C] air temperature of the RC-node 217 REAL(wp) :: theta_air_0 !<! [degree_C] air temperature of the RC-node in equilibrium 218 REAL(wp) :: theta_air_10 !<! [degree_C] air temperature of the RC-node from a heating capacity of 10 W/m2 219 REAL(wp) :: theta_air_ac !< [degree_C] actual room temperature after heating/cooling 220 REAL(wp) :: theta_air_set !< [degree_C] Setpoint_temperature for the room 221 REAL(wp) :: theta_m !<! [degree_C} inner temperature of the RC-node 222 REAL(wp) :: theta_m_t !<! [degree_C] (Fictive) component temperature timestep 223 REAL(wp) :: theta_m_t_prev !< [degree_C] (Fictive) component temperature previous timestep (do not change) 224 REAL(wp) :: theta_op !< [degree_C] operative temperature 225 REAL(wp) :: theta_s !<! [degree_C] surface temperature of the RC-node 226 REAL(wp) :: time_indoor = 0.0_wp !< [s] time since last call of indoor model 227 ! REAL(wp) :: time_utc_hour !< Time in hours per day (UTC) 228 229 REAL(wp) :: f_sr !< [-] factor surface reduction 230 REAL(wp) :: f_cei !< [-] ceiling reduction factor 231 REAL(wp) :: ngs !< [m2] netto ground surface 232 230 REAL(wp) :: theta_air !< [degree_C] air temperature of the RC-node 231 REAL(wp) :: theta_air_0 !< [degree_C] air temperature of the RC-node in equilibrium 232 REAL(wp) :: theta_air_10 !< [degree_C] air temperature of the RC-node from a heating capacity of 10 W/m2 233 REAL(wp) :: theta_air_ac !< [degree_C] actual room temperature after heating/cooling 234 REAL(wp) :: theta_air_set !< [degree_C] Setpoint_temperature for the room 235 REAL(wp) :: theta_m !< [degree_C} inner temperature of the RC-node 236 REAL(wp) :: theta_m_t !< [degree_C] (Fictive) component temperature timestep 237 REAL(wp) :: theta_m_t_prev !< [degree_C] (Fictive) component temperature previous timestep (do not change) 238 REAL(wp) :: theta_op !< [degree_C] operative temperature 239 REAL(wp) :: theta_s !< [degree_C] surface temperature of the RC-node 240 REAL(wp) :: time_indoor = 0.0_wp !< [s] time since last call of indoor model 241 REAL(wp) :: total_area !< [m2] area of all surfaces pointing to zone 242 REAL(wp) :: window_area_per_facade !< [m2] window area per facade element 243 244 REAL(wp), PARAMETER :: h_is = 3.45_wp !< [W/(m2 K)] surface-related heat transfer coefficient between surface and air (chap. 7.2.2.2) 245 REAL(wp), PARAMETER :: h_ms = 9.1_wp !< [W/(m2 K)] surface-related heat transfer coefficient between component and surface (chap. 12.2.2) 233 246 REAL(wp), PARAMETER :: params_f_f = 0.3_wp !< [-] frame ratio chap. 8.3.2.1.1 for buildings with mostly cooling 2.0_wp 234 247 REAL(wp), PARAMETER :: params_f_w = 0.9_wp !< [-] correction factor (fuer nicht senkrechten Stahlungseinfall DIN 4108-2 chap.8, (hier konstant, keine WinkelabhÀngigkeit) 235 248 REAL(wp), PARAMETER :: params_f_win = 0.5_wp !< [-] proportion of window area, Database A_win aus Datenbank 27 window_area_per_facade_percent 236 249 REAL(wp), PARAMETER :: params_solar_protection = 300.0_wp !< [W/m2] chap. G.5.3.1 sun protection closed, if the radiation on facade exceeds this value 237 REAL(wp), PARAMETER :: params_waste_heat_c = 4.0_wp !< [-] anthropogenic heat outputs for cooling e.g. 4 for KKM with COP = 3 238 REAL(wp), PARAMETER :: params_waste_heat_h = 1.111_wp !< [-] anthropogenic heat outputs for heating e.g. 1 / 0.9 = 1.111111 for combustion with eta = 0.9 or -3 for WP with COP = 4 239 REAL(wp), PARAMETER :: h_is = 3.45_wp !< [W/(m^2 K)] h_is = 3.45 between surface and air (chap. 7.2.2.2) 240 REAL(wp), PARAMETER :: h_ms = 9.1_wp !< [W/K] h_ms = 9.10 W / (m2 K) between component and surface (chap. 12.2.2) 241 242 250 243 251 244 252 SAVE … … 332 340 REAL(wp) :: near_facade_temperature 333 341 REAL(wp) :: phi_hc_nd_dummy 334 335 336 !< Calculation of total mass specific thermal load (internal and external) 337 phi_mtot = ( phi_m + h_tr_em * indoor_wall_window_temperature & 338 + h_tr_3 * ( phi_st + h_tr_w * pt(k,j,i) & 339 + h_tr_1 * & 340 ( ( ( phi_ia + phi_hc_nd_dummy ) / h_ve ) & 342 ! 343 !-- Calculation of total mass specific thermal load (internal and external) 344 phi_mtot = ( phi_m + h_t_wm * indoor_wall_window_temperature & 345 + h_t_3 * ( phi_st + h_t_es * pt(k,j,i) & 346 + h_t_1 * & 347 ( ( ( phi_ia + phi_hc_nd_dummy ) / h_v ) & 341 348 + near_facade_temperature ) & 342 ) / h_t r_2&349 ) / h_t_2 & 343 350 ) !< [degree_C] Eq. (C.5) 344 345 !< Calculation of component temperature at factual timestep 346 theta_m_t = ( ( theta_m_t_prev & 347 * ( ( c_m / 3600.0_wp ) - 0.5_wp * ( h_tr_3 + h_tr_em ) ) + phi_mtot & 348 ) & 349 / ( ( c_m / 3600.0_wp ) + 0.5_wp * ( h_tr_3 + h_tr_em ) ) & 351 ! 352 !-- Calculation of component temperature at factual timestep 353 theta_m_t = ( ( theta_m_t_prev & 354 * ( ( c_m / 3600.0_wp ) - 0.5_wp * ( h_t_3 + h_t_wm ) ) & 355 + phi_mtot & 356 ) & 357 / ( ( c_m / 3600.0_wp ) + 0.5_wp * ( h_t_3 + h_t_wm ) ) & 350 358 ) !< [degree_C] Eq. (C.4) 351 352 !< Calculation of mean inner temperature for the RC-node in actual timestep 353 theta_m = ( theta_m_t + theta_m_t_prev ) * 0.5_wp !< [degree_C] Eq. (C.9) 354 355 !< Calculation of mean surface temperature of the RC-node in actual timestep 356 theta_s = ( ( h_tr_ms * theta_m + phi_st + h_tr_w * pt(k,j,i) & 357 + h_tr_1 * ( near_facade_temperature + ( phi_ia + phi_hc_nd_dummy ) / h_ve ) & 358 ) & 359 / ( h_tr_ms + h_tr_w + h_tr_1 ) & 359 ! 360 !-- Calculation of mean inner temperature for the RC-node in actual timestep 361 theta_m = ( theta_m_t + theta_m_t_prev ) * 0.5_wp !< [degree_C] Eq. (C.9) 362 363 ! 364 !-- Calculation of mean surface temperature of the RC-node in actual timestep 365 theta_s = ( ( h_t_ms * theta_m + phi_st + h_t_es * pt(k,j,i) & 366 + h_t_1 * ( near_facade_temperature & 367 + ( phi_ia + phi_hc_nd_dummy ) / h_v ) & 368 ) & 369 / ( h_t_ms + h_t_es + h_t_1 ) & 360 370 ) !< [degree_C] Eq. (C.10) 361 371 362 !< Calculation of the air temperature of the RC-node 363 theta_air = ( h_tr_is * theta_s + h_ve * near_facade_temperature & 364 + phi_ia + phi_hc_nd_dummy ) / ( h_tr_is + h_ve ) !< [degree_C] Eq. (C.11) 372 ! 373 !-- Calculation of the air temperature of the RC-node 374 theta_air = ( h_t_is * theta_s + h_v * near_facade_temperature & 375 + phi_ia + phi_hc_nd_dummy ) / ( h_t_is + h_v ) !< [degree_C] Eq. (C.11) 365 376 366 377 END SUBROUTINE im_calc_temperatures … … 375 386 !-- Input values 376 387 !-- Input datas from Palm, M4 377 ! i_global --> net_sw_in ! global radiation [W/m2]378 ! theta_e --> pt(k,j,i) ! undisturbed outside temperature, 1. PALM volume, for windows388 ! i_global --> net_sw_in !< global radiation [W/m2] 389 ! theta_e --> pt(k,j,i) !< undisturbed outside temperature, 1. PALM volume, for windows 379 390 ! theta_sup = theta_f --> surf_usm_h%pt_10cm(m) 380 ! surf_usm_v(l)%pt_10cm(m) !Air temperature, facade near (10cm) air temperature from 1. Palm volume391 ! surf_usm_v(l)%pt_10cm(m) !< Air temperature, facade near (10cm) air temperature from 1. Palm volume 381 392 ! theta_node --> t_wall_h(nzt_wall,m) 382 ! t_wall_v(l)%t(nzt_wall,m) ! Temperature of innermost wall layer, for opaque wall393 ! t_wall_v(l)%t(nzt_wall,m) !< Temperature of innermost wall layer, for opaque wall 383 394 !------------------------------------------------------------------------------! 384 395 SUBROUTINE im_init … … 431 442 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: receive_dum_h !< dummy array used for MPI_ALLREDUCE 432 443 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: receive_dum_v !< dummy array used for MPI_ALLREDUCE 433 444 434 445 INTEGER(iwp), DIMENSION(0:numprocs-1) :: num_buildings !< number of buildings with different ID on entire model domain 435 446 INTEGER(iwp), DIMENSION(0:numprocs-1) :: num_buildings_l !< number of buildings with different ID on local subdomain 436 447 448 REAL(wp) :: u_tmp !< dummy for temporary calculation of u-value without h_is 449 REAL(wp) :: du_tmp !< 1/u_tmp 450 REAL(wp) :: du_win_tmp !< 1/building(nb)%u_value_win 451 437 452 REAL(wp), DIMENSION(:), ALLOCATABLE :: volume !< total building volume at each discrete height level 438 453 REAL(wp), DIMENSION(:), ALLOCATABLE :: volume_l !< total building volume at each discrete height level, 439 454 !< on local subdomain 440 455 441 IF ( debug_output ) CALL debug_message( 'im_init', 'start' ) 442 456 CALL location_message( 'initializing indoor model', .FALSE. ) 443 457 ! 444 458 !-- Initializing of indoor model is only possible if buildings can be … … 457 471 IF ( building_id_f%var(j,i) /= building_id_f%fill ) THEN 458 472 IF ( num_buildings_l(myid) > 0 ) THEN 459 IF ( ANY( building_id_f%var(j,i) == build_ids_l ) ) THEN473 IF ( ANY( building_id_f%var(j,i) .EQ. build_ids_l ) ) THEN 460 474 CYCLE 461 475 ELSE … … 516 530 build_ids = build_ids_l 517 531 #endif 532 518 533 ! 519 534 !-- Note: in parallel mode, building IDs can occur mutliple times, as … … 524 539 525 540 IF ( ALLOCATED(build_ids_final) ) THEN 526 IF ( ANY( build_ids(n) == build_ids_final ) ) THEN !FK: Warum ANY?, Warum .EQ.? --> s.o541 IF ( ANY( build_ids(n) == build_ids_final ) ) THEN 527 542 CYCLE 528 543 ELSE … … 623 638 !-- these building is present. 624 639 IF ( buildings(nb)%on_pe ) THEN 640 625 641 ALLOCATE( buildings(nb)%volume(buildings(nb)%kb_min:buildings(nb)%kb_max) ) 626 642 ALLOCATE( buildings(nb)%vol_frac(buildings(nb)%kb_min:buildings(nb)%kb_max) ) … … 659 675 IF ( ALLOCATED( buildings(nb)%volume ) ) & 660 676 buildings(nb)%vol_tot = SUM( buildings(nb)%volume ) 661 677 662 678 DEALLOCATE( volume ) 663 679 DEALLOCATE( volume_l ) 664 680 665 681 ENDDO 666 667 682 ! 668 683 !-- Allocate arrays for indoor temperature. … … 716 731 ENDDO 717 732 ! 718 !-- Vertical facades 733 !-- Vertical facades! 719 734 buildings(:)%num_facades_per_building_v_l = 0 720 735 DO l = 0, 3 … … 777 792 comm2d, & 778 793 ierr ) 779 IF ( ALLOCATED( buildings(nb)%num_facade_h ) ) & !FK: Was wenn not allocated? --> s.o.794 IF ( ALLOCATED( buildings(nb)%num_facade_h ) ) & 780 795 buildings(nb)%num_facade_h = receive_dum_h 781 796 IF ( ALLOCATED( buildings(nb)%num_facade_v ) ) & … … 785 800 buildings(nb)%num_facade_v = num_facades_v 786 801 #endif 802 787 803 ! 788 804 !-- Deallocate dummy arrays … … 812 828 ENDIF 813 829 ! 814 ! -- Determine volume per facade element (vpf)830 ! -- Determine volume per facade element (vpf) 815 831 IF ( buildings(nb)%on_pe ) THEN 816 832 ALLOCATE( buildings(nb)%vpf(buildings(nb)%kb_min:buildings(nb)%kb_max) ) … … 818 834 DO k = buildings(nb)%kb_min, buildings(nb)%kb_max 819 835 buildings(nb)%vpf(k) = buildings(nb)%volume(k) / & 820 821 buildings(nb)%num_facade_v(k) )836 REAL( buildings(nb)%num_facade_h(k) + & 837 buildings(nb)%num_facade_v(k), KIND = wp ) 822 838 ENDDO 839 ENDIF 840 841 ! 842 !-- Determine volume per total facade area (vpf). For the horizontal facade 843 !-- area num_facades_per_building_h can be taken, multiplied with dx*dy. 844 !-- However, due to grid stretching, vertical facade elements must be 845 !-- summed-up vertically. Please note, if dx /= dy, an error is made! 846 IF ( buildings(nb)%on_pe ) THEN 847 848 buildings(nb)%vpf = buildings(nb)%vol_tot / & 849 ( buildings(nb)%num_facades_per_building_h * dx * dy + & 850 SUM( buildings(nb)%num_facade_v(buildings(nb)%kb_min: & 851 buildings(nb)%kb_max) & 852 * dzw(buildings(nb)%kb_min:buildings(nb)%kb_max) ) * dx ) 823 853 ENDIF 824 854 ENDDO … … 863 893 !-- In a second step initialize with building tpyes from static input file, 864 894 !-- where building types can be individual for each building. 865 buildings(:)%lambda_layer3 = building_pars(63,building_type) 866 buildings(:)%s_layer3 = building_pars(57,building_type) 867 buildings(:)%f_c_win = building_pars(119,building_type) 868 buildings(:)%g_value_win = building_pars(120,building_type) 869 buildings(:)%u_value_win = building_pars(121,building_type) 870 buildings(:)%air_change_low = building_pars(122,building_type) 871 buildings(:)%air_change_high = building_pars(123,building_type) 872 buildings(:)%eta_ve = building_pars(124,building_type) 873 buildings(:)%factor_a = building_pars(125,building_type) 874 buildings(:)%factor_c = building_pars(126,building_type) 875 buildings(:)%lambda_at = building_pars(127,building_type) 876 buildings(:)%theta_int_h_set = building_pars(118,building_type) 877 buildings(:)%theta_int_c_set = building_pars(117,building_type) 878 buildings(:)%phi_h_max = building_pars(128,building_type) 879 buildings(:)%phi_c_max = building_pars(129,building_type) 880 buildings(:)%qint_high = building_pars(130,building_type) 881 buildings(:)%qint_low = building_pars(131,building_type) 882 buildings(:)%height_storey = building_pars(132,building_type) 883 buildings(:)%height_cei_con = building_pars(133,building_type) 895 buildings(:)%lambda_layer3 = building_pars(63,building_type) 896 buildings(:)%s_layer3 = building_pars(57,building_type) 897 buildings(:)%f_c_win = building_pars(119,building_type) 898 buildings(:)%g_value_win = building_pars(120,building_type) 899 buildings(:)%u_value_win = building_pars(121,building_type) 900 buildings(:)%air_change_low = building_pars(122,building_type) 901 buildings(:)%air_change_high = building_pars(123,building_type) 902 buildings(:)%eta_ve = building_pars(124,building_type) 903 buildings(:)%factor_a = building_pars(125,building_type) 904 buildings(:)%factor_c = building_pars(126,building_type) 905 buildings(:)%lambda_at = building_pars(127,building_type) 906 buildings(:)%theta_int_h_set = building_pars(118,building_type) 907 buildings(:)%theta_int_c_set = building_pars(117,building_type) 908 buildings(:)%q_h_max = building_pars(128,building_type) 909 buildings(:)%q_c_max = building_pars(129,building_type) 910 buildings(:)%qint_high = building_pars(130,building_type) 911 buildings(:)%qint_low = building_pars(131,building_type) 912 buildings(:)%height_storey = building_pars(132,building_type) 913 buildings(:)%height_cei_con = building_pars(133,building_type) 914 buildings(:)%params_waste_heat_h = building_pars(134,building_type) 915 buildings(:)%params_waste_heat_c = building_pars(135,building_type) 884 916 ! 885 917 !-- Initialize ventilaation load. Please note, building types > 7 are actually … … 909 941 DO j = nys, nyn 910 942 IF ( building_id_f%var(j,i) /= building_id_f%fill ) THEN 911 nb = MINLOC( ABS( buildings(:)%id - building_id_f%var(j,i) ), 943 nb = MINLOC( ABS( buildings(:)%id - building_id_f%var(j,i) ), & 912 944 DIM = 1 ) 913 945 bt = building_type_f%var(j,i) 914 946 915 buildings(nb)%lambda_layer3 = building_pars(63,bt) 916 buildings(nb)%s_layer3 = building_pars(57,bt) 917 buildings(nb)%f_c_win = building_pars(119,bt) 918 buildings(nb)%g_value_win = building_pars(120,bt) 919 buildings(nb)%u_value_win = building_pars(121,bt) 920 buildings(nb)%air_change_low = building_pars(122,bt) 921 buildings(nb)%air_change_high = building_pars(123,bt) 922 buildings(nb)%eta_ve = building_pars(124,bt) 923 buildings(nb)%factor_a = building_pars(125,bt) 924 buildings(nb)%factor_c = building_pars(126,bt) 925 buildings(nb)%lambda_at = building_pars(127,bt) 926 buildings(nb)%theta_int_h_set = building_pars(118,bt) 927 buildings(nb)%theta_int_c_set = building_pars(117,bt) 928 buildings(nb)%phi_h_max = building_pars(128,bt) 929 buildings(nb)%phi_c_max = building_pars(129,bt) 930 buildings(nb)%qint_high = building_pars(130,bt) 931 buildings(nb)%qint_low = building_pars(131,bt) 932 buildings(nb)%height_storey = building_pars(132,bt) 933 buildings(nb)%height_cei_con = building_pars(133,bt) 947 buildings(nb)%lambda_layer3 = building_pars(63,bt) 948 buildings(nb)%s_layer3 = building_pars(57,bt) 949 buildings(nb)%f_c_win = building_pars(119,bt) 950 buildings(nb)%g_value_win = building_pars(120,bt) 951 buildings(nb)%u_value_win = building_pars(121,bt) 952 buildings(nb)%air_change_low = building_pars(122,bt) 953 buildings(nb)%air_change_high = building_pars(123,bt) 954 buildings(nb)%eta_ve = building_pars(124,bt) 955 buildings(nb)%factor_a = building_pars(125,bt) 956 buildings(nb)%factor_c = building_pars(126,bt) 957 buildings(nb)%lambda_at = building_pars(127,bt) 958 buildings(nb)%theta_int_h_set = building_pars(118,bt) 959 buildings(nb)%theta_int_c_set = building_pars(117,bt) 960 buildings(nb)%q_h_max = building_pars(128,bt) 961 buildings(nb)%q_c_max = building_pars(129,bt) 962 buildings(nb)%qint_high = building_pars(130,bt) 963 buildings(nb)%qint_low = building_pars(131,bt) 964 buildings(nb)%height_storey = building_pars(132,bt) 965 buildings(nb)%height_cei_con = building_pars(133,bt) 966 buildings(nb)%params_waste_heat_h = building_pars(134,bt) 967 buildings(nb)%params_waste_heat_c = building_pars(135,bt) 934 968 ! 935 969 !-- Initialize ventilaation load. Please note, building types > 7 … … 958 992 ENDDO 959 993 ENDIF 994 995 ! 996 !-- Calculation of surface-related heat transfer coeffiecient 997 !-- out of standard u-values from building database 998 !-- only amount of extern and surface is used 999 !-- otherwise amount between air and surface taken account twice 1000 DO nb = 1, num_build 1001 IF ( buildings(nb)%on_pe ) THEN 1002 du_win_tmp = 1.0_wp / buildings(nb)%u_value_win 1003 u_tmp = buildings(nb)%u_value_win * ( du_win_tmp / ( du_win_tmp - & 1004 0.125_wp + ( 1.0_wp / h_is ) ) ) 1005 1006 du_tmp = 1.0_wp / u_tmp 1007 1008 buildings(nb)%h_es = ( du_tmp / ( du_tmp - ( 1.0_wp / h_is ) ) ) * & 1009 u_tmp 1010 ENDIF 1011 ENDDO 960 1012 ! 961 1013 !-- Initial room temperature [K] … … 968 1020 ENDDO 969 1021 970 IF ( debug_output ) CALL debug_message( 'im_init', 'end')1022 CALL location_message( 'finished', .TRUE. ) 971 1023 972 1024 END SUBROUTINE im_init … … 983 1035 USE arrays_3d, & 984 1036 ONLY: ddzw, dzw 1037 1038 ! USE basic_constants_and_equations_mod, & 1039 ! ONLY: c_p 1040 1041 ! USE control_parameters, & 1042 ! ONLY: rho_surface 985 1043 986 1044 USE date_and_time_mod, & … … 1071 1129 ! 1072 1130 !-- Building geometries --> not time-dependent 1073 facade_element_area = dx * dy !< [m2] surface area per facade element 1074 floor_area_per_facade = buildings(nb)%vpf(kk) * ddzw(kk) !< [m2] net floor area per facade element 1075 indoor_volume_per_facade = buildings(nb)%vpf(kk) !< [m3] indoor air volume per facade element 1076 window_area_per_facade = surf_usm_h%frac(ind_wat_win,m) * facade_element_area !< [m2] window area per facade element 1077 1078 ! print*, "building_height", building_height 1079 ! print*, "num_facades_v_l", buildings(nb)%num_facades_per_building_v_l 1080 ! print*, "num_facades_v", buildings(nb)%num_facades_per_building_v 1081 ! print*, "kb_min_max", buildings(nb)%kb_min, buildings(nb)%kb_max 1082 ! print*, "dzw kk", dzw(kk), kk 1083 1084 f_cei = buildings(nb)%building_height / & 1085 (buildings(nb)%height_storey-buildings(nb)%height_cei_con) !< [-] factor for ceiling redcution 1086 ngs = buildings(nb)%vpf(kk)/f_cei !< [m2] calculation of netto ground surface 1087 f_sr = ngs/floor_area_per_facade !< [-] factor for surface reduction 1088 eff_mass_area = buildings(nb)%factor_a * ngs !< [m2] standard values according to Table 12 section 12.3.1.2 (calculate over Eq. (65) according to section 12.3.1.2) 1089 c_m = buildings(nb)%factor_c * ngs !< [J/K] standard values according to table 12 section 12.3.1.2 (calculate over Eq. (66) according to section 12.3.1.2) 1090 total_area = buildings(nb)%lambda_at * floor_area_per_facade !< [m2] area of all surfaces pointing to zone Eq. (9) according to section 7.2.2.2 1091 1131 facade_element_area = dx * dy !< [m2] surface area per facade element 1132 floor_area_per_facade = buildings(nb)%vpf(kk) * ddzw(kk) !< [m2/m2] floor area per facade area 1133 indoor_volume_per_facade = buildings(nb)%vpf(kk) !< [m3/m2] indoor air volume per facade area 1134 buildings(nb)%area_facade = facade_element_area * & 1135 ( buildings(nb)%num_facades_per_building_h + & 1136 buildings(nb)%num_facades_per_building_v ) !< [m2] area of total facade 1137 window_area_per_facade = surf_usm_h%frac(ind_wat_win,m) * facade_element_area !< [m2] window area per facade element 1138 1139 buildings(nb)%net_floor_area = buildings(nb)%vol_tot / ( buildings(nb)%height_storey ) 1140 total_area = buildings(nb)%net_floor_area !< [m2] area of all surfaces pointing to zone Eq. (9) according to section 7.2.2.2 1141 a_m = buildings(nb)%factor_a * total_area * & 1142 ( facade_element_area / buildings(nb)%area_facade ) * & 1143 buildings(nb)%lambda_at !< [m2] standard values according to Table 12 section 12.3.1.2 (calculate over Eq. (65) according to section 12.3.1.2) 1144 c_m = buildings(nb)%factor_c * total_area * & 1145 ( facade_element_area / buildings(nb)%area_facade ) !< [J/K] standard values according to table 12 section 12.3.1.2 (calculate over Eq. (66) according to section 12.3.1.2) 1146 ! 1092 1147 !-- Calculation of heat transfer coefficient for transmission --> not time-dependent 1093 h_tr_w = window_area_per_facade * buildings(nb)%u_value_win !< [W/K] only for windows 1094 h_tr_is = total_area * h_is !< [W/K] with h_is = 3.45 W / (m2 K) between surface and air, Eq. (9) 1095 h_tr_ms = eff_mass_area * h_ms !< [W/K] with h_ms = 9.10 W / (m2 K) between component and surface, Eq. (64) 1096 h_tr_op = 1.0_wp / ( 1.0_wp / ( ( facade_element_area - window_area_per_facade ) & 1097 * buildings(nb)%lambda_layer3 / buildings(nb)%s_layer3 * 0.5_wp ) + 1.0_wp / h_tr_ms ) 1098 h_tr_em = 1.0_wp / ( 1.0_wp / h_tr_op - 1.0_wp / h_tr_ms ) !< [W/K] Eq. (63), Section 12.2.2 1148 h_t_es = window_area_per_facade * buildings(nb)%h_es !< [W/K] only for windows 1149 1150 h_t_is = buildings(nb)%area_facade * h_is !< [W/K] with h_is = 3.45 W / (m2 K) between surface and air, Eq. (9) 1151 h_t_ms = a_m * h_ms !< [W/K] with h_ms = 9.10 W / (m2 K) between component and surface, Eq. (64) 1152 h_t_wall = 1.0_wp / ( 1.0_wp / ( ( facade_element_area - window_area_per_facade ) & !< [W/K] 1153 * buildings(nb)%lambda_layer3 / buildings(nb)%s_layer3 * 0.5_wp & 1154 ) + 1.0_wp / h_t_ms ) !< [W/K] opaque components 1155 h_t_wm = 1.0_wp / ( 1.0_wp / h_t_wall - 1.0_wp / h_t_ms ) !< [W/K] emmision Eq. (63), Section 12.2.2 1099 1156 ! 1100 1157 !-- internal air loads dependent on the occupacy of the room 1101 1158 !-- basical internal heat gains (qint_low) with additional internal heat gains by occupancy (qint_high) (0,5*phi_int) 1102 phi_ia = 0.5_wp * ( ( buildings(nb)%qint_high * schedule_d + buildings(nb)%qint_low ) & 1103 * ngs ) !< [W] Eq. (C.1) 1159 phi_ia = 0.5_wp * ( ( buildings(nb)%qint_high * schedule_d + buildings(nb)%qint_low ) & 1160 * floor_area_per_facade ) 1161 q_int = phi_ia / total_area 1104 1162 ! 1105 1163 !-- Airflow dependent on the occupacy of the room … … 1110 1168 !-- not less than 0.01 W/K to provide division by 0 in further calculations 1111 1169 !-- with heat capacity of air 0.33 Wh/m2K 1112 h_v e= MAX( 0.01_wp , ( air_change * indoor_volume_per_facade * &1170 h_v = MAX( 0.01_wp , ( air_change * indoor_volume_per_facade * & 1113 1171 0.33_wp * (1.0_wp - buildings(nb)%eta_ve ) ) ) !< [W/K] from ISO 13789 Eq.(10) 1114 1172 1115 1173 !-- Heat transfer coefficient auxiliary variables 1116 h_t r_1 = 1.0_wp / ( ( 1.0_wp / h_ve ) + ( 1.0_wp / h_tr_is ) ) !< [W/K] Eq. (C.6)1117 h_t r_2 = h_tr_1 + h_tr_w!< [W/K] Eq. (C.7)1118 h_t r_3 = 1.0_wp / ( ( 1.0_wp / h_tr_2 ) + ( 1.0_wp / h_tr_ms ) ) !< [W/K] Eq. (C.8)1174 h_t_1 = 1.0_wp / ( ( 1.0_wp / h_v ) + ( 1.0_wp / h_t_is ) ) !< [W/K] Eq. (C.6) 1175 h_t_2 = h_t_1 + h_t_es !< [W/K] Eq. (C.7) 1176 h_t_3 = 1.0_wp / ( ( 1.0_wp / h_t_2 ) + ( 1.0_wp / h_t_ms ) ) !< [W/K] Eq. (C.8) 1119 1177 ! 1120 1178 !-- Net short-wave radiation through window area (was i_global) … … 1129 1187 surf_usm_h%frac(ind_veg_wall,m) * t_wall_h(nzt_wall,m) & 1130 1188 + surf_usm_h%frac(ind_wat_win,m) * t_window_h(nzt_wall,m) 1189 ! 1190 !-- Solar thermal gains. If net_sw_in larger than sun-protection 1191 !-- threshold parameter (params_solar_protection), sun protection will 1192 !-- be activated 1193 IF ( net_sw_in <= params_solar_protection ) THEN 1194 solar_protection_off = 1 1195 solar_protection_on = 0 1196 ELSE 1197 solar_protection_off = 0 1198 solar_protection_on = 1 1199 ENDIF 1200 ! 1201 !-- Calculation of total heat gains from net_sw_in through windows [W] in respect on automatic sun protection 1202 !-- DIN 4108 - 2 chap.8 1203 phi_sol = ( window_area_per_facade * net_sw_in * solar_protection_off & 1204 + window_area_per_facade * net_sw_in * buildings(nb)%f_c_win * solar_protection_on ) & 1205 * buildings(nb)%g_value_win * ( 1.0_wp - params_f_f ) * params_f_w 1206 q_sol = phi_sol 1207 ! 1208 !-- Calculation of the mass specific thermal load for internal and external heatsources of the inner node 1209 phi_m = (a_m / total_area) * ( phi_ia + phi_sol ) !< [W] Eq. (C.2) with phi_ia=0,5*phi_int 1210 q_c_m = phi_m 1211 ! 1212 !-- Calculation mass specific thermal load implied non thermal mass 1213 phi_st = ( 1.0_wp - ( a_m / total_area ) - ( h_t_es / ( 9.1_wp * total_area ) ) ) & 1214 * ( phi_ia + phi_sol ) !< [W] Eq. (C.3) with phi_ia=0,5*phi_int 1215 q_c_st = phi_st 1216 ! 1217 !-- Calculations for deriving indoor temperature and heat flux into the wall 1218 !-- Step 1: Indoor temperature without heating and cooling 1219 !-- section C.4.1 Picture C.2 zone 3) 1220 phi_hc_nd = 0.0_wp 1221 1222 CALL im_calc_temperatures ( i, j, k, indoor_wall_window_temperature, & 1223 near_facade_temperature, phi_hc_nd ) 1224 ! 1225 !-- If air temperature between border temperatures of heating and cooling, assign output variable, then ready 1226 IF ( buildings(nb)%theta_int_h_set <= theta_air .AND. theta_air <= buildings(nb)%theta_int_c_set ) THEN 1227 phi_hc_nd_ac = 0.0_wp 1228 phi_hc_nd = phi_hc_nd_ac 1229 theta_air_ac = theta_air 1230 ! 1231 !-- Step 2: Else, apply 10 W/m2 heating/cooling power and calculate indoor temperature 1232 !-- again. 1233 ELSE 1234 ! 1235 !-- Temperature not correct, calculation method according to section C4.2 1236 theta_air_0 = theta_air !< temperature without heating/cooling 1237 ! 1238 !-- Heating or cooling? 1239 IF ( theta_air_0 > buildings(nb)%theta_int_c_set ) THEN 1240 theta_air_set = buildings(nb)%theta_int_c_set 1241 ELSE 1242 theta_air_set = buildings(nb)%theta_int_h_set 1243 ENDIF 1244 ! 1245 !-- Calculate the temperature with phi_hc_nd_10 1246 phi_hc_nd_10 = 10.0_wp * floor_area_per_facade 1247 phi_hc_nd = phi_hc_nd_10 1248 1249 CALL im_calc_temperatures ( i, j, k, indoor_wall_window_temperature, & 1250 near_facade_temperature, phi_hc_nd ) 1251 theta_air_10 = theta_air !< temperature with 10 W/m2 of heating 1252 phi_hc_nd_un = phi_hc_nd_10 * (theta_air_set - theta_air_0) & 1253 / (theta_air_10 - theta_air_0) !< Eq. (C.13) 1254 ! 1255 !-- Step 3: With temperature ratio to determine the heating or cooling capacity 1256 !-- If necessary, limit the power to maximum power 1257 !-- section C.4.1 Picture C.2 zone 2) and 4) 1258 buildings(nb)%phi_c_max = buildings(nb)%q_c_max * floor_area_per_facade 1259 buildings(nb)%phi_h_max = buildings(nb)%q_h_max * floor_area_per_facade 1260 IF ( buildings(nb)%phi_c_max < phi_hc_nd_un .AND. phi_hc_nd_un < buildings(nb)%phi_h_max ) THEN 1261 phi_hc_nd_ac = phi_hc_nd_un 1262 phi_hc_nd = phi_hc_nd_un 1263 ELSE 1264 ! 1265 !-- Step 4: Inner temperature with maximum heating (phi_hc_nd_un positive) or cooling (phi_hc_nd_un negative) 1266 !-- section C.4.1 Picture C.2 zone 1) and 5) 1267 IF ( phi_hc_nd_un > 0.0_wp ) THEN 1268 phi_hc_nd_ac = buildings(nb)%phi_h_max !< Limit heating 1269 ELSE 1270 phi_hc_nd_ac = buildings(nb)%phi_c_max !< Limit cooling 1271 ENDIF 1272 ENDIF 1273 phi_hc_nd = phi_hc_nd_ac 1274 ! 1275 !-- Calculate the temperature with phi_hc_nd_ac (new) 1276 CALL im_calc_temperatures ( i, j, k, indoor_wall_window_temperature, & 1277 near_facade_temperature, phi_hc_nd ) 1278 theta_air_ac = theta_air 1279 ENDIF 1280 ! 1281 !-- Update theta_m_t_prev 1282 theta_m_t_prev = theta_m_t 1283 1284 q_vent = h_v * ( theta_air - near_facade_temperature ) 1285 ! 1286 !-- Calculate the operating temperature with weighted mean temperature of air and mean solar temperature 1287 !-- Will be used for thermal comfort calculations 1288 theta_op = 0.3_wp * theta_air_ac + 0.7_wp * theta_s !< [degree_C] operative Temperature Eq. (C.12) 1289 ! surf_usm_h%t_indoor(m) = theta_op !< not integrated now 1290 ! 1291 !-- Heat flux into the wall. Value needed in urban_surface_mod to 1292 !-- calculate heat transfer through wall layers towards the facade 1293 !-- (use c_p * rho_surface to convert [W/m2] into [K m/s]) 1294 q_wall_win = h_t_ms * ( theta_s - theta_m ) & 1295 / ( facade_element_area & 1296 - window_area_per_facade ) 1297 q_trans = q_wall_win * facade_element_area 1298 ! 1299 !-- Transfer q_wall_win back to USM (innermost wall/window layer) 1300 surf_usm_h%iwghf_eb(m) = q_wall_win 1301 surf_usm_h%iwghf_eb_window(m) = q_wall_win 1302 ! 1303 !-- Sum up operational indoor temperature per kk-level. Further below, 1304 !-- this temperature is reduced by MPI to one temperature per kk-level 1305 !-- and building (processor overlapping) 1306 buildings(nb)%t_in_l(kk) = buildings(nb)%t_in_l(kk) + theta_op 1307 ! 1308 !-- Calculation of waste heat 1309 !-- Anthropogenic heat output 1310 IF ( phi_hc_nd_ac > 0.0_wp ) THEN 1311 heating_on = 1 1312 cooling_on = 0 1313 ELSE 1314 heating_on = 0 1315 cooling_on = -1 1316 ENDIF 1317 1318 q_waste_heat = ( phi_hc_nd * ( & 1319 buildings(nb)%params_waste_heat_h * heating_on + & 1320 buildings(nb)%params_waste_heat_c * cooling_on ) & 1321 ) / facade_element_area !< [W/m2] , observe the directional convention in PALM! 1322 surf_usm_h%waste_heat(m) = q_waste_heat 1323 ENDDO !< Horizontal surfaces loop 1324 ! 1325 !-- Vertical surfaces 1326 DO fa = 1, buildings(nb)%num_facades_per_building_v_l 1327 ! 1328 !-- Determine indices where corresponding surface-type information 1329 !-- is stored. 1330 l = buildings(nb)%l_v(fa) 1331 m = buildings(nb)%m_v(fa) 1332 ! 1333 !-- Determine building height level index. 1334 kk = surf_usm_v(l)%k(m) + surf_usm_v(l)%koff 1335 ! 1336 !-- (SOME OF THE FOLLOWING (not time-dependent COULD PROBABLY GO INTO A FUNCTION 1337 !-- EXCEPT facade_element_area, EVERYTHING IS CALCULATED EQUALLY) 1338 !-- Building geometries --> not time-dependent 1339 IF ( l == 0 .OR. l == 1 ) facade_element_area = dx * dzw(kk) !< [m2] surface area per facade element 1340 IF ( l == 2 .OR. l == 3 ) facade_element_area = dy * dzw(kk) !< [m2] surface area per facade element 1341 floor_area_per_facade = buildings(nb)%vpf(kk) * ddzw(kk) !< [m2/m2] floor area per facade area 1342 indoor_volume_per_facade = buildings(nb)%vpf(kk) !< [m3/m2] indoor air volume per facade area 1343 buildings(nb)%area_facade = facade_element_area * & 1344 ( buildings(nb)%num_facades_per_building_h + & 1345 buildings(nb)%num_facades_per_building_v ) !< [m2] area of total facade 1346 window_area_per_facade = surf_usm_v(l)%frac(ind_wat_win,m) * facade_element_area !< [m2] window area per facade element 1347 1348 buildings(nb)%net_floor_area = buildings(nb)%vol_tot / ( buildings(nb)%height_storey ) 1349 total_area = buildings(nb)%net_floor_area !< [m2] area of all surfaces pointing to zone Eq. (9) according to section 7.2.2.2 1350 a_m = buildings(nb)%factor_a * total_area * & 1351 ( facade_element_area / buildings(nb)%area_facade ) * & 1352 buildings(nb)%lambda_at !< [m2] standard values according to Table 12 section 12.3.1.2 (calculate over Eq. (65) according to section 12.3.1.2) 1353 c_m = buildings(nb)%factor_c * total_area * & 1354 ( facade_element_area / buildings(nb)%area_facade ) !< [J/K] standard values according to table 12 section 12.3.1.2 (calculate over Eq. (66) according to section 12.3.1.2) 1355 ! 1356 !-- Calculation of heat transfer coefficient for transmission --> not time-dependent 1357 h_t_es = window_area_per_facade * buildings(nb)%h_es !< [W/K] only for windows 1358 1359 h_t_is = buildings(nb)%area_facade * h_is !< [W/K] with h_is = 3.45 W / (m2 K) between surface and air, Eq. (9) 1360 h_t_ms = a_m * h_ms !< [W/K] with h_ms = 9.10 W / (m2 K) between component and surface, Eq. (64) 1361 h_t_wall = 1.0_wp / ( 1.0_wp / ( ( facade_element_area - window_area_per_facade ) & !< [W/K] 1362 * buildings(nb)%lambda_layer3 / buildings(nb)%s_layer3 * 0.5_wp & 1363 ) + 1.0_wp / h_t_ms ) !< [W/K] opaque components 1364 h_t_wm = 1.0_wp / ( 1.0_wp / h_t_wall - 1.0_wp / h_t_ms ) !< [W/K] emmision Eq. (63), Section 12.2.2 1365 ! 1366 !-- internal air loads dependent on the occupacy of the room 1367 !-- basical internal heat gains (qint_low) with additional internal heat gains by occupancy (qint_high) (0,5*phi_int) 1368 phi_ia = 0.5_wp * ( ( buildings(nb)%qint_high * schedule_d + buildings(nb)%qint_low ) & 1369 * floor_area_per_facade ) 1370 q_int = phi_ia 1371 1372 ! 1373 !-- Airflow dependent on the occupacy of the room 1374 !-- basical airflow (air_change_low) with additional airflow gains by occupancy (air_change_high) 1375 air_change = ( buildings(nb)%air_change_high * schedule_d + buildings(nb)%air_change_low ) 1376 ! 1377 !-- Heat transfer of ventilation 1378 !-- not less than 0.01 W/K to provide division by 0 in further calculations 1379 !-- with heat capacity of air 0.33 Wh/m2K 1380 h_v = MAX( 0.01_wp , ( air_change * indoor_volume_per_facade * & 1381 0.33_wp * (1.0_wp - buildings(nb)%eta_ve ) ) ) !< [W/K] from ISO 13789 Eq.(10) 1382 1383 !-- Heat transfer coefficient auxiliary variables 1384 h_t_1 = 1.0_wp / ( ( 1.0_wp / h_v ) + ( 1.0_wp / h_t_is ) ) !< [W/K] Eq. (C.6) 1385 h_t_2 = h_t_1 + h_t_es !< [W/K] Eq. (C.7) 1386 h_t_3 = 1.0_wp / ( ( 1.0_wp / h_t_2 ) + ( 1.0_wp / h_t_ms ) ) !< [W/K] Eq. (C.8) 1387 ! 1388 !-- Net short-wave radiation through window area (was i_global) 1389 net_sw_in = surf_usm_v(l)%rad_sw_in(m) - surf_usm_v(l)%rad_sw_out(m) 1390 ! 1391 !-- Quantities needed for im_calc_temperatures 1392 i = surf_usm_v(l)%i(m) 1393 j = surf_usm_v(l)%j(m) 1394 k = surf_usm_v(l)%k(m) 1395 near_facade_temperature = surf_usm_v(l)%pt_10cm(m) 1396 indoor_wall_window_temperature = & 1397 surf_usm_v(l)%frac(ind_veg_wall,m) * t_wall_v(l)%t(nzt_wall,m) & 1398 + surf_usm_v(l)%frac(ind_wat_win,m) * t_window_v(l)%t(nzt_wall,m) 1131 1399 ! 1132 1400 !-- Solar thermal gains. If net_sw_in larger than sun-protection … … 1141 1409 ENDIF 1142 1410 ! 1143 !-- Calculation of total heat gains from net_sw_in through windows [W] in respect on automatic sun protection 1411 !-- Calculation of total heat gains from net_sw_in through windows [W] in respect on automatic sun protection 1144 1412 !-- DIN 4108 - 2 chap.8 1145 phi_sol = ( window_area_per_facade * net_sw_in * solar_protection_off &1413 phi_sol = ( window_area_per_facade * net_sw_in * solar_protection_off & 1146 1414 + window_area_per_facade * net_sw_in * buildings(nb)%f_c_win * solar_protection_on ) & 1147 * buildings(nb)%g_value_win * ( 1.0_wp - params_f_f ) * params_f_w !< [W] 1148 ! 1149 !-- Calculation of the mass specific thermal load for internal and external heatsources of the inner node 1150 phi_m = (eff_mass_area / total_area) * ( phi_ia + phi_sol ) !< [W] Eq. (C.2) with phi_ia=0,5*phi_int 1415 * buildings(nb)%g_value_win * ( 1.0_wp - params_f_f ) * params_f_w 1416 q_sol = phi_sol 1417 ! 1418 !-- Calculation of the mass specific thermal load for internal and external heatsources 1419 phi_m = (a_m / total_area) * ( phi_ia + phi_sol ) !< [W] Eq. (C.2) with phi_ia=0,5*phi_int 1420 q_c_m = phi_m 1151 1421 ! 1152 1422 !-- Calculation mass specific thermal load implied non thermal mass 1153 phi_st = ( 1.0_wp - ( eff_mass_area / total_area ) - ( h_tr_w / ( 9.1_wp * total_area ) ) ) & 1154 * ( phi_ia + phi_sol ) !< [W] Eq. (C.3) with phi_ia=0,5*phi_int 1423 phi_st = ( 1.0_wp - ( a_m / total_area ) - ( h_t_es / ( 9.1_wp * total_area ) ) ) & 1424 * ( phi_ia + phi_sol ) !< [W] Eq. (C.3) with phi_ia=0,5*phi_int 1425 q_c_st = phi_st 1155 1426 ! 1156 1427 !-- Calculations for deriving indoor temperature and heat flux into the wall … … 1158 1429 !-- section C.4.1 Picture C.2 zone 3) 1159 1430 phi_hc_nd = 0.0_wp 1160 1161 1431 CALL im_calc_temperatures ( i, j, k, indoor_wall_window_temperature, & 1162 1432 near_facade_temperature, phi_hc_nd ) 1163 1433 ! 1164 !-- If air temperature between border temperatures of heating and cooling, assign output variable, then ready 1434 !-- If air temperature between border temperatures of heating and cooling, assign output variable, then ready 1165 1435 IF ( buildings(nb)%theta_int_h_set <= theta_air .AND. theta_air <= buildings(nb)%theta_int_c_set ) THEN 1166 1436 phi_hc_nd_ac = 0.0_wp … … 1174 1444 !-- Temperature not correct, calculation method according to section C4.2 1175 1445 theta_air_0 = theta_air !< Note temperature without heating/cooling 1176 1446 ! 1177 1447 !-- Heating or cooling? 1178 IF ( theta_air > buildings(nb)%theta_int_c_set ) THEN1448 IF ( theta_air_0 > buildings(nb)%theta_int_c_set ) THEN 1179 1449 theta_air_set = buildings(nb)%theta_int_c_set 1180 1450 ELSE … … 1182 1452 ENDIF 1183 1453 1184 !-- Calculate the temperature with phi_hc_nd_10 1454 !-- Calculate the temperature with phi_hc_nd_10 1185 1455 phi_hc_nd_10 = 10.0_wp * floor_area_per_facade 1186 1456 phi_hc_nd = phi_hc_nd_10 … … 1190 1460 1191 1461 theta_air_10 = theta_air !< Note the temperature with 10 W/m2 of heating 1192 ! 1193 1194 phi_hc_nd_un = phi_hc_nd_10 * ( theta_air_set - theta_air_0)&1195 / ( theta_air_10 - theta_air_0) !< Eq. (C.13)1196 1462 1463 1464 phi_hc_nd_un = phi_hc_nd_10 * ( theta_air_set - theta_air_0 ) & 1465 / ( theta_air_10 - theta_air_0 ) !< Eq. (C.13) 1466 ! 1197 1467 !-- Step 3: With temperature ratio to determine the heating or cooling capacity 1198 1468 !-- If necessary, limit the power to maximum power 1199 1469 !-- section C.4.1 Picture C.2 zone 2) and 4) 1470 buildings(nb)%phi_c_max = buildings(nb)%q_c_max * floor_area_per_facade 1471 buildings(nb)%phi_h_max = buildings(nb)%q_h_max * floor_area_per_facade 1200 1472 IF ( buildings(nb)%phi_c_max < phi_hc_nd_un .AND. phi_hc_nd_un < buildings(nb)%phi_h_max ) THEN 1201 1473 phi_hc_nd_ac = phi_hc_nd_un 1202 phi_hc_nd = phi_hc_nd_un 1474 phi_hc_nd = phi_hc_nd_un 1203 1475 ELSE 1476 ! 1204 1477 !-- Step 4: Inner temperature with maximum heating (phi_hc_nd_un positive) or cooling (phi_hc_nd_un negative) 1205 1478 !-- section C.4.1 Picture C.2 zone 1) and 5) … … 1210 1483 ENDIF 1211 1484 ENDIF 1212 1213 phi_hc_nd = phi_hc_nd_ac 1485 phi_hc_nd = phi_hc_nd_ac 1214 1486 ! 1215 1487 !-- Calculate the temperature with phi_hc_nd_ac (new) 1216 1488 CALL im_calc_temperatures ( i, j, k, indoor_wall_window_temperature, & 1217 1489 near_facade_temperature, phi_hc_nd ) 1218 1219 1490 theta_air_ac = theta_air 1220 1221 1491 ENDIF 1222 1492 ! 1223 1493 !-- Update theta_m_t_prev 1224 1494 theta_m_t_prev = theta_m_t 1225 ! 1226 !-- Calculate the operating temperature with weighted mean temperature of air and mean solar temperature 1495 1496 q_vent = h_v * ( theta_air - near_facade_temperature ) 1497 ! 1498 !-- Calculate the operating temperature with weighted mean of temperature of air and mean 1227 1499 !-- Will be used for thermal comfort calculations 1228 theta_op = 0.3_wp * theta_air_ac + 0.7_wp * theta_s !< [degree_C] operative Temperature Eq. (C.12) 1500 theta_op = 0.3_wp * theta_air_ac + 0.7_wp * theta_s 1501 ! surf_usm_v(l)%t_indoor(m) = theta_op !< not integrated yet 1229 1502 ! 1230 1503 !-- Heat flux into the wall. Value needed in urban_surface_mod to 1231 1504 !-- calculate heat transfer through wall layers towards the facade 1232 !-- (use c_p * rho_surface to convert [W/m2] into [K m/s]) 1233 q_wall_win = h_tr_ms * ( theta_s - theta_m ) & 1505 q_wall_win = h_t_ms * ( theta_s - theta_m ) & 1234 1506 / ( facade_element_area & 1235 1507 - window_area_per_facade ) 1508 q_trans = q_wall_win * facade_element_area 1236 1509 ! 1237 1510 !-- Transfer q_wall_win back to USM (innermost wall/window layer) 1238 surf_usm_ h%iwghf_eb(m) = q_wall_win1239 surf_usm_ h%iwghf_eb_window(m) = q_wall_win1511 surf_usm_v(l)%iwghf_eb(m) = q_wall_win 1512 surf_usm_v(l)%iwghf_eb_window(m) = q_wall_win 1240 1513 ! 1241 1514 !-- Sum up operational indoor temperature per kk-level. Further below, … … 1251 1524 ELSE 1252 1525 heating_on = 0 1253 cooling_on = 11526 cooling_on = -1 1254 1527 ENDIF 1255 1528 1256 q_waste_heat = (phi_hc_nd * (params_waste_heat_h * heating_on + params_waste_heat_c * cooling_on))!< [W/GebÀudemodell] , observe the directional convention in PALM! 1257 surf_usm_h%waste_heat(m) = q_waste_heat 1529 q_waste_heat = ( phi_hc_nd * ( & 1530 buildings(nb)%params_waste_heat_h * heating_on + & 1531 buildings(nb)%params_waste_heat_c * cooling_on ) & 1532 ) / facade_element_area !< [W/m2] , observe the directional convention in PALM! 1533 surf_usm_v(l)%waste_heat(m) = q_waste_heat 1258 1534 1259 ENDDO !< Horizontal surfaces loop1260 !1261 !-- Vertical surfaces1262 DO fa = 1, buildings(nb)%num_facades_per_building_v_l1263 !1264 !-- Determine indices where corresponding surface-type information1265 !-- is stored.1266 l = buildings(nb)%l_v(fa)1267 m = buildings(nb)%m_v(fa)1268 !1269 !-- Determine building height level index.1270 kk = surf_usm_v(l)%k(m) + surf_usm_v(l)%koff1271 !1272 !-- (SOME OF THE FOLLOWING (not time-dependent COULD PROBABLY GO INTO A FUNCTION1273 !-- EXCEPT facade_element_area, EVERYTHING IS CALCULATED EQUALLY)1274 !-- Building geometries --> not time-dependent1275 IF ( l == 0 .OR. l == 1 ) facade_element_area = dx * dzw(kk) !< [m2] surface area per facade element1276 IF ( l == 2 .OR. l == 3 ) facade_element_area = dy * dzw(kk) !< [m2] surface area per facade element1277 floor_area_per_facade = buildings(nb)%vpf(kk) * ddzw(kk) !< [m2] net floor area per facade element1278 indoor_volume_per_facade = buildings(nb)%vpf(kk) !< [m3] indoor air volume per facade element1279 window_area_per_facade = surf_usm_v(l)%frac(ind_wat_win,m) * facade_element_area !< [m2] window area per facade element1280 1281 f_cei = buildings(nb)%building_height / &1282 (buildings(nb)%height_storey-buildings(nb)%height_cei_con) !< [-] factor for ceiling redcution1283 ngs = buildings(nb)%vpf(kk)/f_cei !< [m2] calculation of netto ground surface1284 f_sr = ngs/floor_area_per_facade !< [-] factor for surface reduction1285 eff_mass_area = buildings(nb)%factor_a * ngs !< [m2] standard values according to Table 12 section 12.3.1.2 (calculate over Eq. (65) according to section 12.3.1.2)1286 c_m = buildings(nb)%factor_c * ngs !< [J/K] standard values according to table 12 section 12.3.1.2 (calculate over Eq. (66) according to section 12.3.1.2)1287 total_area = buildings(nb)%lambda_at * floor_area_per_facade !< [m2] area of all surfaces pointing to zone Eq. (9) according to section 7.2.2.21288 !1289 !-- Calculation of heat transfer coefficient for transmission --> not time-dependent1290 h_tr_w = window_area_per_facade * buildings(nb)%u_value_win !< [W/K] only for windows1291 h_tr_is = total_area * h_is !< [W/K] with h_is = 3.45 W / (m2 K) between surface and air, Eq. (9)1292 h_tr_ms = eff_mass_area * h_ms !< [W/K] with h_ms = 9.10 W / (m2 K) between component and surface, Eq. (64)1293 h_tr_op = 1.0_wp / ( 1.0_wp / ( ( facade_element_area - window_area_per_facade ) &1294 * buildings(nb)%lambda_layer3 / buildings(nb)%s_layer3 * 0.5_wp ) + 1.0_wp / h_tr_ms )1295 h_tr_em = 1.0_wp / ( 1.0_wp / h_tr_op - 1.0_wp / h_tr_ms ) !< [W/K] Eq. (63), Section 12.2.21296 !1297 !-- internal air loads dependent on the occupacy of the room1298 !-- basical internal heat gains (qint_low) with additional internal heat gains by occupancy (qint_high) (0,5*phi_int)1299 phi_ia = 0.5_wp * ( ( buildings(nb)%qint_high * schedule_d + buildings(nb)%qint_low ) &1300 * ngs ) !< [W] Eq. (C.1)1301 !1302 !-- Airflow dependent on the occupacy of the room1303 !-- basical airflow (air_change_low) with additional airflow gains by occupancy (air_change_high)1304 air_change = ( buildings(nb)%air_change_high * schedule_d + buildings(nb)%air_change_low )1305 !1306 !-- Heat transfer of ventilation1307 !-- not less than 0.01 W/K to provide division by 0 in further calculations1308 !-- with heat capacity of air 0.33 Wh/m2K1309 h_ve = MAX( 0.01_wp , ( air_change * indoor_volume_per_facade * &1310 0.33_wp * (1 - buildings(nb)%eta_ve ) ) ) !< [W/K] from ISO 13789 Eq.(10)1311 1312 !-- Heat transfer coefficient auxiliary variables1313 h_tr_1 = 1.0_wp / ( ( 1.0_wp / h_ve ) + ( 1.0_wp / h_tr_is ) ) !< [W/K] Eq. (C.6)1314 h_tr_2 = h_tr_1 + h_tr_w !< [W/K] Eq. (C.7)1315 h_tr_3 = 1.0_wp / ( ( 1.0_wp / h_tr_2 ) + ( 1.0_wp / h_tr_ms ) ) !< [W/K] Eq. (C.8)1316 !1317 !-- Net short-wave radiation through window area (was i_global)1318 net_sw_in = surf_usm_v(l)%rad_sw_in(m) - surf_usm_v(l)%rad_sw_out(m)1319 !1320 !-- Quantities needed for im_calc_temperatures1321 i = surf_usm_v(l)%i(m)1322 j = surf_usm_v(l)%j(m)1323 k = surf_usm_v(l)%k(m)1324 near_facade_temperature = surf_usm_v(l)%pt_10cm(m)1325 indoor_wall_window_temperature = &1326 surf_usm_v(l)%frac(ind_veg_wall,m) * t_wall_v(l)%t(nzt_wall,m) &1327 + surf_usm_v(l)%frac(ind_wat_win,m) * t_window_v(l)%t(nzt_wall,m)1328 !1329 !-- Solar thermal gains. If net_sw_in larger than sun-protection1330 !-- threshold parameter (params_solar_protection), sun protection will1331 !-- be activated1332 IF ( net_sw_in <= params_solar_protection ) THEN1333 solar_protection_off = 11334 solar_protection_on = 01335 ELSE1336 solar_protection_off = 01337 solar_protection_on = 11338 ENDIF1339 !1340 !-- Calculation of total heat gains from net_sw_in through windows [W] in respect on automatic sun protection1341 !-- DIN 4108 - 2 chap.81342 phi_sol = ( window_area_per_facade * net_sw_in * solar_protection_off &1343 + window_area_per_facade * net_sw_in * buildings(nb)%f_c_win * solar_protection_on ) &1344 * buildings(nb)%g_value_win * ( 1.0_wp - params_f_f ) * params_f_w1345 !1346 !-- Calculation of the mass specific thermal load for internal and external heatsources1347 phi_m = (eff_mass_area / total_area) * ( phi_ia + phi_sol ) !< [W] Eq. (C.2) with phi_ia=0,5*phi_int1348 !1349 !-- Calculation mass specific thermal load implied non thermal mass1350 phi_st = ( 1.0_wp - ( eff_mass_area / total_area ) - ( h_tr_w / ( 9.1_wp * total_area ) ) ) &1351 * ( phi_ia + phi_sol ) !< [W] Eq. (C.3) with phi_ia=0,5*phi_int1352 !1353 !-- Calculations for deriving indoor temperature and heat flux into the wall1354 !-- Step 1: Indoor temperature without heating and cooling1355 !-- section C.4.1 Picture C.2 zone 3)1356 phi_hc_nd = 0.0_wp1357 CALL im_calc_temperatures ( i, j, k, indoor_wall_window_temperature, &1358 near_facade_temperature, phi_hc_nd )1359 !1360 !-- If air temperature between border temperatures of heating and cooling, assign output variable, then ready1361 IF ( buildings(nb)%theta_int_h_set <= theta_air .AND. theta_air <= buildings(nb)%theta_int_c_set ) THEN1362 phi_hc_nd_ac = 0.0_wp1363 phi_hc_nd = phi_hc_nd_ac1364 theta_air_ac = theta_air1365 !1366 !-- Step 2: Else, apply 10 W/m2 heating/cooling power and calculate indoor temperature1367 !-- again.1368 ELSE1369 !1370 !-- Temperature not correct, calculation method according to section C4.21371 theta_air_0 = theta_air !< Note temperature without heating/cooling1372 1373 !-- Heating or cooling?1374 IF ( theta_air > buildings(nb)%theta_int_c_set ) THEN1375 theta_air_set = buildings(nb)%theta_int_c_set1376 ELSE1377 theta_air_set = buildings(nb)%theta_int_h_set1378 ENDIF1379 1380 !-- Calculate the temperature with phi_hc_nd_101381 phi_hc_nd_10 = 10.0_wp * floor_area_per_facade1382 phi_hc_nd = phi_hc_nd_101383 1384 CALL im_calc_temperatures ( i, j, k, indoor_wall_window_temperature, &1385 near_facade_temperature, phi_hc_nd )1386 1387 theta_air_10 = theta_air !< Note the temperature with 10 W/m2 of heating1388 1389 1390 phi_hc_nd_un = phi_hc_nd_10 * (theta_air_set - theta_air_0) &1391 / (theta_air_10 - theta_air_0) !< Eq. (C.13)1392 !1393 !-- Step 3: With temperature ratio to determine the heating or cooling capacity1394 !-- If necessary, limit the power to maximum power1395 !-- section C.4.1 Picture C.2 zone 2) and 4)1396 IF ( buildings(nb)%phi_c_max < phi_hc_nd_un .AND. phi_hc_nd_un < buildings(nb)%phi_h_max ) THEN1397 phi_hc_nd_ac = phi_hc_nd_un1398 phi_hc_nd = phi_hc_nd_un1399 ELSE1400 !-- Step 4: Inner temperature with maximum heating (phi_hc_nd_un positive) or cooling (phi_hc_nd_un negative)1401 !-- section C.4.1 Picture C.2 zone 1) and 5)1402 IF ( phi_hc_nd_un > 0.0_wp ) THEN1403 phi_hc_nd_ac = buildings(nb)%phi_h_max !< Limit heating1404 ELSE1405 phi_hc_nd_ac = buildings(nb)%phi_c_max !< Limit cooling1406 ENDIF1407 ENDIF1408 1409 phi_hc_nd = phi_hc_nd_ac1410 !1411 !-- Calculate the temperature with phi_hc_nd_ac (new)1412 CALL im_calc_temperatures ( i, j, k, indoor_wall_window_temperature, &1413 near_facade_temperature, phi_hc_nd )1414 1415 theta_air_ac = theta_air1416 1417 ENDIF1418 !1419 !-- Update theta_m_t_prev1420 theta_m_t_prev = theta_m_t1421 !1422 !-- Calculate the operating temperature with weighted mean of temperature of air and mean1423 !-- Will be used for thermal comfort calculations1424 theta_op = 0.3_wp * theta_air_ac + 0.7_wp * theta_s1425 !1426 !-- Heat flux into the wall. Value needed in urban_surface_mod to1427 !-- calculate heat transfer through wall layers towards the facade1428 q_wall_win = h_tr_ms * ( theta_s - theta_m ) &1429 / ( facade_element_area &1430 - window_area_per_facade )1431 !1432 !-- Transfer q_wall_win back to USM (innermost wall/window layer)1433 surf_usm_v(l)%iwghf_eb(m) = q_wall_win1434 surf_usm_v(l)%iwghf_eb_window(m) = q_wall_win1435 !1436 !-- Sum up operational indoor temperature per kk-level. Further below,1437 !-- this temperature is reduced by MPI to one temperature per kk-level1438 !-- and building (processor overlapping)1439 buildings(nb)%t_in_l(kk) = buildings(nb)%t_in_l(kk) + theta_op1440 1441 !1442 !-- Calculation of waste heat1443 !-- Anthropogenic heat output1444 IF ( phi_hc_nd_ac > 0.0_wp ) THEN1445 heating_on = 11446 cooling_on = 01447 ELSE1448 heating_on = 01449 cooling_on = 11450 ENDIF1451 1452 q_waste_heat = (phi_hc_nd * (params_waste_heat_h * heating_on + params_waste_heat_c * cooling_on))!< [W/GebÀudemodell] , observe the directional convention in PALM!1453 surf_usm_v(l)%waste_heat(m) = q_waste_heat1454 1455 1535 ENDDO !< Vertical surfaces loop 1456 1536 … … 1473 1553 t_in_l_send = buildings(nb)%t_in_l 1474 1554 ENDIF 1555 1475 1556 1476 1557 #if defined( __parallel ) … … 1489 1570 buildings(nb)%t_in = buildings(nb)%t_in_l 1490 1571 #endif 1491 IF ( ALLOCATED( buildings(nb)%t_in ) ) & 1492 buildings(nb)%t_in = buildings(nb)%t_in / & 1493 ( buildings(nb)%num_facade_h + & 1494 buildings(nb)%num_facade_v ) 1572 1573 IF ( ALLOCATED( buildings(nb)%t_in ) ) THEN 1574 ! 1575 !-- Average indoor temperature. Note, in case a building is completely 1576 !-- surrounded by higher buildings, it may have no facade elements 1577 !-- at some height levels, will will lead to a divide by zero. If this 1578 !-- is the case, indoor temperature will be set to -1.0. 1579 DO k = buildings(nb)%kb_min, buildings(nb)%kb_max 1580 IF ( buildings(nb)%num_facade_h(k) + & 1581 buildings(nb)%num_facade_v(k) > 0 ) THEN 1582 buildings(nb)%t_in(k) = buildings(nb)%t_in(k) / & 1583 REAL( buildings(nb)%num_facade_h(k) + & 1584 buildings(nb)%num_facade_v(k), KIND = wp ) 1585 ELSE 1586 buildings(nb)%t_in(k) = -1.0_wp 1587 ENDIF 1588 ENDDO 1589 ENDIF 1590 1591 1495 1592 ! 1496 1593 !-- Deallocate dummy arrays … … 1499 1596 1500 1597 ENDDO 1501 1502 1598 1503 1599 END SUBROUTINE im_main_heatcool 1504 1600 … … 1530 1626 unit = 'W m-2' 1531 1627 1532 CASE ( 'im_t_indoor' ) 1628 CASE ( 'im_t_indoor_mean' ) 1629 unit = 'K' 1630 1631 CASE ( 'im_t_indoor_roof' ) 1632 unit = 'K' 1633 1634 CASE ( 'im_t_indoor_wall_win' ) 1533 1635 unit = 'K' 1534 1636 … … 1548 1650 SUBROUTINE im_check_parameters 1549 1651 1550 ! !!!USE control_parameters,1551 ! !!!ONLY: message_string1652 ! USE control_parameters, 1653 ! ONLY: message_string 1552 1654 1553 1655 IMPLICIT NONE … … 1587 1689 grid_y = 'y' 1588 1690 grid_z = 'zu' 1589 1590 CASE ( 'im_t_indoor ')1691 1692 CASE ( 'im_t_indoor_mean', 'im_t_indoor_roof', 'im_t_indoor_wall_win') 1591 1693 grid_x = 'x' 1592 1694 grid_y = 'y' … … 1627 1729 INTEGER(iwp) :: nzb_do !< lower limit of the data output (usually 0) 1628 1730 INTEGER(iwp) :: nzt_do !< vertical upper limit of the data output (usually nz_do3d) 1629 1630 1731 1631 1732 LOGICAL :: found !< … … 1643 1744 !-- Output of indoor temperature. All grid points within the building are 1644 1745 !-- filled with values, while atmospheric grid points are set to _FillValues. 1645 CASE ( 'im_t_indoor ' )1746 CASE ( 'im_t_indoor_mean' ) 1646 1747 IF ( av == 0 ) THEN 1647 1748 DO i = nxl, nxr … … 1676 1777 ENDDO 1677 1778 ENDIF 1678 1779 1679 1780 CASE ( 'im_hf_roof_waste' ) 1680 1781 IF ( av == 0 ) THEN … … 1685 1786 local_pf(i,j,k) = surf_usm_h%waste_heat(m) 1686 1787 ENDDO 1687 ENDIF 1688 1788 ENDIF 1789 1689 1790 CASE ( 'im_hf_wall_win' ) 1690 1791 IF ( av == 0 ) THEN … … 1698 1799 ENDDO 1699 1800 ENDIF 1700 1801 1701 1802 CASE ( 'im_hf_wall_win_waste' ) 1702 1803 IF ( av == 0 ) THEN … … 1709 1810 ENDDO 1710 1811 ENDDO 1711 ENDIF 1712 1812 ENDIF 1813 1814 ! 1815 !< NOTE im_t_indoor_roof and im_t_indoor_wall_win not work yet 1816 1817 ! CASE ( 'im_t_indoor_roof' ) 1818 ! IF ( av == 0 ) THEN 1819 ! DO m = 1, surf_usm_h%ns 1820 ! i = surf_usm_h%i(m) !+ surf_usm_h%ioff 1821 ! j = surf_usm_h%j(m) !+ surf_usm_h%joff 1822 ! k = surf_usm_h%k(m) !+ surf_usm_h%koff 1823 ! local_pf(i,j,k) = surf_usm_h%t_indoor(m) 1824 ! ENDDO 1825 ! ENDIF 1826 ! 1827 ! CASE ( 'im_t_indoor_wall_win' ) 1828 ! IF ( av == 0 ) THEN 1829 ! DO l = 0, 3 1830 ! DO m = 1, surf_usm_v(l)%ns 1831 ! i = surf_usm_v(l)%i(m) !+ surf_usm_v(l)%ioff 1832 ! j = surf_usm_v(l)%j(m) !+ surf_usm_v(l)%joff 1833 ! k = surf_usm_v(l)%k(m) !+ surf_usm_v(l)%koff 1834 ! local_pf(i,j,k) = surf_usm_v(l)%t_indoor(m) 1835 ! ENDDO 1836 ! ENDDO 1837 ! ENDIF 1838 1713 1839 CASE DEFAULT 1714 1840 found = .FALSE. -
palm/trunk/SOURCE/radiation_model_mod.f90
r4134 r4148 28 28 ! ----------------- 29 29 ! $Id$ 30 ! Comments added 31 ! 32 ! 4134 2019-08-02 18:39:57Z suehring 30 33 ! Bugfix in formatted write statement 31 34 ! … … 3569 3572 3570 3573 IF ( average_radiation ) THEN 3571 3574 ! 3575 !-- Determine minimum topography top index. 3572 3576 k_topo_l = MINVAL( get_topography_top_index( 's' ) ) 3573 3577 #if defined( __parallel ) … … 3705 3709 rrtm_lw_tauaer(0:0,k_topo+1:nzt_rad+1,1:nbndlw+1) 3706 3710 3707 ! CALL rrtmg_lw( 1, nzt_rad , rrtm_icld , rrtm_idrv ,&3708 ! rrtm_play , rrtm_plev , rrtm_tlay , rrtm_tlev ,&3709 ! rrtm_tsfc , rrtm_h2ovmr , rrtm_o3vmr , rrtm_co2vmr ,&3710 ! rrtm_ch4vmr , rrtm_n2ovmr , rrtm_o2vmr , rrtm_cfc11vmr ,&3711 ! rrtm_cfc12vmr , rrtm_cfc22vmr, rrtm_ccl4vmr , rrtm_emis ,&3712 ! rrtm_inflglw , rrtm_iceflglw, rrtm_liqflglw, rrtm_cldfr ,&3713 ! rrtm_lw_taucld , rrtm_cicewp , rrtm_cliqwp , rrtm_reice ,&3714 ! rrtm_reliq , rrtm_lw_tauaer, &3715 ! rrtm_lwuflx , rrtm_lwdflx , rrtm_lwhr , &3716 ! rrtm_lwuflxc , rrtm_lwdflxc , rrtm_lwhrc , &3717 ! rrtm_lwuflx_dt , rrtm_lwuflxc_dt )3718 3719 3711 CALL rrtmg_lw( 1, & 3720 3712 nzt_rad-k_topo, & … … 3809 3801 rrtm_sw_asmaer_dum = rrtm_sw_asmaer(0:0,k_topo+1:nzt_rad+1,1:nbndsw+1) 3810 3802 rrtm_sw_ecaer_dum = rrtm_sw_ecaer(0:0,k_topo+1:nzt_rad+1,1:naerec+1) 3811 ! CALL rrtmg_sw( 1, nzt_rad , rrtm_icld , rrtm_iaer ,& 3812 ! rrtm_play , rrtm_plev , rrtm_tlay , rrtm_tlev ,& 3813 ! rrtm_tsfc , rrtm_h2ovmr , rrtm_o3vmr , rrtm_co2vmr ,& 3814 ! rrtm_ch4vmr , rrtm_n2ovmr , rrtm_o2vmr , rrtm_asdir ,& 3815 ! rrtm_asdif , rrtm_aldir , rrtm_aldif , zenith ,& 3816 ! 0.0_wp , day_of_year , solar_constant, rrtm_inflgsw ,& 3817 ! rrtm_iceflgsw , rrtm_liqflgsw , rrtm_cldfr , rrtm_sw_taucld ,& 3818 ! rrtm_sw_ssacld , rrtm_sw_asmcld, rrtm_sw_fsfcld, rrtm_cicewp ,& 3819 ! rrtm_cliqwp , rrtm_reice , rrtm_reliq , rrtm_sw_tauaer ,& 3820 ! rrtm_sw_ssaaer , rrtm_sw_asmaer, rrtm_sw_ecaer , rrtm_swuflx ,& 3821 ! rrtm_swdflx , rrtm_swhr , rrtm_swuflxc , rrtm_swdflxc ,& 3822 ! rrtm_swhrc , rrtm_dirdflux , rrtm_difdflux ) 3803 3823 3804 CALL rrtmg_sw( 1, & 3824 3805 nzt_rad-k_topo, & … … 3879 3860 3880 3861 ! 3881 !-- Save fluxes: 3882 !-- - whole domain 3862 !-- Save radiation fluxes for the entire depth of the model domain 3883 3863 DO k = nzb, nzt+1 3884 3864 rad_sw_in(k,:,:) = rrtm_swdflx(0,k) 3885 3865 rad_sw_out(k,:,:) = rrtm_swuflx(0,k) 3886 3866 ENDDO 3887 !-- - direct and diffuse SW at urban-surface-layer(required by RTM)3867 !-- Save direct and diffuse SW radiation at the surface (required by RTM) 3888 3868 rad_sw_in_dir(:,:) = rrtm_dirdflux(0,k_topo) 3889 3869 rad_sw_in_diff(:,:) = rrtm_difdflux(0,k_topo) -
palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90
r4144 r4148 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Remove unused variable 28 ! 29 ! 4144 2019-08-06 09:11:47Z raasch 27 30 ! relational operators .EQ., .NE., etc. replaced by ==, /=, etc. 28 31 ! … … 2269 2272 2270 2273 USE surface_mod, & 2271 ONLY: get_topography_top_index_ji,surf_def_h, surf_lsm_h, surf_usm_h2274 ONLY: surf_def_h, surf_lsm_h, surf_usm_h 2272 2275 2273 2276 IMPLICIT NONE -
palm/trunk/SOURCE/urban_surface_mod.f90
r4127 r4148 28 28 ! ----------------- 29 29 ! $Id$ 30 ! - Add anthropogenic heat output factors for heating and cooling to building 31 ! data base 32 ! - Move definition of building_pars to usm_init_arrays since it is already 33 ! required in the indoor model 34 ! 35 ! 4127 2019-07-30 14:47:10Z suehring 30 36 ! Do not add anthopogenic energy during wall/soil spin-up 31 37 ! (merge from branch resler) … … 781 787 !-- (>700), while intel and gfortran compiler have hard limit of continuation 782 788 !-- lines of 511. 783 REAL(wp), DIMENSION(0:13 3,1:7) :: building_pars789 REAL(wp), DIMENSION(0:135,1:7) :: building_pars 784 790 ! 785 791 !-- Type for surface temperatures at vertical walls. Is not necessary for horizontal walls. … … 1430 1436 IF ( ALLOCATED( surf_usm_v(l)%iwghf_eb_window ) ) surf_usm_v(l)%iwghf_eb_window = 0.0_wp 1431 1437 ENDDO 1432 1438 ! 1439 !-- Initialize building-surface properties, which are also required by other modules, 1440 !-- e.g. the indoor model. 1441 CALL usm_define_pars 1442 1433 1443 IF ( debug_output ) CALL debug_message( 'usm_init_arrays', 'end' ) 1434 1444 … … 3778 3788 3779 3789 CALL cpu_log( log_point_s(78), 'usm_init', 'start' ) 3780 !3781 !-- Initialize building-surface properties3782 CALL usm_define_pars3783 3790 ! 3784 3791 !-- surface forcing have to be disabled for LSF … … 9068 9075 10.0_wp, & !< parameter 131 - basic internal heat gains without occupancy of the room 9069 9076 3.0_wp, & !< parameter 132 - storey height 9070 0.2_wp & !< parameter 133 - ceiling construction height 9077 0.2_wp, & !< parameter 133 - ceiling construction height 9078 0.1_wp, & !< parameter 134 - anthropogenic heat output for heating 9079 1.333_wp & !< parameter 135 - anthropogenic heat output for cooling 9071 9080 /) 9072 9081 … … 9205 9214 8.0_wp, & !< parameter 131 - basic internal heat gains without occupancy of the room 9206 9215 3.0_wp, & !< parameter 132 - storey height 9207 0.2_wp & !< parameter 133 - ceiling construction height 9216 0.2_wp, & !< parameter 133 - ceiling construction height 9217 0.1_wp, & !< parameter 134 - anthropogenic heat output for heating 9218 1.333_wp & !< parameter 135 - anthropogenic heat output for cooling 9208 9219 /) 9209 9220 … … 9342 9353 8.0_wp, & !< parameter 131 - basic internal heat gains without occupancy of the room 9343 9354 3.0_wp, & !< parameter 132 - storey height 9344 0.2_wp & !< parameter 133 - ceiling construction height 9355 0.2_wp, & !< parameter 133 - ceiling construction height 9356 0.1_wp, & !< parameter 134 - anthropogenic heat output for heating 9357 1.333_wp & !< parameter 135 - anthropogenic heat output for cooling 9345 9358 /) 9346 9359 … … 9479 9492 10.0_wp, & !< parameter 131 - basic internal heat gains without occupancy of the room 9480 9493 3.0_wp, & !< parameter 132 - storey height 9481 0.2_wp & !< parameter 133 - ceiling construction height 9494 0.2_wp, & !< parameter 133 - ceiling construction height 9495 0.1_wp, & !< parameter 134 - anthropogenic heat output for heating 9496 1.333_wp & !< parameter 135 - anthropogenic heat output for cooling 9482 9497 /) 9483 9498 … … 9616 9631 20.0_wp, & !< parameter 131 - basic internal heat gains without occupancy of the room 9617 9632 3.0_wp, & !< parameter 132 - storey height 9618 0.2_wp & !< parameter 133 - ceiling construction height 9633 0.2_wp, & !< parameter 133 - ceiling construction height 9634 0.0_wp, & !< parameter 134 - anthropogenic heat output for heating 9635 2.54_wp & !< parameter 135 - anthropogenic heat output for cooling 9619 9636 /) 9620 9637 … … 9753 9770 15.0_wp, & !< parameter 131 - basic internal heat gains without occupancy of the room 9754 9771 3.0_wp, & !< parameter 132 - storey height 9755 0.2_wp & !< parameter 133 - ceiling construction height 9772 0.2_wp, & !< parameter 133 - ceiling construction height 9773 -2.0_wp, & !< parameter 134 - anthropogenic heat output for heating 9774 1.25_wp & !< parameter 135 - anthropogenic heat output for cooling 9756 9775 /) 9757 9776 … … 9890 9909 0.0_wp, & !< parameter 131 - basic internal heat gains without occupancy of the room 9891 9910 3.0_wp, & !< parameter 132 - storey height 9892 0.2_wp & !< parameter 133 - ceiling construction height 9911 0.2_wp, & !< parameter 133 - ceiling construction height 9912 0.0_wp, & !< parameter 134 - anthropogenic heat output for heating 9913 0.0_wp & !< parameter 135 - anthropogenic heat output for cooling 9893 9914 /) 9894 9915
Note: See TracChangeset
for help on using the changeset viewer.