Changeset 634
- Timestamp:
- 09/17/2007 10:44:17 AM (16 months ago)
- Location:
- Modelica/trunk/Modelica
- Files:
-
- 2 modified
-
Mechanics/Rotational.mo (modified) (6 diffs)
-
package.mo (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Modelica/trunk/Modelica/Mechanics/Rotational.mo
r633 r634 1752 1752 equation 1753 1753 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; 1755 1755 0,-70; 0,-100], style(color=0)); 1756 1756 annotation (Documentation(info="<html> … … 4443 4443 connect(elastoBacklash.flange_b, flange_b) 4444 4444 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; 4446 4446 -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; 4448 4448 -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; 4450 4450 20,-40; 6.12323e-016,-40; 6.12323e-016,-50], style(color=0)); 4451 4451 end Gear; … … 4549 4549 connect(elastoBacklash.flange_b, flange_b) 4550 4550 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; 4552 4552 -40,-40; 6.12323e-016,-40; 6.12323e-016,-50], style(color=0)); 4553 4553 end Gear2; … … 5533 5533 StateSelect.prefer else StateSelect.always)= 5534 5534 der(phi_flange) "= der(phi_flange)"; 5535 SI.AngularAcceleration a_flange=der(w_flange) "= der(w_flange)";5536 5535 annotation (Icon( 5537 5536 Text( … … 5558 5557 5559 5558 <p> 5560 For example, if \"use_phi_start = true\", then flange.phi is ini alized5559 For example, if \"use_phi_start = true\", then flange.phi is initialized 5561 5560 with the value of the input signal \"phi_start\" at the start time. 5562 5561 </p> … … 5577 5576 5578 5577 protected 5579 model GetInputs "Get enabled inputs and parameters of disabled inputs" 5578 encapsulated model Set_phi_start "Set phi_start" 5579 import Modelica; 5580 5580 extends Modelica.Blocks.Interfaces.BlockIcon; 5581 5581 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"5584 5582 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; 5585 5609 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 5587 5612 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; 5589 5628 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]); 5601 5635 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)); 5620 5670 end InitializeFlange; 5621 5671 -
Modelica/trunk/Modelica/package.mo
r633 r634 706 706 707 707 <p><br> 708 The following <b style=\"color:blue\">existing components</b> 709 have 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> 708 721 The following <b style=\"color:red\">critical errors</b> have been fixed (i.e. errors 709 722 that can lead to wrong simulation results): … … 743 756 </html>")); 744 757 end Version_3_0; 745 758 746 759 class Version_2_2_2 "Version 2.2.2 (Aug. 31, 2007)" 747 760
