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

Fluid Syntax CurveBend Geometry

Fluid Syntax CurveBend Geometry

Hello,

currently I'm trying to setup a flow network, using the Fluid library. In general with the given examples most of it I can solve, but somehow I struggle with the required input / syntax for the CurvedBend. The documentation nicley describes the physics of the modelling, which is fine, however, the geometric information somehow has to be set for the bend.

when I enter:

  Modelica.Fluid.Fittings.Bends.CurvedBend curvedBend1(redeclare package Medium = Medium, geometry = {Modelica.Fluid.Fittings.BaseClasses.Bends.CurvedBend.Geometry(d_hyd=0.1, R_0=1.5, delta=1.533)})  annotation(Placement(visible = true, transformation(origin = {2, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));


I receive following error message:

Type mismatch in binding geometry = {Modelica.Fluid.Fittings.BaseClasses.Bends.CurvedBend.Geometry(0.1, 1.5, 1.533, 2.5e-005)}, expected subtype of record Modelica.Fluid.Fittings.BaseClasses.Bends.CurvedBend.Geometry
  Real(min = 0.0, quantity = "Length", unit = "m") d_hyd;
  Real(min = 0.0, quantity = "Length", unit = "m") R_0;
  Real(quantity = "Angle", unit = "rad", displayUnit = "deg") delta;
  (type .Modelica.Icons.TypeReal bc:Real(quantity = "Length", unit = "m", displayUnit = "mm")) K;
end Modelica.Fluid.Fittings.BaseClasses.Bends.CurvedBend.Geometry;, got type record Modelica.Fluid.Fittings.BaseClasses.Bends.CurvedBend.Geometry
  Real(min = 0.0, quantity = "Length", unit = "m") d_hyd;
  Real(min = 0.0, quantity = "Length", unit = "m") R_0;
  Real(quantity = "Angle", unit = "rad", displayUnit = "deg") delta;
  (type .Modelica.Icons.TypeReal bc:Real(quantity = "Length", unit = "m", displayUnit = "mm")) K;
end Modelica.Fluid.Fittings.BaseClasses.Bends.CurvedBend.Geometry;[1].


somehow the "expected subtype" and the "got type" are the same, but I don't understand, why this gives then an error.

Thanks in advance for any valuable input!

Edited by: peste - Mar-31-16 13:21:45

Re: Fluid Syntax CurveBend Geometry

just solved:

  Modelica.Fluid.Fittings.Bends.CurvedBend curvedBend1(redeclare package Medium = Medium, geometry = Modelica.Fluid.Fittings.BaseClasses.Bends.CurvedBend.Geometry(d_hyd=0.1, R_0=1) )  annotation(Placement(visible = true, transformation(origin = {2, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));

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