Show
Ignore:
Timestamp:
10/10/2007 03:17:26 PM (15 months ago)
Author:
otter
Message:

Fixed minor unit errors reported by Sven Erik
(mostly related to s-parameterization of ideal electrical
switches and friction elements)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Modelica/branches/maintenance/2.2.2/Modelica/Mechanics/Rotational.mo

    r659 r660  
    32103210     
    32113211    // Friction torque 
    3212     tau = if locked then sa else (if startForward then  
     3212    tau = if locked then sa*unitTorque else (if startForward then  
    32133213      Modelica.Math.tempInterpol1(w, tau_pos, 2) else if startBackward then - 
    32143214      Modelica.Math.tempInterpol1(-w, tau_pos, 2) else if pre(mode) == Forward then  
     
    34113411     
    34123412    // friction torque 
    3413     tau = if locked then sa else if free then 0 else cgeo*fn*(if startForward then  
     3413    tau = if locked then sa*unitTorque else if free then 0 else cgeo*fn*(if startForward then  
    34143414            Modelica.Math.tempInterpol1(w_rel, mue_pos, 2) else if  
    34153415      startBackward then -Modelica.Math.tempInterpol1(-w_rel, mue_pos, 2) else  
     
    34483448    Real mue0 "Friction coefficient for w=0 and sliding"; 
    34493449    Boolean free "true, if frictional element is not active"; 
    3450     Real sa "path parameter of tau = f(a_rel) Friction characteristic"; 
     3450    Real sa(unit="1")  
     3451      "path parameter of tau = f(a_rel) Friction characteristic"; 
    34513452    constant Real eps0=1.0e-4 "Relative hysteresis epsilon"; 
    34523453    SI.Torque tau0_max_low "lowest value for tau0_max"; 
     
    36293630       special code shall be generated) 
    36303631    */ 
    3631     startForward = pre(stuck) and (sa > tau0_max or pre(startForward) and sa > 
    3632       tau0 or w_rel > w_small) or initial() and (w_rel > 0); 
     3632    startForward = pre(stuck) and (sa > tau0_max/unitTorque or pre(startForward) and sa > 
     3633      tau0/unitTorque or w_rel > w_small) or initial() and (w_rel > 0); 
    36333634    locked = pre(stuck) and not startForward; 
    36343635     
    36353636    // acceleration and friction torque 
    36363637    a_rel = unitAngularAcceleration* (if locked then 0 else sa - tau0/unitTorque); 
    3637     tau = if locked then sa else (if free then 0 else cgeo*fn* 
     3638    tau = if locked then sa*unitTorque else (if free then 0 else cgeo*fn* 
    36383639      Modelica.Math.tempInterpol1(w_rel, mue_pos, 2)); 
    36393640     
     
    38523853     
    38533854    // friction torque 
    3854     tau = if locked then sa else if free then 0 else cgeo*fn*(if startForward then  
     3855    tau = if locked then sa*unitTorque else if free then 0 else cgeo*fn*(if startForward then  
    38553856            Modelica.Math.tempInterpol1(w, mue_pos, 2) else if startBackward then  
    38563857            -Modelica.Math.tempInterpol1(-w, mue_pos, 2) else if pre(mode) == 
     
    41904191     
    41914192    // Determine rolling/stuck mode when w_rel = 0 
    4192     startForward = pre(mode) == Stuck and sa > tauLossMax or initial() and w_a 
     4193    startForward = pre(mode) == Stuck and sa > tauLossMax/unitTorque or initial() and w_a 
    41934194       > 0; 
    4194     startBackward = pre(mode) == Stuck and sa < tauLossMin or initial() and w_a 
     4195    startBackward = pre(mode) == Stuck and sa < tauLossMin/unitTorque or initial() and w_a 
    41954196       < 0; 
    41964197    locked = not (ideal or pre(mode) == Forward or startForward or pre(mode) 
     
    42014202       to simplify the following expression as mode == Stuck is assured in case 
    42024203       of startForward or startBackward */ 
    4203     tauLoss = if ideal then 0 else (if locked then sa else (if (startForward or  
     4204    tauLoss = if ideal then 0 else (if locked then sa*unitTorque else (if (startForward or  
    42044205          pre(mode) == Forward) then tauLossMax else tauLossMin)); 
    42054206