Opened 7 years ago

Closed 6 years ago

#4842 closed defect (fixed)

Variable browser in OMEdit confuses the display unit when loading results files

Reported by: Dietmar Winkler Owned by: Adeel Asghar
Priority: high Milestone: 1.14.0
Component: OMEdit Version:
Keywords: Cc:

Description

When using the workaround for OMEdits inability of displaying several simulation run results by exporting the result to CSV and then loading it again I noticed that the display unit switch is wrong in the variable browser.

Take this simple example:

model TempTest
 parameter Modelica.SIunits.Temperature T(displayUnit = "degC")= 353.15;
annotation(uses(Modelica(version = "3.2.2")));
end TempTest;

Run it, plot T and export the result to a csv file.

That will then look like this:

"time","T"
0,80
1,80

When loading this file OMEdit assumes that "80" is in K (of course) BUT in the variable browser the displayUnit switch says "degC" when at actually displays the "80" as 80 K.
So something is wrong with the displayUnit switch logic here.

Actually upon export the value written should not have been 80 but 253.15 if no additional information of degC as unit is stored in the CSV file.

Change History (1)

comment:1 by Adeel Asghar, 6 years ago

Milestone: Future1.14.0
Resolution: fixed
Status: newclosed

The exported csv file has no information about the unit and yes it now contains the value according to the actual unit and not display unit.

Fixed in 3823fc8/OpenModelica.

Note: See TracTickets for help on using tickets.