Changeset 634

Show
Ignore:
Timestamp:
09/17/2007 10:44:17 AM (16 months ago)
Author:
otter
Message:

Rotational.InitializeFlange: Changed implementation so that counting unknowns
and equations is possible without actual values of parameters.
Updated the release notes with this change.

Location:
Modelica/trunk/Modelica
Files:
2 modified

Legend:

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

    r633 r634  
    17521752    equation  
    17531753      tau_support = -adapter.flange_b.tau; 
    1754       connect(adapter.flange_a, bearing) annotation (points=[-6.12323e-016,-70;  
     1754      connect(adapter.flange_a, bearing) annotation (points=[-6.12323e-016,-70; 
    17551755            0,-70; 0,-100],    style(color=0)); 
    17561756      annotation (Documentation(info="<html> 
     
    44434443    connect(elastoBacklash.flange_b, flange_b)  
    44444444      annotation (points=[70, 0; 100, 0], style(color=0)); 
    4445     connect(gearRatio.bearing, adapter.flange_b) annotation (points=[-60,-10;  
     4445    connect(gearRatio.bearing, adapter.flange_b) annotation (points=[-60,-10; 
    44464446          -60,-40; 6.12323e-016,-40; 6.12323e-016,-50],    style(color=0)); 
    4447     connect(gearEfficiency.bearing, adapter.flange_b) annotation (points=[-20,-10;  
     4447    connect(gearEfficiency.bearing, adapter.flange_b) annotation (points=[-20,-10; 
    44484448          -20,-40; 6.12323e-016,-40; 6.12323e-016,-50],         style(color=0)); 
    4449     connect(bearingFriction.bearing, adapter.flange_b) annotation (points=[20,-10;  
     4449    connect(bearingFriction.bearing, adapter.flange_b) annotation (points=[20,-10; 
    44504450          20,-40; 6.12323e-016,-40; 6.12323e-016,-50],         style(color=0)); 
    44514451  end Gear; 
     
    45494549    connect(elastoBacklash.flange_b, flange_b)  
    45504550      annotation (points=[60, 0; 100, 0], style(color=0)); 
    4551     connect(lossyGear.bearing, adapter.flange_b) annotation (points=[-40,-20;  
     4551    connect(lossyGear.bearing, adapter.flange_b) annotation (points=[-40,-20; 
    45524552          -40,-40; 6.12323e-016,-40; 6.12323e-016,-50],    style(color=0)); 
    45534553  end Gear2; 
     
    55335533                StateSelect.prefer else StateSelect.always)= 
    55345534          der(phi_flange) "= der(phi_flange)"; 
    5535     SI.AngularAcceleration a_flange=der(w_flange) "= der(w_flange)"; 
    55365535    annotation (Icon( 
    55375536        Text( 
     
    55585557  
    55595558<p> 
    5560 For example, if \"use_phi_start = true\", then flange.phi is inialized 
     5559For example, if \"use_phi_start = true\", then flange.phi is initialized 
    55615560with the value of the input signal \"phi_start\" at the start time. 
    55625561</p> 
     
    55775576     
    55785577  protected  
    5579     model GetInputs "Get enabled inputs and parameters of disabled inputs"  
     5578    encapsulated model Set_phi_start "Set phi_start"  
     5579      import Modelica; 
    55805580      extends Modelica.Blocks.Interfaces.BlockIcon; 
    55815581      Modelica.Blocks.Interfaces.RealInput phi_start "Start angle"  
    5582         annotation (Hide=true, extent=[-140,40; -100,80]); 
    5583       Modelica.Blocks.Interfaces.RealInput w_start "Start speed"  
    55845582        annotation (Hide=true, extent=[-140,-20; -100,20]); 
     5583       
     5584      annotation (Diagram); 
     5585      Modelica.Mechanics.Rotational.Interfaces.Flange_b flange annotation (extent=[90,-10; 110,10]); 
     5586    initial equation  
     5587      flange.phi = phi_start; 
     5588    equation  
     5589      flange.tau = 0; 
     5590    end Set_phi_start; 
     5591     
     5592    encapsulated model Set_w_start "Set w_start"  
     5593      import Modelica; 
     5594      extends Modelica.Blocks.Interfaces.BlockIcon; 
     5595      Modelica.Blocks.Interfaces.RealInput w_start "Start angular velocity"  
     5596        annotation (Hide=true, extent=[-140,-20; -100,20]); 
     5597       
     5598      annotation (Diagram); 
     5599      Modelica.Mechanics.Rotational.Interfaces.Flange_b flange annotation (extent=[90,-10; 110,10]); 
     5600    initial equation  
     5601      der(flange.phi) = w_start; 
     5602    equation  
     5603      flange.tau = 0; 
     5604    end Set_w_start; 
     5605     
     5606    encapsulated model Set_a_start "Set a_start"  
     5607      import Modelica; 
     5608      extends Modelica.Blocks.Interfaces.BlockIcon; 
    55855609      Modelica.Blocks.Interfaces.RealInput a_start "Start angular acceleration" 
    5586         annotation (Hide=true, extent=[-140,-80; -100,-40]); 
     5610        annotation (Hide=true, extent=[-140,-20; -100,20]); 
     5611       
    55875612      annotation (Diagram); 
    5588     end GetInputs; 
     5613      Modelica.Mechanics.Rotational.Interfaces.Flange_b flange(phi(stateSelect=StateSelect.avoid)) annotation (extent=[90,-10; 110,10]); 
     5614      Modelica.SIunits.AngularVelocity w = der(flange.phi) annotation(Hide=true); 
     5615    initial equation  
     5616      der(w) = a_start; 
     5617    equation  
     5618      flange.tau = 0; 
     5619    end Set_a_start; 
     5620     
     5621    encapsulated model Set_flange_tau "Set flange_tau to zero"  
     5622      import Modelica; 
     5623      extends Modelica.Blocks.Interfaces.BlockIcon; 
     5624      Modelica.Mechanics.Rotational.Interfaces.Flange_b flange annotation (extent=[90,-10; 110,10]); 
     5625    equation  
     5626      flange.tau = 0; 
     5627    end Set_flange_tau; 
    55895628  protected  
    5590     GetInputs getInputs annotation (extent=[-10,-10; 10,10]); 
    5591   initial equation  
    5592     if use_phi_start then 
    5593        phi_flange = getInputs.phi_start; 
    5594     end if; 
    5595     if use_w_start then 
    5596        w_flange = getInputs.w_start; 
    5597     end if; 
    5598     if use_a_start then 
    5599        a_flange = getInputs.a_start; 
    5600     end if; 
     5629    Set_phi_start set_phi_start if use_phi_start annotation (extent=[-20,50; 0,70]); 
     5630    Set_w_start set_w_start if use_w_start  
     5631                            annotation (extent=[-20,-10; 0,10]); 
     5632    Set_a_start set_a_start if use_a_start  
     5633                            annotation (extent=[-20,-70; 0,-50]); 
     5634    Set_flange_tau set_flange_tau annotation (extent=[20,-100; 40,-80]); 
    56015635  equation  
    5602     connect(phi_start, getInputs.phi_start) annotation (points=[-120,60; -60,60; 
    5603           -60,6; -12,6], style(color=74, rgbcolor={0,0,127})); 
    5604     connect(w_start, getInputs.w_start)  
    5605       annotation (points=[-120,0; -12,0], style(color=74, rgbcolor={0,0,127})); 
    5606     connect(a_start, getInputs.a_start) annotation (points=[-120,-60; -60,-60; 
    5607           -60,-6; -12,-6], style(color=74, rgbcolor={0,0,127})); 
    5608      
    5609     if not use_phi_start then 
    5610        getInputs.phi_start = 0; 
    5611     end if; 
    5612     if not use_w_start then 
    5613        getInputs.w_start = 0; 
    5614     end if; 
    5615     if not use_a_start then 
    5616        getInputs.a_start = 0; 
    5617     end if; 
    5618      
    5619     flange.tau = 0; 
     5636    connect(set_phi_start.phi_start, phi_start) annotation (points=[-22,60; -120, 
     5637          60], style( 
     5638        color=74, 
     5639        rgbcolor={0,0,127}, 
     5640        smooth=0)); 
     5641    connect(set_phi_start.flange, flange) annotation (points=[0,60; 60,60; 60,0; 
     5642          100,0], style( 
     5643        color=0, 
     5644        rgbcolor={0,0,0}, 
     5645        smooth=0)); 
     5646    connect(set_w_start.flange, flange) annotation (points=[0,0; 100,0], style( 
     5647        color=0, 
     5648        rgbcolor={0,0,0}, 
     5649        smooth=0)); 
     5650    connect(set_w_start.w_start, w_start) annotation (points=[-22,0; -120,0], 
     5651        style( 
     5652        color=74, 
     5653        rgbcolor={0,0,127}, 
     5654        smooth=0)); 
     5655    connect(set_a_start.a_start, a_start) annotation (points=[-22,-60; -120,-60], 
     5656        style( 
     5657        color=74, 
     5658        rgbcolor={0,0,127}, 
     5659        smooth=0)); 
     5660    connect(set_a_start.flange, flange) annotation (points=[0,-60; 60,-60; 60,0; 
     5661          100,0], style( 
     5662        color=0, 
     5663        rgbcolor={0,0,0}, 
     5664        smooth=0)); 
     5665    connect(set_flange_tau.flange, flange) annotation (points=[40,-90; 60,-90; 60, 
     5666          0; 100,0], style( 
     5667        color=0, 
     5668        rgbcolor={0,0,0}, 
     5669        smooth=0)); 
    56205670  end InitializeFlange; 
    56215671   
  • Modelica/trunk/Modelica/package.mo

    r633 r634  
    706706 
    707707<p><br> 
     708The following <b style=\"color:blue\">existing components</b> 
     709have been <b style=\"color:blue\">improved</b>: 
     710</p> 
     711  
     712<table border=\"1\" cellspacing=0 cellpadding=2 style=\"border-collapse:collapse;\"> 
     713  <tr><td colspan=\"2\"><b>Mechanics.Rotational.</b></td></tr> 
     714  <tr><td valign=\"top\"> InitializeFlange</td> 
     715      <td valign=\"top\"> Changed implementation so that counting unknowns and 
     716                        equations is possible without actual values of parameters.</td> </tr> 
     717</table> 
     718 
     719 
     720<p><br> 
    708721The following <b style=\"color:red\">critical errors</b> have been fixed (i.e. errors 
    709722that can lead to wrong simulation results): 
     
    743756</html>")); 
    744757  end Version_3_0; 
    745  
     758     
    746759  class Version_2_2_2 "Version 2.2.2 (Aug. 31, 2007)"  
    747760