Changeset 4159 for palm/trunk/SOURCE/indoor_model_mod.f90
- Timestamp:
- Aug 15, 2019 1:31:35 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/indoor_model_mod.f90
r4148 r4159 26 26 ! ----------------- 27 27 ! $Id: indoor_model_mod.f90 28 ! Bugfix in case of non grid-resolved buildings. Further, vertical grid spacing 29 ! is now considered at the correct level. 30 ! 31 ! 28 32 ! - change calculation of a_m and c_m 29 33 ! - change calculation of u-values (use h_es in building array) … … 449 453 REAL(wp) :: du_tmp !< 1/u_tmp 450 454 REAL(wp) :: du_win_tmp !< 1/building(nb)%u_value_win 455 REAL(wp) :: facade_area_v !< dummy to compute the total facade area from vertical walls 451 456 452 457 REAL(wp), DIMENSION(:), ALLOCATABLE :: volume !< total building volume at each discrete height level … … 588 593 nb = MINLOC( ABS( buildings(:)%id - building_id_f%var(j,i) ), & 589 594 DIM = 1 ) 590 DO k = nzb +1, nzt+1595 DO k = nzb, nzt+1 591 596 ! 592 597 !-- Check if grid point belongs to a building. … … 622 627 DO k = buildings(nb)%kb_min, buildings(nb)%kb_max 623 628 buildings(nb)%building_height = buildings(nb)%building_height & 624 + dzw(k )629 + dzw(k+1) 625 630 ENDDO 626 631 ENDDO … … 650 655 DO k = buildings(nb)%kb_min, buildings(nb)%kb_max 651 656 IF ( building_id_f%var(j,i) /= building_id_f%fill ) & 652 volume_l(k) = volume_l(k) + dx * dy * dzw(k )657 volume_l(k) = volume_l(k) + dx * dy * dzw(k+1) 653 658 ENDDO 654 659 ENDDO … … 720 725 !-- Determine building index and check whether building is on PE 721 726 nb = MINLOC( ABS( buildings(:)%id - building_id_f%var(j,i) ), DIM = 1 ) 727 722 728 IF ( buildings(nb)%on_pe ) THEN 723 729 ! … … 846 852 IF ( buildings(nb)%on_pe ) THEN 847 853 854 facade_area_v = 0.0_wp 855 DO k = buildings(nb)%kb_min, buildings(nb)%kb_max 856 facade_area_v = facade_area_v + buildings(nb)%num_facade_v(k) & 857 * dzw(k+1) * dx 858 ENDDO 859 848 860 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 ) 861 ( buildings(nb)%num_facades_per_building_h * dx * dy + & 862 facade_area_v ) 853 863 ENDIF 854 864 ENDDO … … 1130 1140 !-- Building geometries --> not time-dependent 1131 1141 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 area1142 floor_area_per_facade = buildings(nb)%vpf(kk) * ddzw(kk+1) !< [m2/m2] floor area per facade area 1133 1143 indoor_volume_per_facade = buildings(nb)%vpf(kk) !< [m3/m2] indoor air volume per facade area 1134 1144 buildings(nb)%area_facade = facade_element_area * & … … 1337 1347 !-- EXCEPT facade_element_area, EVERYTHING IS CALCULATED EQUALLY) 1338 1348 !-- Building geometries --> not time-dependent 1339 IF ( l == 0 .OR. l == 1 ) facade_element_area = dx * dzw(kk )!< [m2] surface area per facade element1340 IF ( l == 2 .OR. l == 3 ) facade_element_area = dy * dzw(kk )!< [m2] surface area per facade element1341 floor_area_per_facade = buildings(nb)%vpf(kk) * ddzw(kk )!< [m2/m2] floor area per facade area1349 IF ( l == 0 .OR. l == 1 ) facade_element_area = dx * dzw(kk+1) !< [m2] surface area per facade element 1350 IF ( l == 2 .OR. l == 3 ) facade_element_area = dy * dzw(kk+1) !< [m2] surface area per facade element 1351 floor_area_per_facade = buildings(nb)%vpf(kk) * ddzw(kk+1) !< [m2/m2] floor area per facade area 1342 1352 indoor_volume_per_facade = buildings(nb)%vpf(kk) !< [m3/m2] indoor air volume per facade area 1343 1353 buildings(nb)%area_facade = facade_element_area * &
Note: See TracChangeset
for help on using the changeset viewer.