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

Posts

Posts

Oct-06-16 11:05:01
FMU export problems

Thanks for the fast reply.
I downloaded and installed the nightly build as you suggested. Running the FMUChecker now it gives me the following error:
[INFO][FMUCHK] Printing output file header
"time"
[INFO][FMILIB] Loading 'win64' binary with 'standard32' platform types
[FATAL][FMICAPI] Could not load the DLL: Impossibile trovare il modulo specificato.

[FATAL][FMUCHK] Could not create the DLL loading mechanism(C-API).

I forgot to say that I'm using FMU version 1 Model Exchange

Oct-06-16 09:43:51
FMU export problems

I'm trying to export my modelica model in FMU and the to load it in Simulink using the Pilot Support Package (PSP) by Mathworks.
When I try to load the FMU file with PSP in Simulink it gives me the following error:
Dynamic library file ("modelxxx.dll") does not exist in FMU 'directory of the FMU file'
I run the FMUChecker and it gives me the following errors:
[FATAL][FMILIB] Could not change to the DLL directory ...\fmucktmpa06852\binaries\win64\
[FATAL][FMILIB] The FMU contains no binary for this platform.
[FATAL][FMUCHK] Could not create the DLL loading mechanism(C-API).

I'm working under Windows10 because PSP is available only for windows.

Any suggestion? I'm new in Modelica.

Thanks in advance.

Aug-05-16 13:28:04
Trying create a simple model

Hi,
I'm new to Modelica and I was used to Matlab and Simulink/SimHydraulics. For external reasons I have to use OpenModelica and Modelica.fluid library. After installing all the suite I had spent sometime to have some of the examples running...why putting example that needs not trivial modifications for beginning user?

I didn't find any good step-by-step tutorial, do someone as some good resource to learn OpenModelica? The documentation provided with the library is not detailed and inadequate for beginners.

Now I'm trying to run a model with a pump, two pipes and two linear valves...for some reasons it doesn't work. Can someone help me? the code is the following:

Code:

model WaterCircuitProportionalValves

  replaceable package Medium = Modelica.Media.Water.StandardWaterOnePhase constrainedby Modelica.Media.Interfaces.PartialMedium;
  Modelica.Fluid.Pipes.StaticPipe pipe(redeclare package Medium = Medium, allowFlowReversal = true, diameter(displayUnit = "mm") = 0.01, length = 3) annotation(Placement(visible = true, transformation(origin = {-14, -44}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Valves.ValveLinear valveLinear1(redeclare package Medium = Medium, allowFlowReversal = true, dp_nominal = 10000, dp_start = 1.03, m_flow_nominal = 100) annotation(Placement(visible = true, transformation(origin = {16, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
  Modelica.Fluid.Machines.ControlledPump pump(redeclare package Medium = Medium, allowFlowReversal = true, checkValve = true, control_m_flow = true, m_flow_nominal = 10, p_a_nominal = 10000000, p_b_nominal = 15000000, use_m_flow_set = true) annotation(Placement(visible = true, transformation(origin = {-68, -50}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Pipes.StaticPipe pipe1(redeclare package Medium = Medium, allowFlowReversal = true, diameter(displayUnit = "mm") = 0.01, length = 3) annotation(Placement(visible = true, transformation(origin = {-16, 36}, extent = {{-10, 10}, {10, -10}}, rotation = 180)));
  Modelica.Fluid.Valves.ValveLinear valveLinear2(redeclare package Medium = Medium, allowFlowReversal = true, dp_nominal = 10000, dp_start = 1.03, m_flow_nominal = 100) annotation(Placement(visible = true, transformation(origin = {76, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
  inner Modelica.Fluid.System system(allowFlowReversal = false, m_flow_start = 0, use_eps_Re = true) annotation(Placement(visible = true, transformation(origin = {72, -86}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Blocks.Sources.Constant const(k = 100) annotation(Placement(visible = true, transformation(origin = {-52, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Vessels.OpenTank tank(redeclare package Medium = Medium, crossArea = 0.01, height = 2, level_start = 1, massDynamics = Modelica.Fluid.Types.Dynamics.FixedInitial, nPorts = 2, portsData = {Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter = 0.01), Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter = 0.01)}, use_T_start = true) annotation(Placement(visible = true, transformation(origin = {-120, 66}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));
  Modelica.Blocks.Sources.Constant const1(k = 1) annotation(Placement(visible = true, transformation(origin = {-18, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Blocks.Sources.Constant const2(k = 1) annotation(Placement(visible = true, transformation(origin = {48, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
  connect(valveLinear2.opening, const2.y) annotation(Line(points = {{68, 0}, {58, 0}, {58, 0}, {60, 0}}, color = {0, 0, 127}));
  connect(valveLinear1.opening, const1.y) annotation(Line(points = {{8, 0}, {-8, 0}, {-8, 0}, {-6, 0}}, color = {0, 0, 127}));
  connect(pump.port_a, tank.ports[1]) annotation(Line(points = {{-78, -50}, {-78, -49.625}, {-120, -49.625}, {-120, 46}}, color = {0, 127, 255}));
  connect(pipe1.port_b, tank.ports[2]) annotation(Line(points = {{-26, 36}, {-60, 36}, {-60, 46}, {-120, 46}}, color = {0, 127, 255}));
  connect(pipe.port_a, pump.port_b) annotation(Line(points = {{-24, -44}, {-35, -44}, {-35, -50}, {-58, -50}}, color = {0, 127, 255}));
  connect(const.y, pump.m_flow_set) annotation(Line(points = {{-41, 10}, {-73, 10}, {-73, -42}}, color = {0, 0, 127}));
  connect(pipe1.port_a, valveLinear1.port_b) annotation(Line(points = {{-6, 36}, {16, 36}, {16, 10}}, color = {0, 127, 255}));
  connect(valveLinear1.port_a, pipe.port_b) annotation(Line(points = {{16, -10}, {16, -44}, {-4, -44}}, color = {0, 127, 255}));
  connect(pipe1.port_a, valveLinear2.port_b) annotation(Line(points = {{-6, 36}, {76, 36}, {76, 10}, {76, 10}}, color = {0, 127, 255}));
  connect(valveLinear2.port_a, pipe.port_b) annotation(Line(points = {{76, -10}, {76, -44}, {-4, -44}}, color = {0, 127, 255}));
  annotation(uses(Modelica(version = "3.2.2")), Diagram);
end WaterCircuitProportionalValves;

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