Changeset 1119 for branches/maintenance

Show
Ignore:
Timestamp:
05/04/08 21:39:55 (7 months ago)
Author:
otter
Message:

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

Location:
branches/maintenance/3.0/Modelica
Files:
3 modified

Legend:

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

    r1083 r1119  
    66 
    77  annotation ( 
    8   version="1.1.1", versionDate="2007-11-22" 
    9     , 
     8  version="1.1.1", versionDate="2007-11-22", 
    109    Documentation(info="<html> 
    1110  
     
    842841locked, forward sliding.</p> 
    843842  
    844 </HTML>"), __Dymola_Commands(file="Scripts/__Dymola_CoupledClutches.mos" "Simulate and Plot"), 
     843</HTML>"), __Dymola_Commands(file="Scripts/__Dymola_CoupledClutches.mos" 
     844            "Simulate and Plot"), 
    845845        Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-140,-80},{ 
    846846                140,80}}, 
     
    13461346               0))); 
    13471347      annotation ( 
    1348          
    13491348        Icon(coordinateSystem( 
    13501349            preserveAspectRatio=true, 
     
    13841383            Line(points={{-40,-40},{-80,-80}}, color={0,0,0}), 
    13851384            Line(points={{0,-40},{0,-4}}, color={0,0,0})})); 
     1385 
    13861386    equation 
    13871387      flange.phi = phi0; 
     
    14071407 
    14081408      annotation ( 
    1409          
    14101409        Documentation(info="<html> 
    14111410<p> 
     
    14541453            extent={{-100,-100},{100,100}}, 
    14551454            grid={1,1}), graphics)); 
     1455 
    14561456    equation 
    14571457      phi = flange_a.phi; 
     
    14701470      SI.Angle phi "Absolute rotation angle of component"; 
    14711471      annotation ( 
    1472          
    14731472        Documentation(info="<html> 
    14741473<p> 
     
    15151514            extent={{-100,-100},{100,100}}, 
    15161515            grid={1,1}), graphics)); 
     1516 
    15171517    equation 
    15181518      flange_a.phi = phi - deltaPhi/2; 
     
    15281528 
    15291529      annotation ( 
    1530          
    15311530        Documentation(info="<html> 
    15321531<p> 
     
    15751574            Line(points={{-96,0},{-60,0},{-42,-32},{-12,30},{18,-30},{48,28},{ 
    15761575                  62,0},{96,0}}, color={0,0,255})})); 
     1576 
    15771577    equation 
    15781578      tau = c*(phi_rel - phi_rel0); 
     
    15851585        "Damping constant"; 
    15861586      annotation ( 
    1587          
    15881587        Documentation(info="<html> 
    15891588<p> 
     
    16421641              fillColor={128,128,128}, 
    16431642              fillPattern=FillPattern.Solid)})); 
     1643 
    16441644    equation 
    16451645      tau = d*w_rel; 
     
    16571657 
    16581658      annotation ( 
    1659          
    16601659        Documentation(info="<html> 
    16611660<p> 
     
    17331732            Line(points={{-96,0},{-80,0}}, color={0,0,0}), 
    17341733            Line(points={{96,0},{80,0}}, color={0,0,0})})); 
     1734 
    17351735    equation 
    17361736      tau = c*(phi_rel - phi_rel0) + d*w_rel; 
     
    17631763      constant SI.Angle bEps = 1e-10 "minimum backlash"; 
    17641764      annotation ( 
    1765          
    17661765        Documentation(info="<html> 
    17671766<p> 
     
    20372036              fillPattern=FillPattern.Solid, 
    20382037              textString="b")})); 
     2038 
    20392039    equation 
    20402040        if initial() then 
     
    21942194  
    21952195</HTML> 
    2196 ")     , 
    2197         Icon(coordinateSystem( 
     2196"),     Icon(coordinateSystem( 
    21982197            preserveAspectRatio=true, 
    21992198            extent={{-100,-100},{100,100}}, 
     
    23212320            rotation=90))); 
    23222321      annotation ( 
    2323          
    23242322        Icon(coordinateSystem( 
    23252323            preserveAspectRatio=true, 
     
    23682366              fillPattern=FillPattern.Solid), 
    23692367            Line(points={{0,90},{80,70},{80,-40},{70,-40}}, color={0,0,127}), 
    2370             Line(points={{0,90},{-80,70},{-80,-40},{-70,-40}}, color={0,0,127}),  
    2371  
     2368            Line(points={{0,90},{-80,70},{-80,-40},{-70,-40}}, color={0,0,127}), 
    23722369            Text( 
    23732370              extent={{-150,-180},{150,-140}}, 
     
    25192516            rotation=90))); 
    25202517      annotation ( 
    2521          
    25222518        Icon(coordinateSystem( 
    25232519            preserveAspectRatio=true, 
     
    26532649            extent={{-100,-100},{100,100}}, 
    26542650            grid={1,1}), graphics)); 
     2651 
    26552652    equation 
    26562653      // Constant auxiliary variable 
     
    27172714            rotation=90))); 
    27182715      annotation ( 
    2719          
    27202716        Icon(coordinateSystem( 
    27212717            preserveAspectRatio=true, 
     
    28512847            extent={{-100,-100},{100,100}}, 
    28522848            grid={1,1}), graphics)); 
     2849 
    28532850    equation 
    28542851      // Constant auxiliary variable 
     
    28912888 
    28922889      annotation ( 
    2893          
    28942890        Documentation(info="<html> 
    28952891<p> 
     
    29632959            extent={{-100,-100},{100,100}}, 
    29642960            grid={1,1}), graphics)); 
     2961 
    29652962    equation 
    29662963      phi_a = flange_a.phi - internalSupport.phi; 
     
    33183315               0))); 
    33193316      annotation ( 
    3320          
    33213317        Documentation(info="<HTML> 
    33223318<p> 
     
    35063502              lineColor={128,128,128}, 
    35073503              textString="rotation axis")})); 
     3504 
    35083505    equation 
    35093506      (1 + ratio)*carrier.phi = sun.phi + ratio*ring.phi; 
     
    35823579              fillColor={192,192,192}), 
    35833580            Polygon( 
    3584               points={{-60,10},{-60,20},{-40,40},{-40,-40},{-60,-20},{-60,10}},  
    3585  
     3581              points={{-60,10},{-60,20},{-40,40},{-40,-40},{-60,-20},{-60,10}}, 
    35863582              lineColor={0,0,0}, 
    35873583              fillPattern=FillPattern.HorizontalCylinder, 
     
    36433639        "Transmission ratio (flange_a.phi/flange_b.s)"; 
    36443640      annotation ( 
    3645          
    36463641        Documentation(info="<html> 
    36473642This is an ideal mass- and inertialess gearbox which transforms a 
     
    37203715            extent={{-100,-100},{100,100}}, 
    37213716            grid={1,1}), graphics)); 
     3717 
    37223718    equation 
    37233719      (flangeR.phi - internalSupportR.phi) = ratio*(flangeT.s - internalSupportT.s); 
     
    40184014      SI.AngularAcceleration a_rel(start=0) "Relative angular acceleration"; 
    40194015      annotation ( 
    4020          
    40214016        Documentation(info="<html> 
    40224017<p> 
     
    41134108              color={0,0,0}, 
    41144109              pattern=LinePattern.Dash)})); 
     4110 
    41154111    equation 
    41164112      phi_rel = flange_b.phi - flange_a.phi; 
     
    41604156              rotation=0))); 
    41614157      annotation ( 
    4162          
    41634158        Documentation(info="<HTML> 
    41644159<p> 
     
    42314226            extent={{-100,-100},{100,100}}, 
    42324227            grid={2,2}), graphics)); 
     4228 
    42334229    protected 
    42344230      parameter Modelica.SIunits.AngularFrequency w_crit=2*Modelica.Constants.pi*f_crit 
     
    42744270              rotation=0))); 
    42754271      annotation ( 
    4276          
    42774272        Documentation(info="<html> 
    42784273<p> 
     
    43454340            extent={{-100,-100},{100,100}}, 
    43464341            grid={2,2}), graphics)); 
     4342 
    43474343    protected 
    43484344      parameter Modelica.SIunits.AngularFrequency w_crit=2*Modelica.Constants.pi*f_crit 
     
    43824378              rotation=0))); 
    43834379      annotation ( 
    4384          
    43854380        Documentation(info="<html> 
    43864381<p> 
     
    44294424            extent={{-100,-100},{100,100}}, 
    44304425            grid={2,2}), graphics)); 
     4426 
    44314427    equation 
    44324428      phi = flange.phi - internalSupport.phi; 
     
    45054501              extent={{-150,100},{150,60}}, 
    45064502              textString="%name", 
    4507               lineColor={0,0,255})}) 
    4508         ); 
     4503              lineColor={0,0,255})})); 
    45094504    protected 
    45104505      function position 
     
    45564551              rotation=0))); 
    45574552      annotation ( 
    4558          
    45594553        Documentation(info="<HTML> 
    45604554<p> 
     
    45964590            Line(points={{-10,-50},{10,-30}}, color={0,0,0}), 
    45974591            Line(points={{10,-50},{30,-30}}, color={0,0,0}), 
    4598             Line( 
    4599               points={{-54,-42},{-38,-28},{-16,-16},{4,-14},{22,-18},{36,-26},{ 
    4600                   48,-36},{56,-46},{64,-58}}, 
    4601               color={0,0,0}), 
     4592            Line(points={{-54,-42},{-38,-28},{-16,-16},{4,-14},{22,-18},{36,-26}, 
     4593                  {48,-36},{56,-46},{64,-58}}, color={0,0,0}), 
    46024594            Polygon( 
    46034595              points={{-61,-66},{-44,-42},{-58,-36},{-61,-66}}, 
     
    46294621              fillColor={0,0,0}, 
    46304622              fillPattern=FillPattern.Solid)})); 
     4623 
    46314624    equation 
    46324625      flange.tau = -tau; 
     
    46444637 
    46454638      annotation ( 
    4646          
    46474639        Documentation(info="<HTML> 
    46484640<p> 
     
    47204712              fillColor={0,0,0}, 
    47214713              fillPattern=FillPattern.Solid)})); 
     4714 
    47224715    equation 
    47234716      flange_a.tau =  tau; 
     
    49414934            preserveAspectRatio=true, 
    49424935            extent={{-100,-100},{100,100}}, 
    4943             grid={1,1}), graphics) 
    4944         ); 
     4936            grid={1,1}), graphics)); 
    49454937    equation 
    49464938      phi = flange.phi; 
     
    49754967            preserveAspectRatio=true, 
    49764968            extent={{-100,-100},{100,100}}, 
    4977             grid={1,1}), graphics) 
    4978         ); 
     4969            grid={1,1}), graphics)); 
    49794970    equation 
    49804971      w = der(flange.phi); 
     
    50105001            preserveAspectRatio=true, 
    50115002            extent={{-100,-100},{100,100}}, 
    5012             grid={1,1}), graphics) 
    5013         ); 
     5003            grid={1,1}), graphics)); 
    50145004    equation 
    50155005      w = der(flange.phi); 
     
    50485038            preserveAspectRatio=true, 
    50495039            extent={{-100,-100},{100,100}}, 
    5050             grid={1,1}), graphics) 
    5051         ); 
     5040            grid={1,1}), graphics)); 
    50525041    equation 
    50535042      phi_rel = flange_b.phi - flange_a.phi; 
     
    50895078            preserveAspectRatio=true, 
    50905079            extent={{-100,-100},{100,100}}, 
    5091             grid={1,1}), graphics) 
    5092         ); 
     5080            grid={1,1}), graphics)); 
    50935081    equation 
    50945082      phi_rel = flange_b.phi - flange_a.phi; 
     
    51325120            preserveAspectRatio=true, 
    51335121            extent={{-100,-100},{100,100}}, 
    5134             grid={1,1}), graphics) 
    5135         ); 
     5122            grid={1,1}), graphics)); 
    51365123    equation 
    51375124      phi_rel = flange_b.phi - flange_a.phi; 
     
    51725159            preserveAspectRatio=true, 
    51735160            extent={{-100,-100},{100,100}}, 
    5174             grid={1,1}), graphics) 
    5175         ); 
     5161            grid={1,1}), graphics)); 
    51765162    equation 
    51775163      flange_a.phi = flange_b.phi; 
     
    52085194            preserveAspectRatio=true, 
    52095195            extent={{-100,-100},{100,100}}, 
    5210             grid={1,1}), graphics) 
    5211         ); 
     5196            grid={1,1}), graphics)); 
    52125197    equation 
    52135198      flange_a.phi = flange_b.phi; 
     
    52345219      SI.Angle phi "Absolute rotation angle of flange"; 
    52355220      flow SI.Torque tau "Cut torque in the flange"; 
    5236       annotation(defaultComponentName = "flange_a" 
    5237         , 
     5221      annotation(defaultComponentName = "flange_a", 
    52385222        Documentation(info="<html> 
    52395223<p> 
     
    52965280      SI.Angle phi "Absolute rotation angle of flange"; 
    52975281      flow SI.Torque tau "Cut torque in the flange"; 
    5298       annotation(defaultComponentName = "flange_b" 
    5299         , 
     5282      annotation(defaultComponentName = "flange_b", 
    53005283        Documentation(info="<html> 
    53015284<p> 
     
    55205503            preserveAspectRatio=true, 
    55215504            extent={{-100,-100},{100,100}}, 
    5522             grid={2,2}), graphics) 
    5523         ); 
     5505            grid={2,2}), graphics)); 
    55245506    end PartialTwoFlanges; 
    55255507 
     
    55585540              extent={{21,-95},{61,-96}}, 
    55595541              lineColor={95,95,95}, 
    5560               textString="(if not useSupport)")}) 
    5561         , 
     5542              textString="(if not useSupport)")}), 
    55625543        Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{ 
    55635544                100,100}}), graphics={ 
     
    56365617              extent={{24,-97},{64,-98}}, 
    56375618              lineColor={95,95,95}, 
    5638               textString="(if not useSupport)")}) 
    5639         , 
     5619              textString="(if not useSupport)")}), 
    56405620        Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{ 
    56415621                100,100}}), graphics={ 
     
    56925672 
    56935673      annotation ( 
    5694          
    56955674        Documentation(info="<html> 
    56965675<p> 
     
    57085687            extent={{-100,-100},{100,100}}, 
    57095688            grid={2,2}), graphics)); 
     5689 
    57105690    equation 
    57115691      phi_rel = flange_b.phi - flange_a.phi; 
     
    57385718 
    57395719      annotation ( 
    5740          
    57415720        Documentation(info="<html> 
    57425721<p> 
     
    57745753            extent={{-100,-100},{100,100}}, 
    57755754            grid={2,2}), graphics)); 
     5755 
    57765756    equation 
    57775757      phi_rel = flange_b.phi - flange_a.phi; 
     
    58165796              extent={{-38,-98},{-6,-96}}, 
    58175797              lineColor={95,95,95}, 
    5818               textString="(if useSupport)")}) 
    5819         , 
     5798              textString="(if useSupport)")}), 
    58205799        Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{ 
    58215800                100,100}}), graphics={ 
     
    58945873              extent={{-38,-98},{-6,-96}}, 
    58955874              lineColor={95,95,95}, 
    5896               textString="(if useSupport)")}) 
    5897         , 
     5875              textString="(if useSupport)")}), 
    58985876        Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{ 
    58995877                100,100}}), graphics={ 
     
    59595937 
    59605938      annotation ( 
    5961          
    59625939        Documentation(info="<html> 
    59635940  
     
    60326009            extent={{-100,-100},{100,100}}, 
    60336010            grid={1,1}), graphics)); 
     6011 
    60346012    protected 
    60356013      Rotational.Interfaces.InternalSupport internalSupportR(tau = - flangeR.tau)  
     
    60896067              fillColor={0,0,0}, 
    60906068              fillPattern=FillPattern.Solid), 
    6091             Line( 
    6092               points={{-58,-82},{-42,-68},{-20,-56},{0,-54},{18,-56},{34,-62},{ 
    6093                   44,-72},{54,-82},{60,-94}}, 
    6094               color={0,0,0}), 
     6069            Line(points={{-58,-82},{-42,-68},{-20,-56},{0,-54},{18,-56},{34,-62}, 
     6070                  {44,-72},{54,-82},{60,-94}}, color={0,0,0}), 
    60956071            Polygon( 
    60966072              points={{-65,-98},{-46,-80},{-58,-72},{-65,-98}}, 
     
    61446120              rotation=0))); 
    61456121      annotation ( 
    6146          
    61476122        Documentation(info="<html> 
    61486123<p> 
     
    61896164            extent={{-100,-100},{100,100}}, 
    61906165            grid={1,1}), graphics)); 
     6166 
    61916167    equation 
    61926168      0 = flange.tau; 
     
    62036179              rotation=0))); 
    62046180      annotation ( 
    6205          
    62066181        Documentation(info="<html> 
    62076182<p> 
     
    62496224            extent={{-100,-100},{100,100}}, 
    62506225            grid={1,1}), graphics)); 
     6226 
    62516227    equation 
    62526228      0 = flange_a.tau + flange_b.tau; 
     
    62956271      constant SI.AngularAcceleration unitAngularAcceleration = 1 annotation(HideResult=true); 
    62966272      constant SI.Torque unitTorque = 1 annotation(HideResult=true); 
     6273      Real sa0 = (tau0_max + (tau0_max - tau0))/unitTorque 
     6274        "Value of sa when start of forward sliding at w=0"; 
    62976275    equation 
    62986276    /* Friction characteristic 
     
    63016279   if for each configuration special code shall be generated) 
    63026280*/ 
    6303       startForward  = pre(mode) == Stuck and  
    6304         (pre(startForward)  or sa >  tau0_max/unitTorque and sa >  tau0/unitTorque) or  
     6281      startForward  = pre(mode) == Stuck and sa >  tau0_max/unitTorque or  
    63056282        pre(mode) == Backward and w_relfric >  w_small or initial() and w_relfric > 0; 
    6306       startBackward = pre(mode) == Stuck and  
    6307         (pre(startBackward) or sa < -tau0_max/unitTorque and sa < -tau0/unitTorque) or  
     6283      startBackward = pre(mode) == Stuck and sa < -tau0_max/unitTorque or  
    63086284        pre(mode) == Forward  and w_relfric < -w_small or initial() and w_relfric < 0; 
    63096285      locked = not free and  
     
    63116287      a_relfric/unitAngularAcceleration = if locked then               0 else  
    63126288                                          if free then                 sa else  
    6313                                           if startForward then         sa - tau0/unitTorque else  
    6314                                           if startBackward then        sa + tau0/unitTorque else  
    6315                                           if pre(mode) == Forward then sa - tau0/unitTorque else  
    6316                                                                        sa + tau0/unitTorque; 
     6289                                          if startForward then         sa - sa0 else  
     6290                                          if startBackward then        sa + sa0 else  
     6291                                          if pre(mode) == Forward then sa - sa0 else  
     6292                                                                       sa + sa0; 
    63176293    /* Friction torque has to be defined in a subclass. Example for a clutch: 
    63186294   tau = if locked then sa else  
  • branches/maintenance/3.0/Modelica/Mechanics/Translational.mo

    r1083 r1119  
    55  import SI = Modelica.SIunits; 
    66  annotation ( 
    7   version="1.1.1", versionDate="20