Changeset 1051 for branches/maintenance/2.2.2
- Timestamp:
- 02/24/08 20:03:46 (8 months ago)
- Location:
- branches/maintenance/2.2.2/Modelica
- Files:
-
- 8 modified
-
Mechanics/MultiBody/Forces.mo (modified) (2 diffs)
-
Mechanics/MultiBody/Frames.mo (modified) (12 diffs)
-
Mechanics/MultiBody/Interfaces.mo (modified) (1 diff)
-
Mechanics/MultiBody/Joints.mo (modified) (20 diffs)
-
Mechanics/MultiBody/Types.mo (modified) (1 diff)
-
Mechanics/MultiBody/Visualizers.mo (modified) (4 diffs)
-
Mechanics/MultiBody/parts.mo (modified) (2 diffs)
-
package.mo (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/maintenance/2.2.2/Modelica/Mechanics/MultiBody/Forces.mo
r660 r1051 1565 1565 SI.Position r_rel_0[3] 1566 1566 "Position vector from frame_a to frame_b resolved in world frame"; 1567 Real e_rel_0[3] 1567 Real e_rel_0[3](each final unit="1") 1568 1568 "Unit vector in direction from frame_a to frame_b, resolved in world frame"; 1569 1569 annotation ( … … 1880 1880 SI.Position r_rel_0[3] 1881 1881 "Position vector from frame_a to frame_b resolved in world frame"; 1882 Real e_rel_0[3] 1882 Real e_rel_0[3](each final unit="1") 1883 1883 "Unit vector in direction from frame_a to frame_b, resolved in world frame"; 1884 1884 annotation ( -
branches/maintenance/2.2.2/Modelica/Mechanics/MultiBody/Frames.mo
r572 r1051 394 394 import Modelica.Math; 395 395 extends Modelica.Icons.Function; 396 input Real e[3] "Normalized axis of rotation (must have length=1)";396 input Real e[3](each final unit="1") "Normalized axis of rotation (must have length=1)"; 397 397 input Modelica.SIunits.Angle angle 398 398 "Rotation angle to rotate frame 1 into frame 2 along axis e"; … … 409 409 410 410 extends Modelica.Icons.Function; 411 input Real e[3] 411 input Real e[3](each final unit="1") 412 412 "Normalized axis of rotation to rotate frame 1 around e into frame 2 (must have length=1)"; 413 413 input Real v1[3] … … 547 547 "Rotation angles around the axes defined in 'sequence' such that R=Frames.axesRotation(sequence,angles); -pi < angles[i] <= pi"; 548 548 protected 549 Real e1_1[3] "First rotation axis, resolved in frame 1";550 Real e2_1a[3] "Second rotation axis, resolved in frame 1a";551 Real e3_1[3] "Third rotation axis, resolved in frame 1";552 Real e3_2[3] "Third rotation axis, resolved in frame 2";549 Real e1_1[3](each final unit="1") "First rotation axis, resolved in frame 1"; 550 Real e2_1a[3](each final unit="1") "Second rotation axis, resolved in frame 1a"; 551 Real e3_1[3](each final unit="1") "Third rotation axis, resolved in frame 1"; 552 Real e3_2[3](each final unit="1") "Third rotation axis, resolved in frame 2"; 553 553 Real A 554 554 "Coefficient A in the equation A*cos(angles[1])+B*sin(angles[1]) = 0"; … … 703 703 function from_nxy "Return fixed orientation object from n_x and n_y vectors" 704 704 extends Modelica.Icons.Function; 705 input Real n_x[3] 705 input Real n_x[3](each final unit="1") 706 706 "Vector in direction of x-axis of frame 2, resolved in frame 1"; 707 input Real n_y[3] 707 input Real n_y[3](each final unit="1") 708 708 "Vector in direction of y-axis of frame 2, resolved in frame 1"; 709 709 output Orientation R "Orientation object to rotate frame 1 into frame 2"; 710 710 protected 711 Real abs_n_x =sqrt(n_x*n_x);712 Real e_x[3] =if abs_n_x < 1.e-10 then {1,0,0} else n_x/abs_n_x;713 Real n_z_aux[3] =cross(e_x, n_y);714 Real n_y_aux[3] =if n_z_aux*n_z_aux > 1.0e-6 then n_y else (if abs(e_x[1])711 Real abs_n_x(final unit="1")=sqrt(n_x*n_x); 712 Real e_x[3](each final unit="1")=if abs_n_x < 1.e-10 then {1,0,0} else n_x/abs_n_x; 713 Real n_z_aux[3](each final unit="1")=cross(e_x, n_y); 714 Real n_y_aux[3](each final unit="1")=if n_z_aux*n_z_aux > 1.0e-6 then n_y else (if abs(e_x[1]) 715 715 > 1.0e-6 then {0,1,0} else {1,0,0}); 716 Real e_z_aux[3] =cross(e_x, n_y_aux);717 Real e_z[3] =e_z_aux/sqrt(e_z_aux*e_z_aux);716 Real e_z_aux[3](each final unit="1")=cross(e_x, n_y_aux); 717 Real e_z[3](each final unit="1")=e_z_aux/sqrt(e_z_aux*e_z_aux); 718 718 algorithm 719 719 R := Orientation(T={e_x,cross(e_z, e_x),e_z},w= zeros(3)); … … 743 743 function from_nxz "Return fixed orientation object from n_x and n_z vectors" 744 744 extends Modelica.Icons.Function; 745 input Real n_x[3] 745 input Real n_x[3](each final unit="1") 746 746 "Vector in direction of x-axis of frame 2, resolved in frame 1"; 747 input Real n_z[3] 747 input Real n_z[3] (each final unit="1") 748 748 "Vector in direction of z-axis of frame 2, resolved in frame 1"; 749 749 output Orientation R "Orientation object to rotate frame 1 into frame 2"; 750 750 protected 751 Real abs_n_x =sqrt(n_x*n_x);752 Real e_x[3] =if abs_n_x < 1.e-10 then {1,0,0} else n_x/abs_n_x;753 Real n_y_aux[3] =cross(n_z, e_x);754 Real n_z_aux[3] =if n_y_aux*n_y_aux > 1.0e-6 then n_z else (if abs(e_x[1])751 Real abs_n_x(final unit="1")=sqrt(n_x*n_x); 752 Real e_x[3](each final unit="1")=if abs_n_x < 1.e-10 then {1,0,0} else n_x/abs_n_x; 753 Real n_y_aux[3](each final unit="1")=cross(n_z, e_x); 754 Real n_z_aux[3](each final unit="1")=if n_y_aux*n_y_aux > 1.0e-6 then n_z else (if abs(e_x[1]) 755 755 > 1.0e-6 then {0,0,1} else {1,0,0}); 756 Real e_y_aux[3] =cross(n_z_aux, e_x);757 Real e_y[3] =e_y_aux/sqrt(e_y_aux*e_y_aux);756 Real e_y_aux[3](each final unit="1")=cross(n_z_aux, e_x); 757 Real e_y[3](each final unit="1")=e_y_aux/sqrt(e_y_aux*e_y_aux); 758 758 algorithm 759 759 R := Orientation(T={e_x,e_y,cross(e_x, e_y)},w= zeros(3)); … … 918 918 extends Modelica.Icons.Function; 919 919 input Integer axis(min=1, max=3) "Axis vector to be returned"; 920 output Real e[3] "Unit axis vector";920 output Real e[3](each final unit="1") "Unit axis vector"; 921 921 algorithm 922 922 e := if axis == 1 then {1,0,0} else (if axis == 2 then {0,1,0} else {0,0,1}); … … 1225 1225 import Modelica.Math; 1226 1226 extends Modelica.Icons.Function; 1227 input Real e[3] "Normalized axis of rotation (must have length=1)";1227 input Real e[3](each final unit="1") "Normalized axis of rotation (must have length=1)"; 1228 1228 input Modelica.SIunits.Angle angle 1229 1229 "Rotation angle to rotate frame 1 into frame 2 along axis e"; … … 1621 1621 import Modelica.Math; 1622 1622 extends Modelica.Icons.Function; 1623 input Real e[3] "Normalized axis of rotation (must have length=1)";1623 input Real e[3](each final unit="1") "Normalized axis of rotation (must have length=1)"; 1624 1624 input Modelica.SIunits.Angle angle 1625 1625 "Rotation angle to rotate frame 1 into frame 2 along axis e"; … … 1635 1635 1636 1636 extends Modelica.Icons.Function; 1637 input Real e[3] 1637 input Real e[3](each final unit="1") 1638 1638 "Normalized axis of rotation to rotate frame 1 around e into frame 2 (must have length=1)"; 1639 1639 input Real v1[3] … … 1762 1762 "Rotation angles around the axes defined in 'sequence' such that T=TransformationMatrices.axesRotation(sequence,angles); -pi < angles[i] <= pi"; 1763 1763 protected 1764 Real e1_1[3] "First rotation axis, resolved in frame 1";1765 Real e2_1a[3] "Second rotation axis, resolved in frame 1a";1766 Real e3_1[3] "Third rotation axis, resolved in frame 1";1767 Real e3_2[3] "Third rotation axis, resolved in frame 2";1764 Real e1_1[3](each final unit="1") "First rotation axis, resolved in frame 1"; 1765 Real e2_1a[3](each final unit="1") "Second rotation axis, resolved in frame 1a"; 1766 Real e3_1[3](each final unit="1") "Third rotation axis, resolved in frame 1"; 1767 Real e3_2[3](each final unit="1") "Third rotation axis, resolved in frame 2"; 1768 1768 Real A 1769 1769 "Coefficient A in the equation A*cos(angles[1])+B*sin(angles[1]) = 0"; … … 1919 1919 function from_nxy "Return orientation object from n_x and n_y vectors" 1920 1920 extends Modelica.Icons.Function; 1921 input Real n_x[3] 1921 input Real n_x[3](each final unit="1") 1922 1922 "Vector in direction of x-axis of frame 2, resolved in frame 1"; 1923 input Real n_y[3] 1923 input Real n_y[3](each final unit="1") 1924 1924 "Vector in direction of y-axis of frame 2, resolved in frame 1"; 1925 1925 output TransformationMatrices.Orientation T 1926 1926 "Orientation object to rotate frame 1 into frame 2"; 1927 1927 protected 1928 Real abs_n_x =sqrt(n_x*n_x);1929 Real e_x[3] =if abs_n_x < 1.e-10 then {1,0,0} else n_x/abs_n_x;1930 Real n_z_aux[3] =cross(e_x, n_y);1931 Real n_y_aux[3] =if n_z_aux*n_z_aux > 1.0e-6 then n_y else (if abs(e_x[1])1928 Real abs_n_x(final unit="1")=sqrt(n_x*n_x); 1929 Real e_x[3](each final unit="1")=if abs_n_x < 1.e-10 then {1,0,0} else n_x/abs_n_x; 1930 Real n_z_aux[3](each final unit="1")=cross(e_x, n_y); 1931 Real n_y_aux[3](each final unit="1")=if n_z_aux*n_z_aux > 1.0e-6 then n_y else (if abs(e_x[1]) 1932 1932 > 1.0e-6 then {0,1,0} else {1,0,0}); 1933 Real e_z_aux[3] =cross(e_x, n_y_aux);1934 Real e_z[3] =e_z_aux/sqrt(e_z_aux*e_z_aux);1933 Real e_z_aux[3](each final unit="1")=cross(e_x, n_y_aux); 1934 Real e_z[3](each final unit="1")=e_z_aux/sqrt(e_z_aux*e_z_aux); 1935 1935 algorithm 1936 1936 T := {e_x,cross(e_z, e_x),e_z}; … … 1960 1960 function from_nxz "Return orientation object from n_x and n_z vectors" 1961 1961 extends Modelica.Icons.Function; 1962 input Real n_x[3] 1962 input Real n_x[3](each final unit="1") 1963 1963 "Vector in direction of x-axis of frame 2, resolved in frame 1"; 1964 input Real n_z[3] 1964 input Real n_z[3](each final unit="1") 1965 1965 "Vector in direction of z-axis of frame 2, resolved in frame 1"; 1966 1966 output TransformationMatrices.Orientation T 1967 1967 "Orientation object to rotate frame 1 into frame 2"; 1968 1968 protected 1969 Real abs_n_x =sqrt(n_x*n_x);1970 Real e_x[3] =if abs_n_x < 1.e-10 then {1,0,0} else n_x/abs_n_x;1971 Real n_y_aux[3] =cross(n_z, e_x);1972 Real n_z_aux[3] =if n_y_aux*n_y_aux > 1.0e-6 then n_z else (if abs(e_x[1])1969 Real abs_n_x(final unit="1")=sqrt(n_x*n_x); 1970 Real e_x[3](each final unit="1")=if abs_n_x < 1.e-10 then {1,0,0} else n_x/abs_n_x; 1971 Real n_y_aux[3](each final unit="1")=cross(n_z, e_x); 1972 Real n_z_aux[3](each final unit="1")=if n_y_aux*n_y_aux > 1.0e-6 then n_z else (if abs(e_x[1]) 1973 1973 > 1.0e-6 then {0,0,1} else {1,0,0}); 1974 Real e_y_aux[3] =cross(n_z_aux, e_x);1975 Real e_y[3] =e_y_aux/sqrt(e_y_aux*e_y_aux);1974 Real e_y_aux[3](each final unit="1")=cross(n_z_aux, e_x); 1975 Real e_y[3](each final unit="1")=e_y_aux/sqrt(e_y_aux*e_y_aux); 1976 1976 algorithm 1977 1977 T := {e_x,e_y,cross(e_x, e_y)}; -
branches/maintenance/2.2.2/Modelica/Mechanics/MultiBody/Interfaces.mo
r555 r1051 624 624 SI.Position s 625 625 "(Guarded) distance between the origin of frame_a and the origin of frame_b (>= s_small))"; 626 Real e_a[3] 626 Real e_a[3](each final unit="1") 627 627 "Unit vector on the line connecting the origin of frame_a with the origin of frame_b resolved in frame_a (directed from frame_a to frame_b)"; 628 Realr_rel_a[3]628 Modelica.SIunits.Position r_rel_a[3] 629 629 "Position vector from origin of frame_a to origin of frame_b, resolved in frame_a"; 630 630 protected -
branches/maintenance/2.2.2/Modelica/Mechanics/MultiBody/Joints.mo
r572 r1051 914 914 protected 915 915 parameter Integer ndim=if world.enableAnimation and animation then 1 else 0; 916 parameter Real e[3] =Frames.normalize(n);916 parameter Real e[3](each final unit="1")=Frames.normalize(n); 917 917 protected 918 918 Visualizers.Advanced.Shape box_x[ndim]( … … 1697 1697 SI.Position rRod_a[3] 1698 1698 "Position vector from frame_a to frame_b resolved in frame_a"; 1699 Real eRod_a[3] 1699 Real eRod_a[3](each final unit="1") 1700 1700 "Unit vector in direction from frame_a to frame_b, resolved in frame_a"; 1701 1701 SI.Position r_CM_0[3] … … 2044 2044 Frames.length(rRod_ia) 2045 2045 "Length of rod (distance between origin of frame_a and origin of frame_b)"; 2046 final parameter Real eRod_ia[3] =Frames.normalize(rRod_ia)2046 final parameter Real eRod_ia[3](each final unit="1")=Frames.normalize(rRod_ia) 2047 2047 "Unit vector from origin of frame_a to origin of frame_b, resolved in frame_ia"; 2048 final parameter Real e2_ia[3] =Frames.normalize(cross(n1_a, eRod_ia))2048 final parameter Real e2_ia[3](each final unit="1")=Frames.normalize(cross(n1_a, eRod_ia)) 2049 2049 "Unit vector in direction of axis 2 of universal joint, resolved in frame_ia (orthogonal to n1_a and eRod_ia; note: frame_ia is parallel to frame_a when the universal joint angles are zero)"; 2050 final parameter Real e3_ia[3] =cross(eRod_ia, e2_ia)2050 final parameter Real e3_ia[3](each final unit="1")=cross(eRod_ia, e2_ia) 2051 2051 "Unit vector perpendicular to eRod_ia and e2_ia, resolved in frame_ia"; 2052 2052 SI.Power totalPower … … 2054 2054 SI.Force f_b_a1[3] 2055 2055 "frame_b.f without f_rod part, resolved in frame_a (needed for analytic loop handling)"; 2056 Real eRod_a[3] 2056 Real eRod_a[3](each final unit="1") 2057 2057 "Unit vector in direction of rRod_a, resolved in frame_a (needed for analytic loop handling)"; 2058 2058 SI.Position rRod_0[3](start=rRod_ia) … … 2327 2327 SI.Force f_ia_a[3] "frame_ia.f resolved in frame_a"; 2328 2328 SI.Torque t_ia_a[3] "frame_ia.t resolved in frame_a"; 2329 Real n2_a[3] 2329 Real n2_a[3](each final unit="1") 2330 2330 "Vector in direction of axis 2 of the universal joint (e2_ia), resolved in frame_a"; 2331 2331 Real length2_n2_a(start=1, unit="m2") "Square of length of vector n2_a"; 2332 2332 SI.Length length_n2_a "Length of vector n2_a"; 2333 Real e2_a[3] 2333 Real e2_a[3](each final unit="1") 2334 2334 "Unit vector in direction of axis 2 of the universal joint (e2_ia), resolved in frame_a"; 2335 Real e3_a[3] 2335 Real e3_a[3](each final unit="1") 2336 2336 "Unit vector perpendicular to eRod_ia and e2_a, resolved in frame_a"; 2337 Real der_rRod_a_L[3] "= der(rRod_a)/rodLength";2337 Real der_rRod_a_L[3](each final unit="1/s") "= der(rRod_a)/rodLength"; 2338 2338 SI.AngularVelocity w_rel_ia1[3]; 2339 2339 Frames.Orientation R_rel_ia1; … … 2838 2838 "= true, if total power flowing into this component shall be determined (must be zero)" 2839 2839 annotation (Dialog(tab="Advanced")); 2840 final parameter Real eAxis_ia[3] =Frames.normalize(nAxis_ia)2840 final parameter Real eAxis_ia[3](each final unit="1")=Frames.normalize(nAxis_ia) 2841 2841 "Unit vector from origin of frame_a to origin of frame_b, resolved in frame_ia"; 2842 final parameter Real e2_ia[3] =Frames.normalize(cross(n1_a, eAxis_ia))2842 final parameter Real e2_ia[3](each final unit="1")=Frames.normalize(cross(n1_a, eAxis_ia)) 2843 2843 "Unit vector in direction of second rotation axis of universal joint, resolved in frame_ia"; 2844 final parameter Real e3_ia[3] =cross(eAxis_ia, e2_ia)2844 final parameter Real e3_ia[3](each final unit="1")=cross(eAxis_ia, e2_ia) 2845 2845 "Unit vector perpendicular to eAxis_ia and e2_ia, resolved in frame_ia"; 2846 2846 SI.Position s … … 3167 3167 SI.Position rAxis_a[3] 3168 3168 "Position vector from origin of frame_a to origin of frame_b resolved in frame_a"; 3169 Real eAxis_a[3] 3169 Real eAxis_a[3](each final unit="1") 3170 3170 "Unit vector in direction of rAxis_a, resolved in frame_a"; 3171 Real e2_a[3] 3171 Real e2_a[3](each final unit="1") 3172 3172 "Unit vector in direction of second rotation axis of universal joint, resolved in frame_a"; 3173 Real e3_a[3] 3173 Real e3_a[3](each final unit="1") 3174 3174 "Unit vector perpendicular to eAxis_a and e2_a, resolved in frame_a"; 3175 Real n2_a[3] 3175 Real n2_a[3](each final unit="1") 3176 3176 "Vector in direction of second rotation axis of universal joint, resolved in frame_a"; 3177 3177 Real length2_n2_a(unit="m2") "Square of length of vector n2_a"; 3178 3178 SI.Length length_n2_a "Length of vector n2_a"; 3179 Real der_rAxis_a_L[3] "= der(rAxis_a)/axisLength";3179 Real der_rAxis_a_L[3](each final unit="1/s") "= der(rAxis_a)/axisLength"; 3180 3180 SI.AngularVelocity w_rel_ia1[3]; 3181 3181 Frames.Orientation R_ia1_a; … … 3477 3477 "= true, if total power flowing into this component shall be determined (must be zero)" 3478 3478 annotation (Dialog(tab="Advanced")); 3479 final parameter Real eRod1_ia[3] =rod1.eRod_ia3479 final parameter Real eRod1_ia[3](each final unit="1")=rod1.eRod_ia 3480 3480 "Unit vector from origin of frame_a to origin of spherical joint, resolved in frame_ia"; 3481 final parameter Real e2_ia[3] =rod1.e2_ia3481 final parameter Real e2_ia[3](each final unit="1")=rod1.e2_ia 3482 3482 "Unit vector in direction of axis 2 of universal joint, resolved in frame_ia"; 3483 3483 final parameter SI.Distance rod1Length=rod1.rodLength … … 3973 3973 "= true, if total power flowing into this component shall be determined (must be zero)" 3974 3974 annotation (Dialog(tab="Advanced")); 3975 final parameter Real eRod1_ia[3] =rod1.eRod_ia3975 final parameter Real eRod1_ia[3](each final unit="1")=rod1.eRod_ia 3976 3976 "Unit vector from origin of frame_a to origin of spherical joint, resolved in frame_ia"; 3977 final parameter Real e2_ia[3] =rod1.e2_ia3977 final parameter Real e2_ia[3](each final unit="1")=rod1.e2_ia 3978 3978 "Unit vector in direction of axis 2 of universal joint, resolved in frame_ia"; 3979 3979 final parameter SI.Distance rod1Length=rod1.rodLength … … 5126 5126 "Axes of revolute joints resolved in frame_a (all axes are parallel to each other)" 5127 5127 annotation (Evaluate=true); 5128 final parameter Real n_b[3]( fixed=false) = {0,0,1}5128 final parameter Real n_b[3](each final unit="1", fixed=false) = {0,0,1} 5129 5129 "Axis of revolute joint fixed and resolved in frame_b" 5130 5130 annotation (Evaluate=true); … … 5160 5160 "= true, if total power flowing into this component shall be determined (must be zero)" 5161 5161 annotation (Dialog(tab="Advanced")); 5162 final parameter Real e_a[3] =Frames.normalize(n_a)5162 final parameter Real e_a[3](each final unit="1")=Frames.normalize(n_a) 5163 5163 "Unit vector along axes of rotations, resolved in frame_a"; 5164 final parameter Real e_ia[3] =jointUSR.e2_ia5164 final parameter Real e_ia[3](each final unit="1")=jointUSR.e2_ia 5165 5165 "Unit vector along axes of rotations, resolved in frame_ia"; 5166 final parameter Real e_b[3] =jointUSR.revolute.e5166 final parameter Real e_b[3](each final unit="1")=jointUSR.revolute.e 5167 5167 "Unit vector along axes of rotations, resolved in frame_b, frame_ib and frame_im"; 5168 5168 SI.Power totalPower=jointUSR.totalPower … … 5470 5470 "= true, if total power flowing into this component shall be determined (must be zero)" 5471 5471 annotation (Dialog(tab="Advanced")); 5472 final parameter Real e_a[3] =Frames.normalize(n_a)5472 final parameter Real e_a[3](each final unit="1")=Frames.normalize(n_a) 5473 5473 "Unit vector along axes of rotations, resolved in frame_a"; 5474 final parameter Real e_ia[3] =jointUSP.e2_ia5474 final parameter Real e_ia[3](each final unit="1")=jointUSP.e2_ia 5475 5475 "Unit vector along axes of rotations, resolved in frame_ia"; 5476 final parameter Real e_im[3](each fi xed=false)5476 final parameter Real e_im[3](each final unit="1",each fixed=false) 5477 5477 "Unit vector along axes of rotations, resolved in frame_im"; 5478 final parameter Real e_b[3] =jointUSP.prismatic.e5478 final parameter Real e_b[3](each final unit="1")=jointUSP.prismatic.e 5479 5479 "Unit vector along axes of translation of the prismatic joint, resolved in frame_b and frame_ib"; 5480 5480 SI.Power totalPower=jointUSP.totalPower … … 5847 5847 protected 5848 5848 outer Modelica.Mechanics.MultiBody.World world; 5849 parameter Real e[3] =Frames.normalize(n)5849 parameter Real e[3](each final unit="1")=Frames.normalize(n) 5850 5850 "Unit vector in direction of rotation axis, resolved in frame_a (= same as in frame_b)"; 5851 parameter Real nnx_a[3] =if abs(e[1]) > 0.1 then {0,1,0} else (if abs(e[2])5851 parameter Real nnx_a[3](each final unit="1")=if abs(e[1]) > 0.1 then {0,1,0} else (if abs(e[2]) 5852 5852 > 0.1 then {0,0,1} else {1,0,0}) 5853 5853 "Arbitrary vector that is not aligned with rotation axis n" 5854 5854 annotation (Evaluate=true); 5855 parameter Real ey_a[3] =Frames.normalize(cross(e, nnx_a))5855 parameter Real ey_a[3](each final unit="1")=Frames.normalize(cross(e, nnx_a)) 5856 5856 "Unit vector orthogonal to axis n of revolute joint, resolved in frame_a" 5857 5857 annotation (Evaluate=true); 5858 parameter Real ex_a[3] =cross(ey_a, e)5858 parameter Real ex_a[3](each final unit="1")=cross(ey_a, e) 5859 5859 "Unit vector orthogonal to axis n of revolute joint and to ey_a, resolved in frame_a" 5860 5860 annotation (Evaluate=true); 5861 Real ey_b[3] "ey_a, resolved in frame_b";5862 Real ex_b[3] "ex_a, resolved in frame_b";5861 Real ey_b[3](each final unit="1") "ey_a, resolved in frame_b"; 5862 Real ex_b[3](each final unit="1") "ex_a, resolved in frame_b"; 5863 5863 Frames.Orientation R_rel 5864 5864 "Dummy or relative orientation object from frame_a to frame_b"; 5865 5865 Frames.Orientation R_rel_inv 5866 5866 "Dummy or relative orientation object from frame_b to frame_a"; 5867 Realr_rel_a[3]5867 Modelica.SIunits.Position r_rel_a[3] 5868 5868 "Position vector from origin of frame_a to origin of frame_b, resolved in frame_a"; 5869 5869 SI.Force f_c[2] "Dummy or constraint forces in direction of ex_a, ey_a"; … … 6028 6028 "= true, if generalized variables (s,v) shall be used as states (StateSelect.always)" 6029 6029 annotation (Dialog(tab="Advanced")); 6030 final parameter Real e[3] =Frames.normalize(n)6030 final parameter Real e[3](each final unit="1")=Frames.normalize(n) 6031 6031 "Unit vector in direction of prismatic axis n"; 6032 6032 … … 6231 6231 final parameter Boolean positiveBranch(fixed=false) 6232 6232 "Based on phi_guess, selection of one of the two solutions of the non-linear constraint equation"; 6233 final parameter Real e[3] =Modelica.Mechanics.MultiBody.Frames.normalize(n)6233 final parameter Real e[3](each final unit="1")=Modelica.Mechanics.MultiBody.Frames.normalize(n) 6234 6234 "Unit vector in direction of rotation axis, resolved in frame_a"; 6235 6235 … … 6376 6376 import Modelica.Math.*; 6377 6377 input SI.Length L "Length of length constraint"; 6378 input Real e[3] 6378 input Real e[3](each final unit="1") 6379 6379 "Unit vector along axis of rotation, resolved in frame_a (= same in frame_b)"; 6380 6380 input SI.Angle angle_guess … … 6576 6576 final parameter Boolean positiveBranch(fixed=false) 6577 6577 "Selection of one of the two solutions of the non-linear constraint equation"; 6578 final parameter Real e[3] =Modelica.Mechanics.MultiBody.Frames.normalize(n)6578 final parameter Real e[3](each final unit="1")=Modelica.Mechanics.MultiBody.Frames.normalize(n) 6579 6579 "Unit vector in direction of translation axis, resolved in frame_a"; 6580 6580 SI.Position s … … 6701 6701 SI.Position r_b[3]=position_b 6702 6702 "Position vector from frame_b to frame_b side of length constraint, resolved in frame_b of revolute joint"; 6703 Realrbra[3] "= rb - ra";6703 Modelica.SIunits.Position rbra[3] "= rb - ra"; 6704 6704 Real B "Coefficient B of equation: s*s + B*s + C = 0"; 6705 6705 Real C "Coefficient C of equation: s*s + B*s + C = 0"; … … 6725 6725 import Modelica.Math.*; 6726 6726 input SI.Length L "Length of length constraint"; 6727 input Real e[3] 6727 input Real e[3](each final unit="1") 6728 6728 "Unit vector along axis of translation, resolved in frame_a (= same in frame_b)"; 6729 6729 input SI.Position d_guess … … 6735 6735 output Boolean positiveBranch "Branch of the initial solution"; 6736 6736 protected 6737 Realrbra[3] "= rb - ra";6737 Modelica.SIunits.Position rbra[3] "= rb - ra"; 6738 6738 Real B "Coefficient B of equation: d*d + B*d + C = 0"; 6739 6739 Real C "Coefficient C of equation: d*d + B*d + C = 0"; -
branches/maintenance/2.2.2/Modelica/Mechanics/MultiBody/Types.mo
r1049 r1051 11 11 </HTML>")); 12 12 13 type Axis = Modelica.Icons.TypeReal[3](each unit="1")13 type Axis = Modelica.Icons.TypeReal[3](each final unit="1") 14 14 "Axis vector with choices for menus" annotation ( 15 15 preferedView="text", -
branches/maintenance/2.2.2/Modelica/Mechanics/MultiBody/Visualizers.mo
r660 r1051 1003 1003 "Position vector from origin of object frame to shape origin, resolved in object frame" 1004 1004 annotation(Dialog); 1005 input Real lengthDirection[3] ={1,0,0}1005 input Real lengthDirection[3](each final unit="1")={1,0,0} 1006 1006 "Vector in length direction, resolved in object frame" annotation(Dialog); 1007 input Real widthDirection[3] ={0,1,0}1007 input Real widthDirection[3](each final unit="1")={0,1,0} 1008 1008 "Vector in width direction, resolved in object frame" annotation(Dialog); 1009 1009 input SI.Length length=0 "Length of visual object" annotation(Dialog); … … 1012 1012 input Types.ShapeExtra extra=0.0 1013 1013 "Additional size data for some of the shape types" annotation(Dialog); 1014 input Realcolor[3]={255,0,0} "Color of shape" annotation(Dialog);1014 input Integer color[3]={255,0,0} "Color of shape" annotation(Dialog); 1015 1015 input Types.SpecularCoefficient specularCoefficient = 0.7 1016 1016 "Reflection of ambient light (= 0: light is completely absorbed)" annotation(Dialog); 1017 1017 // Real rxry[3, 2]; 1018 1018 protected 1019 Real abs_n_x =Frames.length(lengthDirection) annotation (Hide=true);1020 Real e_x[3] =noEvent(if abs_n_x < 1.e-10 then {1,0,0} else lengthDirection1019 Real abs_n_x(final unit="1")=Frames.length(lengthDirection) annotation (Hide=true); 1020 Real e_x[3](each final unit="1")=noEvent(if abs_n_x < 1.e-10 then {1,0,0} else lengthDirection 1021 1021 /abs_n_x) annotation (Hide=true); 1022 Real n_z_aux[3] =cross(e_x, widthDirection) annotation (Hide=true);1023 Real e_y[3] =noEvent(cross(Frames.normalize(cross(e_x, if n_z_aux*n_z_aux1022 Real n_z_aux[3](each final unit="1")=cross(e_x, widthDirection) annotation (Hide=true); 1023 Real e_y[3](each final unit="1")=noEvent(cross(Frames.normalize(cross(e_x, if n_z_aux*n_z_aux 1024 1024 > 1.0e-6 then widthDirection else (if abs(e_x[1]) > 1.0e-6 then {0,1, 1025 1025 0} else {1,0,0}))), e_x)) annotation (Hide=true); 1026 1026 output Real Form annotation (Hide=false); 1027 1027 public 1028 output Real rxvisobj[3] 1028 output Real rxvisobj[3](each final unit="1") 1029 1029 "x-axis unit vector of shape, resolved in world frame" 1030 1030 annotation (Hide=false); 1031 output Real ryvisobj[3] 1031 output Real ryvisobj[3](each final unit="1") 1032 1032 "y-axis unit vector of shape, resolved in world frame" 1033 1033 annotation (Hide=false);
