- Index
- » Programming
- » Modelica Language
- » Issue with...
Issue with Modelica.SIunits.HeatFlowRate not being in the scope I made
Issue with Modelica.SIunits.HeatFlowRate not being in the scope I made
Hello I was following a Modelica tutorial found here: https://www.youtube.com/watch?v=esSMzMC … =BenkyTech by the channel "Benky Tech" At 7:12 Benky makes a scope called Heatport and uses Modelica.SIunits.HeatFlowRate but when I do the same thing I get the error message "[1] 12:47:53 Translation Error
[Alejandro_HeatExampleOneText: 7:3-7:47]: Class Modelica.SIunits.HeatFlowRate not found in scope Heatport.". I am not really sure how to fix this and I did not see how to do it online. What I have written is:
partial connector Heatport
//Potential Varible
Modelica.SIunits.TemperatureDifference T "unit=K";
//Flow Varible
Modelica.SIunits.HeatFlowRate Q "units=Watt";
end Heatport;
Re: Issue with Modelica.SIunits.HeatFlowRate not being in the scope I made
If you are using Modelica Standard Library (MSL) version 3.2.3 the model is called `Modelica.SIunits.HeatFlowRate`, so it is the Model HeatFlowRate in package SIunits. That's probably the MSL version used in the video.
But you are probably using MSL version 4.0.0 (current default) where the SIunits package was renamed/moved to `Units.SI`. In that case you'll need to use `Modelica.Units.SI.HeatFlowRate`.
One way to find moved models while following the video would be to use the library browser to search for models in the loaded libraries. Another option is to use MSL 3.2.3. In OMEdit you'll need to open the options at `Tools->Options`, go to `Libraries ` and edit the system library `Modelica` to use version `3.2.3`.
- AnHeuermann
- 52 Posts
- Index
- » Programming
- » Modelica Language
- » Issue with...