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

Posts

Posts

I want to install OpenModelica on a computer running openSUSE. Hence, I am compiling from source.
I believe I have successfully installed it but I am not able to load the Modelica Standard Library in OMEdit.

I followed the Github readme with one difference that I have specified a location to install i.e.

Code:


> git clone --recursive https://openmodelica.org/git-readonly/OpenModelica.git  openmodelica_src
> cd openmodelica_src
> autoconf
> ./configure CC=clang CXX=clang++ --prefix=/opt/dist/openmodelica
> make -j8
> make install

Initially, on running /opt/dist/openmodelica/bin/OMEdit, I got an error saying libOMPlot.so.1 could not be found.
As a temporary fix, I set the LD_LIBRARY_PATH using

Code:


export LD_LIBRARY_PATH=/opt/dist/openmodelica/lib64/x86_64-linux-gnu/omc/:/opt/dist/openmodelica/lib64:$LD_LIBRARY_PATH

On doing this, I can start OMEdit but the MSL is not loaded automatically. I can't even load it manually using the Menu option, where only the top-level package gets loaded but not the sub-packages.

Does anyone have an idea to solve this issue or at least where I can look for a problem?

I have noticed one difference compared to an installation on an Ubuntu virtual machine.
On openSUSE:

Code:


> readelf -d /opt/dist/openmodelica/bin/OMEdit | grep PATH
0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN/../lib/x86_64-linux-gnu/omc:$ORIGIN/../lib:$ORIGIN]

On Ubuntu:

Code:


readelf -d OMEdit | grep PATH
0x000000000000000f (RPATH)              Library rpath: [$ORIGIN/../lib/x86_64-linux-gnu/omc:$ORIGIN/../lib:$ORIGIN]

I am having an issue with the redeclaration of Medium models in OMEdit 1.13.2.
I tried to check the model Buildings.Fluid.Boilers.Examples.BoilerPolynomial from the Buildings library v5.1.0 and I got the following error:

Code:


Translation Error
[Buildings.Fluid.Boilers.Examples.BoilerPolynomial: 28:3-39:70]: component boi1 contains the definition of a partial class Medium.
Please redeclare it to any package compatible with Modelica.Media.Interfaces.PartialMedium.

I don't understand this error since the component boi1 is declared in the example as:

Code:


package Medium = Buildings.Media.Water "Medium model";
Buildings.Fluid.Boilers.BoilerPolynomial boi1(
    a={0.9},
    effCur=Buildings.Fluid.Types.EfficiencyCurves.Constant,
    Q_flow_nominal=Q_flow_nominal,
    m_flow_nominal = m_flow_nominal,
    redeclare package Medium = Medium,
    dp_nominal=dp_nominal,
    fue=Buildings.Fluid.Data.Fuels.NaturalGasLowerHeatingValue(),
    energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
    from_dp=true,
    T_start=293.15);

I can not predictably reproduce this for other fluid components like source and sink as the same error does not occur for them even though they have similar redeclaration of the Medium. I also got no such error for this model in Dymola. 

Is this a bug in OMEdit or is this an error in the model?

I have also noticed that when a component is duplicated all the parameters get copied but not the redeclarations (like Medium package). Could this be related to the above issue?

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