System dynamics — fluid tank with valve
Engineering control example.
Make it your own.
title "Fluid tank with valve"
cloud src at (-1,2)
stock Tank at (3,2) initial 50
cloud drain at (7,2)
flow fill from src to Tank rate "pump * valve_open"
flow empty from Tank to drain rate "k_drain * Tank"
aux pump at (1,4) value 10
aux valve_open at (3,4) value 1 label "valve"
aux k_drain at (5,4) value 0.05
info pump -> fill
info valve_open -> fill
info Tank -> empty