GiD - The personal pre and post processor

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

<unit>

A unit of measurement is a definite magnitude of a physical quantity, defined and adopted by convention or by law, that is used as a standard for measurement of the same physical quantity. Any other value of the physical quantity can be expressed as a simple multiple of the unit of measurement. For example, length is a physical quantity, and metre is a unit of length that represents a definite predetermined length.


The node <units> in the *.spd file can be used to change some defaults or to add specialized units, which in principle are not supported. The structure and contents of this subtree <units> requires to have the format as further detailed in this document. The following attributes are available:

  • n - name
  • pn - printed name (decorated and translated)
  • p - Priority of the unit, it is regarded as more important than others units. The possible values for 'p' are 1, 2 and 3, as follows,

1 - It gives maximum priority, and therefore a unit with p="1" is the default unit in the GUI.
2 - A unit with p="2" is always shown in the combobox of below to facilitate the selection of the most used units.
3 - It gives lowest priority, and therefore a unit with p="3" could only be chosen when clicking on 'More units...' option in the combobox of below, which enables the user to choose the unit from a table.
Example of combobox items

Table to select the unit to insert

  • factor - The conversion factor used to multiply a quantity when converting from one system of units to another. It is the mathematical tool for converting between units of measurement [1 unit=factor*unit(SI)]. Example: 1mm=10e-3 m.
  • help - To make easier to the user to identify the unit.


Example of <units> field: Species concentration and reference variable are not supported and therefore, both magnitudes are defined in the *.spd file, as follows,

<units>
<unit_magnitude n="Reference_variable_unit" pn="Reference variable unit" default="U" SI_base="U" active="1">
      <unit n="U" pn="ReferenceUnit" p="2" factor="1.0"/>
      <unit n="ppm" pn="parts-per-million" p="2" factor="1.0e-6" help="parts-per-million"/>
      <unit n="ppb" pn="parts-per-billion" p="2" factor="1.0e-9" help="parts-per-billion"/>
      <unit n="%" pn="per-one-hundred" p="2" factor="0.01" help="per-one-hundred"/>
      <unit n="%0" pn="per-one-thousand" p="2" factor="0.001" help="per-one-thousand"/>
      <unit n="Np" pn="Nepper" p="2" factor="1.0" help="Nepper"/>
   </unit_magnitude>
<unit_magnitude n="Species_concentration" pn="Species concentration" default="C" SI_base="C" active="1">
      <unit n="C" pn="ReferenceUnit" p="2" factor="1"/>
      <unit n="ppm" pn="parts-per-million" p="2" factor="1.0e-6" help="parts-per-million"/>
      <unit n="ppb" pn="parts-per-billion" p="2" factor="1.0e-9" help="parts-per-billion"/>
      <unit n="%" pn="per-one-hundred" p="2" factor="0.01" help="per-one-hundred"/>
      <unit n="%0" pn="per-one-thousand" p="2" factor="0.001" help="per-one-thousand"/>
      <unit n="mol" pn="mole" p="2" factor="1.0"/>
    </unit_magnitude>
</units>





  • No labels