Skip to contents

This function computes damage by room and external wall segment in a provided model. It calculates damage by, first, grouping elementary components by room and segment of external, and calculating the absolute damage for the given hazard range

Usage

compute_damage_by_room_wall(
  model = model,
  hazard_range = getOption("floodam_building_hazard_range"),
  dam = floodam.building::DAM,
  h_abs = "room",
  verbose = getOption("floodam_building_verbose")
)

Arguments

model

model

hazard_range

list, default to getOption("floodam_building_hazard_range")

dam

list, default to floodam.building::DAM

h_abs

character, default to "room". See details

verbose

logical, default to getOption("floodam_building_verbose")

Value

a list containing the computed absolute damage by room and external wall segment. The list has two elements:

  • absolute_room: A list where each element represents the damage for a specific room.

  • absolute_external: A list where each element represents the damage for a specific external wall segment.

Details

The function has only been tested for version 02 of building input file.

The h_abs parameter is used to control whether calculations are performed using the original level at which the room and external walls are located in the building (h_abs = "model"), or an alternative level that disregards the room's floor level in relation to street level and sets the room's floor to zero (h_abs = "room").

Examples


model = analyse_model(adu_t_basement, stage = "extract")
#> Extracting building information for 'adu_t_basement'...
#> 	- extracted:
#> 		- parameter
#> 		- storey
#> 		- room
#> 		- wall
#> 		- opening
#> 		- coating
#> 		- furniture
#> 	- missing (not found):
#> 	... Informations successfully extracted for 'adu_t_basement'
#> Computing some values for 'adu_t_basement'...
#> 	... Informations successfully extracted for 'adu_t_basement'
#> End of analysis for 'adu_t_basement'. Total elapsed time 0.10 secs
#> More information availabe at /tmp/R-test/model/adu/adu_t_basement/adu_t_basement.log
model[["dam_room_wall"]] = compute_damage_by_room_wall(
  model = model
)
#> Computing damage by room and external wall segment for 'adu_t_basement'...
#> 	... Damaging by room and external wall successfully computed for 'adu_t_basement'

model[["dam_room_wall"]] = compute_damage_by_room_wall(
  model = model,
 h_abs = "model"
)
#> Computing damage by room and external wall segment for 'adu_t_basement'...
#> 	... Damaging by room and external wall successfully computed for 'adu_t_basement'