OpenModelica


Forgot password? | Forgot username? | Register

connector Terminal of Buildings Library

connector Terminal of Buildings Library

model storage
  Modelica.Blocks.Math.Abs abs1(generateEvent = false) annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = -90, origin = {74, 6})));
  Modelica.Blocks.Sources.Sine sine(amplitude = 1000, freqHz = 0.000015704, phase = 0, offset = 0, startTime = 0) annotation(Placement(transformation(extent = {{38, 48}, {58, 68}})));
  Buildings.Electrical.DC.Sources.PVSimple pVSimple1(V_nominal = 400, A = 200, fAct = 0.9, eta = 0.12) annotation(Placement(visible = true, transformation(origin = {70, -64}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Buildings.Electrical.AC.ThreePhasesBalanced.Sources.Grid gri(f = 50, V = 400, phiSou = 0.1) annotation(Placement(visible = true, transformation(origin = {-76, -16}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Buildings.Electrical.AC.ThreePhasesBalanced.Conversion.ACDCConverter conACDC(conversionFactor = 1, eta = 0.9) annotation(Placement(visible = true, transformation(origin = {0, -54}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
  connect(abs1.y, pVSimple1.G) annotation(Line(points = {{74, -5}, {70, -5}, {70, -52}, {70, -52}}, color = {0, 0, 127}));
  connect(sine.y, abs1.u) annotation(Line(points = {{59, 58}, {74, 58}, {74, 20}, {74, 20}}, color = {0, 0, 127}));
  connect(conACDC.terminal_n, gri.terminal) annotation(Line(points = {{-10, -54}, {-38, -54}, {-38, -78}, {-76, -78}, {-76, -26}}, color = {0, 120, 120}));
  connect(conACDC.terminal_p, pVSimple1.terminal) annotation(Line(points = {{10, -54}, {36, -54}, {36, -64}, {60, -64}}, color = {0, 0, 255}));
end storage;

this model gives error:

" Translation Error
Error occurred while flattening model storage

Translation Error
[Buildings.Electrical.Interfaces.Terminal: 7:1-7:54]: Could not evaluate structural parameter (or constant): PhaseSystem.n which gives dimensions of array: v[PhaseSystem.n]. Array dimensions must be known at compile time.

the error is in the last line of this script where the text is in evidence :

connector Terminal "Generalized electric terminal"
  extends Buildings.Electrical.Interfaces.BaseTerminal;
  replaceable package PhaseSystem = PhaseSystems.PartialPhaseSystem "Phase system" annotation(choicesAllMatching = true);
  PhaseSystem.Voltage v[PhaseSystem.n] "Voltage vector";
  flow PhaseSystem.Current i[PhaseSystem.n] "Current vector";
  PhaseSystem.ReferenceAngle theta[PhaseSystem.m] "Optional vector of phase angles";    current/sad

Edited by: claudio34 - Oct-01-15 18:09:41
Administrator has disabled public posting. Please login or register in order to proceed.
There are 0 guests and 0 other users also viewing this topic
You are here: