Hydraulic module introduction

The hydraulic module of floodam.building was created during the DEUFI project to simulate the behavior of water inside buildings. It converts hydraulic results into room- and façade-level impacts. The main entry point is analyse_hydraulic().

Key capabilities:

  • compute water depths and flows through openings (doors, windows);
  • map hydraulic outputs to vulnerability/damage functions to estimate monetary impacts;
  • support staged execution so you can run only the parts you need (e.g. hydraulic simulation, damaging, danger analysis, graphing, saving or display).

Stages commonly used: "hydraulic", "damaging","graph", "save", "display".

This implementation replaces an earlier Python prototype and is now a native R version. It uses a semi-distributed approach (see semi-distributed model) where rooms are primary elements connected by openings; flows follow the gate/weir formulations described in flow equations.

Quick start example:

# load package
library(floodam.building)

# find path to preloaded models
model_path = list(
  data = system.file("extdata", package = "floodam.building"),
  output = tempdir()
)

# create models
model = analyse_model(
  model = "adu_t",
  type = "adu",
  stage = c("load", "extract", "damaging", "hydraulic"),
  path = model_path
)

# create limnigraph
limnigraph = generate_limnigraph(
    model = model,
    time = c(0, 1800, 3600),
    depth = cbind(facade = c(0, 3, 0)),
    exposition = list(facade = list(external = c("wall_A", "wall_B")))
)

# run hydraulic analysis
hydraulic = analyse_hydraulic(
    model = model,
    limnigraph = limnigraph,
    stage = c("hydraulic", "damaging")
)

# plot results
plot(hydraulic)
print(hydraulic$damage)