Questions tagged [jmodelica]

An extensible Modelica-based open source platform for optimization, simulation, and analysis of complex dynamic systems.

From the docs:

JModelica.org is an extensible Modelica-based open source platform for optimization, simulation and analysis of complex dynamic systems. The main objective of the project is to create an industrially viable open source platform for optimization of Modelica models, while offering a flexible platform serving as a virtual lab for algorithm development and research.

JModelica.org is distributed under the GPL v.3 license approved by the Open Source Initiative.

JModelica.org at a glance:

  • Model your systems using the object-oriented and equation-based language Modelica
  • Solve your complex simulation and optimization problems using state of the art numerical algorithms
  • Automate your work in the Python scripting environment
  • Visualize your results
111 questions
2
votes
2 answers

How to describe media along a continuous production line with different operations?

I would like to describe a continuous production line with a media flow and with different process units along the line. Outflow of media from one unit is inflow to the next unit. The media can typically be described by a flow rate, pressure and…
janpeter
  • 681
  • 8
  • 22
2
votes
0 answers

Cannot run FMU in pyFMI?

I'm trying to simulate a FMU exported from OpenModelica using pyFMI: from pyfmi import load_fmu import os baseDir = os.path.dirname(os.getcwd()) fmu = baseDir + '\\Woody\\woody.fmu' model = load_fmu(fmu) # Get the options opts =…
jvandeweg
  • 133
  • 5
2
votes
2 answers

Parametrised Modelica library and possibility to “delay” setting of structural parameter - part 3

I work with finding a good way to divide code in two parts: a general library and and application code, The examples I work with usually contain liquids and I want to make the general library independent of the number of components in the liquid.…
janpeter
  • 681
  • 8
  • 22
2
votes
2 answers

How to read .mat output files in JModelica?

To save the time, I'm trying to read the .mat file rather than simulate the model again. I used scipy.io.loadmat but it didn't work well: res = loadmat('ChatteringControl_result.mat') res.keys() ['Aclass', 'dataInfo', 'name', 'data_2', 'data_1',…
CY Ye
  • 23
  • 3
2
votes
0 answers

Models with over 10000 equations / NonLinearTearing / OpenModelica Flags Usage

I am running the very same model but with a different number of equations: Case 1. - number of equations < 10000 Case 2. and number of equations > 10000 The number of equations is changed by changing the discretization (number of nodes).…
Tomillo
  • 157
  • 7
2
votes
2 answers

Problem: Compile FMU c-code from jmodelica with emscripten

Problem If I try to compile c-code (from a FMU exported by JModelica) with emcc, I get an error that the header file "gnu/stubs-32.h" was not found. emcc -I /usr/include/ -I /usr/include/x86_64-linux-gnu/ -I /usr/include/x86_64-linux-gnu/bits/ -I…
19leunam93
  • 21
  • 2
2
votes
2 answers

matrix singular under determined linear system not solvable

Following this question, I modified my code to: model test // types type Mass = Real(unit = "Kg", min = 0); type Length = Real(unit = "m"); type Area = Real(unit = "m2", min = 0); type Force = Real(unit = "Kg.m/s2"); type Pressure =…
Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193
2
votes
2 answers

Error while loading a fmu in python with pyfmi library

I have installed PyFMI library and trying to load a fmu created by GT-Suite in python. I am following this tutorial of jmodelica : https://jmodelica.org/pyfmi/tutorial.html # Import the load function (load_fmu) from pyfmi import load_fmu this set…
chink
  • 1,505
  • 3
  • 28
  • 70
2
votes
1 answer

How do I fix "Variable Not Found in Scope" within Modelica

I recently tried to instantiate the WindFarm.mo located within PowerSystems.Examples.Wind.WindFarm and I received an error message reading: [1] 08:40:50 Translation Error [PowerSystems.AC3ph.Machines: 667:58-667:76]: Variable system.f_nom not found…
finnahuss
  • 317
  • 3
  • 9
2
votes
2 answers

undefined reference to '__imp_fmi2_import_free'

I have been trying to compile and link a test file written in c and which can communicate with FMILibrary of JModelica. I was able to compile and link it and run it in linux systems. coming to the Windows, I am using mingw-64 compiler to compile and…
lorugant
  • 49
  • 7
2
votes
0 answers

PyFMI/JModelica - Pausing simulation and restarting from state with modified parameters

I'm using Dymola 2019 to translate my Modelica model into an FMU, which I then simulate with JModelica (I'm on JModelica version 2.2 from 2018-03-15). My goal is to be able to simulate a certain period, analyze the results, modify certain parameters…
ATLPoly
  • 141
  • 4
2
votes
1 answer

FMU-module method get_states_list()

I found a limitation of the FMU-module method get_states_list(). This method seems to bring a list only of continuous time states and not of discrete time states. I do usually make models that contain both continuous and discrete time sub-models…
janpeter
  • 681
  • 8
  • 22
2
votes
1 answer

FMU-modules and method get_author()

I use JModelica since many years and now run the current version 2.2. I am interested to share (compiled) FMU-modules and put my name and company into the FMU-module. If your FMU-module have the name model then there is a method model.get_author()…
janpeter
  • 681
  • 8
  • 22
2
votes
1 answer

How to automatically delete temporary folder after simulation using pyFMI?

I am performing lots of parallel simulations using pyFMI for sensitivity studies. For every simulation pyFMI creates temporary files in /tmp//JModelica.org/jm_tmp******. These files alone are not very big, but begin to pile up until there…
Yannick
  • 177
  • 1
  • 10
2
votes
1 answer

FMUException: Error loading the binary. Could not load the DLL: A dynamic link library (DLL) initialization routine failed

I'm using pyfmi for loading the Modelica generated model in Python. Once I load the model I want to perform an optimization and parameter estimation. The issue is that for every parameter estimation (optimization iteration) the FMU needs to be…
NiPapen
  • 95
  • 1
  • 12