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

Class SI.Reluctance not found in scope

Class SI.Reluctance not found in scope

Hi,
I tried recreating the example  (Modelica.Magnetic.FundamentalWave.Examples.Components.SinglePhaseInductance) in a new Model "Inerti2"
copied the same code from that example to this Model as refers to many Type paramaters
Get the error

Error: Class SI.Reluctance not found in scope inerti2

However if i compile the example , it works fine

I am using Modelica 4.0.0 and Open Modelcal 1.17

Thanks

Re: Class SI.Reluctance not found in scope

My first guess:
You need to declare what `SI` is by using

Code:

import SI=Modelica.Units.SI;

This could be done in some other place in the MSL example.

If that is not the problem where did you copy the code from?
The error you are describing could be related to the version of the Modelica Standard Library (MSL). Maybe the version where you copied from doesn't match the version you have in OpenModelica, which is using MSL 4.0.0 in your case.

In MSL 4.0.0 the SI units are in

Code:

Units.SI

while in the previous MSL 3.2.3 they where in

Code:

SIunits

Edited by: AnHeuermann - Jul-15-21 10:06:12
There are 0 guests and 0 other users also viewing this topic
You are here: