- Index
- » Users
- » Lisa
- » Profile
Posts
Posts
Hi,
It seem to be the same problem I have already posted.
See: http://openmodelica.org/index.php/forum/topic?id=248
Try the "Show OMI Log" - button to check.
There is another way to use OpenModelica Interactive, please see OpenModelicaUserGuide, Chapter 5.
Best regards.
Lisa
Hi,
Thanks a lot.
Best Regards,
Lisa
Hello Willi,
Thanks a lot.
Best regards.
Lisa
Hi Mohsen,
Thanks for your answer. I know that Media and Fluid are not supported and Thermal is not dependent on media.
I think the wrong results are due to the semiLinear- command in the TwoPort model ( Modelica.Thermal.FluidHeatFlow.Interfaces.Partials.TwoPort).
In my opinion the semiLinear - command is not working correctly.
See also my post: http://www.openmodelica.org/index.php/f … pic?id=274
For correct results in the FluidHeatFlow library it's very important that H_flow = m_flow*h. Because of wrong results from semiLinear , H_flow becomes equal to h , which can't be true.
Best regards.
In Modelica Specifications 3.2 ( page 23 ) the semiLinear- command is described as :
semiLinear(x, positiveSlope, negativeSlope) :
Returns: if x>=0 then positiveSlope*x else negativeSlope*x.
I wrote a model to test the semiLinear- command. If I simulate this model, semiLinear only returns postiveSlope or negativeSlope. It doesn't multiply positiveSlope (negativeSlope) with x.
In my opinion this is an error.
Thanks in advance.
Best regards.
The model :
model Testsemilinear
Real result;
parameter Real positve = 5;
parameter Real negative = 70;
Modelica.Blocks.Sources.Ramp ramp2(height = 2, duration = 5, offset = 0, startTime = 0) annotation(Placement(visible = true, transformation(origin = {-56,-19.5}, extent = {{-15,-15},{15,15}}, rotation = 0)));
Modelica.Blocks.Sources.Ramp ramp1(height = -4, duration = 10, offset = 0, startTime = 10) annotation(Placement(visible = true, transformation(origin = {-54.5,44.5}, extent = {{-15,-15},{15,15}}, rotation = 0)));
Modelica.Blocks.Math.Add add1 annotation(Placement(visible = true, transformation(origin = {-3,15}, extent = {{-15,-15},{15,15}}, rotation = 0)));
equation
connect(ramp2.y,add1.u2) annotation(Line(points = {{-39.5,-19.5},{-27.5,-19.5},{-27.5,5},{-23,5},{-23,6},{-21,6}}));
connect(ramp1.y,add1.u1) annotation(Line(points = {{-38,44.5},{-33,44.5},{-33,24.5},{-21,24.5},{-21,24}}));
result = semiLinear(add1.y, positve, negative);
end Testsemilinear;
In the release notes of OM 1.7.0 you wrote:
“The OpenModelica 1.7.0 ALPHA has some issues simulating some examples from MSL 3.1!
We are working on fixing these issues in the next weeks for a BETA release. “
I'm working with Modelica.Thermal models of the Modelica Standard Library.
I would like to know if the above-mentioned problems concern the examples of Modelica.Thermal ?
I noticed that the simulation of this examples had been improved in the latest nightly builds 1.7.0.BETA.
I tested some examples of Modelica.Thermal.FluidHeatFlow and checked the plausibility of the results.
I also checked the equations in the models and they seem to be okay.
e.g : Provided I understood the definitions correctly, the results should look like this :
if “flowPort_b.m_flow < 0” ( massflow is leaving the connector) then should be “flowPort_b.h = h”
In the results of the examples with OM 1.7.0:
if “flowPort_b.m_flow” < 0 then “flowPort_b.h” becomes equal to “ - h “
I'm wondering if it's my fault or if it is a problem with OM ?
From week to week Open Modelica is getting better and better. Thanks a lot to everybody , who is working on it.
Good luck.
Best regards.
(P.S: I don't have the results of another tool to compare them with OM . For explanations about port definitions I also looked at chapter 2.2 and 2.3 of the following paper. The notation is a little bit different but the principle is the same. : Elmqvist, H., Tummescheit H., and Otter M.( 2003). Object-Oriented Modeling of Thermo-Fluid Systems. Proceedings of 3 rd Int. Modelica Conference, Linköping, Sweden, ed. P. Fritzson, pp. 269-286. )
When I select the variables to print in the interactive simulation mode of OMEdit and then I press the Initialze - button, the following message appear in the OM Log:
setfilter#1#tank1.h:tank2.h:source.flowLevel#end
-> In the setfilter- command there is "#" missing between Variables and Parameters . ( setfilter#seq#var1:var2#par1:par2#end). In the Variables - window you don't differentiate between Variables and Parameters. If the "#" is missing between Variables and Parameters , OMI assumes that tank1.h,tank2.h,source.flowLevel are parameters and returns the values of the first three parameters, which doesn't fit to tank1.h,tank2.h,source.flowLevel , because tank1.h,tank2.h are variables.
------
How does the parameter-window ( parameter change) work ?
Thanks.
Best regards.
Generally it’s possible to define your own Medium with Media from Modelica Standard Library. You have to create a new package and there you can define your medium. The best way to find out, how to do, is to look at the free ThermoPower Library :
e.g.: ThermoPower.Media.FlueGas
( or Modelica.Media.IdealGases.MixtureGases.FlueGasSixComponents)
Then in your model/connector you have to use the commands “replaceable package….” and “redeclare package ….” to use your own medium.
See e.g. :
ThermoPower.Gas.FlangeA,
ThermoPower.Gas.Mixer,
ThermoPower.Test.GasElements.TestGasMixer
(provided that the simulation tool is able to use Modelica.Media)
Thanks.
Is it possible to use Euler with OpenModelica Interactive ?
If I use Euler with OMI, in the result message the simulation time (Tn) is always 0 . ( With dassl the simulation time is returned. )
Thanks in advance.
Best regards.
I'm testing the OpenModelica Interactive with the example client and with my own client. If I use the command
" changevalue#seq#Tn#par1=0.03#end",
I have the following problem:
e.g: If I change the value at Tn = 50,
in the next result message from OMI to GUI Tn will jump to Tn=70 and
in the next step the simulation time will either return to Tn = 50
or sometimes it also returns to a time < 50 ( e.g. Tn=35). Then the simulation continues.
For my purpose OMI should change the value at the time I tell him and it should continue at that time. The simulation time shouldn't jump forward or backward., because if the simulation continues with the new value at the wrong time the results will be false.
Does anybody know why this happens?
Is there any possibility to avoid this?
Thanks in advance.
Best regards.
- Index
- » Users
- » Lisa
- » Profile