Changeset 676
- Timestamp:
- 10/11/2007 04:05:49 PM (15 months ago)
- Location:
- Modelica/trunk/Modelica/Mechanics/MultiBody
- Files:
-
- 7 modified
-
Examples/Loops/Utilities.mo (modified) (4 diffs)
-
Forces.mo (modified) (3 diffs)
-
Interfaces.mo (modified) (4 diffs)
-
Joints.mo (modified) (69 diffs)
-
Sensors.mo (modified) (5 diffs)
-
Types.mo (modified) (1 diff)
-
Visualizers.mo (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
Modelica/trunk/Modelica/Mechanics/MultiBody/Examples/Loops/Utilities.mo
r550 r676 224 224 extends Modelica.Mechanics.Translational.Interfaces.Compliant; 225 225 parameter SI.Length L "Length of cylinder"; 226 parameter SI. Length d "diameter of cylinder";227 parameter Realk0=0.01;228 parameter Realk1=1;229 parameter Realk=1;226 parameter SI.Diameter d "Diameter of cylinder"; 227 parameter SIunits.Volume k0=0.01; 228 parameter SIunits.Volume k1=1; 229 parameter SIunits.HeatCapacity k=1; 230 230 constant Real pi=Modelica.Constants.pi; 231 231 constant Real PI=Modelica.Constants.pi; … … 270 270 fillPattern=1)), 271 271 Text(extent=[-100, 120; 100, 60], string="%name"))); 272 272 protected 273 constant SI.Mass unitMass=1; 274 Modelica.SIunits.Pressure p; 273 275 equation 274 276 y = -s_rel/L; … … 276 278 v_rel = der(s_rel); 277 279 278 press = if v_rel < 0 then (if x < 0.987 then 177.4132*x^4 - 287.2189*x^3 + 280 press = p/1e5; 281 p = (if v_rel < 0 then (if x < 0.987 then 177.4132*x^4 - 287.2189*x^3 + 279 282 151.8252*x^2 - 24.9973*x + 2.4 else 2836360*x^4 - 10569296*x^3 + 14761814 280 283 *x^2 - 9158505*x + 2129670) else (if x > 0.93 then -3929704*x^4 + 281 284 14748765*x^3 - 20747000*x^2 + 12964477*x - 3036495 else 145.930*x^4 - 282 131.707*x^3 + 17.3438*x^2 + 17.9272*x + 2.4) ;285 131.707*x^3 + 17.3438*x^2 + 17.9272*x + 2.4))*1e5; 283 286 284 287 f = -1.0E5*press*pi*d^2/4; 285 288 286 289 V = k0 + k1*(1 - x); 287 dens = 1/V;288 press*V = k*T;290 dens = unitMass/V; 291 (p/1e5)*V = k*T; 289 292 end GasForce; 290 293 … … 618 621 import SI = Modelica.SIunits; 619 622 parameter Boolean animation=true "= true, if animation shall be enabled"; 620 replaceable model Cylinder = Cylinder_analytic_CAD extends CylinderBase 621 "Cylinder type"; 622 /* 623 annotation (choices(choice(redeclare model Cylinder = 623 replaceable model Cylinder = Cylinder_analytic_CAD extends CylinderBase "Cylinder type" 624 annotation (choices(choice(redeclare model Cylinder = 624 625 Modelica.Mechanics.MultiBody.Examples.Loops.Utilities.Cylinder_analytic_CAD 625 626 "Analytic loop handling + CAD animation"), choice(redeclare model 626 627 Cylinder = Modelica.Mechanics.MultiBody.Examples.Loops.Utilities.Cylinder_analytic 627 628 "Analytic loop handling + standard animation"))); 628 */629 629 630 630 Cylinder cylinder1( -
Modelica/trunk/Modelica/Mechanics/MultiBody/Forces.mo
r616 r676 1560 1560 SI.Position r_rel_0[3] 1561 1561 "Position vector from frame_a to frame_b resolved in world frame"; 1562 Real e_rel_0[3] (each unit="1")1562 Real e_rel_0[3] 1563 1563 "Unit vector in direction from frame_a to frame_b, resolved in world frame"; 1564 1564 annotation ( … … 2257 2257 "Reflection of ambient light (= 0: light is completely absorbed)" 2258 2258 annotation (Dialog(tab="Animation", group="if animation = true", enable=animation)); 2259 input RealmassDiameter=max(0, (width - 2*coilWidth)*0.9)2259 input SIunits.Diameter massDiameter=max(0, (width - 2*coilWidth)*0.9) 2260 2260 " Diameter of mass point sphere" annotation (Dialog(tab="Animation", group= 2261 2261 "if animation = true and showMass = true", enable=animation and showMass)); … … 2351 2351 " Length of cylinder at frame_a side" 2352 2352 annotation (Dialog(tab="Animation", group="if animation = true", enable=animation)); 2353 input SI .Distancediameter_a=world.defaultForceWidth2353 input SIunits.Diameter diameter_a=world.defaultForceWidth 2354 2354 " Diameter of cylinder at frame_a side" 2355 2355 annotation (Dialog(tab="Animation", group="if animation = true", enable=animation)); 2356 input Realdiameter_b=0.6*diameter_a2356 input SIunits.Diameter diameter_b=0.6*diameter_a 2357 2357 " Diameter of cylinder at frame_b side" 2358 2358 annotation (Dialog(tab="Animation", group="if animation = true", enable=animation)); -
Modelica/trunk/Modelica/Mechanics/MultiBody/Interfaces.mo
r555 r676 769 769 Line(points=[-70, 0; -101, 0], style(color=0)), 770 770 Line(points=[70, 0; 100, 0], style(color=0)), 771 Line(points=[0, -100; 0, -70] ),771 Line(points=[0, -100; 0, -70], style(color=74, rgbcolor={0,0,127})), 772 772 Text(extent=[-132, 76; 129, 124], string="%name"), 773 773 Text( … … 782 782 Line(points=[-70, 0; -100, 0], style(color=0)), 783 783 Line(points=[70, 0; 100, 0], style(color=0)), 784 Line(points=[0, -100; 0, -70] )));784 Line(points=[0, -100; 0, -70], style(color=74, rgbcolor={0,0,127})))); 785 785 equation 786 786 … … 827 827 Line(points=[-70, 0; -101, 0], style(color=0)), 828 828 Line(points=[70, 0; 100, 0], style(color=0)), 829 Line(points=[-80, -100; -80, 0] ),829 Line(points=[-80, -100; -80, 0], style(color=74, rgbcolor={0,0,127})), 830 830 Text(extent=[-132, 76; 129, 124], string="%name"), 831 831 Text( … … 848 848 Line(points=[-70, 0; -100, 0], style(color=0)), 849 849 Line(points=[70, 0; 100, 0], style(color=0)), 850 Line(points=[-80, -100; -80, 0] ),850 Line(points=[-80, -100; -80, 0], style(color=74, rgbcolor={0,0,127})), 851 851 Line(points=[80,0; 80,-100], style( 852 852 color=10, -
Modelica/trunk/Modelica/Mechanics/MultiBody/Joints.mo
r611 r676 85 85 86 86 annotation ( 87 preferedView="info",88 87 Icon(Text( 89 88 extent=[-142, 62; 147, 101], … … 132 131 annotation (extent=[-30,50; -50,70]); 133 132 annotation ( 134 preferedView="info",135 133 Diagram( 136 134 Text(extent=[42, 81; 57, 66], string="f"), … … 205 203 extends Internal.Revolute; 206 204 annotation ( 207 preferedView="info",208 205 Icon(Text( 209 206 extent=[-146, 70; 143, 109], … … 288 285 annotation (extent=[-70,90; -50,110]); 289 286 annotation ( 290 preferedView="info",291 287 Coordsys( 292 288 extent=[-100, -100; 100, 100], … … 481 477 a_start=wd_start) annotation (extent=[10, -25; 65, 25]); 482 478 annotation ( 483 preferedView="info",484 479 Coordsys( 485 480 extent=[-100, -100; 100, 100], … … 647 642 annotation (extent=[10, 20; 60, 70], rotation=90); 648 643 annotation ( 649 preferedView="info",650 644 Coordsys( 651 645 extent=[-100, -100; 100, 100], … … 840 834 a_start=wd_start) annotation (extent=[41, -20; 81, 20]); 841 835 annotation ( 842 preferedView="info",843 836 Coordsys( 844 837 extent=[-100, -100; 100, 100], … … 953 946 rgbcolor={95,95,95}, 954 947 thickness=2)); 955 connect(prismatic_x.frame_b, prismatic_y.frame_a) annotation (points=[-29,0; 956 -1.2246 1e-015,0; -1.22461e-015,30], style(948 connect(prismatic_x.frame_b, prismatic_y.frame_a) annotation (points=[-29,0; 949 -1.22465e-015,0; -1.22465e-015,30], style( 957 950 color=10, 958 951 rgbcolor={95,95,95}, 959 952 thickness=2)); 960 953 connect(prismatic_y.frame_b, revolute.frame_a) annotation (points=[ 961 1.2246 1e-015,70; 0,80; 30,80; 30,0; 41,0], style(954 1.22465e-015,70; 0,80; 30,80; 30,0; 41,0], style( 962 955 color=10, 963 956 rgbcolor={95,95,95}, … … 1025 1018 D2R); 1026 1019 annotation ( 1027 preferedView="info",1028 1020 Coordsys( 1029 1021 extent=[-100, -100; 100, 100], … … 1356 1348 SI.Acceleration a_rel_a[3] "= der(v_rel_a)"; 1357 1349 annotation ( 1358 preferedView="info",1359 1350 Coordsys( 1360 1351 extent=[-100, -100; 100, 100], … … 1687 1678 "= false, if no constraint shall be defined, due to analytically solving a kinematic loop" 1688 1679 annotation (Dialog(tab="Advanced")); 1680 Real constraintResidue = rRod_0*rRod_0 - rodLength*rodLength 1681 "Constraint equation of joint in residue form: Either length constraint (= default) or equation to compute rod force (for analytic solution of loops in combination with Internal.RevoluteWithLengthConstraint/PrismaticWithLengthConstraint)" 1682 annotation (Dialog(tab="Advanced", enable=not kinematicConstraint)); 1689 1683 parameter Boolean checkTotalPower=false 1690 1684 "= true, if total power flowing into this component shall be determined (must be zero)" … … 1712 1706 1713 1707 annotation ( 1714 preferedView="info",1715 1708 Coordsys( 1716 1709 extent=[-100, -100; 100, 100], … … 1909 1902 eRod_a = rRod_a/rodLength; 1910 1903 1911 /* Constraint equation is removed, when taken into account somewhere else, 1912 e.g., when analytically solving a kinematic loop 1913 */ 1914 if kinematicConstraint then 1915 0 = rRod_0*rRod_0 - rodLength*rodLength; 1916 end if; 1904 // Constraint equation 1905 constraintResidue = 0; 1917 1906 1918 1907 // Cut-torques at frame_a and frame_b … … 2036 2025 "= false, if no constraint shall be defined, due to analytically solving a kinematic loop" 2037 2026 annotation (Dialog(tab="Advanced")); 2027 Real constraintResidue = rRod_0*rRod_0 - rodLength*rodLength 2028 "Constraint equation of joint in residue form: Either length constraint (= default) or equation to compute rod force (for analytic solution of loops in combination with Internal.RevoluteWithLengthConstraint/PrismaticWithLengthConstraint)" 2029 annotation (Dialog(tab="Advanced", enable=not kinematicConstraint)); 2038 2030 parameter Boolean checkTotalPower=false 2039 2031 "= true, if total power flowing into this component shall be determined (must be zero)" … … 2061 2053 "Position vector from origin of frame_a to origin of frame_b resolved in frame_a"; 2062 2054 annotation ( 2063 preferedView="info",2064 2055 Coordsys( 2065 2056 extent=[-100, -100; 100, 100], … … 2414 2405 2415 2406 // Constraint equation 2416 if kinematicConstraint then 2417 0 = rRod_0*rRod_0 - rodLength*rodLength; 2418 end if; 2407 constraintResidue = 0; 2419 2408 2420 2409 /* Determine relative Rotation R_rel_ia from frame_a to frame_ia … … 2629 2618 annotation (points=[10, 40; 50, 40; 50, 10], style(color=0)); 2630 2619 connect(actuatedRevolute_a.frame_a,fixedTranslation2. frame_b) annotation ( 2631 points=[-40,0; -35,0; -35,1.2246 1e-015; -30,1.22461e-015], style(2620 points=[-40,0; -35,0; -35,1.22465e-015; -30,1.22465e-015], style( 2632 2621 color=10, 2633 2622 rgbcolor={95,95,95}, 2634 2623 thickness=2)); 2635 2624 connect(fixedTranslation2.frame_a, bearing) annotation (points=[-10, 2636 -1.2246 1e-015; -4,-1.22461e-015; -4,0; 0,0; 0,-100], style(2625 -1.22465e-015; -4,-1.22465e-015; -4,0; 0,0; 0,-100], style( 2637 2626 color=10, 2638 2627 rgbcolor={95,95,95}, … … 2851 2840 "Total power flowing into this element, if checkTotalPower=true (otherwise dummy)"; 2852 2841 annotation ( 2853 preferedView="info",2854 2842 Coordsys( 2855 2843 extent=[-100, -100; 100, 100], … … 2935 2923 </p> 2936 2924 </html> "), 2937 Icon( coordinateSystem(extent=[-200,-200; 200,200]),2925 Icon( 2938 2926 Text( 2939 2927 extent=[-140,-50; 140,-75], … … 3473 3461 Dialog(tab="Animation", group="if animation = true and showUniversalAxes", 3474 3462 enable=animation and showUniversalAxes)); 3475 3476 3463 parameter Boolean checkTotalPower=false 3477 3464 "= true, if total power flowing into this component shall be determined (must be zero)" … … 3487 3474 SI.Position aux 3488 3475 "Denominator used to compute force in rod connecting universal and spherical joint"; 3476 SI.Force f_rod 3477 "Constraint force in direction of the rod (positive, if rod is pressed)"; 3478 3489 3479 annotation ( 3490 preferedView="info",3491 3480 Coordsys( 3492 3481 extent=[-100, -100; 100, 100], … … 3615 3604 </pre> 3616 3605 </html> "), 3617 Icon( coordinateSystem(extent=[-200,-200; 200,200]),3606 Icon( 3618 3607 Text( 3619 3608 extent=[-140,-41; 140,-66], … … 3727 3716 cylinderLength=revoluteLength, 3728 3717 cylinderColor=revoluteColor, 3729 specularCoefficient=specularCoefficient, 3730 axisTorqueBalance=false) annotation (extent=[75, -20; 35, 20]); 3718 specularCoefficient=specularCoefficient) annotation (extent=[75, -20; 35, 20]); 3731 3719 Modelica.Mechanics.MultiBody.Joints.UniversalSpherical rod1( 3732 3720 animation=animation, … … 3743 3731 cylinderColor=cylinderColor, 3744 3732 specularCoefficient=specularCoefficient, 3745 kinematicConstraint=false) annotation (extent=[-92, -20; -52, 20]); 3733 kinematicConstraint=false, 3734 constraintResidue=rod1.f_rod - f_rod) 3735 annotation (extent=[-92, -20; -52, 20]); 3746 3736 Modelica.Mechanics.MultiBody.Parts.FixedTranslation rod2( 3747 3737 animation=animation, … … 3751 3741 specularCoefficient=specularCoefficient, 3752 3742 r=rRod2_ib) annotation (extent=[15, -20; -25, 20]); 3753 Modelica.Mechanics.MultiBody.Sensors.RelativeSensor relativeSensor(animation=false) 3743 Modelica.Mechanics.MultiBody.Sensors.RelativeSensorNew relativeSensor( 3744 animation=false) 3754 3745 annotation (extent=[60, -70; 40, -90]); 3755 3746 Modelica.Blocks.Sources.Constant position_b[3](k=rRod2_ib) 3756 3747 annotation (extent=[-20, -50; 0, -30]); 3757 3748 equation 3758 defineRoot(frame_ib.R);3749 // defineRoot(frame_ib.R); 3759 3750 3760 3751 /* Compute the unknown force in the rod of the rod1 joint … … 3775 3766 + rod1.f_rod*e*cross(rRod2_ib, Frames.resolve2(rod1.R_rel, rod1.eRod_a)) 3776 3767 Solving this equation for f_rod results in 3777 rod1.f_rod = (-tau - e*(frame_ib.t + frame_im.t + cross(rRod2_ib, frame_im.f)3778 + cross(rRod2_ib, -rod1.f_b_a1)))3779 / (cross(e,rRod2_ib)*Frames.resolve2(rod1.R_rel, rod1.eRod_a)))3768 f_rod = (-tau - e*(frame_ib.t + frame_im.t + cross(rRod2_ib, frame_im.f) 3769 + cross(rRod2_ib, -rod1.f_b_a1))) 3770 / (cross(e,rRod2_ib)*Frames.resolve2(rod1.R_rel, rod1.eRod_a))) 3780 3771 Additionally, a guard against division by zero is introduced 3772 3773 f_rod is passed to component JointsUSR.rod1 via variable "constraintResidue" in the Advanced menu 3781 3774 */ 3782 3775 aux = cross(revolute.e, rRod2_ib)*Frames.resolveRelative(rod1.eRod_a, 3783 3776 rod1.frame_a.R, rod1.frame_b.R); 3784 rod1.f_rod = (-revolute.tau - revolute.e*(frame_ib.t + frame_im.t + cross(3777 f_rod = (-revolute.tau - revolute.e*(frame_ib.t + frame_im.t + cross( 3785 3778 rRod2_ib, frame_im.f) - cross(rRod2_ib, Frames.resolveRelative(rod1. 3786 3779 f_b_a1, rod1.frame_a.R, rod1.frame_b.R))))/noEvent(if abs(aux) < 1.e-10 then … … 3856 3849 fillColor=8, 3857 3850 rgbfillColor={192,192,192})); 3858 connect(relativeSensor.y, revolute.position_a) annotation (points=[3859 50, -69; 50, -40; 90, -40; 90, -12; 79, -12], style(3860 color=3,3861 gradient=3,3862 fillColor=8));3863 3851 connect(position_b.y, revolute.position_b) annotation (points=[1, -40; 3864 3852 20, -40; 20, -12; 31, -12], style( 3865 color=3, 3853 color=74, 3854 rgbcolor={0,0,127}, 3866 3855 gradient=3, 3867 fillColor=8)); 3856 fillColor=8, 3857 rgbfillColor={192,192,192})); 3868 3858 connect(rod2.frame_b, frame_im) annotation (points=[-25,0; -40,0; -40,80; 0, 3869 3859 80; 0,100], style( … … 3880 3870 connect(revolute.bearing, bearing) 3881 3871 annotation (points=[67,20; 67,40; 100,40], style(color=0)); 3872 connect(relativeSensor.r_rel, revolute.position_a) annotation (points=[58,-69; 3873 58,-50; 90,-50; 90,-12; 79,-12], style( 3874 color=74, 3875 rgbcolor={0,0,127}, 3876 smooth=0)); 3882 3877 end JointUSR; 3883 3878 … … 3979 3974 final parameter SI.Distance rod1Length=rod1.rodLength 3980 3975 "Length of rod 1 (= distance between universal and spherical joint"; 3976 SI.Force f_rod 3977 "Constraint force in direction of the rod (positive, if rod is pressed)"; 3981 3978 SI.Power totalPower 3982 3979 "Total power flowing into this element, if checkTotalPower=true (otherwise dummy)"; 3983 3980 annotation ( 3984 preferedView="info",3985 3981 Coordsys( 3986 3982 extent=[-100, -100; 100, 100], … … 4116 4112 </pre> 4117 4113 </html> "), 4118 Icon( coordinateSystem(extent=[-200,-200; 200,200]),4114 Icon( 4119 4115 Rectangle(extent=[50, 20; 80, -20], style(color=0, fillColor=8)), 4120 4116 Rectangle(extent=[80, 30; 100, -30], style(color=0, fillColor=8)), … … 4237 4233 boxHeight=boxHeight, 4238 4234 boxColor=boxColor, 4239 specularCoefficient=specularCoefficient ,4240 axisForceBalance=false)annotation (extent=[76, -20; 36, 20]);4235 specularCoefficient=specularCoefficient) 4236 annotation (extent=[76, -20; 36, 20]); 4241 4237 Modelica.Mechanics.MultiBody.Joints.UniversalSpherical rod1( 4242 4238 animation=animation, … … 4253 4249 cylinderDiameter=cylinderDiameter, 4254 4250 cylinderColor=cylinderColor, 4255 kinematicConstraint=false) annotation (extent=[-92, -20; -52, 20]); 4251 kinematicConstraint=false, 4252 constraintResidue=rod1.f_rod - f_rod) 4253 annotation (extent=[-92, -20; -52, 20]); 4256 4254 Modelica.Mechanics.MultiBody.Parts.FixedTranslation rod2( 4257 4255 animation=animation, … … 4261 4259 specularCoefficient=specularCoefficient, 4262 4260 color=rod2Color) annotation (extent=[0, 20; -40, -20]); 4263 Modelica.Mechanics.MultiBody.Sensors.RelativeSensor relativeSensor(animation=false)4261 Sensors.RelativeSensorNew relativeSensor( animation=false) 4264 4262 annotation (extent=[50, -70; 30, -90]); 4265 4263 Modelica.Blocks.Sources.Constant position_b[3](k=rRod2_ib) … … 4289 4287 Additionally, a guard against division by zero is introduced 4290 4288 */ 4291 defineRoot(frame_ib.R);4292 4289 aux = prismatic.e*Frames.resolveRelative(rod1.eRod_a, rod1.frame_a.R, 4293 4290 rod1.frame_b.R); 4294 rod1.f_rod = (-prismatic.f - prismatic.e*(frame_ib.f + frame_im.f -4291 f_rod = (-prismatic.f - prismatic.e*(frame_ib.f + frame_im.f - 4295 4292 Frames.resolveRelative(rod1.f_b_a1, rod1.frame_a.R, rod1.frame_b.R)))/ 4296 4293 noEvent(if abs(aux) < 1.e-10 then 1.e-10 else aux); … … 4375 4372 connect(position_b.y, prismatic.position_b) annotation (points=[1, 4376 4373 -50; 10, -50; 10, -12; 32, -12], style( 4377 color=3, 4378 fillColor=8, 4379 fillPattern=1)); 4380 connect(relativeSensor.y, prismatic.position_a) annotation (points= 4381 [40, -69; 40, -40; 90, -40; 90, -12; 80, -12], style( 4382 color=3, 4383 fillColor=8, 4374 color=74, 4375 rgbcolor={0,0,127}, 4376 fillColor=8, 4377 rgbfillColor={192,192,192}, 4384 4378 fillPattern=1)); 4385 4379 connect(prismatic.axis, axis) annotation (points=[40,14; 40,56; 90,56; 90,80; … … 4387 4381 connect(prismatic.bearing, bearing) 4388 4382 annotation (points=[64,14; 64,40; 100,40], style(color=58)); 4383 connect(relativeSensor.r_rel, prismatic.position_a) annotation (points=[ 4384 48,-69; 48,-50; 90,-50; 90,-12; 80,-12], style( 4385 color=74, 4386 rgbcolor={0,0,127}, 4387 smooth=0)); 4389 4388 end JointUSP; 4390 4389 … … 4463 4462 SI.Position aux 4464 4463 "Denominator used to compute force in rod connecting universal and spherical joint"; 4464 SI.Force f_rod 4465 "Constraint force in direction of the rod (positive, if rod is pressed)"; 4465 4466 SI.Power totalPower 4466 4467 "Total power flowing into this element, if checkTotalPower=true (otherwise dummy)"; 4467 4468 annotation ( 4468 preferedView="info",4469 4469 Coordsys( 4470 4470 extent=[-100, -100; 100, 100], … … 4517 4517 </p> 4518 4518 </html> "), 4519 Icon( coordinateSystem(extent=[-200,-200; 200,200]),4519 Icon( 4520 4520 Text( 4521 4521 extent=[-141,-41; 139,-66], … … 4601 4601 cylinderLength=revoluteLength, 4602 4602 cylinderColor=revoluteColor, 4603 specularCoefficient=specularCoefficient ,4604 axisTorqueBalance=false)annotation (extent=[75, -20; 35, 20]);4603 specularCoefficient=specularCoefficient) 4604 annotation (extent=[75, -20; 35, 20]); 4605 4605 Modelica.Mechanics.MultiBody.Joints.SphericalSpherical rod1( 4606 4606 animation=animation, … … 4613 4613 specularCoefficient=specularCoefficient, 4614 4614 kinematicConstraint=false, 4615 sphereColor=sphereColor) annotation (extent=[-89, -20; -49, 20]); 4615 sphereColor=sphereColor, 4616 constraintResidue=rod1.f_rod - f_rod) 4617 annotation (extent=[-89, -20; -49, 20]); 4616 4618 Modelica.Mechanics.MultiBody.Parts.FixedTranslation rod2( 4617 4619 animation=animation, … … 4621 4623 specularCoefficient=specularCoefficient, 4622 4624 r=rRod2_ib) annotation (extent=[15, -20; -25, 20]); 4623 Modelica.Mechanics.MultiBody.Sensors.RelativeSensor relativeSensor(animation=false)4625 Sensors.RelativeSensorNew relativeSensor( animation=false) 4624 4626 annotation (extent=[60, -70; 40, -90]); 4625 4627 Modelica.Blocks.Sources.Constant position_b[3](k=rRod2_ib) 4626 4628 annotation (extent=[-20, -50; 0, -30]); 4627 4629 equation 4628 defineRoot(frame_ib.R);4629 4630 /* Compute the unknown force in the rod of the rod1 joint 4630 4631 by a torque balance at the revolute joint: … … 4652 4653 aux = cross(revolute.e, rRod2_ib)*Frames.resolveRelative(rod1.eRod_a, 4653 4654 rod1.frame_a.R, rod1.frame_b.R); 4654 rod1.f_rod = (-revolute.tau - revolute.e*(frame_ib.t + frame_im.t + cross(4655 f_rod = (-revolute.tau - revolute.e*(frame_ib.t + frame_im.t + cross( 4655 4656 rRod2_ib, frame_im.f) - cross(rRod2_ib, Frames.resolveRelative(rod1. 4656 4657 f_b_a1, rod1.frame_a.R, rod1.frame_b.R))))/noEvent(if abs(aux) < 1.e-10 then … … 4725 4726 fillColor=8, 4726 4727 rgbfillColor={192,192,192})); 4727 connect(relativeSensor.y, revolute.position_a) annotation (points=[4728 50, -69; 50, -40; 90, -40; 90, -12; 79, -12], style(4729 color=3,4730 gradient=3,4731 fillColor=8));4732 4728 connect(position_b.y, revol
