Model Description

This FMU models a fluid tank that is open to the atmosphere and whose fluid is completely mixed. The only energy exchange with the environment is through the fluid inlet and outlet. The model implements the following equations:

  m * der(T) = inlet.m_flow * (inlet.T - T)                            (1)
  dp = inlet.p-outlet.p                                                (2)
  outlet.m_flow = if noEvent(dp>0) then sqrt(dp/k) else -sqrt(-dp/k)   (3)
  outlet.T = T                                                         (4)
  outlet.p = pAtm                                                      (5)
where inlet and outlet are the inlet and outlet ports, m_flow is the mass flow rate, T is the temperature and p is the absolute pressure. The parameters are pAtm for the atmospheric pressure, k for the flow coefficient and T_start for the initial value of T.

Limitations

Because the flow versus pressure drop equation (3) is not regularized near zero flow, this model should not be used around dp=0 if the model is combined with a solver that requires the derivatives of the model equations to be bounded. This is for example the case if the model is used within an algebraic loop that is solved using a Newton-Raphson solver.