Changeset 1120

Show
Ignore:
Timestamp:
05/04/08 21:40:31 (5 months ago)
Author:
otter
Message:

Enhanced efficiency of friction models of Rotational and Translational library in some situations (only if peak > 1)

Location:
trunk/Modelica
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/Modelica/Mechanics/Rotational.mo

    r1100 r1120  
    11within Modelica.Mechanics; 
    2 package Rotational  
    3   "Library to model 1-dimensional, rotational mechanical systems"  
     2package Rotational 
     3  "Library to model 1-dimensional, rotational mechanical systems" 
    44  extends Modelica.Icons.Library2; 
    55  import SI = Modelica.SIunits; 
    6    
     6 
    77  annotation ( 
    88  version="1.1.1", versionDate="2007-11-22", 
     
    4949    Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{100, 
    5050            100}}), graphics={ 
    51         Line(points={{-83,-66},{-63,-66}}, color={0,0,0}),  
    52         Line(points={{36,-68},{56,-68}}, color={0,0,0}),  
    53         Line(points={{-73,-66},{-73,-91}}, color={0,0,0}),  
    54         Line(points={{46,-68},{46,-91}}, color={0,0,0}),  
    55         Line(points={{-83,-29},{-63,-29}}, color={0,0,0}),  
    56         Line(points={{36,-32},{56,-32}}, color={0,0,0}),  
    57         Line(points={{-73,-9},{-73,-29}}, color={0,0,0}),  
    58         Line(points={{46,-12},{46,-32}}, color={0,0,0}),  
    59         Line(points={{-73,-91},{46,-91}}, color={0,0,0}),  
     51        Line(points={{-83,-66},{-63,-66}}, color={0,0,0}), 
     52        Line(points={{36,-68},{56,-68}}, color={0,0,0}), 
     53        Line(points={{-73,-66},{-73,-91}}, color={0,0,0}), 
     54        Line(points={{46,-68},{46,-91}}, color={0,0,0}), 
     55        Line(points={{-83,-29},{-63,-29}}, color={0,0,0}), 
     56        Line(points={{36,-32},{56,-32}}, color={0,0,0}), 
     57        Line(points={{-73,-9},{-73,-29}}, color={0,0,0}), 
     58        Line(points={{46,-12},{46,-32}}, color={0,0,0}), 
     59        Line(points={{-73,-91},{46,-91}}, color={0,0,0}), 
    6060        Rectangle( 
    61           extent={{-47,-17},{27,-80}},  
    62           lineColor={0,0,0},  
    63           fillPattern=FillPattern.HorizontalCylinder,  
    64           fillColor={192,192,192}),  
     61          extent={{-47,-17},{27,-80}}, 
     62          lineColor={0,0,0}, 
     63          fillPattern=FillPattern.HorizontalCylinder, 
     64          fillColor={192,192,192}), 
    6565        Rectangle( 
    66           extent={{-87,-41},{-47,-54}},  
    67           lineColor={0,0,0},  
    68           fillPattern=FillPattern.HorizontalCylinder,  
    69           fillColor={192,192,192}),  
     66          extent={{-87,-41},{-47,-54}}, 
     67          lineColor={0,0,0}, 
     68          fillPattern=FillPattern.HorizontalCylinder, 
     69          fillColor={192,192,192}), 
    7070        Rectangle( 
    71           extent={{27,-42},{66,-56}},  
    72           lineColor={0,0,0},  
    73           fillPattern=FillPattern.HorizontalCylinder,  
     71          extent={{27,-42},{66,-56}}, 
     72          lineColor={0,0,0}, 
     73          fillPattern=FillPattern.HorizontalCylinder, 
    7474          fillColor={192,192,192})})); 
    75    
    76 package UsersGuide "User's Guide of Rotational Library"  
    77      
     75 
     76package UsersGuide "User's Guide of Rotational Library" 
     77 
    7878  annotation (DocumentationClass=true, Documentation(info="<HTML> 
    7979<p> 
     
    8484 
    8585</HTML>")); 
    86      
    87   class Overview "Overview"  
    88        
     86 
     87  class Overview "Overview" 
     88 
    8989    annotation (DocumentationClass=true, Documentation(info="<HTML> 
    9090  
     
    145145  
    146146</HTML>")); 
    147        
     147 
    148148  end Overview; 
    149      
    150   class FlangeConnectors "Flange Connectors"  
    151        
     149 
     150  class FlangeConnectors "Flange Connectors" 
     151 
    152152    annotation (DocumentationClass=true, Documentation(info="<HTML> 
    153153<p> 
     
    172172</pre> 
    173173</HTML>")); 
    174        
     174 
    175175  end FlangeConnectors; 
    176      
    177   class SupportTorques "Support Torques"  
    178        
     176 
     177  class SupportTorques "Support Torques" 
     178 
    179179    annotation (DocumentationClass=true, Documentation(info="<HTML> 
    180180  
     
    201201  
    202202</HTML>")); 
    203        
     203 
    204204  end SupportTorques; 
    205      
    206   class SignConventions "Sign Conventions"  
    207        
     205 
     206  class SignConventions "Sign Conventions" 
     207 
    208208    annotation (DocumentationClass=true, Documentation(info="<HTML> 
    209209  
     
    261261</p> 
    262262</HTML>")); 
    263        
     263 
    264264  end SignConventions; 
    265      
    266   class UserDefinedComponents "User Defined Components"  
    267        
     265 
     266  class UserDefinedComponents "User Defined Components" 
     267 
    268268    annotation (DocumentationClass=true, Documentation(info="<HTML> 
    269269<p> 
     
    392392</p> 
    393393</HTML>")); 
    394        
     394 
    395395  end UserDefinedComponents; 
    396      
    397   class RequirementsForSimulationTool "Requirements for Simulation Tools"  
    398        
     396 
     397  class RequirementsForSimulationTool "Requirements for Simulation Tools" 
     398 
    399399    annotation (DocumentationClass=true, Documentation(info="<HTML> 
    400400  
     
    450450  
    451451</HTML>")); 
    452        
     452 
    453453  end RequirementsForSimulationTool; 
    454      
    455   class Contact "Contact"  
    456        
     454 
     455  class Contact "Contact" 
     456 
    457457    annotation (Documentation(info="<html> 
    458458<dl> 
     
    484484")); 
    485485  end Contact; 
    486      
     486 
    487487end UsersGuide; 
    488    
    489   package Examples "Demonstration examples of the components of this package"  
    490      
     488 
     489  package Examples "Demonstration examples of the components of this package" 
     490 
    491491    extends Modelica.Icons.Library; 
    492      
     492 
    493493    annotation ( Documentation(info="<html> 
    494494<p> 
     
    500500</HTML> 
    501501")); 
    502     model First "First example: simple drive train"  
     502    model First "First example: simple drive train" 
    503503      import SI = Modelica.SIunits; 
    504        
     504 
    505505      extends Modelica.Icons.Example; 
    506        
    507       parameter Modelica.SIunits.Torque amplitude=10  
     506 
     507      parameter Modelica.SIunits.Torque amplitude=10 
    508508        "Amplitude of driving torque"; 
    509509      parameter SI.Frequency freqHz=5 "Frequency of driving torque"; 
     
    512512      parameter Real ratio=10 "Gear ratio"; 
    513513      parameter Real damping=10 "Damping in bearing of gear"; 
    514        
     514 
    515515      annotation (Documentation(info="<html> 
    516516<p>The drive train consists of a motor inertia which is driven by 
     
    529529                   graphics), 
    530530        experiment); 
    531        
     531 
    532532      Rotational.Components.Fixed fixed  
    533533                             annotation (Placement(transformation(extent={{38, 
     
    562562        annotation (Placement(transformation(extent={{-98,-8},{-82,8}}, 
    563563              rotation=0))); 
    564     equation  
     564    equation 
    565565      connect(inertia1.flange_b, idealGear.flange_a)  
    566566        annotation (Line(points={{-22,0},{-8,0}},  color={0,0,0})); 
     
    586586          smooth=Smooth.None)); 
    587587    end First; 
    588      
    589     model FirstGrounded  
    590       "First example: simple drive train with grounded elments"  
     588 
     589    model FirstGrounded 
     590      "First example: simple drive train with grounded elments" 
    591591      import SI = Modelica.SIunits; 
    592        
     592 
    593593      extends Modelica.Icons.Example; 
    594        
    595       parameter Modelica.SIunits.Torque amplitude=10  
     594 
     595      parameter Modelica.SIunits.Torque amplitude=10 
    596596        "Amplitude of driving torque"; 
    597597      parameter SI.Frequency freqHz=5 "Frequency of driving torque"; 
     
    600600      parameter Real ratio=10 "Gear ratio"; 
    601601      parameter Real damping=10 "Damping in bearing of gear"; 
    602        
     602 
    603603      annotation (Documentation(info="<html> 
    604604<p>The drive train consists of a motor inertia which is driven by 
     
    617617                   graphics), 
    618618        experiment(StopTime=1)); 
    619        
     619 
    620620      Rotational.Components.Fixed fixed  
    621621                             annotation (Placement(transformation(extent={{38,-48}, 
     
    649649        annotation (Placement(transformation(extent={{-98,-8},{-82,8}}, 
    650650              rotation=0))); 
    651     equation  
     651    equation 
    652652      connect(inertia1.flange_b, idealGear.flange_a)  
    653653        annotation (Line(points={{-22,0},{-8,0}},  color={0,0,0})); 
     
    669669          smooth=Smooth.None)); 
    670670    end FirstGrounded; 
    671      
    672     model Friction "Drive train with clutch and brake"  
     671 
     672    model Friction "Drive train with clutch and brake" 
    673673      import Modelica.Constants.pi; 
    674674      import SI = Modelica.SIunits; 
    675        
     675 
    676676      extends Modelica.Icons.Example; 
    677        
     677 
    678678      parameter SI.Time startTime=0.5 "Start time of step"; 
    679        
     679 
    680680      output SI.Torque tMotor "driving torque of inertia3"; 
    681681      output SI.Torque tClutch "friction torque of clutch"; 
    682682      output SI.Torque tBrake "friction torque of brake"; 
    683683      output SI.Torque tSpring "spring torque"; 
    684        
     684 
    685685      annotation (Documentation(info="<html> 
    686686<p>This drive train contains a frictional <b>clutch</b> and a <b>brake</b>. 
     
    706706            grid={2,2}), graphics), 
    707707        experiment(StopTime=3)); 
    708        
     708 
    709709      Rotational.Sources.Torque torque(useSupport=true)  
    710710                               annotation (Placement(transformation(extent={{-90,-10}, 
     
    770770                             annotation (Placement(transformation(extent={{-10,-30}, 
    771771                {10,-10}},     rotation=0))); 
    772     equation  
     772    equation 
    773773      tMotor = torque.tau; 
    774774      tClutch = clutch.tau; 
    775775      tBrake = brake.tau; 
    776776      tSpring = spring.tau; 
    777        
     777 
    778778      connect(torque.flange, inertia3.flange_a)  
    779779        annotation (Line(points={{-70,0},{-70,0},{-60,0}}, 
     
    808808              -20},{0,-20}},    color={0,0,0})); 
    809809    end Friction; 
    810      
    811     model CoupledClutches "Drive train with 3 dynamically coupled clutches"  
    812        
     810 
     811    model CoupledClutches "Drive train with 3 dynamically coupled clutches" 
     812 
    813813      import SI = Modelica.SIunits; 
    814        
     814 
    815815      extends Modelica.Icons.Example; 
    816        
    817       parameter SI.Frequency freqHz=0.2  
     816 
     817      parameter SI.Frequency freqHz=0.2 
    818818        "frequency of sine function to invoke clutch1"; 
    819819      parameter SI.Time T2=0.4 "time when clutch2 is invoked"; 
    820820      parameter SI.Time T3=0.9 "time when clutch3 is invoked"; 
    821        
     821 
    822822      annotation (Documentation(info="<html> 
    823823<p>This example demonstrates how variable structure 
     
    841841locked, forward sliding.</p> 
    842842  
    843 </HTML>"), __Dymola_Commands(file="Scripts/__Dymola_CoupledClutches.mos"  
     843</HTML>"), __Dymola_Commands(file="Scripts/__Dymola_CoupledClutches.mos" 
    844844            "Simulate and Plot"), 
    845845        Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-140,-80},{ 
     
    848848                graphics), 
    849849        experiment(StopTime=1.5)); 
    850        
     850 
    851851      Rotational.Components.Inertia J1( 
    852852        J=1, 
     
    905905                             annotation (Placement(transformation(extent={{-100, 
    906906                -30},{-80,-10}}, rotation=0))); 
    907     equation  
     907    equation 
    908908      connect(torque.flange, J1.flange_a)  
    909909        annotation (Line(points={{-80,0},{-70,0}}, color={0,0,0})); 
     
    937937                         color={0,0,0})); 
    938938    end CoupledClutches; 
    939      
    940     model LossyGearDemo1  
    941       "Example to show that gear efficiency may lead to stuck motion"  
    942        
     939 
     940    model LossyGearDemo1 
     941      "Example to show that gear efficiency may lead to stuck motion" 
     942 
    943943      import SI = Modelica.SIunits; 
    944        
     944 
    945945      extends Modelica.Icons.Example; 
    946946      SI.Power PowerLoss "power lost in the gear"; 
     
    10001000                             annotation (Placement(transformation(extent={{-10, 
    10011001                -30},{10,-10}}, rotation=0))); 
    1002     equation  
     1002    equation 
    10031003      connect(Inertia1.flange_b, gear.flange_a)  
    10041004        annotation (Line(points={{-20,10},{-10,10}}, color={0,0,0})); 
     
    10111011      PowerLoss = gear.flange_a.tau*der(gear.flange_a.phi) + gear.flange_b.tau* 
    10121012        der(gear.flange_b.phi); 
    1013        
     1013 
    10141014      connect(DriveSine.y, torque1.tau) annotation (Line(points={{-79,10},{-72, 
    10151015              10}}, color={0,0,127})); 
     
    10231023              {60,-20},{60,0}}, color={0,0,0})); 
    10241024    end LossyGearDemo1; 
    1025      
    1026     model LossyGearDemo2  
    1027       "Example to show combination of LossyGear and BearingFriction"  
    1028        
     1025 
     1026    model LossyGearDemo2 
     1027      "Example to show combination of LossyGear and BearingFriction" 
     1028 
    10291029      import SI = Modelica.SIunits; 
    1030        
     1030 
    10311031      extends Modelica.Icons.Example; 
    10321032      SI.Power PowerLoss "power lost in the gear"; 
    1033        
     1033 
    10341034      annotation (Documentation(info="<html> 
    10351035<p> 
     
    10971097                             annotation (Placement(transformation(extent={{-20,-30}, 
    10981098                {0,-10}},       rotation=0))); 
    1099     equation  
     1099    equation 
    11001100      PowerLoss = gear.flange_a.tau*der(gear.flange_a.phi) + gear.flange_b.tau* 
    11011101        der(gear.flange_b.phi); 
     
    11261126                                  color={0,0,0})); 
    11271127    end LossyGearDemo2; 
    1128      
    1129     model ElasticBearing "Example to show possible usage of support flange"  
     1128 
     1129    model ElasticBearing "Example to show possible usage of support flange" 
    11301130      extends Modelica.Icons.Example; 
    11311131      Rotational.Components.Inertia shaft(        phi(fixed=true, start=0), w( 
     
    11791179            extent={{-10,-10},{10,10}}, 
    11801180            rotation=90))); 
    1181     equation  
     1181    equation 
    11821182      connect(torque.flange, shaft.flange_a)  
    11831183        annotation (Line(points={{-30,50},{-20,50}}, color={0,0,0})); 
     
    12011201              {-40,-60},{-40,40}}, color={0,0,0})); 
    12021202    end ElasticBearing; 
    1203      
    1204     model Backlash "Example to demonstrate backlash"  
     1203 
     1204    model Backlash "Example to demonstrate backlash" 
    12051205      extends Modelica.Icons.Example; 
    12061206      annotation (Diagram(coordinateSystem(preserveAspectRatio=true, 
     
    12411241          displayUnit="deg"))  
    12421242        annotation (Placement(transformation(extent={{20,-50},{40,-30}}))); 
    1243     equation  
     1243    equation 
    12441244      connect(springDamper.flange_b, inertia1.flange_a)  
    12451245                                                       annotation (Line( 
     
    12611261          smooth=Smooth.None)); 
    12621262    end Backlash; 
    1263      
    1264     model RollingWheel "Demonstrate coupling Rotational - Translational"  
     1263 
     1264    model RollingWheel "Demonstrate coupling Rotational - Translational" 
    12651265      extends Modelica.Icons.Example; 
    12661266      Rotational.Components.IdealRollingWheel idealRollingWheel(radius=1)  
     
    12761276      Translational.Components.Mass mass(L=0, m=1)  
    12771277        annotation (Placement(transformation(extent={{20,-10},{40,10}}))); 
    1278       Translational.Sources.QuadraticSpeedDependentForce  
     1278      Translational.Sources.QuadraticSpeedDependentForce 
    12791279        quadraticSpeedDependentForce( 
    12801280        f_nominal=-10, 
     
    12821282        v_nominal=5)  
    12831283        annotation (Placement(transformation(extent={{72,-10},{52,10}}))); 
    1284     equation  
    1285        
     1284    equation 
     1285 
    12861286      annotation ( 
    12871287        Documentation(info="<html> 
     
    13141314    end RollingWheel; 
    13151315  end Examples; 
    1316    
    1317   package Components "Components for 1D rotational mechanical drive trains"  
     1316 
     1317  package Components "Components for 1D rotational mechanical drive trains" 
    13181318    extends Modelica.Icons.Library2; 
    13191319    annotation (Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100, 
    13201320              -100},{100,100}}), graphics={ 
    13211321          Rectangle( 
    1322             extent={{-58,8},{42,-92}},  
    1323             lineColor={0,0,0},  
    1324             fillPattern=FillPattern.HorizontalCylinder,  
    1325             fillColor={192,192,192}),  
     1322            extent={{-58,8},{42,-92}}, 
     1323            lineColor={0,0,0}, 
     1324            fillPattern=FillPattern.HorizontalCylinder, 
     1325            fillColor={192,192,192}), 
    13261326          Rectangle( 
    1327             extent={{-100,-32},{-58,-52}},  
    1328             lineColor={0,0,0},  
    1329             fillPattern=FillPattern.HorizontalCylinder,  
    1330             fillColor={192,192,192}),  
     1327            extent={{-100,-32},{-58,-52}}, 
     1328            lineColor={0,0,0}, 
     1329            fillPattern=FillPattern.HorizontalCylinder, 
     1330            fillColor={192,192,192}), 
    13311331          Rectangle( 
    1332             extent={{42,-32},{80,-52}},  
    1333             lineColor={0,0,0},  
    1334             fillPattern=FillPattern.HorizontalCylinder,  
     1332            extent={{42,-32},{80,-52}}, 
     1333            lineColor={0,0,0}, 
     1334            fillPattern=FillPattern.HorizontalCylinder, 
    13351335            fillColor={192,192,192})}),                     Documentation(info="<html> 
    13361336<p> 
     
    13381338</p> 
    13391339</html>")); 
    1340      
    1341     model Fixed "Flange fixed in housing at a given angle"  
     1340 
     1341    model Fixed "Flange fixed in housing at a given angle" 
    13421342      parameter SI.Angle phi0=0 "Fixed offset angle of housing"; 
    1343        
     1343 
    13441344      Interfaces.Flange_b flange "(right) flange fixed in housing"  
    13451345        annotation (Placement(transformation(extent={{10,-10},{-10,10}}, rotation= 
     
    13511351            grid={2,2}), graphics={ 
    13521352            Text( 
    1353               extent={{-150,-90},{150,-130}},  
    1354               lineColor={0,0,255},  
    1355               textString="%name"),  
    1356             Line(points={{-80,-40},{80,-40}}, color={0,0,0}),  
    1357             Line(points={{80,-40},{40,-80}}, color={0,0,0}),  
    1358             Line(points={{40,-40},{0,-80}}, color={0,0,0}),  
    1359             Line(points={{0,-40},{-40,-80}}, color={0,0,0}),  
    1360             Line(points={{-40,-40},{-80,-80}}, color={0,0,0}),  
     1353              extent={{-150,-90},{150,-130}}, 
     1354              lineColor={0,0,255}, 
     1355              textString="%name"), 
     1356            Line(points={{-80,-40},{80,-40}}, color={0,0,0}), 
     1357            Line(points={{80,-40},{40,-80}}, color={0,0,0}), 
     1358            Line(points={{40,-40},{0,-80}}, color={0,0,0}), 
     1359            Line(points={{0,-40},{-40,-80}}, color={0,0,0}), 
     1360            Line(points={{-40,-40},{-80,-80}}, color={0,0,0}), 
    13611361            Line(points={{0,-40},{0,-10}}, color={0,0,0})}), 
    13621362        Documentation(info="<html> 
     
    13831383            Line(points={{-40,-40},{-80,-80}}, color={0,0,0}), 
    13841384            Line(points={{0,-40},{0,-4}}, color={0,0,0})})); 
    1385        
    1386     equation  
     1385 
     1386    equation 
    13871387      flange.phi = phi0; 
    13881388    end Fixed; 
    1389      
    1390     model Inertia "1D-rotational component with inertia"  
     1389 
     1390    model Inertia "1D-rotational component with inertia" 
    13911391      import SI = Modelica.SIunits; 
    13921392      Rotational.Interfaces.Flange_a flange_a "Left flange of shaft"  
     
    13971397              rotation=0))); 
    13981398      parameter SI.Inertia J(min=0, start=1) "Moment of inertia"; 
    1399       parameter StateSelect stateSelect=StateSelect.default  
     1399      parameter StateSelect stateSelect=StateSelect.default 
    14001400        "Priority to use phi and w as states" annotation(HideResult=true,Dialog(tab="Advanced")); 
    1401       SI.Angle phi(stateSelect=stateSelect)  
     1401      SI.Angle phi(stateSelect=stateSelect) 
    14021402        "Absolute rotation angle of component" annotation(Dialog(group="Initialization", __Dymola_initialDialog=true)); 
    1403       SI.AngularVelocity w(stateSelect=stateSelect)  
     1403      SI.AngularVelocity w(stateSelect=stateSelect) 
    14041404        "Absolute angular velocity of component (= der(phi))" annotation(Dialog(group="Initialization", __Dymola_initialDialog=true)); 
    1405       SI.AngularAcceleration a  
     1405      SI.AngularAcceleration a 
    14061406        "Absolute angular acceleration of component (= der(w))" annotation(Dialog(group="Initialization", __Dymola_initialDialog=true)); 
    1407        
     1407 
    14081408      annotation ( 
    14091409        Documentation(info="<html> 
     
    14181418            grid={1,1}), graphics={ 
    14191419            Rectangle( 
    1420               extent={{-100,10},{-50,-10}},  
    1421               lineColor={0,0,0},  
    1422               fillPattern=FillPattern.HorizontalCylinder,  
    1423               fillColor={192,192,192}),  
    1424             Rectangle( 
    1425               extent={{50,10},{100,-10}},  
    1426               lineColor={0,0,0},  
    1427