Show
Ignore:
Timestamp:
05/25/08 10:33:05 (6 months ago)
Author:
otter
Message:

maintenance/3.0/Modelica: Removed previously introduced fix for friction

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/maintenance/3.0/Modelica/Mechanics/Translational.mo

    r1119 r1129  
    55  import SI = Modelica.SIunits; 
    66  annotation ( 
    7   version="1.1.1", versionDate="2007-11-22", 
     7  version="1.1.1", versionDate="2007-11-22" 
     8    , 
    89    Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{100, 
    910            100}}), graphics={ 
     
    158159 
    159160    annotation ( 
     161       
    160162      Documentation(info="<html> 
    161163<p> 
     
    167169</HTML> 
    168170")); 
    169  
    170171    model SignConvention "Examples for the used sign conventions." 
    171172      extends Modelica.Icons.Example; 
     
    276277      extends Modelica.Icons.Example; 
    277278      annotation ( 
     279         
    278280        Documentation(info="<html>  
    279281<p> 
     
    397399      extends Modelica.Icons.Example; 
    398400      annotation ( 
     401         
    399402        Documentation(info="<html> 
    400403<p> 
     
    434437              color={0,0,255})}), 
    435438        experiment(StopTime=1)); 
    436  
    437439      Translational.Components.Fixed fixed  
    438440                                 annotation (Placement(transformation(extent={{ 
     
    627629      extends Modelica.Icons.Example; 
    628630      annotation ( 
     631         
    629632        Documentation(info="<html> 
    630633<p> 
     
    655658            grid={2,2}), graphics), 
    656659        experiment(StopTime=1)); 
    657  
    658660      Translational.Components.Mass mass1( 
    659661        L=1, 
     
    728730      extends Modelica.Icons.Example; 
    729731      annotation ( 
     732         
    730733        Documentation(info="<html> 
    731734<p> 
     
    755758            grid={2,2}), graphics), 
    756759        experiment(StopTime=1)); 
    757  
    758760      Translational.Sensors.ForceSensor forceSensor  annotation (Placement( 
    759761            transformation(extent={{-20,40},{0,60}}, rotation=0))); 
     
    823825              extent={{-100,20},{-80,0}}, 
    824826              textString="2)", 
    825               lineColor={0,0,255})}), 
     827              lineColor={0,0,255})}) 
     828        , 
    826829        Documentation(info="<html> 
    827830<ol> 
     
    892895 
    893896      annotation ( 
     897         
    894898        Diagram(coordinateSystem( 
    895899            preserveAspectRatio=true, 
     
    11911195 
    11921196      annotation ( 
     1197         
    11931198        Icon(coordinateSystem( 
    11941199            preserveAspectRatio=true, 
     
    12231228</HTML> 
    12241229")); 
    1225  
    12261230      Interfaces.Flange_b flange   annotation (Placement(transformation( 
    12271231            origin={0,0}, 
     
    12421246 
    12431247      annotation ( 
     1248         
    12441249        Documentation(info="<html> 
    12451250<p> 
     
    13231328              textString="Position s", 
    13241329              lineColor={0,0,255})})); 
    1325  
    13261330    equation 
    13271331      v = der(s); 
     
    13341338 
    13351339      annotation ( 
     1340         
    13361341        Documentation(info="<html> 
    13371342<p> 
     
    13991404              textString="Length L", 
    14001405              lineColor={0,0,255})})); 
    1401  
    14021406    equation 
    14031407      0 = flange_a.f + flange_b.f; 
     
    14111415 
    14121416      annotation ( 
     1417         
    14131418        Documentation(info="<html> 
    14141419<p> 
     
    14541459            Line(points={{-86,0},{-60,0},{-44,-30},{-16,30},{14,-30},{44,30},{ 
    14551460                  60,0},{84,0}}, color={0,0,0})})); 
    1456  
    14571461    equation 
    14581462      f = c*(s_rel - s_rel0); 
     
    14641468        "damping constant"; 
    14651469      annotation ( 
     1470         
    14661471        Documentation(info="<html> 
    14671472<p> 
     
    15201525              lineColor={128,128,128}, 
    15211526              textString="der(s_rel)")})); 
    1522  
    15231527    equation 
    15241528      f = d*v_rel; 
     
    15331537      parameter SI.Position s_rel0=0 "unstretched spring length"; 
    15341538      annotation ( 
     1539         
    15351540        Documentation(info="<html> 
    15361541<p> 
     
    16051610            Line(points={{-90,0},{-80,0}}, color={0,0,0}), 
    16061611            Line(points={{90,0},{80,0}}, color={0,0,0})})); 
    1607  
    16081612    equation 
    16091613      f = c*(s_rel - s_rel0) + d*v_rel; 
     
    16191623 
    16201624      annotation ( 
     1625         
    16211626        Documentation(info="<html> 
    16221627<p> 
     
    17841789              textString="%name", 
    17851790              lineColor={0,0,255})})); 
    1786  
    17871791    /* 
    17881792Please note that initialization might fail due to the nonlinear spring characteristic 
     
    24732477<li><i>June 10, 2002 by P. Beater, StateSelect.always for variables s and v (instead of fixed=true). </i> </li> 
    24742478</ul> 
    2475 </html>"), 
     2479</html>") 
     2480        , 
    24762481        Icon(coordinateSystem( 
    24772482            preserveAspectRatio=true, 
     
    26772682      constant SI.Acceleration unitAcceleration = 1 annotation(HideResult=true); 
    26782683      constant SI.Force unitForce = 1 annotation(HideResult=true); 
    2679       Real sa0 = (f0_max + (f0_max - f0))/unitForce 
    2680           "Value of sa when start of forward sliding at w=0"; 
    26812684    equation 
    26822685    /* Friction characteristic 
     
    26852688   if for each configuration special code shall be generated) 
    26862689*/ 
    2687       startForward  = pre(mode) == Stuck and sa >  f0_max/unitForce and s < (smax - L/2) or  
     2690      startForward  = pre(mode) == Stuck and  
     2691        (pre(startForward)  or sa >  f0_max/unitForce and sa >  f0/unitForce and s < (smax - L/2)) or  
    26882692        pre(mode) == Backward and v_relfric >  v_small or initial() and v_relfric > 0; 
    2689       startBackward = pre(mode) == Stuck and sa < -f0_max/unitForce and s > (smin + L/2) or  
     2693      startBackward = pre(mode) == Stuck and  
     2694        (pre(startBackward) or sa < -f0_max/unitForce and sa < -f0/unitForce and s > (smin + L/2)) or  
    26902695        pre(mode) == Forward  and v_relfric < -v_small or initial() and v_relfric < 0; 
    26912696      locked = not free and  
     
    26932698      a_relfric/unitAcceleration = if locked then               0 else  
    26942699                                   if free then                 sa else  
    2695                                    if startForward then         sa - sa0 else  
    2696                                    if startBackward then        sa + sa0 else  
    2697                                    if pre(mode) == Forward then sa - sa0 else  
    2698                                                                 sa + sa0; 
     2700                                   if startForward then         sa - f0/unitForce else  
     2701                                   if startBackward then        sa + f0/unitForce else  
     2702                                   if pre(mode) == Forward then sa - f0/unitForce else  
     2703                                                                sa + f0/unitForce; 
    26992704    /* Friction torque has to be defined in a subclass. Example for a clutch: 
    27002705   f = if locked then sa else  
     
    27662771      SI.Acceleration a_rel(start=0) "relative angular acceleration"; 
    27672772      annotation ( 
     2773         
    27682774        Documentation(info="<html> 
    27692775<p> 
     
    28602866              color={0,0,0}, 
    28612867              pattern=LinePattern.Dash)})); 
    2862  
    28632868    equation 
    28642869      s_rel = flange_b.s - flange_a.s; 
     
    29062911      constant Real bf=0.6180 "s*s coefficient of Bessel filter"; 
    29072912      annotation ( 
     2913         
    29082914        Documentation(info="<HTML> 
    29092915<p> 
     
    29762982            extent={{-100,-100},{100,100}}, 
    29772983            grid={2,2}), graphics)); 
    2978  
    29792984    initial equation 
    29802985      if not exact then 
     
    30103015            transformation(extent={{-140,-20},{-100,20}}, rotation=0))); 
    30113016      annotation ( 
     3017         
    30123018        Documentation(info="<HTML> 
    30133019<p> 
     
    30803086            extent={{-100,-100},{100,100}}, 
    30813087            grid={2,2}), graphics)); 
    3082  
    30833088    protected 
    30843089      parameter Modelica.SIunits.AngularFrequency w_crit=2*Modelica.Constants.pi*f_crit 
     
    31143119              rotation=0))); 
    31153120      annotation ( 
     3121         
    31163122        Documentation(info="<html> 
    31173123<p> 
     
    31603166            extent={{-100,-100},{100,100}}, 
    31613167            grid={2,2}), graphics)); 
    3162  
    31633168    equation 
    31643169      v = der(s); 
     
    32323237              extent={{150,60},{-150,100}}, 
    32333238              textString="%name", 
    3234               lineColor={0,0,255})})); 
     3239              lineColor={0,0,255})}) 
     3240        ); 
    32353241    protected 
    32363242      function position 
     
    32823288              extent={{-140,-20},{-100,20}}, rotation=0))); 
    32833289      annotation ( 
     3290         
    32843291        Documentation(info="<html> 
    32853292<p> 
     
    33283335            extent={{-100,-100},{100,100}}, 
    33293336            grid={2,2}), graphics)); 
    3330  
    33313337    equation 
    33323338      flange.f = -f; 
     
    33433349            origin={0,40}))); 
    33443350      annotation ( 
     3351         
    33453352        Documentation(info="<html> 
    33463353<p> 
     
    33813388            extent={{-100,-100},{100,100}}, 
    33823389            grid={2,2}), graphics)); 
    3383  
    33843390    equation 
    33853391      flange_a.f =  f; 
     
    35153521 
    35163522    annotation ( 
     3523       
    35173524      Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{100, 
    35183525              100}}), graphics={ 
     
    35503557                -10},{120,10}}))); 
    35513558      annotation ( 
     3559         
    35523560        Documentation(info="<html> 
    35533561<p> 
     
    35703578            extent={{-100,-100},{100,100}}, 
    35713579            grid={1,1}), graphics)); 
    3572  
    35733580    equation 
    35743581      s = flange.s; 
     
    35823589              rotation=0))); 
    35833590      annotation ( 
     3591         
    35843592        Documentation(info="<html> 
    35853593<p> 
     
    36023610            extent={{-100,-100},{100,100}}, 
    36033611            grid={1,1}), graphics)); 
    3604  
    36053612    equation 
    36063613      v = der(flange.s); 
     
    36153622              rotation=0))); 
    36163623      annotation ( 
     3624         
    36173625        Documentation(info="<html> 
    36183626<p> 
     
    36363644            extent={{-100,-100},{100,100}}, 
    36373645            grid={1,1}), graphics)); 
    3638  
    36393646    equation 
    36403647      v = der(flange.s); 
     
    36503657            origin={0,-110}))); 
    36513658      annotation ( 
     3659         
    36523660        Documentation(info="<html> 
    36533661<p> 
     
    36733681            extent={{-100,-100},{100,100}}, 
    36743682            grid={1,1}), graphics)); 
    3675  
    36763683    equation 
    36773684      s_rel = flange_b.s - flange_a.s; 
     
    36893696            origin={0,-110}))); 
    36903697      annotation ( 
     3698         
    36913699        Documentation(info="<html> 
    36923700<p> 
     
    37193727            extent={{-100,-100},{100,100}}, 
    37203728            grid={1,1}), graphics)); 
    3721  
    37223729    equation 
    37233730      s_rel = flange_b.s - flange_a.s; 
     
    37383745            origin={0,-110}))); 
    37393746      annotation ( 
     3747         
    37403748        Documentation(info="<html> 
    37413749<p> 
     
    37613769            extent={{-100,-100},{100,100}}, 
    37623770            grid={1,1}), graphics)); 
    3763  
    37643771    equation 
    37653772      s_rel = flange_b.s - flange_a.s; 
     
    37963803            Line(points={{-70,0},{-90,0}}, color={0,0,0}), 
    37973804            Line(points={{70,0},{90,0}}, color={0,0,0}), 
    3798             Line(points={{-80,-100},{-80,0}}, color={0,0,127})}), 
     3805            Line(points={{-80,-100},{-80,0}}, color={0,0,127})}) 
     3806        , 
    37993807        Diagram(coordinateSystem( 
    38003808            preserveAspectRatio=true, 
     
    38323840            Line(points={{-70,0},{-90,0}}, color={0,0,0}), 
    38333841            Line(points={{70,0},{90,0}}, color={0,0,0}), 
    3834             Line(points={{-80,-100},{-80,0}}, color={0,0,127})}), 
     3842            Line(points={{-80,-100},{-80,0}}, color={0,0,127})}) 
     3843        , 
    38353844        Diagram(coordinateSystem( 
    38363845            preserveAspectRatio=true, 
     
    38603869      "(left) 1D translational flange (flange axis directed INTO cut plane, e. g. from left to right)" 
    38613870 
    3862       annotation(defaultComponentName = "flange_a", 
     3871      annotation(defaultComponentName = "flange_a" 
     3872        , 
    38633873        Documentation(info="<html> 
    38643874This is a flange for 1D translational mechanical systems. In the cut plane of 
     
    39043914      SI.Position s "absolute position of flange"; 
    39053915      flow SI.Force f "cut force directed into flange"; 
    3906       annotation(defaultComponentName = "flange_b", 
     3916      annotation(defaultComponentName = "flange_b" 
     3917        , 
    39073918        Documentation(info="<html> 
    39083919This is a flange for 1D translational mechanical systems. In the cut plane of 
     
    40604071            preserveAspectRatio=true, 
    40614072            extent={{-100,-100},{100,100}}, 
    4062             grid={2,2}), graphics)); 
     4073            grid={2,2}), graphics) 
     4074        ); 
    40634075    end PartialTwoFlanges; 
    40644076 
     
    40974109              extent={{21,-95},{61,-96}}, 
    40984110              lineColor={95,95,95}, 
    4099               textString="(if not useSupport)")}), 
     4111              textString="(if not useSupport)")}) 
     4112        , 
    41004113        Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{ 
    41014114                100,100}}), graphics={ 
     
    41744187              extent={{24,-97},{64,-98}}, 
    41754188              lineColor={95,95,95}, 
    4176               textString="(if not useSupport)")}), 
     4189              textString="(if not useSupport)")}) 
     4190        , 
    41774191        Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{ 
    41784192                100,100}}), graphics={ 
     
    42394253            preserveAspectRatio=true, 
    42404254            extent={{-100,-100},{100,100}}, 
    4241             grid={2,2}), graphics)); 
     4255            grid={2,2}), graphics) 
     4256        ); 
    42424257    equation 
    42434258      flange_a.s = s - L/2; 
     
    42614276        "force between flanges (positive in direction of flange axis R)"; 
    42624277      annotation ( 
     4278         
    42634279        Documentation(info="<html> 
    42644280<p> 
     
    42794295              fillPattern=FillPattern.Solid), Line(points={{-60,-90},{20,-90}}, 
    42804296                color={0,0,0})})); 
    4281  
    42824297    equation 
    42834298      s_rel = flange_b.s - flange_a.s; 
     
    43104325              rotation=0))); 
    43114326      annotation ( 
     4327         
    43124328        Documentation(info="<html> 
    43134329<p> 
     
    43454361            extent={{-100,-100},{100,100}}, 
    43464362            grid={2,2}), graphics)); 
    4347  
    43484363    equation 
    43494364      s_rel = flange_b.s - flange_a.s; 
     
    43644379              rotation=0))); 
    43654380      annotation ( 
     4381         
    43664382        Documentation(info="<html> 
    43674383<p> 
     
    44114427              points={{-30,-100},{30,-100}}, 
    44124428              color={0,0,0})})); 
    4413  
    44144429    protected 
    44154430      InternalSupport internalSupport(f=-flange.f) 
     
    45924607              rotation=0))); 
    45934608      annotation ( 
     4609         
    45944610        Documentation(info="<html> 
    45954611<p> 
     
    46204636            extent={{-100,-100},{100,100}}, 
    46214637            grid={1,1}), graphics)); 
    4622  
    46234638    equation 
    46244639      0 = flange.f; 
     
    46394654              rotation=0))); 
    46404655      annotation ( 
     4656         
    46414657        Documentation(info="<html> 
    46424658<p> 
     
    46684684            extent={{-100,-100},{100,100}}, 
    46694685            grid={1,1}), graphics)); 
    4670  
    46714686    equation 
    46724687      0 = flange_a.f + flange_b.f; 
     
    47154730      constant SI.Acceleration unitAcceleration = 1 annotation(HideResult=true); 
    47164731      constant SI.Force unitForce = 1 annotation(HideResult=true); 
    4717       Real sa0 = (f0_max + (f0_max - f0))/unitForce 
    4718         "Value of sa when start of forward sliding at w=0"; 
    47194732    equation 
    47204733    /* Friction characteristic 
     
    47234736   if for each configuration special code shall be generated) 
    47244737*/ 
    4725       startForward  = pre(mode) == Stuck and sa >  f0_max/unitForce or  
     4738      startForward  = pre(mode) == Stuck and  
     4739        (pre(startForward)  or sa >  f0_max/unitForce and sa >  f0/unitForce) or  
    47264740        pre(mode) == Backward and v_relfric >  v_small or initial() and v_relfric > 0; 
    4727       startBackward = pre(mode) == Stuck and sa < -f0_max/unitForce or  
     4741      startBackward = pre(mode) == Stuck and  
     4742        (pre(startBackward) or sa < -f0_max/unitForce and sa < -f0/unitForce) or  
    47284743        pre(mode) == Forward  and v_relfric < -v_small or initial() and v_relfric < 0; 
    47294744      locked = not free and  
     
    47314746      a_relfric/unitAcceleration = if locked then               0 else  
    47324747                                   if free then                 sa else  
    4733                                    if startForward then         sa - sa0 else  
    4734                                    if startBackward then        sa + sa0 else  
    4735                                    if pre(mode) == Forward then sa - sa0 else  
    4736                                                                 sa + sa0; 
     4748                                   if startForward then         sa - f0/u