Why do we need mathematical modelling?
Mathematical modelling allows us to change whatever we need on the system without affecting the actual system. That gives us the freedom to change anything before even apply it. That feature gives us even more advantages such as reducing the cost since if, let's say, the solution we have for a certain problem is not good that much, so we choose another solution instead.
Suppose we have a tank, inlet water-supply and fixed-diameter outlet. One wishes to derive the equation of motion or the governor equation of the system:
First: applying mass-rate-conservative over the system boundaries
Since we have flow-rate then it's convenient to use cubic-flow rate instead of mass. Hence:
The inlet flow rate is not just equal to the outlet flow rate, it is also equal to the change in the height inside the tank times the cross-section area of the tank
Using Bernoulli's equation between the surface of the tank and the first point exposed to the atmosphere at the inlet flow, we can conclude to
where, h is the height of the fluid (in this case water), h(dot) is the change of height, Q(sub i) is the inlet flow, A(sub t) is the cross section area of the tank, A(sub n) is the area of the outlet nozzle, finally, g is the gravity acceleration
This is a non-linear first order differential equation. In order to make use of it and control the system we need to specify the function area in the slope of the system. It is not that hard to make and it depends on what you need from the system taking in consideration the physical parameter of the system such as the areas of the tank and the nozzle.
In the video below I'll show you a simulation of mine in SIMULINK: