Opened 10 years ago

Last modified 4 years ago

#2902 closed defect

Complex parameter binding lost — at Initial Version

Reported by: mengjia@… Owned by: somebody
Priority: high Milestone: 1.16.0
Component: Frontend Version: trunk
Keywords: Cc: Lennart Ochel, Willi Braun

Description

Hi look,

model Test

model Complex_bindinglost

constant Real pi = Modelica.Constants.pi;
parameter Real eterm = 0.999999 "terminal voltage";
1.0
parameter Real anglev0 = 4.0463 "Power flow, node angle in degree";
parameter Real pelec = 0.399989 * 100 "active power MVA";
80.0
parameter Real qelec = 5.41649 "reactive power MVA";
50.0
parameter Real wbase = 2 * pi * 50 "system base speed";
parameter Real mbase = 100 "system base power rating MVA";
parameter Real Ra = 0 "amature resistance";
parameter Real Xpp = 1;
parameter Real anglev_rad = anglev0 * pi / 180 "initial value of bus anglev in rad";
parameter Real p0 = pelec / mbase "initial value of bus active power in p.u.";
parameter Real q0 = qelec / mbase "initial value of bus reactive power in p.u.";
parameter Complex Zs(re = Ra, im = Xpp) "Equivation impedance";
parameter Complex VT(re = eterm * cos(anglev_rad), im = eterm * sin(anglev_rad));
parameter Complex S(re = p0, im = q0);
parameter Complex It = conj(S / VT);
Initialize current and voltage components of rotor reference fram (dq axes).

end Complex_bindinglost;

model Complex_bindingOK

constant Real pi = Modelica.Constants.pi;
parameter Complex ZsOK(re = 1, im = 1) "Equivation impedance";
parameter Complex VTOK(re = cos(pi), im = sin(pi));
parameter Complex SOK(re = 1, im = 1);
parameter Complex ItOK = conj(S / VT);
annotation(Icon(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2, 2})), Diagram(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2, 2})));

end Complex_bindingOK;
annotation(Icon(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2, 2})), Diagram(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2, 2})));

end Test;

Check that the value of It is zero but ItOK got its value (not zero)
why ?
Thanks :)

Change History (0)

Note: See TracTickets for help on using tickets.