Skip to content

Commit

Permalink
Fix redundant equations when resolveInFrame=frame_resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
tobolar authored Jun 19, 2023
2 parents 2168af8 + 167fcd8 commit 5163bbd
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 6 deletions.
33 changes: 27 additions & 6 deletions PlanarMechanics/Sources/QuadraticSpeedDependentForce.mo
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public
"Coordinate system fixed to the component with one cut-force and cut-torque"
annotation (Placement(transformation(extent={{84,-16},{116,16}})));

Interfaces.Frame_resolve frame_resolve(fx = 0, fy = 0, t = 0)
Interfaces.Frame_resolve frame_resolve
if resolveInFrameB == Modelica.Mechanics.MultiBody.Types.ResolveInFrameB.frame_resolve
"Coordinate system in which vector is optionally resolved, if useExtraFrame is true"
annotation (
Expand Down Expand Up @@ -99,11 +99,11 @@ equation
connect(worldForce.frame_resolve, frame_resolve) annotation (Line(
points={{30,-10},{0,-10},{0,-100}},
color={95,95,95},
pattern=LinePattern.Dot));
thickness=0.5));
connect(absoluteVelocity.frame_resolve, frame_resolve) annotation (Line(
points={{30,30},{30,20},{0,20},{0,-100}},
color={95,95,95},
pattern=LinePattern.Dot));
thickness=0.5));
connect(absoluteVelocity.v, normalizeSpeeds.u) annotation (Line(
points={{19,40},{2,40}},
color={0,0,127}));
Expand Down Expand Up @@ -152,10 +152,31 @@ equation
Documentation(
info="<html>
<p>
Model of a&nbsp;force quadratic dependent on the velocity of the flange.
The force can be resolved in a&nbsp;world frame, or a&nbsp;relative speed
can be used by selecting resolve_frame to use the extra frame_resolve.
A&nbsp;force applied on <code>frame_b</code> which is quadratic dependent on
the velocity of this frame. Both the measured velocity and the applied force
are resolved in the same frame which is defined via parameter
<code>resolveInFrame</code> as follows:
</p>
<table border=\"1\" cellspacing=\"0\" cellpadding=\"2\">
<tr>
<th>Types.ResolveInFrameA.</th>
<th>Meaning</th>
</tr>
<tr>
<td>world</td>
<td>Resolve input force in world frame (= default)</td>
</tr>
<tr>
<td>frame_a</td>
<td>Resolve input force in frame_b</td>
</tr>
<tr>
<td>frame_resolve</td>
<td>Resolve input force in frame_resolve (frame_resolve must be connected)</td>
</tr>
</table>
<p>
This model is e.g. suitable to simulate aerodynamic drag forces.
</p>
Expand Down
4 changes: 4 additions & 0 deletions PlanarMechanics/UsersGuide/ReleaseNotes.mo
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ It is backwards compatible to previous library versions.
<p>Improvements in this version:</p>
<ul>
<li>
<a href=\"modelica://PlanarMechanics.Sources.QuadraticSpeedDependentForce\">QuadraticSpeedDependentForce</a>
Fix redundant equations when <code>resolveInFrame&nbsp;= frame_resolve</code>.
</li>
<li>
Types <a href=\"modelica://PlanarMechanics.Types.Color\">Color</a>
and <a href=\"modelica://PlanarMechanics.Types.SpecularCoefficient\">SpecularCoefficient</a>
Expand Down

0 comments on commit 5163bbd

Please sign in to comment.