Show
Ignore:
Timestamp:
12/11/2007 05:22:27 AM (13 months ago)
Author:
otter
Message:

Changed Modelica.StateGraph.Examples.Utilities.Tank:
sqrt(..) changed to sqrt(max(0,2*g*hmax*level))
since a new implementation of sqrt(..) in Dymola may lead to an error here otherwise

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Modelica/branches/maintenance/2.2.2/Modelica/StateGraph.mo

    r630 r921  
    15491549      der(level) = (inflow1.Fi - outflow1.Fo)/(hmax*A); 
    15501550      if outflow1.open then 
    1551         outflow1.Fo = sqrt(2*g*hmax*level)*a; 
     1551        outflow1.Fo = sqrt(max(0,2*g*hmax*level))*a; 
    15521552      else 
    15531553        outflow1.Fo = 0;