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
1
vote
0 answers

Problem setting fmu parameter with JModelica - 'Failed to set the Real values'

I am trying to set the value of a parameter in JModelica using the approach given in section 4.4.1 of the user manual; however when I load an fmu and try to change the value I get the message: File "src\pyfmi\fmi.pyx", line 209, in…
alkey
  • 986
  • 4
  • 16
  • 33
1
vote
2 answers

Initialization error when compiling code with three equation containing array

I am trying to prepare a modelica code to understand array and for loop. When I am compiling the code, I get following…
damu_d
  • 53
  • 1
  • 8
1
vote
1 answer

FMUException: Failed to setup the experiment

I have a fmu which is created in GT-Suite and am trying to work with it in python. I have followed jmodelica tutorials from pyfmi import load_fmu model = load_fmu('myFMU.fmu') res = model.simulate(final_time=10) My fmu gets loaded but when I try…
chink
  • 1,505
  • 3
  • 28
  • 70
1
vote
0 answers

Change in JModelica transfer_optimization_problem method?

I believe that there has been a change in the JModelica transfer_optimization_problem method that is not documented. If there is a new way of doing this, I'd like to know as I am new to JModelica. I am following the manual for JModelica 2.2 and I…
scottlittle
  • 18,866
  • 8
  • 51
  • 70
1
vote
0 answers

Access FMU system variables during simulation

I have a FMU which I am attempting to simulate in JModelica. The input parameter needs to refer to the current state of some of the variables in the JModelica FMU simulation. However, I'm having trouble accessing these. Reading the documentation, I…
Mark
  • 21
  • 4
1
vote
3 answers

Extending packages and access to the content

I continue work on understanding how to best divide code in library and application. In a few previous posts I have worked with a toy example DEMO_xx library with application dxx_app7. Below is a slightly updated version to cover the question here.…
janpeter
  • 681
  • 8
  • 22
1
vote
1 answer

How do I fix the error, "Model is structurally singular, error found sorting equations"

This is one of the most common errors I receive when working with OpenModelica Software. I already understand how this error is usually triggered, when system parameters are conflicting and disagree with one another. I've already tried omitting…
finnahuss
  • 317
  • 3
  • 9
1
vote
5 answers

Parametrised Modelica library and possibility to use models as parameters - part 2

I work with understanding how parametrized packages in a library can be adapted to external application code, i.e. I like to keep library code and application code very separate. In my example here I have two parameters of my package Equipment, a…
janpeter
  • 681
  • 8
  • 22
1
vote
3 answers

Parametrised Modelica library and possibility to use models as parameters

I try to make a parametrised library. I works fine using packages and connectors as parameters. Using a model as a parameter is also possible. However, if the model is used in the library to build new models using extend, then it is not allowed,…
janpeter
  • 681
  • 8
  • 22
1
vote
1 answer

Modelica - how to extend a (minimal) medium package

I would like to have a package that extends from another basic package. The basic package contains a vector type and constant integers with name for each index number of the vector. It also contains a vector constant that gives each element a value…
janpeter
  • 681
  • 8
  • 22
1
vote
1 answer

Is it currently possible to create/model systems off of the ThermoPower Library in OpenModelica?

For a month now I've been trying to model Power Cycles, specifically the Brayton and Rankine Power Cycles, in an attempt to then model a Combined Power Cycle. The Brayton Cycle example on the ThermoPower Library does in fact run and simulate. This…
finnahuss
  • 317
  • 3
  • 9
1
vote
1 answer

Modelica - how to best adapt import from library to application code

I have a question around structuring Modelica code in a re-usable library part and a specific application part. The question concerns medium and equipment that depends on medium and I am inspired by some of the structure in MSL fluid library but I…
janpeter
  • 681
  • 8
  • 22
1
vote
1 answer

OpenModelica complains about a negative value which can't be negative

Following this question I have modified the energy based controller which I have described here to avoid negative values inside the sqrt: model Model //constants parameter Real m = 1; parameter Real k = 2; parameter Real Fmax = 3; …
Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193
1
vote
1 answer

Why do q_nom & head_nom always give issues for models built from ThermoPower Library?

I've been working within the ThermoPower Library of OpenModelica for a while now trying to build a Combined Power Cycle by first modeling the Brayton and Rankine Power Cycles first. Every time I attempt to use a pump, I always receive errors…
finnahuss
  • 317
  • 3
  • 9
1
vote
0 answers

fmi -Ignoring unknown resource URI

I exported a model fmu from openmodelica OMEditor and it was FMU version 2.0 and I specified it as co-simulation. I am getting the following error: fmistatus = OK; Test CS model Instance (logStatusWarning ): fmi2Instantiate: Ignoring unknown…
lorugant
  • 49
  • 7