Changeset 656

Show
Ignore:
Timestamp:
10/08/07 13:13:42 (14 months ago)
Author:
AHaumer
Message:

small changes to avoid unit conflicts

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Modelica/branches/maintenance/2.2.2/Modelica/Thermal/FluidHeatFlow.mo

    r588 r656  
    11within Modelica.Thermal; 
     2 
    23package FluidHeatFlow  
    34  "Simple components for 1-dimensional incompressible thermo-fluid flow models"  
    45  extends Modelica.Icons.Library2; 
    56  annotation ( 
    6     version="1.6.3", versionDate="2007-08-21", 
     7    version="1.6.3a", versionDate="2007-10-08", 
    78    preferedView="info",Documentation(info="<HTML> 
    89This package contains very simple-to-use components to model coolant flows as needed to simulate cooling e.g. of electric machines: 
     
    106107  <li> v1.6.3 2007/08/21 Anton Haumer<br> 
    107108       improved documentation</li> 
     109  <li> v1.6.3a 2007/10/08 Anton Haumer<br> 
     110       changes to avoid unit conflicts</li> 
    108111  </ul> 
    109112</HTML> 
     
    13911394    protected  
    13921395      constant Real small = Modelica.Constants.small; 
     1396      constant Modelica.SIunits.VolumeFlowRate smallVolumeFlowRate = eps; 
    13931397      constant Real eps = Modelica.Constants.eps; 
    13941398      Real yLim = max(min(y,y1),0) "Limited valve opening"; 
     
    13991403    initial algorithm  
    14001404      assert(y1>small, "Valve characteristic: y1 has to be > 0 !"); 
    1401       assert(Kv1>small, "Valve characteristic: Kv1 has to be > 0 !"); 
     1405      assert(Kv1>smallVolumeFlowRate, "Valve characteristic: Kv1 has to be > 0 !"); 
    14021406      assert(kv0>small, "Valve characteristic: kv0 has to be > 0 !"); 
    14031407      assert(kv0<1-eps, "Valve characteristic: kv0 has to be < 1 !"); 
     
    16711675        Modelica.SIunits.Power Q_friction; 
    16721676      protected  
    1673         parameter Real k(fixed=false); 
     1677        parameter Real k(final unit="Pa.s2/m6", fixed=false); 
    16741678      initial algorithm  
    16751679        assert(V_flowNominal>V_flowLaminar, 
    16761680          "SimpleFriction: V_flowNominal has to be > V_flowLaminar!"); 
    1677         k:=dpLaminar/V_flowLaminar*V_flowNominal; 
    1678         assert(dpNominal>=k, 
    1679           "SimpleFriction: dpNominal has to be > dpLaminar*V_flowNominal/V_flowLaminar!"); 
    1680         k:=(dpNominal - k)/(V_flowNominal - V_flowLaminar)^2; 
     1681        assert(dpNominal>=dpLaminar/V_flowLaminar*V_flowNominal, 
     1682          "SimpleFriction: dpNominal has to be > dpLaminar/V_flowLaminar*V_flowNominal!"); 
     1683        k:=(dpNominal - dpLaminar/V_flowLaminar*V_flowNominal)/(V_flowNominal - V_flowLaminar)^2; 
    16811684      equation  
    16821685        if     VolumeFlow > +V_flowLaminar then