Below, we show how to model a tank system using the traditional approach. A tank system with a tank, a source for liquid, and a controller.
The FlatTank model is a "flat" model of the tank system with no internal hierarchical "system structure" visible, i.e., just a collection of variables and equations that model the system dynamics. The internal system structure consisting of components, interfaces, couplings between the components, etc. is not reflected by this model.
A limiter function is needed in the model to reflect minimum and maximum flows through the output valve: