Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RotationalCoupling #4019

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions Modelica/Electrical/Machines/Examples/DCMachines/DCPM_Drive.mo
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ model DCPM_Drive
wMechanical(fixed=false),
ia(fixed=true))
annotation (Placement(transformation(extent={{50,-70},{30,-50}})));
Mechanics.Rotational.Components.Coupling coupling
Utilities.Coupling coupling
annotation (Placement(transformation(extent={{-10,-70},{10,-50}})));
ControlledDCDrives.Utilities.DcdcInverter dcdcInverter1(fS=1000, VMax=
dcpmData.VaNominal)
Expand Down Expand Up @@ -89,6 +89,10 @@ model DCPM_Drive
extent={{-10,-10},{10,10}},
rotation=0,
origin={-70,30})));
Mechanics.Rotational.Sensors.SpeedSensor speedSensor1
annotation (Placement(transformation(extent={{-30,-100},{-50,-80}})));
Mechanics.Rotational.Sensors.SpeedSensor speedSensor2
annotation (Placement(transformation(extent={{30,-100},{50,-80}})));
equation
connect(dcpm1.flange, coupling.flange_a)
annotation (Line(points={{-30,-60},{-10,-60}}, color={0,0,0}));
Expand Down Expand Up @@ -128,16 +132,21 @@ equation
32,40},{24,40}}, color={0,0,255}));
connect(multiSensor.nv, constantVoltage.n) annotation (Line(points={{0,70},{-46,
70},{-46,40},{-30,40}}, color={0,0,255}));
connect(dcpm1.flange, speedSensor1.flange) annotation (Line(points={{-30,-60},
{-20,-60},{-20,-90},{-30,-90}}, color={0,0,0}));
connect(dcpm2.flange, speedSensor2.flange) annotation (Line(points={{30,-60},
{20,-60},{20,-90},{30,-90}}, color={0,0,0}));
annotation (experiment(StopTime=2.0, Interval=1E-4, Tolerance=1E-6), Documentation(
info="<html>
<p>
This example demonstrates how to use a <a href=\"modelica://Modelica.Mechanics.Rotational.Components.Coupling\">coupling</a>
This example demonstrates how to use a <a href=\"modelica://Modelica.Electrical.Machines.Utilities.Coupling\">coupling</a>
to implement a drive consisting if two permanent magnet DC machines.
Note that <code>dcpm1</code> is turning in positive direction, whereas <code>dcpm2</code> is turning in the opposite direction.
Note that <code>dcpm1</code> is turning in the positive direction, whereas <code>dcpm2</code> is turning in the opposite direction.
This is evident by comparing <code>speedSensor1.w</code> and <code>speedSensor2.w</code>.
Therefore, the armature of <code>dcpm2</code> is connected reversed to the source.
</p>
<p>
Machine <code>dcpm1</code> starts the drive with a voltage ramp up to half of the no-load speed, the armature of <code>dcpm2</code> is not connected.
Machine <code>dcpm1</code> starts the drive with a voltage ramp up to half of no-load speed, the armature of <code>dcpm2</code> is not connected.
Since the induced voltage of <code>dcpm2</code> is the same as that of <code>dcdcInverter2</code>, the <code>switch</code> is closed without any transient.
After that, the armature voltage of <code>dcpm2</code> is slightly increased, causing <code>dcpm2</code> to drive as motor and <code>dcpm1</code> to brake as generator.
Therefore, the speed <code>coupling.w</code> increases.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
within Modelica.Mechanics.Rotational.Components;
within Modelica.Electrical.Machines.Utilities;
model Coupling "Ideal rotational coupling"
extends Modelica.Mechanics.Rotational.Interfaces.PartialTwoFlanges;
Modelica.Units.SI.AngularVelocity w(displayUnit="rpm") = der(flange_a.phi) "Angular velocity of flange_a";
Modelica.Units.SI.Torque tau = flange_a.tau "Torque of flange_a and flange_b";
Mechanics.Rotational.Components.IdealGear idealGear(final useSupport=false,
final ratio=-1)
annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
equation
flange_a.phi + flange_b.phi = 0;
flange_a.tau - flange_b.tau = 0;
connect(idealGear.flange_b, flange_b)
annotation (Line(points={{10,0},{100,0}}, color={0,0,0}));
connect(idealGear.flange_a, flange_a)
annotation (Line(points={{-10,0},{-100,0}}, color={0,0,0}));
annotation (Icon(graphics={
Rectangle(
lineColor={64,64,64},
Expand Down Expand Up @@ -59,16 +64,20 @@ equation
-10,-22},{10,-20},{10,-42},{-10,-40},{-10,-60}}, color={0,0,0})}),
Documentation(info="<html>
<p>
This is a model of an ideal stiff coupling (face to face),
i.e., the angular velocity if <code>flange_b</code> is exactly in opposite direction of <code>flange_a</code>,
and the torque of both flanges is identical.
This is a model of an ideal stiff coupling:
One device connected to the coupling is turning clockwise (looking at the shaft end),
the other device connected to the coupling is turning counter-clockwise (looking at the shaft end).
The torque at <code>flange_b</code> has the same magnitude as the torque at <code>flange_a</code> but opposite sign.
This is achieved by using an
<a href=\"modelica://Modelica.Mechanics.Rotational.Components.IdealGear\">ideal gear</a> with <code>ratio = -1</code>.
</p>
<p>
The usage is demonstrated in an <a href=\"modelica://Modelica.Electrical.Machines.Examples.DCMachines.DCPM_Drive\">example in Modelica.Electrical.Machines</a>.
Variable <code>w</code> represents the angular velocity of <code>flange_a</code>
and <code>tau</code> represents the torque transferred from <code>flange_a</code> to <code>flange_b</code>.
</p>
<p>
Variable <code>w</code> represents the angular velocity of <code>flange_a</code>
and <code>tau</code> represents the torque transferred between <code>flange_a</code> and <code>flange_b</code>.
This behaviour is essential when coupling electric machines. The usage is demonstrated
in the example <a href=\"modelica://Modelica.Electrical.Machines.Examples.DCMachines.DCPM_Drive\">Modelica.Electrical.Machines.Examples.DCMachines.DCPM_Drive</a>.
</p>
</html>"));
end Coupling;
1 change: 1 addition & 0 deletions Modelica/Electrical/Machines/Utilities/package.order
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ TerminalBox
MultiTerminalBox
SwitchedRheostat
RampedRheostat
Coupling
DcBrakeSettings
SynchronousMachineData
TransformerData
1 change: 0 additions & 1 deletion Modelica/Mechanics/Rotational/Components/package.order
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Fixed
Inertia
Disc
Coupling
Spring
Damper
SpringDamper
Expand Down