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

OpenModelica and JModelica deliver significantly different results

Following this question, I'm trying to compare the results of the simulation between JModelica and OpenModelica. The Modelica file is identical to the above-mentioned post and the JModelica wrapper is the corrected version: #%% from pymodelica…
Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193
0
votes
0 answers

can't retrieve the results back from JModelica to Python

Following this question, I'm trying to compile and simulate a Modelica model with JModelica. The model is: package friction1D function coulombFriction input Real relVel; input Real shearForce; input Real normalForce; input Real…
Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193
0
votes
1 answer

JModelica fails at compiling (make install)

I tried to install JModelica on my Ubunute 18.04 but I always get a make error. (I've installed both the required pakages for python and python3) I followed the installation guide from its userGuide.pdf…
pringles
  • 13
  • 5
0
votes
0 answers

Unable to simulate OpenModelica ThermoSysPro FMU in PyFMI

Running 64-bit Windows 10. Anaconda installation of PyFMI and pip OMPython. I want to automate the running of a Rankine Cycle model (using ThermoSysPro Components) in Python using OMPython to create the FMU and then PyFMI to simulate it. I have…
sgribben
  • 1
  • 1
0
votes
1 answer

error while creating a 2-tuple as input for model.simulate() of fmu model with pyfmi

I have a fmu created in gt-suite. I am trying to work with it in python using python PyFMI package. My code from pyfmi import load_fmu import numpy as np model = load_fmu('AHUPIv2b.fmu') t = np.linspace(0.,100.,100) u = np.linspace(3.5,4.5,100) v…
chink
  • 1,505
  • 3
  • 28
  • 70
0
votes
1 answer

How to solve - FMUException: The slave failed to initialize

I am new to the FMU world and started with it. I am trying to load and simulate an FMU in python which is created in GT-Suite. I had hard time solving the errors while loading an FMU but could do it finally.I am following jmodelica tutorials from…
chink
  • 1,505
  • 3
  • 28
  • 70
0
votes
1 answer

Am I incorporating this nested Function properly on OpenModelica?

NOTE: This question is referencing PrescribedSpeedPump.mo located ThermoPower.Examples.RankineCycle.Models.PrescribedSpeedPump I'm trying to simple pump model since all models I build incorporating this pump always yield the same error message: [1]…
finnahuss
  • 317
  • 3
  • 9
0
votes
0 answers

How do I solve Modelica errors of variables, where the variables are parameters of extensions that your model is using?

I've been trying to build a Rankine Power Cycle on OpenModelica for quite some time now and have been running into a reoccurring issue that I'm just not sure how to troubleshoot. My Issue: I'm able to get the majority of all of my Rankine Power…
finnahuss
  • 317
  • 3
  • 9
0
votes
0 answers

Including a causal relation in a Modelica simulation leads to translation Error while flattening model

I want to simulate a controller for a mass-spring model which works based on energy: model model //parameters parameter Real m = 1; parameter Real k = 1; parameter Real Fmax = 3; parameter Real x0 = 1; parameter Real x1 = 2; …
Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193
0
votes
2 answers

fmi2Instantiate: Undefined function or variable 'fmuhelper'

I am trying to export an fmu from matlab using the new tool coupling toolbox as shown in this link https://www.mathworks.com/help/simulink/ug/_mw_54e936ec-2fa7-4418-be70-d99c8f91d2bd.html So I was able to export an fmu and it generated 64 bit binary…
lorugant
  • 49
  • 7
0
votes
1 answer

NullPointerException when compile_fmu used for simulation of Dymola *.mo file from library

The libraray I‘m using is based on the MSL and the Modelica Buildings Library. The model can be simulated by Dymola without any error messages or warnings. The MODELICAPATH is set in the bashrc and the PYTHONPATH too. I use JModelica 2.1, Python 2.7…
Debs
  • 1
  • 2
0
votes
1 answer

Running JModelica in PyCharm - running a .bat file before the PyCharm interpreter to setup the environment

I do most of my development work in PyCharm and would like to do the same with JModelica. I understand that the setenv.bat needs to be run before the interpreter is opened, so that the interpreter knows where to locate the JModelica Python Libraries…
alkey
  • 986
  • 4
  • 16
  • 33
0
votes
1 answer

Error when running fmu example in JModelica 2.4 User's Guide: could not find file

I follow word by word Jmodelica user's manual for installation and when running the fmu example in IPython I get: from pymodelica import compile_fmu from pyfmi import load_fmu my_fmu = compile_fmu('RLC_Circuit','RLC_Circuit.mo') Could not find…
leoo321
  • 31
  • 4
0
votes
1 answer

Is it possible to suppress the output of the JModelica solver?

I am using JModelica to perform many simulations simultaneously. It would be very nice to suppress the solver statistics like Final Run Statistics: --- Number of steps : 691 Number of function evaluations …
Yannick
  • 177
  • 1
  • 10
0
votes
0 answers

Cannot run JModelica demos on Windows

I install the JModelica.org following the instruction of UsersGuide on Windows. However, I failed to run the cstr_casadi demos. Do you know what is the reason? I'll appreciate it. Here is the link of UsersGuideUsersGuide
Yi Bao
  • 1