- Index
- » Users
- » FKitanoski
- » Profile
Posts
Posts
The problem lies as I can understand in the "ports", where i've defined a Vector Xi_outflow[nXi]. In my case nXi is 2.
The flattening is functioning perfect. And i can simulate the model using Dymola.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Transalation 17:25:22 line 0:0-0:0 Error building simulator. Buildlog: Syntaxfehler.
gcc -O3 -falign-functions -msse2 -mfpmath=sse -I"C:/OpenModelica1.8.0//include/omc" -I. -L"C:/Dokumente und Einstellungen/lvfkif0/Desktop" -c -o test.o test.c
test.c: In function 'residualFunc18':
test.c:1365: error: '$Pfixedambient1$Pport$PXi_outflow$lB1$c1$rB' undeclared (first use in this function)
test.c:1365: error: (Each undeclared identifier is reported only once
test.c:1365: error: for each function it appears in.)
test.c:1365: error: '$Pvolumeflow1$Pport_a$lB1$rB$PXi_outflow$lB1$rB' undeclared (first use in this function)
test.c:1365: error: '$Pfixedambient2$Pport$PXi_outflow$lB1$c1$rB' undeclared (first use in this function)
test.c:1365: error: '$Pvolumeflow1$Pport_b$lB1$rB$PXi_outflow$lB1$rB' undeclared (first use in this function)
\MinGW\bin\mingw32-make: *** [test.o] Error 1
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I can't upload the files because of restrictions. I would need a email to send the file. Thank you!
Cheers,
Filip
Is this with the new nightly build solved or is it a bigger issue?
cheers,
Filip
Hi, more or less the topic is discussed under the link you posted. It could be done by using the choicesAllMatching, but not necessary to use . In the Modelica Language Specification 3.1. on page 74 under 7.3.4 Annotation Choices for Suggested Redeclarations and Modifications
you can see a simple example:
replaceable model MyResistor=Resistor
annotation(choices(
choice(redeclare model MyResistor=lib2.Resistor(a={2}) "…"),
choice(redeclare model MyResistor=lib2.Resistor2 "…")));
Using this one can choose between the both "models". I think it's pretty nice feature where you can have your component database. Through the choice a dropdown menu in Dymola is generated , where one can choose which paramaterized component is to be used. It's a usefull thing especially for building templates.
The Tabs feature is that in the dialog window of the components under the properties custom tabs could be defined (not only General, Parameters, Modifiers).
Here an example:
model DialogDemo
parameter Boolean b = true "Boolean parameter";
parameter Modelica.SIunits.Length length "Real parameter with unit";
parameter Integer nInports=0 annotation(Dialog(connectorSizing=true));
parameter Real r1 "Real parameter in Group 1" annotation(Dialog(group="Group 1"));
parameter Real r2 "Disabled Real parameter in group 1"
annotation(Dialog(group="Group 1", enable = not b));
parameter Real r3 "Real parameter in Tab 1" annotation(Dialog(tab="Tab 1"));
parameter Real r4 "Real parameter in Tab 1 and Group 2"
annotation(Dialog(tab="Tab 1", group="Group 2"));
StepIn stepIn[nInports];
...
end DialogDemo; <== copied from the modelica specification
Filip
Are tabs/groups annotations possible in OM? I have a parametrized "Components" and i want to have a dropdown menu for choosing the right component for my modeling. I want to implement this in OMEdit?
If this not possible? Any idea for an user friendly implementation. As far as i know this is possible using dymola.
Thank you in advance!
Cheers,
Filip
Thank you. I thought it's up to me and my "modeling"
Cheers,
Filip
And I'm using as i mentioned before the latest OM version 1.8 BETA2
i don't know the company pushes us to use f.... IE and i don't know why but it has some problems with the posting. Now is the entire code.
you can see now the simple code.
Thank you
Using Dymola with this code i don't receive any error or warning. When I try to use it with OM, loading it in the editor it crashes. Trying that in the shell i don't receive any error or warning as well.
In the previous post, i don't know why but the the entire code wasn't posted. As you can see in this code here, the code is a part of the Modelica.Media.Interface.PartialMedium and Modelica.Media.Interface.PartialSimpleMedium
-------
package test
import SI = Modelica.SIunits;
extends Modelica.Icons.Library;
partial package test2
constant Modelica.SIunits.HeatCapacity cp;
replaceable record aaa
"Minimal variable set that is available as input argument to every medium function"
extends Modelica.Icons.Record;
SI.Density rho "Density";
end aaa;
end test2;
partial package test3
extends test2;
redeclare record extends aaa "Thermodynamic state of ideal gas"
SI.Pressure p "Absolute pressure of medium";
SI.Temperature T "Temperature of medium";
end aaa;
end test3;
end test;
Hi a pretty simple code. I'm not that experienced user but i think, there is nothing wrong in it? I hope you can help. Thank you in advance! Filip
code:
---------------
package test
partial package test2
replaceable record ConstantRecord
extends Modelica.Icons.Record;
String Name "name";
SI.Modelica.ThermalConductivity lambda "ThermalConductivity";
end ConstantRecord;
end test2;
partial package test3
extends test2;
redeclare record extends ConstantRecord;
SI.Modelica.HeatCapacity cp %
- Index
- » Users
- » FKitanoski
- » Profile