- Timestamp:
- 05/04/08 21:39:55 (4 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/maintenance/3.0/Modelica/Mechanics/Translational.mo
r1083 r1119 5 5 import SI = Modelica.SIunits; 6 6 annotation ( 7 version="1.1.1", versionDate="2007-11-22" 8 , 7 version="1.1.1", versionDate="2007-11-22", 9 8 Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{100, 10 9 100}}), graphics={ … … 159 158 160 159 annotation ( 161 162 160 Documentation(info="<html> 163 161 <p> … … 169 167 </HTML> 170 168 ")); 169 171 170 model SignConvention "Examples for the used sign conventions." 172 171 extends Modelica.Icons.Example; … … 277 276 extends Modelica.Icons.Example; 278 277 annotation ( 279 280 278 Documentation(info="<html> 281 279 <p> … … 399 397 extends Modelica.Icons.Example; 400 398 annotation ( 401 402 399 Documentation(info="<html> 403 400 <p> … … 437 434 color={0,0,255})}), 438 435 experiment(StopTime=1)); 436 439 437 Translational.Components.Fixed fixed 440 438 annotation (Placement(transformation(extent={{ … … 629 627 extends Modelica.Icons.Example; 630 628 annotation ( 631 632 629 Documentation(info="<html> 633 630 <p> … … 658 655 grid={2,2}), graphics), 659 656 experiment(StopTime=1)); 657 660 658 Translational.Components.Mass mass1( 661 659 L=1, … … 730 728 extends Modelica.Icons.Example; 731 729 annotation ( 732 733 730 Documentation(info="<html> 734 731 <p> … … 758 755 grid={2,2}), graphics), 759 756 experiment(StopTime=1)); 757 760 758 Translational.Sensors.ForceSensor forceSensor annotation (Placement( 761 759 transformation(extent={{-20,40},{0,60}}, rotation=0))); … … 825 823 extent={{-100,20},{-80,0}}, 826 824 textString="2)", 827 lineColor={0,0,255})}) 828 , 825 lineColor={0,0,255})}), 829 826 Documentation(info="<html> 830 827 <ol> … … 895 892 896 893 annotation ( 897 898 894 Diagram(coordinateSystem( 899 895 preserveAspectRatio=true, … … 1195 1191 1196 1192 annotation ( 1197 1198 1193 Icon(coordinateSystem( 1199 1194 preserveAspectRatio=true, … … 1228 1223 </HTML> 1229 1224 ")); 1225 1230 1226 Interfaces.Flange_b flange annotation (Placement(transformation( 1231 1227 origin={0,0}, … … 1246 1242 1247 1243 annotation ( 1248 1249 1244 Documentation(info="<html> 1250 1245 <p> … … 1328 1323 textString="Position s", 1329 1324 lineColor={0,0,255})})); 1325 1330 1326 equation 1331 1327 v = der(s); … … 1338 1334 1339 1335 annotation ( 1340 1341 1336 Documentation(info="<html> 1342 1337 <p> … … 1404 1399 textString="Length L", 1405 1400 lineColor={0,0,255})})); 1401 1406 1402 equation 1407 1403 0 = flange_a.f + flange_b.f; … … 1415 1411 1416 1412 annotation ( 1417 1418 1413 Documentation(info="<html> 1419 1414 <p> … … 1459 1454 Line(points={{-86,0},{-60,0},{-44,-30},{-16,30},{14,-30},{44,30},{ 1460 1455 60,0},{84,0}}, color={0,0,0})})); 1456 1461 1457 equation 1462 1458 f = c*(s_rel - s_rel0); … … 1468 1464 "damping constant"; 1469 1465 annotation ( 1470 1471 1466 Documentation(info="<html> 1472 1467 <p> … … 1525 1520 lineColor={128,128,128}, 1526 1521 textString="der(s_rel)")})); 1522 1527 1523 equation 1528 1524 f = d*v_rel; … … 1537 1533 parameter SI.Position s_rel0=0 "unstretched spring length"; 1538 1534 annotation ( 1539 1540 1535 Documentation(info="<html> 1541 1536 <p> … … 1610 1605 Line(points={{-90,0},{-80,0}}, color={0,0,0}), 1611 1606 Line(points={{90,0},{80,0}}, color={0,0,0})})); 1607 1612 1608 equation 1613 1609 f = c*(s_rel - s_rel0) + d*v_rel; … … 1623 1619 1624 1620 annotation ( 1625 1626 1621 Documentation(info="<html> 1627 1622 <p> … … 1789 1784 textString="%name", 1790 1785 lineColor={0,0,255})})); 1786 1791 1787 /* 1792 1788 Please note that initialization might fail due to the nonlinear spring characteristic … … 2477 2473 <li><i>June 10, 2002 by P. Beater, StateSelect.always for variables s and v (instead of fixed=true). </i> </li> 2478 2474 </ul> 2479 </html>") 2480 , 2475 </html>"), 2481 2476 Icon(coordinateSystem( 2482 2477 preserveAspectRatio=true, … … 2682 2677 constant SI.Acceleration unitAcceleration = 1 annotation(HideResult=true); 2683 2678 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"; 2684 2681 equation 2685 2682 /* Friction characteristic … … 2688 2685 if for each configuration special code shall be generated) 2689 2686 */ 2690 startForward = pre(mode) == Stuck and 2691 (pre(startForward) or sa > f0_max/unitForce and sa > f0/unitForce and s < (smax - L/2)) or 2687 startForward = pre(mode) == Stuck and sa > f0_max/unitForce and s < (smax - L/2) or 2692 2688 pre(mode) == Backward and v_relfric > v_small or initial() and v_relfric > 0; 2693 startBackward = pre(mode) == Stuck and 2694 (pre(startBackward) or sa < -f0_max/unitForce and sa < -f0/unitForce and s > (smin + L/2)) or 2689 startBackward = pre(mode) == Stuck and sa < -f0_max/unitForce and s > (smin + L/2) or 2695 2690 pre(mode) == Forward and v_relfric < -v_small or initial() and v_relfric < 0; 2696 2691 locked = not free and … … 2698 2693 a_relfric/unitAcceleration = if locked then 0 else 2699 2694 if free then sa else 2700 if startForward then sa - f0/unitForceelse2701 if startBackward then sa + f0/unitForceelse2702 if pre(mode) == Forward then sa - f0/unitForceelse2703 sa + f0/unitForce;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; 2704 2699 /* Friction torque has to be defined in a subclass. Example for a clutch: 2705 2700 f = if locked then sa else … … 2771 2766 SI.Acceleration a_rel(start=0) "relative angular acceleration"; 2772 2767 annotation ( 2773 2774 2768 Documentation(info="<html> 2775 2769 <p> … … 2866 2860 color={0,0,0}, 2867 2861 pattern=LinePattern.Dash)})); 2862 2868 2863 equation 2869 2864 s_rel = flange_b.s - flange_a.s; … … 2911 2906 constant Real bf=0.6180 "s*s coefficient of Bessel filter"; 2912 2907 annotation ( 2913 2914 2908 Documentation(info="<HTML> 2915 2909 <p> … … 2982 2976 extent={{-100,-100},{100,100}}, 2983 2977 grid={2,2}), graphics)); 2978 2984 2979 initial equation 2985 2980 if not exact then … … 3015 3010 transformation(extent={{-140,-20},{-100,20}}, rotation=0))); 3016 3011 annotation ( 3017 3018 3012 Documentation(info="<HTML> 3019 3013 <p> … … 3086 3080 extent={{-100,-100},{100,100}}, 3087 3081 grid={2,2}), graphics)); 3082 3088 3083 protected 3089 3084 parameter Modelica.SIunits.AngularFrequency w_crit=2*Modelica.Constants.pi*f_crit … … 3119 3114 rotation=0))); 3120 3115 annotation ( 3121 3122 3116 Documentation(info="<html> 3123 3117 <p> … … 3166 3160 extent={{-100,-100},{100,100}}, 3167 3161 grid={2,2}), graphics)); 3162 3168 3163 equation 3169 3164 v = der(s); … … 3237 3232 extent={{150,60},{-150,100}}, 3238 3233 textString="%name", 3239 lineColor={0,0,255})}) 3240 ); 3234 lineColor={0,0,255})})); 3241 3235 protected 3242 3236 function position … … 3288 3282 extent={{-140,-20},{-100,20}}, rotation=0))); 3289 3283 annotation ( 3290 3291 3284 Documentation(info="<html> 3292 3285 <p> … … 3335 3328 extent={{-100,-100},{100,100}}, 3336 3329 grid={2,2}), graphics)); 3330 3337 3331 equation 3338 3332 flange.f = -f; … … 3349 3343 origin={0,40}))); 3350 3344 annotation ( 3351 3352 3345 Documentation(info="<html> 3353 3346 <p> … … 3388 3381 extent={{-100,-100},{100,100}}, 3389 3382 grid={2,2}), graphics)); 3383 3390 3384 equation 3391 3385 flange_a.f = f; … … 3521 3515 3522 3516 annotation ( 3523 3524 3517 Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{100, 3525 3518 100}}), graphics={ … … 3557 3550 -10},{120,10}}))); 3558 3551 annotation ( 3559 3560 3552 Documentation(info="<html> 3561 3553 <p> … … 3578 3570 extent={{-100,-100},{100,100}}, 3579 3571 grid={1,1}), graphics)); 3572 3580 3573 equation 3581 3574 s = flange.s; … … 3589 3582 rotation=0))); 3590 3583 annotation ( 3591 3592 3584 Documentation(info="<html> 3593 3585 <p> … … 3610 3602 extent={{-100,-100},{100,100}}, 3611 3603 grid={1,1}), graphics)); 3604 3612 3605 equation 3613 3606 v = der(flange.s); … … 3622 3615 rotation=0))); 3623 3616 annotation ( 3624 3625 3617 Documentation(info="<html> 3626 3618 <p> … … 3644 3636 extent={{-100,-100},{100,100}}, 3645 3637 grid={1,1}), graphics)); 3638 3646 3639 equation 3647 3640 v = der(flange.s); … … 3657 3650 origin={0,-110}))); 3658 3651 annotation ( 3659 3660 3652 Documentation(info="<html> 3661 3653 <p> … … 3681 3673 extent={{-100,-100},{100,100}}, 3682 3674 grid={1,1}), graphics)); 3675 3683 3676 equation 3684 3677 s_rel = flange_b.s - flange_a.s; … … 3696 3689 origin={0,-110}))); 3697 3690 annotation ( 3698 3699 3691 Documentation(info="<html> 3700 3692 <p> … … 3727 3719 extent={{-100,-100},{100,100}}, 3728 3720 grid={1,1}), graphics)); 3721 3729 3722 equation 3730 3723 s_rel = flange_b.s - flange_a.s; … … 3745 3738 origin={0,-110}))); 3746 3739 annotation ( 3747 3748 3740 Documentation(info="<html> 3749 3741 <p> … … 3769 3761 extent={{-100,-100},{100,100}}, 3770 3762 grid={1,1}), graphics)); 3763 3771 3764 equation 3772 3765 s_rel = flange_b.s - flange_a.s; … … 3803 3796 Line(points={{-70,0},{-90,0}}, color={0,0,0}), 3804 3797 Line(points={{70,0},{90,0}}, color={0,0,0}), 3805 Line(points={{-80,-100},{-80,0}}, color={0,0,127})}) 3806 , 3798 Line(points={{-80,-100},{-80,0}}, color={0,0,127})}), 3807 3799 Diagram(coordinateSystem( 3808 3800 preserveAspectRatio=true, … … 3840 3832 Line(points={{-70,0},{-90,0}}, color={0,0,0}), 3841 3833 Line(points={{70,0},{90,0}}, color={0,0,0}), 3842 Line(points={{-80,-100},{-80,0}}, color={0,0,127})}) 3843 , 3834 Line(points={{-80,-100},{-80,0}}, color={0,0,127})}), 3844 3835 Diagram(coordinateSystem( 3845 3836 preserveAspectRatio=true, … … 3869 3860 "(left) 1D translational flange (flange axis directed INTO cut plane, e. g. from left to right)" 3870 3861 3871 annotation(defaultComponentName = "flange_a" 3872 , 3862 annotation(defaultComponentName = "flange_a", 3873 3863 Documentation(info="<html> 3874 3864 This is a flange for 1D translational mechanical systems. In the cut plane of … … 3914 3904 SI.Position s "absolute position of flange"; 3915 3905 flow SI.Force f "cut force directed into flange"; 3916 annotation(defaultComponentName = "flange_b" 3917 , 3906 annotation(defaultComponentName = "flange_b", 3918 3907 Documentation(info="<html> 3919 3908 This is a flange for 1D translational mechanical systems. In the cut plane of … … 4071 4060 preserveAspectRatio=true, 4072 4061 extent={{-100,-100},{100,100}}, 4073 grid={2,2}), graphics) 4074 ); 4062 grid={2,2}), graphics)); 4075 4063 end PartialTwoFlanges; 4076 4064 … … 4109 4097 extent={{21,-95},{61,-96}}, 4110 4098 lineColor={95,95,95}, 4111 textString="(if not useSupport)")}) 4112 , 4099 textString="(if not useSupport)")}), 4113 4100 Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{ 4114 4101 100,100}}), graphics={ … … 4187 4174 extent={{24,-97},{64,-98}}, 4188 4175 lineColor={95,95,95}, 4189 textString="(if not useSupport)")}) 4190 , 4176 textString="(if not useSupport)")}), 4191 4177 Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{ 4192 4178 100,100}}), graphics={ … … 4253 4239 preserveAspectRatio=true, 4254 4240 extent={{-100,-100},{100,100}}, 4255 grid={2,2}), graphics) 4256 ); 4241 grid={2,2}), graphics)); 4257 4242 equation 4258 4243 flange_a.s = s - L/2; … … 4276 4261 "force between flanges (positive in direction of flange axis R)"; 4277 4262 annotation ( 4278 4279 4263 Documentation(info="<html> 4280 4264 <p> … … 4295 4279 fillPattern=FillPattern.Solid), Line(points={{-60,-90},{20,-90}}, 4296 4280 color={0,0,0})})); 4281 4297 4282 equation 4298 4283 s_rel = flange_b.s - flange_a.s; … … 4325 4310 rotation=0))); 4326 4311 annotation ( 4327 4328 4312 Documentation(info="<html> 4329 4313 <p> … … 4361 4345 extent={{-100,-100},{100,100}}, 4362 4346 grid={2,2}), graphics)); 4347 4363 4348 equation 4364 4349 s_rel = flange_b.s - flange_a.s; … … 4379 4364 rotation=0))); 4380 4365 annotation ( 4381 4382 4366 Documentation(info="<html> 4383 4367 <p> … … 4427 4411 points={{-30,-100},{30,-100}}, 4428 4412 color={0,0,0})})); 4413 4429 4414 protected 4430 4415 InternalSupport internalSupport(f=-flange.f) … … 4607 4592 rotation=0))); 4608 4593 annotation ( 4609 4610 4594 Documentation(info="<html> 4611 4595 <p> … … 4636 4620 extent={{-100,-100},{100,100}}, 4637 4621 grid={1,1}), graphics)); 4622 4638 4623 equation 4639 4624 0 = flange.f; … … 4654 4639 rotation=0))); 4655 4640 annotation ( 4656 4657 4641 Documentation(info="<html> 4658 4642 <p> … … 4684 4668 extent={{-100,-100},{100,100}}, 4685 4669 grid={1,1}), graphics)); 4670 4686 4671 equation 4687 4672 0 = flange_a.f + flange_b.f; … … 4730 4715 constant SI.Acceleration unitAcceleration = 1 annotation(HideResult=true); 4731 4716 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"; 4732 4719 equation 4733 4720 /* Friction characteristic … … 4736 4723 if for each configuration special code shall be generated) 4737 4724 */ 4738 startForward = pre(mode) == Stuck and 4739 (pre(startForward) or sa > f0_max/unitForce and sa > f0/unitForce) or 4725 startForward = pre(mode) == Stuck and sa > f0_max/unitForce or 4740 4726 pre(mode) == Backward and v_relfric > v_small or initial() and v_relfric > 0; 4741 startBackward = pre(mode) == Stuck and 4742 (pre(startBackward) or sa < -f0_max/unitForce and sa < -f0/unitForce) or 4727 startBackward = pre(mode) == Stuck and sa < -f0_max/unitForce or 4743 4728 pre(mode) == Forward and v_relfric < -v_small or initial() and v_relfric < 0; 4744 4729 locked = not free and … … 4746 4731 a_relfric/unitAcceleration = if locked then 0 else 4747 4732 if free then sa else 4748 if startForward then sa - f0/unitForceelse4749 if startBackward then sa + f0/unitForceelse4750 if pre(mode) == Forward then sa - f0/unitForceelse4751 sa + f0/unitForce;4733  
