Changeset 4750 for palm/trunk/SOURCE/indoor_model_mod.f90
- Timestamp:
- Oct 16, 2020 2:27:48 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/indoor_model_mod.f90
r4730 r4750 25 25 ! ----------------- 26 26 ! $Id$ 27 ! - Namelist parameter added to switch-off/on the indoor model during wall/soil spinup 28 ! - Bugfix in window-wall treatment during spinup - in the urban-surface model the window fraction 29 ! is set to zero during spinup, so it is done here also 30 ! - Bugfix in wall treatment - inner wall temperature was too low due to wrong weighting of 31 ! wall/green/window fractions 32 ! 33 ! 4730 2020-10-07 10:48:51Z suehring 27 34 ! Bugfix - avoid divisions by zero 28 35 ! … … 271 278 TYPE(build), DIMENSION(:), ALLOCATABLE :: buildings !< building array 272 279 273 INTEGER(iwp) :: num_build !< total number of buildings in domain 280 INTEGER(iwp) :: cooling_on !< Indoor cooling flag (0=off, 1=on) 281 INTEGER(iwp) :: heating_on !< Indoor heating flag (0=off, 1=on) 282 INTEGER(iwp) :: num_build !< total number of buildings in domain 283 INTEGER(iwp) :: solar_protection_off !< Solar protection off 284 INTEGER(iwp) :: solar_protection_on !< Solar protection on 285 286 LOGICAL :: indoor_during_spinup = .FALSE. !< namelist parameter used to switch-off/on the indoor model during spinup 274 287 ! 275 288 !-- Declare all global variables within the module … … 289 302 REAL(wp), PARAMETER :: params_solar_protection = 300.0_wp !< [W/m2] chap. G.5.3.1 sun protection closed, if the radiation 290 303 !< on facade exceeds this value 291 292 INTEGER(iwp) :: cooling_on !< Indoor cooling flag (0=off, 1=on)293 INTEGER(iwp) :: heating_on !< Indoor heating flag (0=off, 1=on)294 INTEGER(iwp) :: solar_protection_off !< Solar protection off295 INTEGER(iwp) :: solar_protection_on !< Solar protection on296 297 304 298 305 REAL(wp) :: a_m !< [m2] the effective mass-related area … … 416 423 ! 417 424 !-- Add VARIABLES that must be available to other modules 418 PUBLIC dt_indoor, skip_time_do_indoor, time_indoor 425 PUBLIC dt_indoor, & 426 indoor_during_spinup, & 427 skip_time_do_indoor, & 428 time_indoor 419 429 420 430 ! … … 1198 1208 1199 1209 USE surface_mod, & 1200 ONLY: ind_veg_wall, ind_wat_win, surf_usm_h, surf_usm_v 1210 ONLY: ind_pav_green, & 1211 ind_veg_wall, & 1212 ind_wat_win, & 1213 surf_usm_h, & 1214 surf_usm_v 1201 1215 1202 1216 USE urban_surface_mod, & 1203 ONLY: building_type, nzt_wall, t_wall_h, t_wall_v, t_window_h, t_window_v 1217 ONLY: building_type, & 1218 nzt_wall, & 1219 t_green_h, & 1220 t_green_v, & 1221 t_wall_h, & 1222 t_wall_v, & 1223 t_window_h, & 1224 t_window_v 1204 1225 1205 1226 … … 1213 1234 INTEGER(iwp) :: nb !< running index for buildings 1214 1235 1215 REAL(wp) :: indoor_wall_window_temperature !< weighted temperature of innermost wall/window layer 1216 1217 REAL(wp) :: indoor_wall_temperature !< temperature of innermost wall layer evtl in im_calc_temperatures einfÃŒgen 1218 1236 LOGICAL :: during_spinup !< flag indicating that the simulation is still in wall/soil spinup 1237 1238 REAL(wp) :: frac_green !< dummy for green fraction 1239 REAL(wp) :: frac_wall !< dummy for wall fraction 1240 REAL(wp) :: frac_win !< dummy for window fraction 1241 ! REAL(wp) :: indoor_wall_window_temperature !< weighted temperature of innermost wall/window layer 1242 REAL(wp) :: indoor_wall_temperature !< temperature of innermost wall layer evtl in im_calc_temperatures einfÃŒgen 1219 1243 REAL(wp) :: near_facade_temperature !< outside air temperature 10cm away from facade 1220 1244 REAL(wp) :: second_of_day !< second of the current day … … 1227 1251 CALL get_date_time( time_since_reference_point, second_of_day=second_of_day ) 1228 1252 time_utc_hour = second_of_day / seconds_per_hour 1253 ! 1254 !-- Check if the simulation is still in wall/soil spinup mode 1255 during_spinup = MERGE( .TRUE., .FALSE., time_since_reference_point < 0.0_wp ) 1229 1256 ! 1230 1257 !-- Following calculations must be done for each facade element. … … 1272 1299 m = buildings(nb)%m_h(fa) 1273 1300 ! 1301 !-- During spinup set window fraction to zero and add these to wall fraction. 1302 frac_win = MERGE( surf_usm_h(l)%frac(m,ind_wat_win), 0.0_wp, .NOT. during_spinup ) 1303 frac_wall = MERGE( surf_usm_h(l)%frac(m,ind_veg_wall), & 1304 surf_usm_h(l)%frac(m,ind_veg_wall) + & 1305 surf_usm_h(l)%frac(m,ind_wat_win), & 1306 .NOT. during_spinup ) 1307 frac_green = surf_usm_h(l)%frac(m,ind_pav_green) 1308 ! 1274 1309 !-- Determine building height level index. 1275 1310 kk = surf_usm_h(l)%k(m) + surf_usm_h(l)%koff … … 1281 1316 buildings(nb)%area_facade = facade_element_area * & 1282 1317 ( buildings(nb)%num_facades_per_building_h + & 1283 buildings(nb)%num_facades_per_building_v ) !< [m2] area of total facade 1284 window_area_per_facade = surf_usm_h(l)%frac(m,ind_wat_win) * facade_element_area !< [m2] window area per facade 1285 !< element 1318 buildings(nb)%num_facades_per_building_v ) !< [m2] area of total facade 1319 window_area_per_facade = frac_win * facade_element_area !< [m2] window area per facade element 1286 1320 1287 1321 buildings(nb)%net_floor_area = buildings(nb)%vol_tot / ( buildings(nb)%height_storey ) … … 1338 1372 k = surf_usm_h(l)%k(m) 1339 1373 near_facade_temperature = surf_usm_h(l)%pt_10cm(m) 1340 indoor_wall_window_temperature = & 1341 surf_usm_h(l)%frac(m,ind_veg_wall) * t_wall_h(l)%val(nzt_wall,m) & 1342 + surf_usm_h(l)%frac(m,ind_wat_win) * t_window_h(l)%val(nzt_wall,m) 1343 indoor_wall_temperature = surf_usm_h(l)%frac(m,ind_veg_wall) * t_wall_h(l)%val(nzt_wall,m) 1374 ! indoor_wall_window_temperature = frac_wall * t_wall_h(l)%val(nzt_wall,m) & 1375 ! + frac_win * t_window_h(l)%val(nzt_wall,m) & 1376 ! + frac_green * t_green_h(l)%val(nzt_wall,m) 1377 indoor_wall_temperature = frac_wall * t_wall_h(l)%val(nzt_wall,m) & 1378 + frac_win * t_window_h(l)%val(nzt_wall,m) & 1379 + frac_green * t_green_h(l)%val(nzt_wall,m) 1344 1380 ! 1345 1381 !-- Solar thermal gains. If net_sw_in larger than sun-protection threshold parameter … … 1510 1546 m = buildings(nb)%m_v(fa) 1511 1547 ! 1548 !-- During spinup set window fraction to zero and add these to wall fraction. 1549 frac_win = MERGE( surf_usm_v(l)%frac(m,ind_wat_win), 0.0_wp, .NOT. during_spinup ) 1550 frac_wall = MERGE( surf_usm_v(l)%frac(m,ind_veg_wall), & 1551 surf_usm_v(l)%frac(m,ind_veg_wall) + & 1552 surf_usm_v(l)%frac(m,ind_wat_win), & 1553 .NOT. during_spinup ) 1554 frac_green = surf_usm_v(l)%frac(m,ind_pav_green) 1555 ! 1512 1556 !-- Determine building height level index. 1513 1557 kk = surf_usm_v(l)%k(m) + surf_usm_v(l)%koff … … 1523 1567 buildings(nb)%area_facade = facade_element_area * & 1524 1568 ( buildings(nb)%num_facades_per_building_h + & 1525 buildings(nb)%num_facades_per_building_v ) !< [m2] area of total facade 1526 window_area_per_facade = surf_usm_v(l)%frac(m,ind_wat_win) * facade_element_area !< [m2] window area per 1527 !< facade element 1569 buildings(nb)%num_facades_per_building_v ) !< [m2] area of total facade 1570 window_area_per_facade = frac_win * facade_element_area !< [m2] window area per facade element 1528 1571 1529 1572 buildings(nb)%net_floor_area = buildings(nb)%vol_tot / ( buildings(nb)%height_storey ) … … 1562 1605 !-- (air_change_high) 1563 1606 air_change = ( buildings(nb)%air_change_high * schedule_d + & 1564 buildings(nb)%air_change_low )1607 buildings(nb)%air_change_low ) 1565 1608 ! 1566 1609 !-- Heat transfer of ventilation. … … 1584 1627 k = surf_usm_v(l)%k(m) 1585 1628 near_facade_temperature = surf_usm_v(l)%pt_10cm(m) 1586 indoor_wall_window_temperature = & 1587 surf_usm_v(l)%frac(m,ind_veg_wall) * t_wall_v(l)%val(nzt_wall,m) & 1588 + surf_usm_v(l)%frac(m,ind_wat_win) * t_window_v(l)%val(nzt_wall,m) 1589 indoor_wall_temperature = surf_usm_v(l)%frac(m,ind_veg_wall) * t_wall_v(l)%val(nzt_wall,m) 1629 1630 ! indoor_wall_window_temperature = frac_wall * t_wall_v(l)%val(nzt_wall,m) & 1631 ! + frac_win * t_window_v(l)%val(nzt_wall,m) & 1632 ! + frac_green * t_green_v(l)%val(nzt_wall,m) 1633 1634 indoor_wall_temperature = frac_wall * t_wall_v(l)%val(nzt_wall,m) & 1635 + frac_win * t_window_v(l)%val(nzt_wall,m) & 1636 + frac_green * t_green_v(l)%val(nzt_wall,m) 1590 1637 1591 1638 ! … … 1725 1772 surf_usm_v(l)%iwghf_eb(m) = - q_wall 1726 1773 surf_usm_v(l)%iwghf_eb_window(m) = - q_win 1774 1775 ! print*, "wwfjg", surf_usm_v(l)%iwghf_eb(m), surf_usm_v(l)%iwghf_eb_window(m) 1727 1776 ! 1728 1777 !-- Sum up operational indoor temperature per kk-level. Further below, this temperature is … … 2070 2119 CHARACTER (LEN=80) :: line !< string containing current line of file PARIN 2071 2120 2072 NAMELIST /indoor_parameters/ initial_indoor_temperature 2121 NAMELIST /indoor_parameters/ indoor_during_spinup, & 2122 initial_indoor_temperature 2073 2123 2074 2124
Note: See TracChangeset
for help on using the changeset viewer.