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
1 answer

pyFMI Modelica: The FMU contains no binary for this platform

I'm trying to run the simple tutorial examples with pyFMI package in Python but I get an error The FMU contains no binary for this platform. Tried to set the enviromental variables for the FMULibrary but the error is still here. I would appreciate…
NiPapen
  • 95
  • 1
  • 12
2
votes
1 answer

Basic model created in Dymola failing to simulate in JModelica - FMU Exception

I created a basic model of a hot water storage cylinder in Dymola using components from the buildings library package. I have saved the model as an .mo file and successfully compiled the fmu and loaded the model in JModelica. The problem occurs when…
alkey
  • 986
  • 4
  • 16
  • 33
2
votes
1 answer

How to implement nested if statements in Modelica?

I am trying to implement a fault inclusive model of an HVAC system. The fault starts at a user defined time, in this case faultTime = 1000. However, the first part of the if statement is not implemented at all. The following is a snippet of code…
yaska
  • 225
  • 3
  • 7
2
votes
1 answer

Optimal control of a boiler: using Fluid Library w. the DynamicPipe component using JModelica

Im interested in using JModelica together with a model I have constructed in Dymola. Specifically, I have a model of a boiler using the DynamicPipe component, and I then just transfer heat to the pipe to warm up the water inside it, and employ a…
2
votes
1 answer

Replaceable function and function calls from strings

The following three questions are tied together so please forgive the length of the post. Using Dymola 2016. Using a replaceable function call within a model provides the opportunity for the user to have the drop down options. Example below: model…
Scott G
  • 2,194
  • 1
  • 14
  • 24
1
vote
0 answers

Example MSL Fluid and Media and how to introduce small concentrations of some material?

I try to understand MSL Fluid and Media better and study the very basic example Modelica.Fluid.Examples.Tanks.EmptyTanks. Water flows simply from the upper tank to the lower tank.See code below, with T_start added for each tank to also work well…
janpeter
  • 681
  • 8
  • 22
1
vote
1 answer

How to upgrade MSL to 4.0 in JModelica?

I still use mainly latest JModelica 2.14 that comes with MSL 3.2.2. I would like to update MSL to 4.0.0 that is available at https://github.com/modelica/ModelicaStandardLibrary. My installation works to some smaller extent but mainly produce…
janpeter
  • 681
  • 8
  • 22
1
vote
0 answers

Feedback loop in OpenModelica

I am currently working on a two zone combustion model in OpenModelica and I want to simulate the loop presented in the next picture volume calculation. With this way OpenModelica always gives me singular matrix error. Is it even possible to this…
1
vote
0 answers

How JModelica(v2.14) enable directional derivatives?

I'm using PyFMI.master to do co-simulation and the FMUs are compiled by JModelica. However, PyFMI.master said that "UserWarning: The model, room_interface_3, does not support directional derivatives which is necessary in-case of an algebraic loop.…
1
vote
1 answer

Compile modelica to FMU in (open-source and in batch)

A long time ago, I used JModelica/pymodelica to compile modelica models into FMUs, using a simple python script. Now I learn that JModelica is discontinued as an open-source project. (The libraries to run an FMU seems to have been branched out into…
George
  • 11
  • 3
1
vote
1 answer

how can I fixed the Jmodelica compiling error?

I am trying to compile a Modelica model (built in Dymola) using Jmodelica, but got the following error: Compiler arguments: Generating code... ====== Model compiled successfully ======= OU44_ZoneR2C2_funcs.o:OU44_ZoneR2C2_funcs.c:(.text+0x24):…
Tao.Y
  • 87
  • 5
1
vote
1 answer

Problem setting an array to fmu parameter with JModelica - 'FMUException: The length of valueref and values are inconsistent.'

I have a model of algebraic equations, partial and ordinary differentials. I did the discretization of partial differential equations by the finite difference method, as in example 6.9 of Tiller, Introduction to PhysicaL Modeling with Modelica…
1
vote
1 answer

PyFMI parameter estimation and handling of fixed model parameters different from default

I have started to in PyFMI use parameter estimation with the procedure model.estimate() and works well. From the documentation (Andersson et al 2016) as well as practical use I understand that model parameters are taken from the compiled FMU-model…
janpeter
  • 681
  • 8
  • 22
1
vote
2 answers

How to use "connect" statements to automatically derive sum of specific "Real" declared across set of components in modelica?

I was thinking about a feature that would nice to have in Modelica language (I am using OpenModelica 1.14.1). The feature would automatically add an equation representing a sum of desired values. The value representing the sum would be declared in…
1
vote
2 answers

PyFMI in Python 3 environment in Ubuntu 18.04

My goal is to be able to run FMUs produced by OpenModelica in Ubuntu 18.04 and then run these with PyFMI in Python 3 environment. I follow the outline for PyFMI installation here https://jmodelica.org/pyfmi/installation.html. So far I have using…
janpeter
  • 681
  • 8
  • 22