- Index
- » Users
- » Oh
- » Profile
Posts
Posts
Hi beckling,
I use OpenModelica with the SimForge user interface and sometimes just omcshell. I takes a while to learn the in's and out's of the system.
Phil
Hi, as a followup, I replaced the Ramp block with a Clock with no offset, and it also gave me the right result. - Thanks, again.
Phil
Thanks, jez, for looking into this. There is something strange about the Ramp block, or I am not using it correctly. Here's what I did:
model Table1
import Modelica.Blocks.Sources;
import Modelica.Blocks.Tables;
Tables.CombiTable1Ds Table1(table=[0,0;1,1;2,2;3,10]);
Tables.CombiTable1Ds Table2(table=[0,0;1,1;2,2;3,10]);
Sources.Ramp Ramp22(height=1,duration=3);
equation
Table1.u=Ramp22.y;
Table2.u=time;
end Table1;
I plotted the output from Table1 and Table2. As I expected, Table2.y[1] is correct, but Table1.y[1] is not. Any thoughts?
Thanks
Phil
I got CombiTable1Ds to compile and run with the following declaration
Tables.CombiTable1Ds Table1(tableOnFile=false,table=[0,0;1,1;2,4;3,10])
However, the simulation result is wrong --- CombiTable1Ds simply sets the output equal to its input.
I am sure many people have used CombiTable1Ds successfully. Can someone tell me what I am doing wrong? Here's the rest of the model
model Table1
import Modelica.Blocks.Sources;
import Modelica.Blocks.Tables;
Tables.CombiTable1Ds Table1(tableOnFile=false,table=[0,0;1,1;2,4;3,10]);
Sources.Ramp Ramp22(height=1,duration=3);
equation
connect(Ramp22.y,Table1.u);
end Table1;
I also just started to use OpenModelica, and am having difficulty with CombiTable1Ds. I have this line in my model:
Tables.CombiTable1Ds Table2(tableOnFile=false,table = [0,0,1,0;1,2,3,1;1.5,4,10,2],columns={1,3}) - it won't compile
I also tried
Tables.CombiTable1Ds Table2(tableOnFile=false,table = [0,0,1,0;1,2,3,1;1.5,4,10,2],columns=[1;3]) and
Tables.CombiTable1Ds Table2(tableOnFile=false,table = [0,0,1,0;1,2,3,1;1.5,4,10,2],columns=[1,3])
The last two compiled, but give me run time errors. Can someone give me a working example?
Thanks in advance, Phil
- Index
- » Users
- » Oh
- » Profile