Initializing starts and ends with idle

45 views
Skip to first unread message

Ahmed Elsheikh

unread,
Jan 17, 2014, 6:13:53 AM1/17/14
to bc...@googlegroups.com
Hello Everyone,
 
i am a newbie in using the BCVTB. My work within my master thesis is basically done with dymola. The idea is to build a thermal system for an electric vehicle which consists of cooling a refrigeration circuits in dymola. My model in dymola is basically consisting of 3 models (air conditioning model, low temperature cooling circuit and a high temperature cooling circuit). Each is connected to the other by the means of air flow in a fluid line connecting the heat exchangers. To have a btter understanding please have a look at the attachments.
 
Now I am trying to connect (couple) the models in BCVTB... i used the bcvtb blocks in dymole properly to receive the signals of the flow rate and tepmerature of the flow and use them as input signals to the flow sources in dymola... please have a look at one of the models in the attachments.
 
now for each connection in dymola.. the model has been separated and the flow has been sensed using the guages and that the signals is transfeered to ptolmy as outputs and inputs to another model.
 
what i am getting here is that once i run the model in ptolemy, the commands are given to open dymola.exe but the program is not started for any dymola block. I also get the status of initialization at the left down corner of the program and stays for some moments and then the running stops giving me no errors but only the word 'idle'.
 
I woudl really appreciate it if anyone who has faced such a problem or even to give his or her opinion about the error (causes and solution suggestions).
 
Thank you all very much in advance.
all_in_one.png
BCVTB_Model.png
1234.png

Michael Wetter

unread,
Jan 19, 2014, 10:32:37 AM1/19/14
to bc...@googlegroups.com
I suggest you try the following steps:
  1. try to run examples/dymola-room to see if your installation is correct.
  2. try to run only one model of your system
  3. then, add one component in Ptolemy after the other.  This should help you isolate where the problem is
Also, please check the output and log files that are generated, as they may point you to potential problems.

On another note, as you have all models in Dymola, I do not understand why you want to couple them in the BCVTB. Based on the time synchronization algorithm, you will get some delay as the signals are propagated from one actor to another. See http://simulationresearch.lbl.gov/bcvtb/releases/latest/doc/manual/math.xhtml for the mathematics that leads to a delay of one time step as there is no direct feedthrough in the components.

All the best,

Michael


--
You received this message because you are subscribed to the Google Groups "bcvtb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bcvtb+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ahmed Elsheikh

unread,
Jan 19, 2014, 11:17:20 AM1/19/14
to bc...@googlegroups.com
Hello Michael,

thank you very much for your reply. I tried to run dymola-room model and it works fine so, i don't think there is a problem with the program installation. The idea of isolating the problem i have already tried to run one model but i got the error of "IO Exception" so, i guess it is a message that i receive when there is something wrong with the inputs or the outputs of the model or with the time synchronization between generating outputs from one block and sending inputs to another one. please correct me if i am wrong.

On of the error messages that i have been receiving also is "Failed to write to a simulation log file". I got it when i was running the model in a whole. However, i couldn't translate the error to see what could be the cause or the source of it.

Thank you very much :)

Ahmed Elsheikh

unread,
Jan 20, 2014, 9:10:56 AM1/20/14
to bc...@googlegroups.com
I also forgot to mention that however i am using Radau as the solver in Dymola, when the model is fired up by BCVTB an inisde the simulation window, i can always see that the solver used is Dassl which is not compatible with my stiff dymola model.
 
I thought it was a command dominated by BCVTB to start the simulation in Dymola with Dassl solver in all cases, but i kept editing almost every file that comes with BCVTB to see i f i can change the solver to Radau but i failed....
 
I would really appreciate it if you could tell me what to do.... Thanks.

Michael Wetter

unread,
Jan 20, 2014, 9:50:58 AM1/20/14
to bc...@googlegroups.com
If you need to change the solver, you can do so in simulateAndExit.mos. Look for example at

examples/dymola-room\simulateAndExit.mos

The line

simulateModel("Buildings_Utilities_IO_BCVTB_Examples_TwoRooms", startTime=0, stopTime=21600);

is the command that Dymola executes. Here you can set the solver, its tolerance etc. The BCVTB just calls Dymola to run this script. There are no other ways how the BCVTB would set the solver of Dymola.

For debugging, you may also want to delete the line

exit();

This will avoid Dymola to close so you can see inside Dymola what was simulated.

Dymola itself is started by the BCVTB using bin/runDymola.{sh,bat}.

All the best,

Michael



--

Ahmed Elsheikh

unread,
Jan 20, 2014, 10:02:56 AM1/20/14
to bc...@googlegroups.com
so the line in my case would be:
 
simulateModel("All_in_one.All_in_one_test", startTime=0, stopTime=6000, Algorithm=Radau IIa - order 5 stiff); ?
 
 

Thierry Nouidui

unread,
Jan 20, 2014, 10:23:42 AM1/20/14
to bc...@googlegroups.com
You should change Algorithm=Radau IIa - order 5 stiff with method="Radau".
Thanks!


On Mon, Jan 20, 2014 at 7:02 AM, Ahmed Elsheikh <ahmed.els...@gmail.com> wrote:
so the line in my case would be:
 
simulateModel("All_in_one.All_in_one_test", startTime=0, stopTime=6000, Algorithm=Radau IIa - order 5 stiff); ?
 
 

--
You received this message because you are subscribed to the Google Groups "bcvtb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bcvtb+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
--------------------------------------
Thierry Stephane Nouidui, PhD

Simulation Research Group
Lawrence Berkeley National Laboratory
1 Cyclotron Road, MS 90R3147
Berkeley, CA 94720
(510) 495-2337 voice
email: TSNo...@lbl.gov
http://simulationresearch.lbl.gov
----------------------------------------

