Hi,

I don't quite understand what you want to model
with this code, but at least for now it won't
work in OpenModelica as when statements in
algorithm sections are not yet supported.

The Modelica specification is quite vague regarding
algorithm sections in models. Recently a discussion
about this has been started on the Modelica design
mailing list and hopefully will lead to a better
specification. This will help us implement these
missing features in OpenModelica.

Cheers,
Adrian Pop/

Jason Brown wrote:
Hello,

I have a simple model:

model Testing
parameter Integer r=64 "Number of rows: the y coordinate such that higher indicies are lower";
parameter Integer c=64 "Number of columns: the x coordinate";
Real u[r,c](start = zeros(r,c)) "The x-component of velocity";
Real v[r,c](start = zeros(r,c)) "The y-component of velocity";
algorithm
when sample(0.1,0.1) then
for i in 1:size(u,1), j in 1:size(u,2) loop
u[i,j] := u[i,j] + 2;
v[i,j] := v[i,j] + 1;
end for;
end when;
end Testing;

for which I get the following error when I try to simulate:

 >>> simulate(Tesing, startTime=0.0, stopTime=1.0); getErrorString()
record
    resultFile = "Simulation failed.
Error occured while flattening model D2Q9
"
end record
""

Any ideas on what I'm doing wrong?

Thanks,
Jason
--------------------------------------------
Jason Brown
Georgia Institute of Technology
College of Architecture
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>

Reply via email to