.Annex60.UsersGuide.Conventions

Information

This library follows the conventions of the Modelica Standard Library, which are as follows:

Note, in the html documentation of any Modelica library, the headings "h1, h2, h3" should not be used, because they are utilized from the automatically generated documentation/headings. Additional headings in the html documentation should start with "h4".

In the Modelica package the following conventions are used:

  1. Class and instance names are written in upper and lower case letters, e.g., "ElectricCurrent", and may contain numbers. An underscore is only used at the end of a name to characterize a lower or upper index, e.g., "pin_a".
  2. Class names start always with an upper case letter.
  3. Instance names, i.e., names of component instances and of variables (with the exception of constants), start usually with a lower case letter with only a few exceptions if this is common sense (such as "T" for a temperature variable).
  4. Constant names, i.e., names of variables declared with the "constant" prefix, follow the usual naming conventions (= upper and lower case letters) and start usually with an upper case letter, e.g. UniformGravity, SteadyState, with only few exceptions such as "pi" and "h_fg".
  5. The two connectors of a domain that have identical declarations and different icons are usually distinguished by "_a", "_b" or "_p", "_n", e.g., Flange_a/Flange_b, HeatPort_a, HeatPort_b.
  6. The instance name of a component is always displayed in its icon (= text string "%name") in blue color. A connector class has the instance name definition in the diagram layer and not in the icon layer. If displayed, parameter values, e.g., resistance, mass, gear ratio, are displayed in the icon in black color in a smaller font size as the instance name.
  7. Packages have usually the following subpackages:

The Annex60 library uses the following conventions in addition to the ones of the Modelica Standard Library:

  1. The nomenclature used in the package Annex60.Utilities.Psychrometrics is as follows,
  2. Names of models, blocks and packages should start with an upper-case letter and be a noun or a noun with a combination of adjectives and nouns. Use camel-case notation to combine multiple words, such as HeatTransfer.
  3. Parameter and variables names are usually a character, such as T for temperature and p for pressure, or a combination of the first three characters of a word, such as higPreSetPoi for high pressure set point.
  4. Comments should be added to each class (package, model, function etc.). The first character should be upper case. For one-line comments of parameters, variables and classes, no period should be used at the end of the comment.
  5. All variables that have a physical correspondence, including physical ratios, must have a unit. Use (derived) SI units. Non-SI units are to be kept at an absolute minimum, and they must be declared as protected.
  6. To indicate that a class (i.e., a package, model, block etc.) has not been extensively tested or validated, its class name ends with the string Beta.

Generated at 2020-04-01T01:39:02Z by OpenModelicaOpenModelica 1.16.0~dev-259-g8a5138f using GenerateDoc.mos