Description Usage Arguments Value Examples
Water level in a tank raises due to an inflow and lowers due to an outflow.
An exessive inflow volume may result in water draining out the tank (lost_water
variable in returned data.frame
).
The water tank needs a recharge whenever it does not guarantee the required outflow. The tank is recharged to its entire volume and is_recharged
variable is set to TRUE
.
1 | get_tank_water_level(tank_level, water_in, water_out, tank_volume)
|
tank_level |
level of water in the tank before in/out flows |
water_in |
the amount of water flowing in the tank (usually from rainfall), may be |
water_out |
the amount of water flowing out the tank (usually for lawn irrigation), may be |
tank_volume |
the total volume of the tank |
a 1 row data.frame
with the following variables: tank_level, water_in, is_recharged, lost_water
1 2 3 4 5 6 7 8 9 10 | tank_level_l <- 2000
tank_vol_l <- 5000
# inflow = outflow, water level is unchanged
get_tank_water_level(tank_level_l, 500, 500, tank_vol_l)
# water level decreases
get_tank_water_level(tank_level_l, NA, 1000, tank_vol_l)
# water level decreases, tank is recharged
get_tank_water_level(tank_level_l, 0, 2500, tank_vol_l)
# inflow fills up the tank, water is lost
get_tank_water_level(tank_level_l, 4000, 500, tank_vol_l)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.