Skip to content

Namespaces and graphical representation

Jens Möckel edited this page Nov 5, 2015 · 3 revisions

Guidelines regarding the namespace for Modelica objects, i.e. allowed characters, upper- or lowercase, differences between objects.

1.1 General

Class, instance and constant names are written in upper and lower case letters and may contain numbers, e.g., "ElectricCurrent". An underscore is only used at the end of a name to characterize a lower or upper index, e.g., "pin_a".

1.2 Class Names

Class names start always with an upper case letter.

1.3 Instance Names

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).

1.4 Constant Names

Constant names, i.e., names of variables declared with the "constant" prefix, start usually with a upper case letter with only a few exceptions if this is common sense e.g. pi, cp.

1.5 Parameter and Variable Names

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. In Addition see chapter Variable Naming.

1.6 Model, Block and Package Names

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.

1.7 Nomenclature

The nomenclature used in the package Buildings.Utilities.Psychometric and in the package BuildingSystems is as follows:

  • Uppercase X denotes mass fraction per total mass.
  • Lowercase x denotes mass fraction per mass of dry air.
  • The notation z_xy denotes that the function or block has output z and inputs x and y.
  • The symbol pW denotes water vapour pressure, TDewPoi denotes dew point temperature, TWetBul denotes wet bulb temperature, and TDryBul (or simply T) denotes dry bulb temperature.

1.8 Displayed Names

  • The instance name of a component is always displayed in its icon (= text string "%name") in blue colour. 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 colour in a smaller font size as the instance name.