Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Stratified Storage Tank in Building Library

Stratified Storage Tank in Building Library

Title
Dear All,

In order to use a model of the stratified tank in the Building library which is included in the OpenModelica, I just checked the model. It gave me a Translation Error as: "Output parameter state was not assigned a value". When I click on the error, it opens another model (Modelica.Media). I have not expected that I would receive an error while simulating a model from somehow a built-in package (Building Library). Would you please advise me on how to resolve this error? The address of the model is: Building.Fluid.Storage.Stratified

Thank you.

Regards,

--
Jodeiri
 

Re: Stratified Storage Tank in Building Library

I think you are having a misunderstanding here. Models not always can be simulated directly. In this case the model is prepared for being connected with other models. You should run the model Buildings.Fluid.Storage.Examples.Stratified, where the object tanSim is an instantiation of the model you are trying to test. You can check the coverage of the Buildings library by OpenModelica here

Re: Stratified Storage Tank in Building Library

Thanks for your reply.
After reading your response, this question came to my mind that models are very similar to classes and they do not have limitations in case of simulation and they can be run without any problem (Fritzson's book). Doesn't this statement apply to the "stratified storage tank" model?

Re: Stratified Storage Tank in Building Library

I would say that it is not exactly like this. In order a model to be runable it must contain the same number of variables than equations. You can make a model like this and it will run. The limitation is that you can play only with changing the value of the defined parameters. In order to make modeling more flexible you can leave missing equations, normally declaring the model as partial, but the normal way is to define models that are prepared to run in combination with other models.
This is done normally using connectors. The more frequent connector contains one potential variable and one flow variable, and one hiden equation that makes the flow variable equal to 0. You define in your model the internal variables you need and the same number of equations than variables, so your model is internally complete. Then you add the connectors. If you use a connector like the one described, one equation is missing in your model, the value of the potential variable of the connector. After this, you can let the model like this (one equation missing), add an equation for the connector variables(complete), or add two equations for the connector variables(overspecified because the flow variable has two equations, the one that makes it equal to 0 and the one you added). When you make the connections, the overspecified models will compensate the underspecified models.
I'm not sure if this is the correct answer according to the Modelica language standard, but is the way I see this matter.

Re: Stratified Storage Tank in Building Library

I am very thankful for your profound and useful comments. I got the answer to my last question.
Regards,

There are 0 guests and 0 other users also viewing this topic
You are here: