Skip to content

Commit

Permalink
Imporove description of matrix R
Browse files Browse the repository at this point in the history
  • Loading branch information
tobolar committed Nov 14, 2023
1 parent 7a75b1a commit bd644a8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions PlanarMechanics/Parts/FixedTranslation.mo
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ model FixedTranslation "A fixed translation between two components (rigid rod)"
final parameter SI.Length l = Modelica.Math.Vectors.length(r)
"Length of vector r";
SI.Position r0[2] "Length of the rod resolved w.r.t to inertal frame";
Real R[2,2] "Rotation matrix";
Real R[2,2] "Rotation matrix from world frame to frame_a";

parameter Boolean animate = true "= true, if animation shall be enabled"
annotation(Dialog(group="Animation"));
Expand Down Expand Up @@ -54,7 +54,7 @@ equation
frame_a.fx + frame_b.fx = 0;
frame_a.fy + frame_b.fy = 0;
// frame_a.t + frame_b.t - sx0*frame_b.fy + sy0*frame_b.fx = 0;
frame_a.t + frame_b.t + r0*{frame_b.fy,-frame_b.fx} = 0;
frame_a.t + frame_b.t + r0*{frame_b.fy,-frame_b.fx} = 0;
annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},
{100,100}}),
graphics={
Expand Down
2 changes: 1 addition & 1 deletion PlanarMechanics/Sources/RelativeForce.mo
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ model RelativeForce "Input signal acting as force and torque on two frames"
Modelica.Blocks.Interfaces.RealInput force[3]
annotation (Placement(transformation(extent={{-20,-20},{20,20}}, origin={-60,-120}, rotation=90)));

Real R[2,2] "Rotation matrix";
Real R[2,2] "Rotation matrix from world frame to frame_b";
SI.Angle phi "Rotation angle of the additional frame_c";

Interfaces.Frame_resolve frame_resolve(fx = 0, fy = 0, t = 0, phi = phi) if resolveInFrame == Modelica.Mechanics.MultiBody.Types.ResolveInFrameAB.frame_resolve
Expand Down
4 changes: 2 additions & 2 deletions PlanarMechanics/Sources/WorldForce.mo
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ model WorldForce
"Coordinate system in which vector is optionally resolved, if useExtraFrame is true"
annotation (Placement(transformation(extent={{-16,-16},{16,16}},rotation=90,origin={0,-100})));

Real R[2,2] "Rotation matrix";
Real R[2,2] "Rotation matrix from world frame to frame_b";
SI.Angle phi "Rotation angle of the additional frame_c";

protected
Expand Down Expand Up @@ -76,7 +76,7 @@ equation

R = {{cos(phi), -sin(phi)}, {sin(phi),cos(phi)}};
{frame_b.fx,frame_b.fy} + R*{force[1], force[2]} = {0, 0};
frame_b.t + force[3]= 0;
frame_b.t + force[3]= 0;

annotation (
Icon(
Expand Down

0 comments on commit bd644a8

Please sign in to comment.