-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Philibert Parquier <philibert.parquier@rte-france.com>
- Loading branch information
1 parent
74ce4b5
commit 528371a
Showing
69 changed files
with
5,904 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
...o/sources/Models/Modelica/Dynawo/Electrical/Controls/IEC/IEC63406/AuxiliaryBlocks/Min3.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
within Dynawo.Electrical.Controls.IEC.IEC63406.AuxiliaryBlocks; | ||
|
||
/* | ||
* Copyright (c) 2024, RTE (http://www.rte-france.com) | ||
* See AUTHORS.txt | ||
* All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, you can obtain one at http://mozilla.org/MPL/2.0/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
* | ||
* This file is part of Dynawo, an hybrid C++/Modelica open source suite of simulation tools for power systems. | ||
*/ | ||
|
||
block Min3 "Pass through the smallest signal" | ||
Modelica.Blocks.Interfaces.RealInput u1 annotation( | ||
Placement(visible = true, transformation(origin = {-120, 46}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {-120, -60}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); | ||
Modelica.Blocks.Interfaces.RealInput u3 annotation( | ||
Placement(visible = true, transformation(origin = {-118, -54}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {-120, 60}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); | ||
Modelica.Blocks.Interfaces.RealInput u2 annotation( | ||
Placement(visible = true, transformation(origin = {-120, 0}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {-120, 0}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); | ||
Modelica.Blocks.Interfaces.RealOutput y annotation( | ||
Placement(visible = true, transformation(origin = {110, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {110, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); | ||
|
||
equation | ||
y = min(u1, min(u2, u3)); | ||
|
||
annotation( | ||
Icon(coordinateSystem(preserveAspectRatio = true, extent = {{-100, -100}, {100, 100}}), graphics = {Text(lineColor = {160, 160, 164}, extent = {{-90, 36}, {90, -36}}, textString = "min()"), Rectangle(extent = {{-100, 100}, {100, -100}})}), | ||
Documentation(info = "<html> | ||
<p> | ||
This block computes the output <strong>y</strong> as <em>minimum</em> of | ||
the two Real inputs <strong>u1</strong> and <strong>u2</strong>: | ||
</p> | ||
<pre> y = <strong>min</strong> ( u1 , u2 ); | ||
</pre> | ||
</html>")); | ||
end Min3; |
38 changes: 38 additions & 0 deletions
38
...s/Models/Modelica/Dynawo/Electrical/Controls/IEC/IEC63406/AuxiliaryBlocks/QuadriSwitch.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
within Dynawo.Electrical.Controls.IEC.IEC63406.AuxiliaryBlocks; | ||
|
||
/* | ||
* Copyright (c) 2024, RTE (http://www.rte-france.com) | ||
* See AUTHORS.txt | ||
* All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, you can obtain one at http://mozilla.org/MPL/2.0/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
* | ||
* This file is part of Dynawo, an hybrid C++/Modelica open source suite of simulation tools for power systems. | ||
*/ | ||
|
||
model QuadriSwitch | ||
|
||
//Input variables | ||
Modelica.Blocks.Interfaces.RealInput e0 annotation( | ||
Placement(visible = true, transformation(origin = {-120, 60}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {-120, 80}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); | ||
Modelica.Blocks.Interfaces.RealInput e1 annotation( | ||
Placement(visible = true, transformation(origin = {-120, 20}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {-120, 26}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); | ||
Modelica.Blocks.Interfaces.RealInput e2 annotation( | ||
Placement(visible = true, transformation(origin = {-120, -22}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {-120, -28}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); | ||
Modelica.Blocks.Interfaces.RealInput e3 annotation( | ||
Placement(visible = true, transformation(origin = {-120, -58}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {-120, -80}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); | ||
Modelica.Blocks.Interfaces.IntegerInput flag annotation( | ||
Placement(visible = true, transformation(origin = {0, -120}, extent = {{-20, -20}, {20, 20}}, rotation = 90), iconTransformation(origin = {0, -120}, extent = {{-20, -20}, {20, 20}}, rotation = 90))); | ||
|
||
//Output variables | ||
Modelica.Blocks.Interfaces.RealOutput y annotation( | ||
Placement(visible = true, transformation(origin = {110, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {110, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); | ||
|
||
equation | ||
y = if flag == 0 then e0 else if flag == 1 then e1 else if flag == 2 then e2 else e3; | ||
|
||
annotation( | ||
Icon(graphics = {Rectangle(extent = {{-100, 100}, {100, -100}}), Text(extent = {{-100, 100}, {100, -100}}, textString = "4 Entries\nSwitch")})); | ||
end QuadriSwitch; |
29 changes: 29 additions & 0 deletions
29
...es/Models/Modelica/Dynawo/Electrical/Controls/IEC/IEC63406/AuxiliaryBlocks/StrongDelay.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
within Dynawo.Electrical.Controls.IEC.IEC63406.AuxiliaryBlocks; | ||
|
||
/* | ||
* Copyright (c) 2024, RTE (http://www.rte-france.com) | ||
* See AUTHORS.txt | ||
* All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, you can obtain one at http://mozilla.org/MPL/2.0/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
* | ||
* This file is part of Dynawo, an hybrid C++/Modelica open source suite of simulation tools for power systems. | ||
*/ | ||
|
||
model StrongDelay | ||
|
||
parameter Types.Time T(start=1) "Time Constant"; | ||
|
||
Modelica.Blocks.Interfaces.RealInput u annotation( | ||
Placement(visible = true, transformation(origin = {-120, 0}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {-120, 0}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); | ||
Modelica.Blocks.Interfaces.RealOutput y annotation( | ||
Placement(visible = true, transformation(origin = {110, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {110, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); | ||
|
||
equation | ||
der(y) = u - delay(u,T); | ||
|
||
annotation( | ||
Icon(graphics = {Rectangle(extent = {{-100, 100}, {100, -100}}), Text(extent = {{-100, 100}, {100, -100}}, textString = "1 - e(-T.s) \n ___________\n\ns")})); | ||
end StrongDelay; |
44 changes: 44 additions & 0 deletions
44
.../Models/Modelica/Dynawo/Electrical/Controls/IEC/IEC63406/AuxiliaryBlocks/SwitchComplex.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
within Dynawo.Electrical.Controls.IEC.IEC63406.AuxiliaryBlocks; | ||
|
||
/* | ||
* Copyright (c) 2024, RTE (http://www.rte-france.com) | ||
* See AUTHORS.txt | ||
* All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, you can obtain one at http://mozilla.org/MPL/2.0/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
* | ||
* This file is part of Dynawo, an hybrid C++/Modelica open source suite of simulation tools for power systems. | ||
*/ | ||
|
||
block SwitchComplex "Switch between two Complex signals" | ||
extends Modelica.Blocks.Icons.PartialBooleanBlock; | ||
|
||
//Input variables | ||
Modelica.ComplexBlocks.Interfaces.ComplexInput u1 annotation( | ||
Placement(visible = true, transformation(origin = {-120, 58}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {-120, 80}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); | ||
Modelica.ComplexBlocks.Interfaces.ComplexInput u3 annotation( | ||
Placement(visible = true, transformation(origin = {-122, -60}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {-120, -80}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); | ||
Modelica.Blocks.Interfaces.BooleanInput u2 annotation( | ||
Placement(visible = true, transformation(extent = {{-140, -20}, {-100, 20}}, rotation = 0), iconTransformation(extent = {{-140, -20}, {-100, 20}}, rotation = 0))); | ||
|
||
//Output variables | ||
Modelica.ComplexBlocks.Interfaces.ComplexOutput y annotation( | ||
Placement(visible = true, transformation(origin = {110, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {110, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); | ||
|
||
equation | ||
y = if u2 then u1 else u3; | ||
|
||
annotation( | ||
defaultComponentName = "switch1", | ||
Documentation(info = "<html> | ||
<p>The Logical.Switch switches, depending on the | ||
logical connector u2 (the middle connector) | ||
between the two possible input signals | ||
u1 (upper connector) and u3 (lower connector).</p> | ||
<p>If u2 is <strong>true</strong>, the output signal y is set equal to | ||
u1, else it is set equal to u3.</p> | ||
</html>"), | ||
Icon(graphics = {Line(points = {{-38, 80}, {6, 2}}, color = {0, 0, 127}, thickness = 1), Line(points = {{-100, 0}, {-40, 0}}, color = {255, 0, 255}), Line(points = {{12, 0}, {100, 0}}, color = {0, 0, 127}), Line(points = {{-40, 12}, {-40, -12}}, color = {255, 0, 255}), Line(points = {{-100, 80}, {-38, 80}}, color = {0, 0, 127}), Ellipse(lineColor = {0, 0, 255}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, extent = {{2, -8}, {18, 8}}), Line(points = {{-100, -80}, {-40, -80}, {-40, -80}}, color = {0, 0, 127})})); | ||
end SwitchComplex; |
36 changes: 36 additions & 0 deletions
36
...s/Models/Modelica/Dynawo/Electrical/Controls/IEC/IEC63406/AuxiliaryBlocks/TripleSwitch.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
within Dynawo.Electrical.Controls.IEC.IEC63406.AuxiliaryBlocks; | ||
|
||
/* | ||
* Copyright (c) 2024, RTE (http://www.rte-france.com) | ||
* See AUTHORS.txt | ||
* All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, you can obtain one at http://mozilla.org/MPL/2.0/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
* | ||
* This file is part of Dynawo, an hybrid C++/Modelica open source suite of simulation tools for power systems. | ||
*/ | ||
|
||
model TripleSwitch | ||
|
||
//Input variables | ||
Modelica.Blocks.Interfaces.RealInput e0 annotation( | ||
Placement(visible = true, transformation(origin = {-120, 20}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {-120, 60}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); | ||
Modelica.Blocks.Interfaces.RealInput e1 annotation( | ||
Placement(visible = true, transformation(origin = {-120, -20}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {-120, 0}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); | ||
Modelica.Blocks.Interfaces.RealInput e2 annotation( | ||
Placement(visible = true, transformation(origin = {-120, -60}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {-120, -60}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); | ||
Modelica.Blocks.Interfaces.IntegerInput flag annotation( | ||
Placement(visible = true, transformation(origin = {-120, 68}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {0, 120}, extent = {{-20, -20}, {20, 20}}, rotation = -90))); | ||
|
||
//Output variables | ||
Modelica.Blocks.Interfaces.RealOutput y annotation( | ||
Placement(visible = true, transformation(origin = {110, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {110, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); | ||
|
||
equation | ||
y = if flag == 0 then e0 else if flag == 1 then e1 else e2; | ||
|
||
annotation( | ||
Icon(graphics = {Rectangle(extent = {{-100, 100}, {100, -100}}), Text(extent = {{-100, 100}, {100, -100}}, textString = "3 entries\nswitch")})); | ||
end TripleSwitch; |
18 changes: 18 additions & 0 deletions
18
...ources/Models/Modelica/Dynawo/Electrical/Controls/IEC/IEC63406/AuxiliaryBlocks/package.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
within Dynawo.Electrical.Controls.IEC.IEC63406; | ||
|
||
|
||
/* | ||
* Copyright (c) 2024, RTE (http://www.rte-france.com) | ||
* See AUTHORS.txt | ||
* All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, you can obtain one at http://mozilla.org/MPL/2.0/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
* | ||
* This file is part of Dynawo, an hybrid C++/Modelica open source suite of simulation tools for power systems. | ||
*/ | ||
|
||
package AuxiliaryBlocks | ||
extends Icons.Package; | ||
end AuxiliaryBlocks; |
5 changes: 5 additions & 0 deletions
5
...ces/Models/Modelica/Dynawo/Electrical/Controls/IEC/IEC63406/AuxiliaryBlocks/package.order
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
StrongDelay | ||
QuadriSwitch | ||
TripleSwitch | ||
SwitchComplex | ||
Min3 |
Oops, something went wrong.