openmodelica

Modeling closed hydraulic cycle in OpenModelica

蓝咒 提交于 2019-12-01 09:28:50
I'd like to model a closed hydraulic cycle as one can find in the Modelica Standard Library/Fluid/Examples/HeatingSystem. With the heating system as well as with my (minimalistic) example I've got the same problem: The system is overdetermined. You can find the HeatingSystem as a "bad example" in the following lecture, so I guess this is a well known problem, but I don't really get the point. http://www.modprod.liu.se/MODPROD2011/1.252944/modprod2011-day2-talk3-Keynote-Francesco-Casella-Control-and-Modelica.pdf (page 20) My example is: a pump model producer pipe_flange w,k; parameter Real a,b

modelica: compute minimum/maximum of continuous variable over time

不打扰是莪最后的温柔 提交于 2019-12-01 06:41:52
As stated above: I wish to compute the minimum (and/or maximum) of a continuous variable over time. Here is a minimal example to demonstrate: model MinMaxTest Real u; Real u_min(start = 10); Real u_max(start = -10); equation u = sin(time / 180 * Modelica.Constants.pi); u_min = min(u, u_min); u_max = max(u, u_max); annotation(experiment(StartTime = 0, StopTime = 360, Tolerance = 1e-06, Interval = 1)); end MinMaxTest; u is the arbitrary continuous variable (for demo purposes a simple sinus wave). u_min / u_max is the minimum/maximum over time. Obviously the expected result is u_min=-1 and u_max

Modeling closed hydraulic cycle in OpenModelica

穿精又带淫゛_ 提交于 2019-12-01 05:46:07
问题 I'd like to model a closed hydraulic cycle as one can find in the Modelica Standard Library/Fluid/Examples/HeatingSystem. With the heating system as well as with my (minimalistic) example I've got the same problem: The system is overdetermined. You can find the HeatingSystem as a "bad example" in the following lecture, so I guess this is a well known problem, but I don't really get the point. http://www.modprod.liu.se/MODPROD2011/1.252944/modprod2011-day2-talk3-Keynote-Francesco-Casella

modelica: compute minimum/maximum of continuous variable over time

大兔子大兔子 提交于 2019-12-01 04:50:30
问题 As stated above: I wish to compute the minimum (and/or maximum) of a continuous variable over time. Here is a minimal example to demonstrate: model MinMaxTest Real u; Real u_min(start = 10); Real u_max(start = -10); equation u = sin(time / 180 * Modelica.Constants.pi); u_min = min(u, u_min); u_max = max(u, u_max); annotation(experiment(StartTime = 0, StopTime = 360, Tolerance = 1e-06, Interval = 1)); end MinMaxTest; u is the arbitrary continuous variable (for demo purposes a simple sinus wave

Two-Phase Modelica Media example

╄→尐↘猪︶ㄣ 提交于 2019-11-30 23:25:56
I am trying to develop a simulation in OpenModelica of a flow that has a single substance that will be liquid or vapor. The Modelica.Media.Water models do have two phases, but are extremely complicated, and would be very hard to reproduce for a completely different substance. I would like to find a simple example of a two phase medium that I can work from. There is a partial package TemplateMedium and a partial package PartialTwoPhaseMedium, but I don't see any examples of how to write a completely new Medium that can be in either of two phase. If anyone can provide a simple example, or just a

How to initialize model with previous simulation solution?

泄露秘密 提交于 2019-11-30 17:25:17
问题 Having run out of ideas again I turn to you. I'm sure this has to have been answered before though for the life of me I can't find a clear description of it. Scenario: You work hard to get a model all set up with initial guesses, etc., and then solve for the 'real' steady state (SS) condition of all parameters in the model. From this solution I want to investigate events effects on the system. To perform this deviation from SS analysis, it would be expedient to be able to simply load the SS