« View all new features in Mathematica 9  previous  |  next 
New in Mathematica 9Advanced Hybrid and Differential Algebraic Equations

Hydraulic Systems 

Model the change in height of water in three tanks, with the third tank leaking.

Click for copyable input
X

The pressures at the bottoms of the tanks 1, 2, and 3 are represented as , , and , respectively. The pipe from tank 1 branches off to tanks 2 and 3. The pressure at the pipe branch is given as . Flow rates depend on pressure differences and geometry.

In[1]:=
Click for copyable input
X

All the fluid leaving tank 1 should enter tank 2 and tank 3. This is represented as a constraint. Also, the height of the fluid in the tanks is related to the pressure in the tank by Toricelli's law.

In[2]:=
Click for copyable input
X

The rate at which the fluid leaves or enters the tank (i.e. flow rate) is directly proportional to the rate of change of the height of the fluid in the tank. This relation comes through mass conservation of incompressible fluids.

In[3]:=
Click for copyable input
X

Specify the dimensions and parameters associated with the system. The cross-sectional areas of tanks 1, 2, and 3 are specified by , , and , respectively. The density and viscosity of the fluid are specified as (kg/m3) and (kg/m-s), respectively.

In[4]:=
Click for copyable input
X

Specify the initial heights of the fluid in each tank.

In[5]:=
Click for copyable input
X

Solve and visualize the result.

In[6]:=
Click for copyable input
X
In[7]:=
Click for copyable input
X
Out[7]=