Coder Social home page Coder Social logo

Comments (3)

tobolar avatar tobolar commented on July 21, 2024

Actually, IMO any common variant of revolutions per minute shall be possible: rpm, r/min, rev/min, see Modelica.Units.NonSI.AngularVelocity_rpm (or https://github.com/modelica/ModelicaStandardLibrary/blob/f095aa0350758431efcc9ff65b436c371de9b1ab/Modelica/Units.mo#L1199).
It seems to me being a tool problem. @sjoelund ?

from vehicleinterfaces.

simonpickering avatar simonpickering commented on July 21, 2024

@tobolar I'm sure your guess is significantly better than mine as today is the first time I've ever tried to use Modelica "in anger"! :)

I am curious though if you don't mind my asking what may be a basic follow-up question or two (and which aren't directly related to VehicleInterface)?:

I assume that the end of the line you linked to ("Angular velocity in revolutions per minute. Alias unit names that are outside of the SI system: rpm, r/min, rev/min") is an annotation/help entry rather than a definition (which I guess is the unit="rev/min" bit?)

That line does appear in the library in my installation fwiw. I did also do some Googling to try to work out how aliases are defined (and found some documentation on the Maplesoft website which looks very similar but uses "1/min" rather than "rev/min" as the eventual unit for Modelica.Units.NonSI.AngularVelocity_rpm (so that's what I tried.)

Is there somewhere else/some other way that aliases for a given unit are defined? e.g. is "rev" defined somewhere on its own with "r" as an alias?

I'm also a little surprised in hindsight that 1/min (which I used and it seemed to work) can be converted to rad/s which is the native AngularSpeed unit that the engine module expects (I think).

All an interesting learning experience :)

from vehicleinterfaces.

tobolar avatar tobolar commented on July 21, 2024

I assume that the end of the line you linked to ("Angular velocity in revolutions per minute. Alias unit names that are outside of the SI system: rpm, r/min, rev/min") is an annotation/help entry rather than a definition (which I guess is the unit="rev/min" bit?)

Yes. Stating this in MSL makes an impression to me this shall be applicable in any tool. But I don't know if this is the case.

Is there somewhere else/some other way that aliases for a given unit are defined?

As long as I know is this tool specific (e.g. displayunit.mos in Dymola). To be sure, in the case of rpm I would rather use "rev/min" as this is obvious. "1/min" could be, in general, misinterpreted. I will change it in VehicleInterfaces.

You can find some discussion on it here: https://stackoverflow.com/questions/24776407/teaching-modelica-medical-non-si-units

from vehicleinterfaces.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.