Ahmed Hussein

unread,
Jan 20, 2014, 10:37:32 AM1/20/14
to bc...@googlegroups.com
thank you very much Michael for the peice of information... it really made my day :)


--
You received this message because you are subscribed to a topic in the Google Groups "bcvtb" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bcvtb/b3ltjVn_n80/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bcvtb+un...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
Ahmed Hussein Saad Hussein
M.Sc. Energy Conversion and Management
+(49) (0)176-843-57-208
Message has been deleted

Ahmed Elsheikh

unread,
Jan 20, 2014, 11:47:02 AM1/20/14
to bc...@googlegroups.com
Hello Michael,
now the simulation runs pretty well but i was wondering if there is a way to control the time between sending outputs by a block and receiving them as inputs to another one connected to it?...
As seen in the attachemnts, the Dymola block 'controller' takes a lot of time to generate output to LT (Batt HEX) and it takes a long time that the simulation in LT (Batt HEX) would start before even the block 'controller' would generate an output which may lead to an IO error.
how can i delay the start of LT (Batt HEX) or synchronize its start with the generation of outputs from 'Controller' block?
Thanks.
1.png

Ahmed Hussein

unread,
Jan 20, 2014, 11:49:58 AM1/20/14
to bc...@googlegroups.com
I would also like to thank you Nouidui for this piece of info :)


On Mon, Jan 20, 2014 at 4:23 PM, Thierry Nouidui <tsno...@lbl.gov> wrote:

--
You received this message because you are subscribed to a topic in the Google Groups "bcvtb" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bcvtb/b3ltjVn_n80/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bcvtb+un...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--

Thierry Nouidui

unread,
Jan 20, 2014, 12:20:00 PM1/20/14
to bc...@googlegroups.com
Just out of curiosity: Is there any reason why you are not doing the whole modeling in Modelica. The controller and the heat exchanger are both modeled in Modelica, I am really not sure why you introduced an additional transaction layer (BCVTB)?

Thierry


--
You received this message because you are subscribed to the Google Groups "bcvtb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bcvtb+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thierry Nouidui

unread,
Jan 20, 2014, 12:30:24 PM1/20/14
to bc...@googlegroups.com
As of your question regarding delaying inputs to a block: The domain of computation used in the BCVTB (SDF) ensures that a block used inputs (token) only when they are available. You shouldn't encounter IO error when blocks are connected in cascade. Did you encounter such an IO error? What was the error message? 
Thanks!
Thierry


On Mon, Jan 20, 2014 at 8:47 AM, Ahmed Elsheikh <ahmed.els...@gmail.com> wrote:

--
You received this message because you are subscribed to the Google Groups "bcvtb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bcvtb+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ahmed Hussein

unread,
Jan 20, 2014, 12:58:00 PM1/20/14
to bc...@googlegroups.com

Dear Thierry,

As i am developing an approach to simulate cooling and air conditioning cycles in electric vehicles, the idea is to have more than a layout on different platforms.

I knew that even the controller, solver and compiler in dymola are the ones used for running the model in bcvtb, but i bet on different synchronization time of the flow properties exchange between the models to get even slightly differed results from those i already got when running the model in Dymola.

I am not quite sure though whether this trial is feasible but i am sticking to my thesis supervisor's plan :D.

I really appreciate this discussion cause i nearly got the same doubts that u have while my supervisor hasn't.

Thanks :)

You received this message because you are subscribed to a topic in the Google Groups "bcvtb" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bcvtb/b3ltjVn_n80/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bcvtb+un...@googlegroups.com.

Ahmed Hussein

unread,
Jan 20, 2014, 2:42:57 PM1/20/14
to bc...@googlegroups.com
Dear Thierry,

I didn't yet receive an IO error but i used the word might cause i faced the same symptoms in other conditions where the simulation was taking too long to respond and ends eventually with an IO error.

Now to clarify this further, when i run the control block alone, it took the same time to respond as it took in Dymola but now after connecting the LT block to it, it is taking too much time to respond. Unfortunately, i am out of work now cause it is 20:30 here in Stuttgart but by the time i was leaving the simulation was running in both dymola blocks but the results were not yet showing on the plotter.

I kept the simulation running till tomorrow so, let's see what is going to happen and then i will be able to update you with the current status.

I will keep your info about the SDF block in mind during diagnosing log file of the simulation.

Thank you very much :)


Ahmed Elsheikh

unread,
Jan 24, 2014, 3:58:35 AM1/24/14
to bc...@googlegroups.com
Good Morning Thierry,
 
now i am back to observe the simulation of the attached layout and the running of the Ptolmey was on for 2 days without any progress. The simulation started normally but didn't show any progree neither in Dymola nor in BCVTB.
 
the log files have nothing to say cause the simulation didnt even start.... now i am confused about what could be the reason.
 
Thank you :)
BCVTB_Model.png

Ahmed Hussein

unread,
Jan 24, 2014, 10:27:46 AM1/24/14
to bc...@googlegroups.com
Dear Thierry,
 
I have another question to ask... now for connecting the actors in Ptolemy, i was wondering how inputs and outputs are designated in the connections between two actors? I am trying to connect 4 inputs to the BCVTB block in dymola and use them as outputs in Ptolemy from the actor. Two of the output signals i would like to plot them and the others are to be transferred to the next actor... what is the proper way to do this?.. also in that case, how can i make sure that the right signal is going to be transfered to the right actuator if there are more than one output in the connection between two actors?....
 
I will be so appreciating for your answer.
 
Thank you very much in advance.


--
You received this message because you are subscribed to a topic in the Google Groups "bcvtb" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bcvtb/b3ltjVn_n80/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bcvtb+un...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
Reply all
Reply to author
Forward
0 new messages