Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » Harvey.Weargol
  • » Profile

Posts

Posts

Nov-24-19 17:34:17
A simple 3 phase rectifier model cannot be initialized.

Hi,
I wanted to simulate a 3 phase rectifier unit. In order to have a better overview I did not use the multiphase models. I use the standard electrial.analog parts to model the recitifer connected to a 3 phase grid, having a simple load. However, as soon as I added three inductor to the model, the model cannot be initialized or shows strange results.
Any ideas?

model CircuitWithL
Modelica.Electrical.Analog.Basic.Ground ground annotation(
    Placement(visible = true, transformation(origin = {-90, -32}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Electrical.Analog.Sources.SineVoltage u(V = 230 * sqrt(2), freqHz = 50) annotation(
    Placement(visible = true, transformation(origin = {-80, 60}, extent = {{-10, -10}, {10, 10}}, rotation = 180)));
  Modelica.Electrical.Analog.Sources.SineVoltage v(V = 230 * sqrt(2), freqHz = 50, phase = 2.0944) annotation(
    Placement(visible = true, transformation(origin = {-80, 20}, extent = {{-10, -10}, {10, 10}}, rotation = 180)));
  Modelica.Electrical.Analog.Sources.SineVoltage w(V = 230 * sqrt(2), freqHz = 50, phase = 4.18879) annotation(
    Placement(visible = true, transformation(origin = {-80, -6}, extent = {{-10, -10}, {10, 10}}, rotation = 180)));
  Modelica.Electrical.Analog.Ideal.IdealDiode D1 annotation(
    Placement(visible = true, transformation(origin = {0, 70}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
  Modelica.Electrical.Analog.Ideal.IdealDiode D2 annotation(
    Placement(visible = true, transformation(origin = {20, 70}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
  Modelica.Electrical.Analog.Ideal.IdealDiode D3 annotation(
    Placement(visible = true, transformation(origin = {40, 70}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
  Modelica.Electrical.Analog.Ideal.IdealDiode D4 annotation(
    Placement(visible = true, transformation(origin = {0, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
  Modelica.Electrical.Analog.Ideal.IdealDiode D5 annotation(
    Placement(visible = true, transformation(origin = {20, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
  Modelica.Electrical.Analog.Ideal.IdealDiode D6 annotation(
    Placement(visible = true, transformation(origin = {40, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
  Modelica.Electrical.Analog.Basic.Capacitor C(C = 1e-3) annotation(
    Placement(visible = true, transformation(origin = {62, 20}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
Modelica.Electrical.Analog.Basic.Resistor resistor(R = 1e-2) annotation(
    Placement(visible = true, transformation(origin = {136, 20}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
Modelica.Electrical.Analog.Basic.Inductor L1(L = 1e-5)  annotation(
    Placement(visible = true, transformation(origin = {-50, 60}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Electrical.Analog.Basic.Inductor L2(L = 1e-5) annotation(
    Placement(visible = true, transformation(origin = {-50, 20}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Electrical.Analog.Basic.Inductor L3(L = 1e-5) annotation(
    Placement(visible = true, transformation(origin = {-52, -6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
initial equation
  C.v = 580;
  L1.i=0;
  L2.i=-230 * sqrt(2)/2;
  L3.i=-230 * sqrt(2)/2;
equation
  connect(w.n, ground.p) annotation(
    Line(points = {{-90, -6}, {-90, -22}}, color = {0, 0, 255}));
  connect(w.n, v.n) annotation(
    Line(points = {{-90, -6}, {-90, 20}}, color = {0, 0, 255}));
  connect(v.n, u.n) annotation(
    Line(points = {{-90, 20}, {-90, 60}}, color = {0, 0, 255}));
  connect(D4.n, D1.p) annotation(
    Line(points = {{0, -20}, {0, -20}, {0, 60}, {0, 60}}, color = {0, 0, 255}));
  connect(D5.n, D2.p) annotation(
    Line(points = {{20, -20}, {20, -20}, {20, 60}, {20, 60}}, color = {0, 0, 255}));
  connect(D6.n, D3.p) annotation(
    Line(points = {{40, -20}, {40, -20}, {40, 60}, {40, 60}}, color = {0, 0, 255}));
  connect(D4.p, D5.p) annotation(
    Line(points = {{0, -40}, {20, -40}, {20, -40}, {20, -40}}, color = {0, 0, 255}));
  connect(D5.p, D6.p) annotation(
    Line(points = {{20, -40}, {40, -40}, {40, -40}, {40, -40}}, color = {0, 0, 255}));
  connect(D6.p, C.n) annotation(
    Line(points = {{40, -40}, {62, -40}, {62, 10}}, color = {0, 0, 255}));
  connect(D1.n, D2.n) annotation(
    Line(points = {{0, 80}, {20, 80}, {20, 80}, {20, 80}}, color = {0, 0, 255}));
  connect(D2.n, D3.n) annotation(
    Line(points = {{20, 80}, {40, 80}, {40, 80}, {40, 80}}, color = {0, 0, 255}));
  connect(D3.n, C.p) annotation(
    Line(points = {{40, 80}, {62, 80}, {62, 30}}, color = {0, 0, 255}));
connect(C.n, resistor.n) annotation(
    Line(points = {{62, 10}, {136, 10}}, color = {0, 0, 255}));
connect(C.p, resistor.p) annotation(
    Line(points = {{62, 30}, {136, 30}}, color = {0, 0, 255}));
connect(u.p, L1.p) annotation(
    Line(points = {{-70, 60}, {-60, 60}, {-60, 60}, {-60, 60}}, color = {0, 0, 255}));
connect(v.p, L2.p) annotation(
    Line(points = {{-70, 20}, {-60, 20}}, color = {0, 0, 255}));
connect(w.p, L3.p) annotation(
    Line(points = {{-70, -6}, {-62, -6}}, color = {0, 0, 255}));
connect(L1.n, D1.p) annotation(
    Line(points = {{-40, 60}, {0, 60}, {0, 60}, {0, 60}}, color = {0, 0, 255}));
connect(L2.n, D2.p) annotation(
    Line(points = {{-40, 20}, {20, 20}, {20, 60}, {20, 60}}, color = {0, 0, 255}));
connect(L3.n, D3.p) annotation(
    Line(points = {{-42, -6}, {40, -6}, {40, 60}, {40, 60}}, color = {0, 0, 255}));
  annotation(
    experiment(StartTime = 0, StopTime = 0.04, Tolerance = 1e-06, Interval = 4.004e-05));

end CircuitWithL;

Feb-17-19 11:02:15
I want to develop a controller model, which sets switches as a reaction of some measurement....

Hi,
I want to develop some kind of controller models. They have all the same concept. They have some measurements (voltage for instance) and base on these measurements they have a boolean output which defines the settings of some switches. I have attached a simple model. For reasons I do not understand, the compiler is not able to compile this model.
But my questions is more basic. Presumably my concept is not the right one. Hence I would like to rephrase my requirement:

How do I design a model, which
a) receives some real input data
b) provide some boolean output data
c) change the boolean output data only at some definite time intervals (1ms for instance)

TC-BMS.mo

BMS.mo

Hi,
I've placed two modules (A & B)  into another module (C). A and B work fine, when I wrote some test cases. After combining them, I get the following compiling message: Does anybody has an idea?


C:/OpenModelica1.13.164bit//share/omc/scripts/Compile.bat TaurusSim.TestCases.TC_ModulPlusBMS gcc mingw64 parallel 4 0
PATH = "C:\OpenModelica1.13.164bit\tools\msys\mingw64\bin;C:\OpenModelica1.13.164bit\tools\msys\mingw64\bin\..\..\usr\bin;"
gcc  -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse     -I"C:/OpenModelica1.13.164bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TaurusSim_TestCases_TC_ModulPlusBMS -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=10 -DOMC_NUM_NONLINEAR_SYSTEMS=10 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o TaurusSim.TestCases.TC_ModulPlusBMS.o TaurusSim.TestCases.TC_ModulPlusBMS.c
gcc  -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse     -I"C:/OpenModelica1.13.164bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TaurusSim_TestCases_TC_ModulPlusBMS -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=10 -DOMC_NUM_NONLINEAR_SYSTEMS=10 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o TaurusSim.TestCases.TC_ModulPlusBMS_functions.o TaurusSim.TestCases.TC_ModulPlusBMS_functions.c
gcc  -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse     -I"C:/OpenModelica1.13.164bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TaurusSim_TestCases_TC_ModulPlusBMS -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=10 -DOMC_NUM_NONLINEAR_SYSTEMS=10 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o TaurusSim.TestCases.TC_ModulPlusBMS_records.o TaurusSim.TestCases.TC_ModulPlusBMS_records.c
gcc  -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse     -I"C:/OpenModelica1.13.164bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TaurusSim_TestCases_TC_ModulPlusBMS -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=10 -DOMC_NUM_NONLINEAR_SYSTEMS=10 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o TaurusSim.TestCases.TC_ModulPlusBMS_01exo.o TaurusSim.TestCases.TC_ModulPlusBMS_01exo.c
gcc  -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse     -I"C:/OpenModelica1.13.164bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TaurusSim_TestCases_TC_ModulPlusBMS -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=10 -DOMC_NUM_NONLINEAR_SYSTEMS=10 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o TaurusSim.TestCases.TC_ModulPlusBMS_02nls.o TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c
gcc  -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse     -I"C:/OpenModelica1.13.164bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TaurusSim_TestCases_TC_ModulPlusBMS -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=10 -DOMC_NUM_NONLINEAR_SYSTEMS=10 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o TaurusSim.TestCases.TC_ModulPlusBMS_03lsy.o TaurusSim.TestCases.TC_ModulPlusBMS_03lsy.c
gcc  -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse     -I"C:/OpenModelica1.13.164bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TaurusSim_TestCases_TC_ModulPlusBMS -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=10 -DOMC_NUM_NONLINEAR_SYSTEMS=10 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o TaurusSim.TestCases.TC_ModulPlusBMS_04set.o TaurusSim.TestCases.TC_ModulPlusBMS_04set.c
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c: In function 'initializeStaticDataNLS830':
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:1625:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal'
   sysData->nominal[i] = data->modelData->booleanVarsData[29].attribute /* moduleNs1p.moduleCell[6].SwitchSignal */.nominal;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:1626:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min'
   sysData->min[i]     = data->modelData->booleanVarsData[29].attribute /* moduleNs1p.moduleCell[6].SwitchSignal */.min;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:1627:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max'
   sysData->max[i++]   = data->modelData->booleanVarsData[29].attribute /* moduleNs1p.moduleCell[6].SwitchSignal */.max;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:1629:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal'
   sysData->nominal[i] = data->modelData->booleanVarsData[28].attribute /* moduleNs1p.moduleCell[5].SwitchSignal */.nominal;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:1630:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min'
   sysData->min[i]     = data->modelData->booleanVarsData[28].attribute /* moduleNs1p.moduleCell[5].SwitchSignal */.min;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:1631:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max'
   sysData->max[i++]   = data->modelData->booleanVarsData[28].attribute /* moduleNs1p.moduleCell[5].SwitchSignal */.max;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:1633:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal'
   sysData->nominal[i] = data->modelData->booleanVarsData[26].attribute /* moduleNs1p.moduleCell[3].SwitchSignal */.nominal;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:1634:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min'
   sysData->min[i]     = data->modelData->booleanVarsData[26].attribute /* moduleNs1p.moduleCell[3].SwitchSignal */.min;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:1635:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max'
   sysData->max[i++]   = data->modelData->booleanVarsData[26].attribute /* moduleNs1p.moduleCell[3].SwitchSignal */.max;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:1637:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal'
   sysData->nominal[i] = data->modelData->booleanVarsData[24].attribute /* moduleNs1p.moduleCell[1].SwitchSignal */.nominal;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:1638:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min'
   sysData->min[i]     = data->modelData->booleanVarsData[24].attribute /* moduleNs1p.moduleCell[1].SwitchSignal */.min;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:1639:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max'
   sysData->max[i++]   = data->modelData->booleanVarsData[24].attribute /* moduleNs1p.moduleCell[1].SwitchSignal */.max;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:1641:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal'
   sysData->nominal[i] = data->modelData->booleanVarsData[25].attribute /* moduleNs1p.moduleCell[2].SwitchSignal */.nominal;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:1642:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min'
   sysData->min[i]     = data->modelData->booleanVarsData[25].attribute /* moduleNs1p.moduleCell[2].SwitchSignal */.min;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:1643:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max'
   sysData->max[i++]   = data->modelData->booleanVarsData[25].attribute /* moduleNs1p.moduleCell[2].SwitchSignal */.max;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:1645:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal'
   sysData->nominal[i] = data->modelData->booleanVarsData[30].attribute /* moduleNs1p.moduleCell[7].SwitchSignal */.nominal;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:1646:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min'
   sysData->min[i]     = data->modelData->booleanVarsData[30].attribute /* moduleNs1p.moduleCell[7].SwitchSignal */.min;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:1647:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max'
   sysData->max[i++]   = data->modelData->booleanVarsData[30].attribute /* moduleNs1p.moduleCell[7].SwitchSignal */.max;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:1649:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal'
   sysData->nominal[i] = data->modelData->booleanVarsData[27].attribute /* moduleNs1p.moduleCell[4].SwitchSignal */.nominal;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:1650:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min'
   sysData->min[i]     = data->modelData->booleanVarsData[27].attribute /* moduleNs1p.moduleCell[4].SwitchSignal */.min;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:1651:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max'
   sysData->max[i++]   = data->modelData->booleanVarsData[27].attribute /* moduleNs1p.moduleCell[4].SwitchSignal */.max;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:1653:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal'
   sysData->nominal[i] = data->modelData->booleanVarsData[31].attribute /* moduleNs1p.moduleCell[8].SwitchSignal */.nominal;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:1654:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min'
   sysData->min[i]     = data->modelData->booleanVarsData[31].attribute /* moduleNs1p.moduleCell[8].SwitchSignal */.min;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:1655:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max'
   sysData->max[i++]   = data->modelData->booleanVarsData[31].attribute /* moduleNs1p.moduleCell[8].SwitchSignal */.max;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c: In function 'initializeStaticDataNLS229':
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:5203:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal'
   sysData->nominal[i] = data->modelData->booleanVarsData[31].attribute /* moduleNs1p.moduleCell[8].SwitchSignal */.nominal;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:5204:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min'
   sysData->min[i]     = data->modelData->booleanVarsData[31].attribute /* moduleNs1p.moduleCell[8].SwitchSignal */.min;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:5205:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max'
   sysData->max[i++]   = data->modelData->booleanVarsData[31].attribute /* moduleNs1p.moduleCell[8].SwitchSignal */.max;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:5207:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal'
   sysData->nominal[i] = data->modelData->booleanVarsData[29].attribute /* moduleNs1p.moduleCell[6].SwitchSignal */.nominal;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:5208:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min'
   sysData->min[i]     = data->modelData->booleanVarsData[29].attribute /* moduleNs1p.moduleCell[6].SwitchSignal */.min;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:5209:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max'
   sysData->max[i++]   = data->modelData->booleanVarsData[29].attribute /* moduleNs1p.moduleCell[6].SwitchSignal */.max;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:5211:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal'
   sysData->nominal[i] = data->modelData->booleanVarsData[30].attribute /* moduleNs1p.moduleCell[7].SwitchSignal */.nominal;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:5212:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min'
   sysData->min[i]     = data->modelData->booleanVarsData[30].attribute /* moduleNs1p.moduleCell[7].SwitchSignal */.min;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:5213:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max'
   sysData->max[i++]   = data->modelData->booleanVarsData[30].attribute /* moduleNs1p.moduleCell[7].SwitchSignal */.max;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:5215:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal'
   sysData->nominal[i] = data->modelData->booleanVarsData[27].attribute /* moduleNs1p.moduleCell[4].SwitchSignal */.nominal;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:5216:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min'
   sysData->min[i]     = data->modelData->booleanVarsData[27].attribute /* moduleNs1p.moduleCell[4].SwitchSignal */.min;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:5217:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max'
   sysData->max[i++]   = data->modelData->booleanVarsData[27].attribute /* moduleNs1p.moduleCell[4].SwitchSignal */.max;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:5219:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal'
   sysData->nominal[i] = data->modelData->booleanVarsData[28].attribute /* moduleNs1p.moduleCell[5].SwitchSignal */.nominal;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:5220:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min'
   sysData->min[i]     = data->modelData->booleanVarsData[28].attribute /* moduleNs1p.moduleCell[5].SwitchSignal */.min;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:5221:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max'
   sysData->max[i++]   = data->modelData->booleanVarsData[28].attribute /* moduleNs1p.moduleCell[5].SwitchSignal */.max;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:5223:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal'
   sysData->nominal[i] = data->modelData->booleanVarsData[25].attribute /* moduleNs1p.moduleCell[2].SwitchSignal */.nominal;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:5224:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min'
   sysData->min[i]     = data->modelData->booleanVarsData[25].attribute /* moduleNs1p.moduleCell[2].SwitchSignal */.min;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:5225:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max'
   sysData->max[i++]   = data->modelData->booleanVarsData[25].attribute /* moduleNs1p.moduleCell[2].SwitchSignal */.max;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:5227:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal'
   sysData->nominal[i] = data->modelData->booleanVarsData[24].attribute /* moduleNs1p.moduleCell[1].SwitchSignal */.nominal;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:5228:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min'
   sysData->min[i]     = data->modelData->booleanVarsData[24].attribute /* moduleNs1p.moduleCell[1].SwitchSignal */.min;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:5229:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max'
   sysData->max[i++]   = data->modelData->booleanVarsData[24].attribute /* moduleNs1p.moduleCell[1].SwitchSignal */.max;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:5231:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'nominal'
   sysData->nominal[i] = data->modelData->booleanVarsData[26].attribute /* moduleNs1p.moduleCell[3].SwitchSignal */.nominal;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:5232:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'min'
   sysData->min[i]     = data->modelData->booleanVarsData[26].attribute /* moduleNs1p.moduleCell[3].SwitchSignal */.min;
                                                                                                                   ^
TaurusSim.TestCases.TC_ModulPlusBMS_02nls.c:5233:115: error: 'BOOLEAN_ATTRIBUTE {aka struct BOOLEAN_ATTRIBUTE}' has no member named 'max'
   sysData->max[i++]   = data->modelData->booleanVarsData[26].attribute /* moduleNs1p.moduleCell[3].SwitchSignal */.max;
                                                                                                                   ^
<builtin>: recipe for target 'TaurusSim.TestCases.TC_ModulPlusBMS_02nls.o' failed
\tools\msys\mingw64\bin\mingw32-make: *** [TaurusSim.TestCases.TC_ModulPlusBMS_02nls.o] Error 1
\tools\msys\mingw64\bin\mingw32-make: *** Waiting for unfinished jobs....
Compilation process failed. Exited with code 2.

Hi,
after installing 1.13.0 (and 1.14.x) I observe, that during storing -in some cases - the editor starts to add tabs!

SynchronousInductionMachines No Frequency dependance of Voltage

I would like to design a model for an electrical generator. I choose to use the synchronous Generator from the Basic Maschine Package SynchronousInductionMachines . But I made a strange observation. The output Voltage is independant from the frequency. Is this a bug or a feature?

Apr-24-16 11:57:21
Heap error in gcc or gdb avoids large size simulations

I'm using version 1.9.6.
Mat-File is used as an output file.

Apr-24-16 11:09:19
Presumably a simple issue in equation handling

I tried, but it is the same error picture ?!?

Here is the whole model. Maybe the issue is more subtil.

model BasicSinglePhaseDCACConverter
  Modelica.Electrical.Analog.Basic.Ground ground1 annotation(Placement(visible = true, transformation(origin = {-90, 4}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Electrical.Analog.Basic.Capacitor UpperHalfCap annotation(Placement(visible = true, transformation(origin = {-36, 24}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  Modelica.Electrical.Analog.Basic.Capacitor LowerHalfCap annotation(Placement(visible = true, transformation(origin = {-36, 4}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  Modelica.Electrical.Analog.Ideal.IdealOpeningSwitch idealOpeningSwitchUpperHalf annotation(Placement(visible = true, transformation(origin = {-10, 34}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Electrical.Analog.Ideal.IdealOpeningSwitch idealOpeningSwitchLowerHalf annotation(Placement(visible = true, transformation(origin = {-6, -6}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Electrical.Analog.Basic.Inductor FilterL(L = 0.01) annotation(Placement(visible = true, transformation(origin = {28, 34}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Electrical.Analog.Basic.Capacitor FilterC(C = 0.001)  annotation(Placement(visible = true, transformation(origin = {52, 24}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  Modelica.Electrical.Analog.Basic.Resistor Load(R = 10000)  annotation(Placement(visible = true, transformation(origin = {92, 24}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  Modelica.Electrical.Analog.Sources.ConstantVoltage constantVoltage1(V = 600) annotation(Placement(visible = true, transformation(origin = {-70, 24}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  Modelica.Electrical.Analog.Sources.ConstantVoltage constantVoltage2(V = 600) annotation(Placement(visible = true, transformation(origin = {-70, 4}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  Modelica.Electrical.Analog.Sensors.VoltageSensor ACOutVSensor annotation(Placement(visible = true, transformation(origin = {118, 24}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
 
  parameter Real pi=2*Modelica.Math.asin(1.0);
  parameter Real Frequenz = 50;
  parameter Real A0 = 230;
  Real SineValue=0;
equation
  connect(ACOutVSensor.n, Load.n) annotation(Line(points = {{118, 14}, {92, 14}, {92, 14}, {92, 14}}, color = {0, 0, 255}));
  connect(ACOutVSensor.p, Load.p) annotation(Line(points = {{118, 34}, {92, 34}, {92, 34}, {92, 34}}, color = {0, 0, 255}));
  connect(FilterC.p, Load.p) annotation(Line(points = {{52, 34}, {92, 34}, {92, 34}, {92, 34}}, color = {0, 0, 255}));
  connect(FilterC.n, Load.n) annotation(Line(points = {{52, 14}, {92, 14}, {92, 14}, {92, 14}}, color = {0, 0, 255}));
  connect(LowerHalfCap.p, FilterC.n) annotation(Line(points = {{-36, 14}, {52, 14}, {52, 14}, {52, 14}}, color = {0, 0, 255}));
  connect(FilterC.p, FilterL.n) annotation(Line(points = {{52, 34}, {38, 34}, {38, 34}, {38, 34}}, color = {0, 0, 255}));
  connect(idealOpeningSwitchUpperHalf.n, FilterL.p) annotation(Line(points = {{0, 34}, {18, 34}}, color = {0, 0, 255}));
  connect(idealOpeningSwitchLowerHalf.n, FilterL.p) annotation(Line(points = {{4, -6}, {18, -6}, {18, 34}}, color = {0, 0, 255}));
  connect(LowerHalfCap.n, idealOpeningSwitchLowerHalf.p) annotation(Line(points = {{-36, -6}, {-18, -6}, {-18, -6}, {-16, -6}}, color = {0, 0, 255}));
  connect(UpperHalfCap.p, idealOpeningSwitchUpperHalf.p) annotation(Line(points = {{-36, 34}, {-20, 34}, {-20, 34}, {-20, 34}}, color = {0, 0, 255}));
  connect(constantVoltage1.p, UpperHalfCap.p) annotation(Line(points = {{-70, 34}, {-36, 34}, {-36, 34}, {-36, 34}}, color = {0, 0, 255}));
  connect(constantVoltage2.n, LowerHalfCap.n) annotation(Line(points = {{-70, -6}, {-36, -6}, {-36, -6}, {-36, -6}}, color = {0, 0, 255}));
  connect(constantVoltage2.p, LowerHalfCap.p) annotation(Line(points = {{-70, 14}, {-36, 14}, {-36, 14}, {-36, 14}}, color = {0, 0, 255}));
  connect(ground1.p, constantVoltage2.p) annotation(Line(points = {{-90, 14}, {-70, 14}, {-70, 14}, {-70, 14}}, color = {0, 0, 255}));

algorithm
  SineValue:=sin(2 * 2*Modelica.Math.asin(1.0) / Frequenz * time);
// when SineValue>0 then
// if SineValue<ACOutVSensor.v then
//   idealOpeningSwitchUpperHalf.control := true;
// end if;
// elsewhen SineValue<0 then
// if SineValue>ACOutVSensor.v then
//   idealOpeningSwitchLowerHalf.control := true;
// end if;
// end when;

idealOpeningSwitchUpperHalf.control :=  if SineValue>0 and SineValue<ACOutVSensor.v then true else false;
idealOpeningSwitchLowerHalf.control :=  if SineValue<0 and SineValue>ACOutVSensor.v then true else false;

  annotation(uses(Modelica(version = "3.2.1")));
end BasicSinglePhaseDCACConverter;

Apr-24-16 10:31:31
Presumably a simple issue in equation handling

Thanks for your fast reply. I change it to

  SineValue:=sin(2 * 2*Modelica.Math.asin(1.0) / Frequenz * time);
  when SineValue>0 then
  if SineValue<ACOutVSensor.v then
    idealOpeningSwitchUpperHalf.control := true;
  end if;
  elsewhen SineValue<0 then
  if SineValue>ACOutVSensor.v then
    idealOpeningSwitchLowerHalf.control := true;
  end if;
  end when;

but still I have 74 equations instead of 73.

Apr-24-16 10:29:50
Heap error in gcc or gdb avoids large size simulations

Hi,
I have troubles compiling models with large numbers of variables. If the number of variables exceeds 1000 variables, I receive a heap error on gcc or gdb. It is reproducable, i.e. it seems to be the number of variables. I have increased the heapsize to (1GB) buy adding some compiler options. This helps to make a step from ~500 up to 1000, but this seems to be the "sound wall".
Are there any additional measures to handle this topic or do I realy standing in front of the "sound wall".
Thanks.

Apr-24-16 10:22:04
Presumably a simple issue in equation handling

Hi,
I wanted to control some switches. However, if you read the algorithm section below. The compiler told me, that there are too many equations (74 instead of 73).

algorithm
  SineValue:=sin(2 * 2*Modelica.Math.asin(1.0) / Frequenz * time);
  when SineValue>0 then
  if SineValue<ACOutVSensor.v then
    idealOpeningSwitchUpperHalf.control := true;
  end if;
  end when;
  when SineValue<0 then
  if SineValue>ACOutVSensor.v then
    idealOpeningSwitchLowerHalf.control := true;
  end if;
  end when;


If I change the section to

algorithm
  SineValue:=sin(2 * 2*Modelica.Math.asin(1.0) / Frequenz * time);
  when SineValue>0 then
  if SineValue<ACOutVSensor.v then
    idealOpeningSwitchUpperHalf.control := true;
  end if;
end when;

I have no precompiler issues, but the behavior of the switches are not correct.

I think I have a problem in understanding the concept of equations and if then else structures. Can anybody provide me some help?

Thanks.

Hi,
I have a very simple question, but I think that I got stock in the way modelica has the be used. Presumably, someone can give me a hint:

I have a simple hello world class:
class Mode
  parameter Real a=-1;
  Real x(start=1);
equation
  der(x)=a*x;
end Mode;

and I want to generate a plot, were the value of x(t=T_end) as a function of is plotted.

Is there a simple solution?

Best Regards

  • Index
  • » Users
  • » Harvey.Weargol
  • » Profile
You are here: