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
  • » wollowizzard
  • » Profile

Posts

Posts

Jun-20-14 12:27:59
Problems redeclaring the function package of apump

Hey,

I have build a simple fluid model and it worked well.
Then i wanted to include a pump and an error occured:

Warning: Forcing full instantiation of partial class baseFlow during checkModel.

I have already redeclared the medium package but looking at the examples i realized that i have to redeclare the function of the pump also.

Anybody got some advice how to do it?

Jun-01-14 16:11:20
Topic: Fluid
Too many equatiations

Hello,

I tried to biuld a simple example "empty tanks" by myself. I coded it exactly the same way as  the example in the library and when I try to test the code it says everything is ok. But then wehen I try to simulate it there's always the message" too many equations". And I have no idea why.
Here's my code:


model Test123




Modelica.Fluid.Pipes.StaticPipe pipe(redeclare package Medium = Modelica.Media.Water.ConstantPropertyLiquidWater, length = 5, diameter = 0.1, height_ab = -1) annotation(Placement(visible = true, transformation(origin = {-20,0}, extent = {{-10,-10},{10,10}}, rotation = 0)));



Modelica.Fluid.Vessels.OpenTank tank(redeclare package Medium = Modelica.Media.Water.ConstantPropertyLiquidWater, nPorts = 1, height = 10, crossArea = 1, level_start = 1, portsData = {Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter = 0.1)}) annotation(Placement(visible = true, transformation(origin = {-60,40}, extent = {{-10,-10},{10,10}}, rotation = 0)));




  Modelica.Fluid.Vessels.OpenTank opentank1(redeclare package Medium = Modelica.Media.Water.ConstantPropertyLiquidWater, height = 10, crossArea = 2, nPorts = 1, portsData = {Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter = 0.1)}, level_start = 1e-010) annotation(Placement(visible = true, transformation(origin = {40,40}, extent = {{-10,-10},{10,10}}, rotation = 0)));


inner Modelica.Fluid.System system annotation(Placement(visible = true, transformation(origin = {-60,-60}, extent = {{-10,-10},{10,10}}, rotation = 0)));





equation
  connect(pipe.port_b,opentank1.ports[2]) annotation(Line(points = {{-10,0},{40.4348,0},{40.4348,30},{40.4348,30}}));
  connect(tank.ports[1],pipe.port_a) annotation(Line(points = {{-60,30},{-60.4348,30},{-60.4348,-1.30435},{-30,-1.30435},{-30,-1.30435}}));
  annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})));
end Test123;



I hope someone can help me. Thank You!!!!!

May-30-14 22:34:54
Topic: Fluid
Insert media into a system

Hey,

Thanks for your answer.
I have already tried it that way but there is a good chance that i made a mistake ( my first modelica).
So i will try again:)

May-30-14 15:23:33
Topic: Fluid
Insert media into a system

Hey Guys,


Could please someone explain me how I can insert a medium, for example water, into a system. I tried it with the toolbox but it doesn't work. Do I have to write it in the text?

Thank You!!!

May-29-14 16:28:29
entry of fluid medium by using redeclare package

Hey,

I have the same problem with my model. Did you manage to fix it ?
If so it would be great if you can tell me how you did it!

Thanks in advance

May-28-14 21:16:45
Topic: Fluid
Inner Outer Declaration

Thank you very much!!! Now i fixed the first error :-)
I did what you told me but now I have another problem:

[:0:0-0:0] Error: Error occurred while flattening model Test2
[C:/OpenModelica1.9.1Nightly/lib/omlibrary/Modelica 3.2.1/Media/package.mo:4380:17-4505:25] Error: Illegal to instantiate partial class BaseProperties.

I would be very thank thankful for new suggestions :-)

May-27-14 22:42:16
Topic: Fluid
Inner Outer Declaration

Hello,

I'm a student and I started creating a program in Openmodelica. Now I would please need a little help. The program contains only a few straight pipes, fittings, a pump an a volume. Everytime when I try to simulate it there's this report which says:

[C:/OpenModelica1.9.1Nightly/lib/omlibrary/Modelica 3.2.1/Fluid/Interfaces.mo:219:5-219:64] Warning: No corresponding 'inner' declaration found for component .Modelica.Fluid.System staticpipe1.system declared as 'outer '.
  The existing 'inner' components are:
    There are no 'inner' components defined in the model in any of the parent scopes of 'outer' component's scope: Modelica.Fluid.Pipes.StaticPipe.
  Check if you have not misspelled the 'outer' component name.
  Please declare an 'inner' component with the same name in the top scope.
  Continuing flattening by only considering the 'outer' component declaration.

But when I load one of the examples from the fluid librarie it always works and there are no declarations done about inner and outer. And by the way could please seomeone explain me the meaning of inner and outer in this case.

Thank you very much!!!

Sebastian

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