Changeset 1050 for trunk

Show
Ignore:
Timestamp:
02/24/08 19:43:25 (6 months ago)
Author:
otter
Message:

Unit errors in MultiBody corrected (unit="1" added for unit vectors, many missing units added, e.g. for RealInput)

Location:
trunk/Modelica/Mechanics/MultiBody
Files:
8 modified

Legend:

Unmodified
Added
Removed
  • trunk/Modelica/Mechanics/MultiBody/Forces.mo

    r1046 r1050  
    14111411    SI.Position r_rel_0[3] 
    14121412      "Position vector from frame_a to frame_b resolved in world frame"; 
    1413     Real e_rel_0[3] 
     1413    Real e_rel_0[3](each final unit="1") 
    14141414      "Unit vector in direction from frame_a to frame_b, resolved in world frame"; 
    14151415    annotation ( 
     
    17681768    SI.Position r_rel_0[3] 
    17691769      "Position vector from frame_a to frame_b resolved in world frame"; 
    1770     Real e_rel_0[3] 
     1770    Real e_rel_0[3](each final unit="1") 
    17711771      "Unit vector in direction from frame_a to frame_b, resolved in world frame"; 
    17721772    annotation ( 
     
    26482648            extent={{-16,-16},{16,16}}, 
    26492649            rotation=90))); 
    2650       Modelica.Blocks.Interfaces.RealInput force[3] 
     2650      Modelica.Blocks.Interfaces.RealInput force[3](each final quantity="Force", each 
     2651        final unit = "N") 
    26512652        "x-, y-, z-coordinates of force resolved in frame defined by resolveInFrame" 
    26522653        annotation (Placement(transformation( 
     
    27832784            rotation=90))); 
    27842785 
    2785       Modelica.Blocks.Interfaces.RealInput torque[3] 
     2786      Modelica.Blocks.Interfaces.RealInput torque[3](each final quantity="Torque", each 
     2787        final unit = "N.m") 
    27862788        "x-, y-, z-coordiantes of torque resolved in frame defined by resolveInFrame" 
    27872789        annotation (Placement(transformation( 
     
    29212923            rotation=270))); 
    29222924 
    2923       Modelica.Blocks.Interfaces.RealInput force[3] 
     2925      Modelica.Blocks.Interfaces.RealInput force[3](each final quantity="Force", each 
     2926        final unit = "N") 
    29242927        "x-, y-, z-coordinates of force resolved in frame defined by resolveInFrame" 
    29252928        annotation (Placement(transformation(extent={{-140,-20},{-100,20}}, 
     
    30283031            rotation=270))); 
    30293032 
    3030       Modelica.Blocks.Interfaces.RealInput torque[3] 
     3033      Modelica.Blocks.Interfaces.RealInput torque[3](each final quantity="Torque", each 
     3034        final unit = "N.m") 
    30313035        "x-, y-, z-coordinates of torque resolved in frame defined by resolveInFrame" 
    30323036        annotation (Placement(transformation(extent={{-140,-20},{-100,20}}, 
  • trunk/Modelica/Mechanics/MultiBody/Frames.mo

    r937 r1050  
    404404    import Modelica.Math; 
    405405    extends Modelica.Icons.Function; 
    406     input Real e[3] "Normalized axis of rotation (must have length=1)"; 
     406    input Real e[3](each final unit="1") "Normalized axis of rotation (must have length=1)"; 
    407407    input Modelica.SIunits.Angle angle 
    408408      "Rotation angle to rotate frame 1 into frame 2 along axis e"; 
     
    420420 
    421421    extends Modelica.Icons.Function; 
    422     input Real e[3] 
     422    input Real e[3](each final unit="1") 
    423423      "Normalized axis of rotation to rotate frame 1 around e into frame 2 (must have length=1)"; 
    424424    input Real v1[3] 
     
    606606</HTML>")); 
    607607  protected 
    608     Real e1_1[3] "First rotation axis, resolved in frame 1"; 
    609     Real e2_1a[3] "Second rotation axis, resolved in frame 1a"; 
    610     Real e3_1[3] "Third rotation axis, resolved in frame 1"; 
    611     Real e3_2[3] "Third rotation axis, resolved in frame 2"; 
     608    Real e1_1[3](each final unit="1") "First rotation axis, resolved in frame 1"; 
     609    Real e2_1a[3](each final unit="1") "Second rotation axis, resolved in frame 1a"; 
     610    Real e3_1[3](each final unit="1") "Third rotation axis, resolved in frame 1"; 
     611    Real e3_2[3](each final unit="1") "Third rotation axis, resolved in frame 2"; 
    612612    Real A 
    613613      "Coefficient A in the equation A*cos(angles[1])+B*sin(angles[1]) = 0"; 
     
    718718  function from_nxy "Return fixed orientation object from n_x and n_y vectors" 
    719719    extends Modelica.Icons.Function; 
    720     input Real n_x[3] 
     720    input Real n_x[3](each final unit="1") 
    721721      "Vector in direction of x-axis of frame 2, resolved in frame 1"; 
    722     input Real n_y[3] 
     722    input Real n_y[3](each final unit="1") 
    723723      "Vector in direction of y-axis of frame 2, resolved in frame 1"; 
    724724    output Orientation R "Orientation object to rotate frame 1 into frame 2"; 
     
    746746  protected 
    747747    Real abs_n_x=sqrt(n_x*n_x); 
    748     Real e_x[3]=if abs_n_x < 1.e-10 then {1,0,0} else n_x/abs_n_x; 
    749     Real n_z_aux[3]=cross(e_x, n_y); 
    750     Real n_y_aux[3]=if n_z_aux*n_z_aux > 1.0e-6 then n_y else (if abs(e_x[1]) 
     748    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; 
     749    Real n_z_aux[3](each final unit="1")=cross(e_x, n_y); 
     750    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]) 
    751751         > 1.0e-6 then {0,1,0} else {1,0,0}); 
    752     Real e_z_aux[3]=cross(e_x, n_y_aux); 
    753     Real e_z[3]=e_z_aux/sqrt(e_z_aux*e_z_aux); 
     752    Real e_z_aux[3](each final unit="1")=cross(e_x, n_y_aux); 
     753    Real e_z[3](each final unit="1")=e_z_aux/sqrt(e_z_aux*e_z_aux); 
    754754  algorithm 
    755755    R := Orientation(T={e_x,cross(e_z, e_x),e_z},w= zeros(3)); 
     
    758758  function from_nxz "Return fixed orientation object from n_x and n_z vectors" 
    759759    extends Modelica.Icons.Function; 
    760     input Real n_x[3] 
     760    input Real n_x[3](each final unit="1") 
    761761      "Vector in direction of x-axis of frame 2, resolved in frame 1"; 
    762     input Real n_z[3] 
     762    input Real n_z[3](each final unit="1") 
    763763      "Vector in direction of z-axis of frame 2, resolved in frame 1"; 
    764764    output Orientation R "Orientation object to rotate frame 1 into frame 2"; 
     
    786786  protected 
    787787    Real abs_n_x=sqrt(n_x*n_x); 
    788     Real e_x[3]=if abs_n_x < 1.e-10 then {1,0,0} else n_x/abs_n_x; 
    789     Real n_y_aux[3]=cross(n_z, e_x); 
    790     Real n_z_aux[3]=if n_y_aux*n_y_aux > 1.0e-6 then n_z else (if abs(e_x[1]) 
     788    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; 
     789    Real n_y_aux[3](each final unit="1")=cross(n_z, e_x); 
     790    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]) 
    791791         > 1.0e-6 then {0,0,1} else {1,0,0}); 
    792     Real e_y_aux[3]=cross(n_z_aux, e_x); 
    793     Real e_y[3]=e_y_aux/sqrt(e_y_aux*e_y_aux); 
     792    Real e_y_aux[3](each final unit="1")=cross(n_z_aux, e_x); 
     793    Real e_y[3](each final unit="1")=e_y_aux/sqrt(e_y_aux*e_y_aux); 
    794794  algorithm 
    795795    R := Orientation(T={e_x,e_y,cross(e_x, e_y)},w= zeros(3)); 
     
    925925    extends Modelica.Icons.Function; 
    926926    input Integer axis(min=1, max=3) "Axis vector to be returned"; 
    927     output Real e[3] "Unit axis vector"; 
     927    output Real e[3](each final unit="1") "Unit axis vector"; 
    928928    annotation(Inline=true); 
    929929  algorithm 
     
    12451245      import Modelica.Math; 
    12461246      extends Modelica.Icons.Function; 
    1247       input Real e[3] "Normalized axis of rotation (must have length=1)"; 
     1247      input Real e[3](each final unit="1") "Normalized axis of rotation (must have length=1)"; 
    12481248      input Modelica.SIunits.Angle angle 
    12491249        "Rotation angle to rotate frame 1 into frame 2 along axis e"; 
     
    16601660      import Modelica.Math; 
    16611661      extends Modelica.Icons.Function; 
    1662       input Real e[3] "Normalized axis of rotation (must have length=1)"; 
     1662      input Real e[3](each final unit="1") "Normalized axis of rotation (must have length=1)"; 
    16631663      input Modelica.SIunits.Angle angle 
    16641664        "Rotation angle to rotate frame 1 into frame 2 along axis e"; 
     
    16751675 
    16761676      extends Modelica.Icons.Function; 
    1677       input Real e[3] 
     1677      input Real e[3](each final unit="1") 
    16781678        "Normalized axis of rotation to rotate frame 1 around e into frame 2 (must have length=1)"; 
    16791679      input Real v1[3] 
     
    18501850</HTML>")); 
    18511851    protected 
    1852       Real e1_1[3] "First rotation axis, resolved in frame 1"; 
    1853       Real e2_1a[3] "Second rotation axis, resolved in frame 1a"; 
    1854       Real e3_1[3] "Third rotation axis, resolved in frame 1"; 
    1855       Real e3_2[3] "Third rotation axis, resolved in frame 2"; 
     1852      Real e1_1[3](each final unit="1") "First rotation axis, resolved in frame 1"; 
     1853      Real e2_1a[3](each final unit="1") "Second rotation axis, resolved in frame 1a"; 
     1854      Real e3_1[3](each final unit="1") "Third rotation axis, resolved in frame 1"; 
     1855      Real e3_2[3](each final unit="1") "Third rotation axis, resolved in frame 2"; 
    18561856      Real A 
    18571857        "Coefficient A in the equation A*cos(angles[1])+B*sin(angles[1]) = 0"; 
     
    19631963    function from_nxy "Return orientation object from n_x and n_y vectors" 
    19641964      extends Modelica.Icons.Function; 
    1965       input Real n_x[3] 
     1965      input Real n_x[3](each final unit="1") 
    19661966        "Vector in direction of x-axis of frame 2, resolved in frame 1"; 
    1967       input Real n_y[3] 
     1967      input Real n_y[3](each final unit="1") 
    19681968        "Vector in direction of y-axis of frame 2, resolved in frame 1"; 
    19691969      output TransformationMatrices.Orientation T 
     
    19921992    protected 
    19931993      Real abs_n_x=sqrt(n_x*n_x); 
    1994       Real e_x[3]=if abs_n_x < 1.e-10 then {1,0,0} else n_x/abs_n_x; 
    1995       Real n_z_aux[3]=cross(e_x, n_y); 
    1996       Real n_y_aux[3]=if n_z_aux*n_z_aux > 1.0e-6 then n_y else (if abs(e_x[1]) 
     1994      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; 
     1995      Real n_z_aux[3](each final unit="1")=cross(e_x, n_y); 
     1996      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]) 
    19971997           > 1.0e-6 then {0,1,0} else {1,0,0}); 
    1998       Real e_z_aux[3]=cross(e_x, n_y_aux); 
    1999       Real e_z[3]=e_z_aux/sqrt(e_z_aux*e_z_aux); 
     1998      Real e_z_aux[3](each final unit="1")=cross(e_x, n_y_aux); 
     1999      Real e_z[3](each final unit="1")=e_z_aux/sqrt(e_z_aux*e_z_aux); 
    20002000    algorithm 
    20012001      T := {e_x,cross(e_z, e_x),e_z}; 
     
    20042004    function from_nxz "Return orientation object from n_x and n_z vectors" 
    20052005      extends Modelica.Icons.Function; 
    2006       input Real n_x[3] 
     2006      input Real n_x[3](each final unit="1") 
    20072007        "Vector in direction of x-axis of frame 2, resolved in frame 1"; 
    2008       input Real n_z[3] 
     2008      input Real n_z[3](each final unit="1") 
    20092009        "Vector in direction of z-axis of frame 2, resolved in frame 1"; 
    20102010      output TransformationMatrices.Orientation T 
     
    20332033    protected 
    20342034      Real abs_n_x=sqrt(n_x*n_x); 
    2035       Real e_x[3]=if abs_n_x < 1.e-10 then {1,0,0} else n_x/abs_n_x; 
    2036       Real n_y_aux[3]=cross(n_z, e_x); 
    2037       Real n_z_aux[3]=if n_y_aux*n_y_aux > 1.0e-6 then n_z else (if abs(e_x[1]) 
     2035      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; 
     2036      Real n_y_aux[3](each final unit="1")=cross(n_z, e_x); 
     2037      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]) 
    20382038           > 1.0e-6 then {0,0,1} else {1,0,0}); 
    2039       Real e_y_aux[3]=cross(n_z_aux, e_x); 
    2040       Real e_y[3]=e_y_aux/sqrt(e_y_aux*e_y_aux); 
     2039      Real e_y_aux[3](each final unit="1")=cross(n_z_aux, e_x); 
     2040      Real e_y[3](each final unit="1")=e_y_aux/sqrt(e_y_aux*e_y_aux); 
    20412041    algorithm 
    20422042      T := {e_x,e_y,cross(e_x, e_y)}; 
  • trunk/Modelica/Mechanics/MultiBody/Interfaces.mo

    r1046 r1050  
    606606    SI.Position s 
    607607      "(Guarded) distance between the origin of frame_a and the origin of frame_b (>= s_small))"; 
    608     Real e_a[3] 
     608    Real e_a[3](each final unit="1") 
    609609      "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)"; 
    610     Real r_rel_a[3] 
     610    Modelica.SIunits.Position r_rel_a[3] 
    611611      "Position vector from origin of frame_a to origin of frame_b, resolved in frame_a"; 
    612612  protected 
  • trunk/Modelica/Mechanics/MultiBody/Joints.mo

    r1046 r1050  
    116116    parameter StateSelect stateSelect=StateSelect.prefer 
    117117      "Priority to use distance s and v=der(s) as states" annotation(Dialog(tab="Advanced")); 
    118     final parameter Real e[3]=Modelica.Math.Vectors.normalize( 
     118    final parameter Real e[3](each final unit="1")=Modelica.Math.Vectors.normalize( 
    119119                                               n) 
    120120      "Unit vector in direction of prismatic axis n"; 
     
    133133 
    134134    annotation ( 
    135        
    136135      Icon(coordinateSystem( 
    137136          preserveAspectRatio=true, 
     
    351350    SI.Angle angle "= phi_offset + phi"; 
    352351    annotation ( 
    353        
    354352      Icon(coordinateSystem( 
    355353          preserveAspectRatio=true, 
     
    506504</html> 
    507505")); 
     506 
    508507  protected 
    509508    outer Modelica.Mechanics.MultiBody.World world; 
    510     parameter Real e[3]=Modelica.Math.Vectors.normalize( 
     509    parameter Real e[3](each final unit="1")=Modelica.Math.Vectors.normalize( 
    511510                                         n) 
    512511      "Unit vector in direction of rotation axis, resolved in frame_a (= same as in frame_b)"; 
     
    614613      "Reflection of ambient light (= 0: light is completely absorbed)"  
    615614      annotation (Dialog(group="if animation = true", enable=animation)); 
    616     annotation (defaultComponentName="revolute" 
    617       , 
     615    annotation (defaultComponentName="revolute", 
    618616      Icon(coordinateSystem( 
    619617          preserveAspectRatio=true, 
     
    706704  protected 
    707705    outer Modelica.Mechanics.MultiBody.World world; 
    708     parameter Real e[3]=Modelica.Math.Vectors.normalize( 
     706    parameter Real e[3](each final unit="1")=Modelica.Math.Vectors.normalize( 
    709707                                         n) 
    710708      "Unit vector in direction of rotation axis, resolved in frame_a (= same as in frame_b)"; 
    711     parameter Real nnx_a[3]=if abs(e[1]) > 0.1 then {0,1,0} else (if abs(e[2]) 
     709    parameter Real nnx_a[3](each final unit="1")=if abs(e[1]) > 0.1 then {0,1,0} else (if abs(e[2]) 
    712710         > 0.1 then {0,0,1} else {1,0,0}) 
    713711      "Arbitrary vector that is not aligned with rotation axis n"  
    714712      annotation (Evaluate=true); 
    715     parameter Real ey_a[3]=Modelica.Math.Vectors.normalize( 
     713    parameter Real ey_a[3](each final unit="1")=Modelica.Math.Vectors.normalize( 
    716714                                            cross(e, nnx_a)) 
    717715      "Unit vector orthogonal to axis n of revolute joint, resolved in frame_a" 
    718716      annotation (Evaluate=true); 
    719     parameter Real ex_a[3]=cross(ey_a, e) 
     717    parameter Real ex_a[3](each final unit="1")=cross(ey_a, e) 
    720718      "Unit vector orthogonal to axis n of revolute joint and to ey_a, resolved in frame_a" 
    721719      annotation (Evaluate=true); 
    722     Real ey_b[3] "ey_a, resolved in frame_b"; 
    723     Real ex_b[3] "ex_a, resolved in frame_b"; 
     720    Real ey_b[3](each final unit="1") "ey_a, resolved in frame_b"; 
     721    Real ex_b[3](each final unit="1") "ex_a, resolved in frame_b"; 
    724722    Frames.Orientation R_rel 
    725723      "Dummy or relative orientation object from frame_a to frame_b"; 
    726     Real r_rel_a[3] 
     724    Modelica.SIunits.Position r_rel_a[3] 
    727725      "Position vector from origin of frame_a to origin of frame_b, resolved in frame_a"; 
    728726    SI.Force f_c[2] "Dummy or constraint forces in direction of ex_a, ey_a"; 
     
    823821 
    824822    annotation ( 
    825        
    826823      Documentation(info="<HTML> 
    827824<p> 
     
    979976 
    980977    annotation ( 
    981        
    982978      Documentation(info="<HTML> 
    983979<p> 
     
    10781074          extent={{-100,-100},{100,100}}, 
    10791075          grid={1,1}), graphics)); 
     1076 
    10801077  equation 
    10811078    phi_a = revolute_a.phi; 
     
    11701167 
    11711168    annotation ( 
    1172        
    11731169      Documentation(info="<HTML> 
    11741170<p> 
     
    12471243  protected 
    12481244    parameter Integer ndim=if world.enableAnimation and animation then 1 else 0; 
    1249     parameter Real e[3]=Modelica.Math.Vectors.normalize( 
     1245    parameter Real e[3](each final unit="1")=Modelica.Math.Vectors.normalize( 
    12501246                                         n); 
    12511247  protected 
     
    13731369      "Orientation object from frame_a to frame_b at initial time"; 
    13741370    annotation ( 
    1375        
    13761371      Documentation(info="<html> 
    13771372<p> 
     
    16971692 
    16981693    annotation ( 
    1699        
    17001694      Documentation(info="<HTML> 
    17011695<p> 
     
    18281822          grid={1,1}), graphics={ 
    18291823          Line( 
    1830             points={{-86,31},{-74,61},{-49,83},{-17,92},{19,88},{40,69},{59,48}}, 
     1824            points={{-86,31},{-74,61},{-49,83},{-17,92},{19,88},{40,69},{59,48}},  
     1825 
    18311826            color={160,160,164}, 
    18321827            thickness=0.5), 
     
    20542049    SI.Position rRod_a[3] 
    20552050      "Position vector from frame_a to frame_b resolved in frame_a"; 
    2056     Real eRod_a[3] 
     2051    Real eRod_a[3](each final unit="1") 
    20572052      "Unit vector in direction from frame_a to frame_b, resolved in frame_a"; 
    20582053    SI.Position r_CM_0[3] 
     
    20692064 
    20702065    annotation ( 
    2071        
    20722066      Icon(coordinateSystem( 
    20732067          preserveAspectRatio=true, 
     
    22222216</p> 
    22232217</html>")); 
     2218 
    22242219  protected 
    22252220    Visualizers.Advanced.Shape shape_rod( 
     
    24212416                    rRod_ia) 
    24222417      "Length of rod (distance between origin of frame_a and origin of frame_b)"; 
    2423     final parameter Real eRod_ia[3]=Modelica.Math.Vectors.normalize( 
     2418    final parameter Real eRod_ia[3](each final unit="1")=Modelica.Math.Vectors.normalize( 
    24242419                                                     rRod_ia) 
    24252420      "Unit vector from origin of frame_a to origin of frame_b, resolved in frame_ia"; 
    2426     final parameter Real e2_ia[3]=Modelica.Math.Vectors.normalize( 
     2421    final parameter Real e2_ia[3](each final unit="1")=Modelica.Math.Vectors.normalize( 
    24272422                                                   cross(n1_a, eRod_ia)) 
    24282423      "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)"; 
    2429     final parameter Real e3_ia[3]=cross(eRod_ia, e2_ia) 
     2424    final parameter Real e3_ia[3](each final unit="1")=cross(eRod_ia, e2_ia) 
    24302425      "Unit vector perpendicular to eRod_ia and e2_ia, resolved in frame_ia"; 
    24312426    SI.Power totalPower 
     
    24332428    SI.Force f_b_a1[3] 
    24342429      "frame_b.f without f_rod part, resolved in frame_a (needed for analytic loop handling)"; 
    2435     Real eRod_a[3] 
     2430    Real eRod_a[3](each final unit="1") 
    24362431      "Unit vector in direction of rRod_a, resolved in frame_a (needed for analytic loop handling)"; 
    24372432    SI.Position rRod_0[3](start=rRod_ia) 
     
    24402435      "Position vector from origin of frame_a to origin of frame_b resolved in frame_a"; 
    24412436    annotation ( 
    2442        
    24432437      Documentation(info="<html> 
    24442438<p> 
     
    27442738    SI.Force f_ia_a[3] "frame_ia.f resolved in frame_a"; 
    27452739    SI.Torque t_ia_a[3] "frame_ia.t resolved in frame_a"; 
    2746     Real n2_a[3] 
     2740    Real n2_a[3](each final unit="1") 
    27472741      "Vector in direction of axis 2 of the universal joint (e2_ia), resolved in frame_a"; 
    27482742    Real length2_n2_a(start=1, unit="m2") "Square of length of vector n2_a"; 
    27492743    SI.Length length_n2_a "Length of vector n2_a"; 
    2750     Real e2_a[3] 
     2744    Real e2_a[3](each final unit="1") 
    27512745      "Unit vector in direction of axis 2 of the universal joint (e2_ia), resolved in frame_a"; 
    2752     Real e3_a[3] 
     2746    Real e3_a[3](each final unit="1") 
    27532747      "Unit vector perpendicular to eRod_ia and e2_a, resolved in frame_a"; 
    2754     Real der_rRod_a_L[3] "= der(rRod_a)/rodLength"; 
     2748    Real der_rRod_a_L[3](each unit="1/s") "= der(rRod_a)/rodLength"; 
    27552749    SI.AngularVelocity w_rel_ia1[3]; 
    27562750    Frames.Orientation R_rel_ia1; 
     
    32863280        "= true, if total power flowing into this component shall be determined (must be zero)" 
    32873281        annotation (Dialog(tab="Advanced")); 
    3288       final parameter Real eAxis_ia[3]=Modelica.Math.Vectors.normalize( 
     3282      final parameter Real eAxis_ia[3](each final unit="1")=Modelica.Math.Vectors.normalize( 
    32893283                                                        nAxis_ia) 
    32903284        "Unit vector from origin of frame_a to origin of frame_b, resolved in frame_ia"; 
    3291       final parameter Real e2_ia[3]=Modelica.Math.Vectors.normalize( 
     3285      final parameter Real e2_ia[3](each final unit="1")=Modelica.Math.Vectors.normalize( 
    32923286                                                     cross(n1_a, eAxis_ia)) 
    32933287        "Unit vector in direction of second rotation axis of universal joint, resolved in frame_ia"; 
    3294       final parameter Real e3_ia[3]=cross(eAxis_ia, e2_ia) 
     3288      final parameter Real e3_ia[3](each final unit="1")=cross(eAxis_ia, e2_ia) 
    32953289        "Unit vector perpendicular to eAxis_ia and e2_ia, resolved in frame_ia"; 
    32963290      SI.Position s 
     
    33013295        "Total power flowing into this element, if checkTotalPower=true (otherwise dummy)"; 
    33023296      annotation ( 
    3303          
    33043297        Documentation(info="<html> 
    33053298<p> 
     
    35693562              color={95,95,95}, 
    35703563              thickness=0.5), 
    3571             Polygon(points={{7,-1},{-5,2},{-5,-4},{7,-1}}, lineColor={0,0,255}), 
     3564            Polygon(points={{7,-1},{-5,2},{-5,-4},{7,-1}}, lineColor={0,0,255}),  
     3565 
    35723566            Line(points={{-50,19},{-30,57}}, color={0,0,255}), 
    35733567            Text( 
     
    36363630              textString="nAxis"), 
    36373631            Line(points={{-61,1},{-2,1}}, color={0,0,255}), 
    3638             Polygon(points={{10,1},{-2,4},{-2,-2},{10,1}}, lineColor={0,0,255}), 
     3632            Polygon(points={{10,1},{-2,4},{-2,-2},{10,1}}, lineColor={0,0,255}),  
     3633 
    36393634            Line( 
    36403635              points={{60,-1},{60,90},{80,90},{80,99}}, 
     
    36883683      SI.Position rAxis_a[3] 
    36893684        "Position vector from origin of frame_a to origin of frame_b resolved in frame_a"; 
    3690       Real eAxis_a[3] 
     3685      Real eAxis_a[3](each final unit="1") 
    36913686        "Unit vector in direction of rAxis_a, resolved in frame_a"; 
    3692       Real e2_a[3] 
     3687      Real e2_a[3](each final unit="1") 
    36933688        "Unit vector in direction of second rotation axis of universal joint, resolved in frame_a"; 
    3694       Real e3_a[3] 
     3689      Real e3_a[3](each final unit="1") 
    36953690        "Unit vector perpendicular to eAxis_a and e2_a, resolved in frame_a"; 
    3696       Real n2_a[3] 
     3691      Real n2_a[3](each final unit="1") 
    36973692        "Vector in direction of second rotation axis of universal joint, resolved in frame_a"; 
    36983693      Real length2_n2_a(unit="m2") "Square of length of vector n2_a"; 
    36993694      SI.Length length_n2_a "Length of vector n2_a"; 
    3700       Real der_rAxis_a_L[3] "= der(rAxis_a)/axisLength"; 
     3695      Real der_rAxis_a_L[3](each unit="1/s") "= der(rAxis_a)/axisLength"; 
    37013696      SI.AngularVelocity w_rel_ia1[3]; 
    37023697      Frames.Orientation R_ia1_a; 
     
    40084003        "= true, if total power flowing into this component shall be determined (must be zero)" 
    40094004        annotation (Dialog(tab="Advanced")); 
    4010       final parameter Real eRod1_ia[3]=rod1.eRod_ia 
     4005      final parameter Real eRod1_ia[3](each final unit="1")=rod1.eRod_ia 
    40114006        "Unit vector from origin of frame_a to origin of spherical joint, resolved in frame_ia"; 
    4012       final parameter Real e2_ia[3]=rod1.e2_ia 
     4007      final parameter Real e2_ia[3](each final unit="1")=rod1.e2_ia 
    40134008        "Unit vector in direction of axis 2 of universal joint, resolved in frame_ia"; 
    40144009      final parameter SI.Distance rod1Length=rod1.rodLength 
     
    40224017 
    40234018      annotation ( 
    4024          
    40254019        Documentation(info="<html> 
    40264020<p> 
     
    45424536        "= true, if total power flowing into this component shall be determined (must be zero)" 
    45434537        annotation (Dialog(tab="Advanced")); 
    4544       final parameter Real eRod1_ia[3]=rod1.eRod_ia 
     4538      final parameter Real eRod1_ia[3](each final unit="1")=rod1.eRod_ia 
    45454539        "Unit vector from origin of frame_a to origin of spherical joint, resolved in frame_ia"; 
    4546