Skip to content

Commit 2ebf7e0

Browse files
Merge pull request OpenIPSL#332 from dietmarw/317-connect-on-non-connectors
Convert internal variable to connector
2 parents 11f2ca2 + 52cac59 commit 2ebf7e0

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

OpenIPSL/Electrical/Solar/PowerFactory/DIgSILENT/DCBusBar.mo

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ model DCBusBar "Model of a DC busbar between the module and inverter"
2727
Modelica.Blocks.Math.Add add(k2=-1) annotation (Placement(transformation(origin = {6, 0}, extent = {{-10, -10}, {10, 10}})));
2828
Modelica.Blocks.Math.Division P_to_I annotation (
2929
Placement(transformation(origin = {-24, -50}, extent = {{-10, -10}, {10, 10}})));
30-
Modelica.Blocks.Continuous.Integrator integrator(initType = Modelica.Blocks.Types.Init.SteadyState, k = 1 / C) annotation (
31-
Placement(transformation(origin = {70, 0}, extent = {{-10, -10}, {10, 10}})));
30+
Modelica.Blocks.Continuous.Integrator integrator(initType = Modelica.Blocks.Types.Init.SteadyState,
31+
k = 1 / C, y_start=Modelica.Constants.eps)
32+
annotation (Placement(transformation(origin = {70, 0}, extent = {{-10, -10}, {10, 10}})));
3233
equation
3334
connect(I_pv, add.u1) annotation (
3435
Line(points={{-120.096,51.0723},{-10,51.0723},{-10,6},{-6,6}},

OpenIPSL/Electrical/Solar/PowerFactory/General/ElmGenstat.mo

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,15 @@ model ElmGenstat "Static generator"
2929
Modelica.Blocks.Interfaces.RealInput cosref if pll_connected "Optional PLL input for cosine"
3030
annotation (
3131
Placement(transformation(origin = {-108, -70}, extent = {{-20, -20}, {20, 20}}), iconTransformation(origin = {-90, -80}, extent = {{-10, -10}, {10, 10}})));
32-
Real sinu "Internal sine of the voltage angle";
33-
Real cosu "Internal cosine of the voltage angle";
3432
Modelica.Blocks.Interfaces.RealOutput P annotation (
3533
Placement(transformation(origin = {110, -30}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {110, -40}, extent = {{-10, -10}, {10, 10}})));
3634
Modelica.Blocks.Interfaces.RealOutput Q annotation (
3735
Placement(transformation(origin = {110, -70}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {110, -80}, extent = {{-10, -10}, {10, 10}})));
36+
37+
protected
38+
Modelica.Blocks.Interfaces.RealOutput sinu "Internal sine of the voltage angle";
39+
Modelica.Blocks.Interfaces.RealOutput cosu "Internal cosine of the voltage angle";
40+
3841
equation
3942
if pll_connected then
4043
connect(sinref, sinu);

0 commit comments

Comments
 (0)