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
  • Index
  • » Users
  • » Sargot
  • » Profile

Posts

Posts

Jan-25-12 20:48:13
Flattening Problems due to Modelica.Fluid.Pipes.StaticPipe

Ah okay

thx than i didn't do anythink wrong current/wink

Good luck for this topic...

THX for your superfast reply

Jan-25-12 20:18:55
Flattening Problems due to Modelica.Fluid.Pipes.StaticPipe

I try  the newest nightly and try to use parts of the Fluid Lib but it not work fine so i try to test the examples

I picked the model Modelica.Fluid.Examples.Tanks.TanksWithOverflow
but the model checker give me following message:

Code:


[C:/OpenModelica1.8.0/lib/omlibrary/Modelica 3.1/Fluid/Pipes.mo:21:5-40:85:writable] Error: No matching function found for Medium.density(flowModel.states[1])
of type
  .Modelica.Fluid.Pipes.StaticPipe.Medium.density<function>(state:record Modelica.Fluid.Pipes.StaticPipe.FlowModel.Medium.ThermodynamicState
end Modelica.Fluid.Pipes.StaticPipe.FlowModel.Medium.ThermodynamicState;) => Real(min=0.0, max=100000.0, nominal=1.0, start=1.0, quantity=\"Density\", unit=\"kg/m3\", displayUnit=\"g/cm3\") in component pipe
candidates are
  .Modelica.Fluid.Pipes.StaticPipe.Medium.density<function>(state:record Modelica.Fluid.Pipes.StaticPipe.Medium.ThermodynamicState
Integer(min=0, max=2) phase;
Real(min=-100000000.0, max=100000000.0, nominal=1000000.0, quantity=\"SpecificEnergy\", unit=\"J/kg\") h;
Real(min=0.0, max=100000.0, nominal=1.0, start=1.0, quantity=\"Density\", unit=\"kg/m3\", displayUnit=\"g/cm3\") d;
Real(min=1.0, max=10000.0, nominal=300.0, start=300.0, quantity=\"ThermodynamicTemperature\", unit=\"K\", displayUnit=\"degC\") T;
Real(min=0.0, max=100000000.0, nominal=100000.0, start=100000.0, quantity=\"Pressure\", unit=\"Pa\", displayUnit=\"bar\") p;
end Modelica.Fluid.Pipes.StaticPipe.Medium.ThermodynamicState;) => Real(min=0.0, max=100000.0, nominal=1.0, start=1.0, quantity=\"Density\", unit=\"kg/m3\", displayUnit=\"g/cm3\")
Error: Error occurred while flattening model Modelica.Fluid.Examples.Tanks.TanksWithOverflow

I have similar Problems when i want to use Modelica.Fluid.Pipes.StaticPipe i try different Mediums packages of water already.
Anyone have a Idea what wents wrong, or i did wrong????

THX

i would suggest to test other solver
my model (also automotive) has massif numeric problems if i use DASSL if i use Euler or Ruge Kutta there are no problems current/wink

Apr-18-11 17:32:00
i get a warning because my model seems to have a number of state event

i tried to get rid of this message while i am use the

Code:

noEvent(if then else)

for all non boolean if clauses but the message stays the same

by the way using dassl leads to numeric errors euler und ruge kutta works quite well...

in the r8532 the example works again current/wink

Apr-01-11 10:38:47
output value reaches unexpected values

okay perfect this works

thanks a lot.

P.S. One Question if the noEvent works and smooth not this means that my expression is not continious?

Apr-01-11 10:05:39
output value reaches unexpected values

i want create a ratio between i1 and i2 this ratio should have a range from 0 to 1
so i try

Code:

ratio=smooth(2, if i1>i2 then 

i2/i1 else
i1/i2);

but ratio reaches a value of round about 1.049 so i tried

Code:

helpratio=smooth(2, if i1>i2 then 

i2/i1 else
i1/i2);
if helpratio>1.0 then
ratio=1.0 else
ratio=helpratio
end if;

but again ratio reaches round about 1.049

then i tested if the second if loop is used

Code:

helpratio=smooth(2, if i1>i2 then 

i2/i1 else
i1/i2);
if helpratio>1.0 then
ratio=1.0 else
ratio=1.0
end if;

then ratio was always 1 but now helpratio has the expected characteristics(between 0 and 1) What i have done wrong?

if it unsupported OM would not show it like the Fluid package, i have testet this Example on an University PC with Dymola and cross check the code roughly and the Body seems to be the same, but Dymola has no Problems  it seems so that  code stays the same....

i have tested it also it look likes that there is a error in the body package...

Mar-15-11 13:07:25
I though that modelica contains a fluid Libary

Okay that sounds bad, is there already someone working on this problem? So that i can contact him and see if I can help.

Mar-15-11 11:55:47
I though that modelica contains a fluid Libary

okay are this Problems due to flatting the differential equations? Or where these problems comes from?

Mar-15-11 00:12:36
I though that modelica contains a fluid Libary

according to https://www.modelica.org/libraries there should be a fluid library, is there any reason why OM doesn*t contain this lib? Or can I add these lib easily?

Mar-14-11 10:48:57
2 equal equations leads to one more equation and same number unknows
Category: Programming

The Simulation doesn't start, if i connect the necessary  Inputs   and compile I get a quite senselesse message, alleged there should miss some connections to my Medium. I know this message i get it quite often if a have forgot to use some Variables or use a wrong equation...
In Detail: Model with the 2 times the same equation: the model has the same number of unknowns and equations: 66
model+inputs(these are right for sure I have tested them allready in detail) now the compiler complains about missing equation due to missing connections to my medium....

For sure Modellica rearrangements aren't always what i expect. But 2 times one equation should lead 0 = 0 (-> neglect one of both) or to an unsolveable algebraic loop(simulation should start and stop with an error at T=0).

Mar-10-11 15:12:10
2 equal equations leads to one more equation and same number unknows
Category: Programming

I found out that I have had one equation twotimes in my code therefore i delete it ones but this reduce the number of equations by one i would expect that the number of equations and unknows stays the same. Is there any reason for this behavior?

Mar-09-11 21:33:43
Is there a easy way to mix Media?
Category: Programming

e.g. there is already a quite good MediaPackage for Air but i need for my model additional substance in it e.g NO2 NH3....
therefore my Question if there is a way to mix them? i can't connect together because the Media is declared in the connector.

Mar-09-11 21:13:27
Problems due Install nightly-ubuntu contrib

I tried to add nightly-ubuntu contrib but i get following error Message

Code:

 http://build.openmodelica.org/apt/dists/nightly-ubuntu/Release  Unable to find expected entry  contrib/source/Sources in Meta-index file (malformed Release file?)

Has anybody an Idea?

  • Index
  • » Users
  • » Sargot
  • » Profile
You are here: