![]() |
GeMA
The GeMA main application
|
GeMA uses the Udunits package for unit conversions. The set of available units is extensive. Most common units are accepted, including common unit multipliers. Since conversions are done by decomposing each unit into their SI equivalents, any combination of known units is also acceptable.
Whenever a data set (state variables, attributes or proeperties) is created, the unit in which its data will be stored can be specified in the GeMA model. Data units can also be given for physics parameters and most other quantities in the model. If this is done, automatic conversions will take place whenever a calculation needs that data in another compatible unit.
When units are correctly specified, even if a physics is expecting some data in meters and the input is in feets, conversions will take place automatically. Everything will work even if different sets of data in the model are in different incompatible units, like, for example, giving mesh coordinates in inches and a conductivity value in W/(m.K).
When defining a unit the following points should be observed:
When working with units, GeMA will always take into consideration the unit in which the data is stored and the unit in which it is being requested. If both are the same, no conversion is ever needed. Otherwise, the following rules apply:
Unit conversions that include a scale offset (like temperature conversions) are handled correctly, even when present in compound units, so 10 degrees Celsius will be converted to 283.15 Kelvin, while 10 degC/m will be converted to 10 K/m.
Adding new units can be done by updating the set of ".xml" files in the "config" directory that can be found on the same folder as the GeMA executable. Another option is to create a copy of those files on another directory, update them, and change the unitsDir
variable on the defaultConfig.lua
file (or in a user config file) to point to the new directory. Refer to the documentation on the Configuration options page for changing the configuration file.