.QCalc.UsersGuide.GettingStarted

Information

There are some points to note besides those in the "Usage" section of the top-level documentation:

  1. Turn off unit checking in Dymola:
        Advanced.CheckUnits = false;
    This is automatic if QCalc is loaded via load.mos.
  2. Call QCalc.Units.setup() to establish the display units in Dymola. This is automatic if QCalc is loaded via load.mos.
  3. Note that angle is explicit in the definitions of quantities, units, and constants. This helps to identify dimensional inconsistencies and provide insight into the physical equations. Sometimes it is necessary to include factors of U.rad, U.cyc, etc. (where U is QCalc.Units), but usually those units cancel. See QCalc.Units for details on where this is important.
  4. The global variable time is in seconds. It is not a quantity, so it must be multiplied by the unit second (U.s) when used with other quantities. When writing a derivative, it is important to divide the result of the der operator by the unit second: der(x)/U.s. By default, the second has a value of one, but this will not be the case if the base constants are changed.
  5. When using results based on QCalc in an external tool, note that the values of the SI base and coherently derived units are not necessarily one. The values can be loaded from the "units.mos" file that is automatically generated by load.mos in the working directory.
  6. If you wish to introduce new quantities, it may help to use the quantities.xlsx spreadsheet.
  7. There are more details about the implementation in QCalc.Units.

Generated at 2024-04-24T18:15:52Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos