- Index
- » Users
- » Aciledom
- » Profile
Posts
Posts
Does somebody know the answer?
Ok, i think i solved this problem with your help
I've done it without saving. Just copy and paste the command output.
Next question. How do i assign one start value for each cell in a 3D Matrix with variable size? Like this
Code:
...
Integer ni=3;
Integer nj=3;
Integer nk=3;
Real Tc_start=50;
Real Tc[ni,nj,nk](start=Tc_start);
...
Thanks again!
Thanks for your answer!
Ok, this seems to be a good method to solve this problem. But the next problem is, that i don't have all these functions ( loadString, loadFile, writeFile, readFile) in Dymola. Do i have to activate them in the options or something?
Hi there!
I am a moderate experienced Modelica (Dymola) User. So i hope you guys could help me.
I want to build up a model with a huge number of ports (>60). They are named like "portxn_1_1, portxn_2_1, portxn_3_1, portxn_1_2, portxn_1_2, ..." and so on.
The first thing is that i don't want to connect them in the diagram editor or by manually programing to connect them with other variables, like this "portxn_1_1.T = Txn[1,1] ; portxn_2_1.T = Txn[2,1] ; portxn_3_1.T = Txn[3,1] ; ..." . So i tried to connect them by a loop, which loops through the numbers "1_1" of the "portxn".
For example like this:
for i in 1:ni loop
portxn_"i"_1.T = Txn[i,1];
end for;
That's the first problem. At my point of view there is no opportunity to loop through a String in Modelica. My first idea was to program the loop in C and include it with as a external function.
Is this the right way? Does anybody have some ideas? Maybe a example or something?
Thanks!
- Index
- » Users
- » Aciledom
- » Profile