Unit System: Difference between revisions

From GREET.net Help
Jump to navigation Jump to search
(Created page with "==Unit System== ===How it works=== ===Setting Unit Preferences=== ====Preferences from General Settings==== ====Preferences from textbox context menu==== The preferred unit f…")
 
 
(30 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Unit System==
The GREET unit system facilitates tracking which measurements each parameter is recorded in and allows changing what units the parameter uses for display in the graphical user interface.
 
===How it works===


===Setting Unit Preferences===
===Setting Unit Preferences===
The primary reason for creating a flexible unit system was to allow a user to change the way various parameters are displayed. The design now allows users to view input parameters and results in imperial units if that is what they are familiar with, or S.I. units if they prefer, or create their own units entirely. In addition the user has the ability to define the unit in which they would want to input their data. For example if your one set of data is in pounds, and your second set of data is in kilograms you can adjust the software to fit your application, and avoid tedious manual unit conversions.


====Preferences from General Settings====
====Preferences from General Settings====
[[File:GeneralSettingsPrefernces.png|thumb|right|300px|Change Unit Options Using General Settings]]
Units can be adjusted via the "General Settings" page of Greet. To access the "General Settings" press "Preferences" and choose "General Settings". A window should pop up similar to the one shown on the right. The unit settings can be adjusted via the "Preferred Units" tab. This tab should be selected by default when opening "General Settings".
Once open you will be presented with a table. This table can be used to adjust unit preferences. The first column represents what type of unit, the second represents its default unit and the third column represents the user preferred unit. The third column can be modified by using the tiny gray down arrows that reveal a drop down menu of available units. For example with the current settings shown in the screen shot process inputs will be displayed in BTU's. However, if I were to utilize the drop down menu and choose J (for joules) as the user defined unit for energy the inputs will be displayed in Joules instead.
Other settings can also be adjusted via the "Preferred Units" tab. These settings pertain to how the numbers are displayed in the selected units. If the "Automatically add prefixes" check box is checked the software will automatically display numbers like 1000000 btu as 1 mmbtu for aesthetics, if toggled off it will just display 1000000 btu. In addition because number can be represented in so many ways the user has three main ways to view numbers in Greet. Currently in the screen shot shown "Display Numbers with database preferences" is selected. This is fine for most cases. However, the user also has the ability to "Display number with maximum precision". Using this option will display all 16 digits of precision Greet uses in calculations. Alternatively you can also select "Display number in scientific notation", and specify the "Significant digits to use".


====Preferences from textbox context menu====
====Preferences from textbox context menu====
The preferred unit for a parameter can also be changed by right clicking on a textbox and going to "Change Unit". This will open a small window which allows changing what unit the value will be displayed in. If the value has multiple units associated with it, such as with the "Heating Value Liquid" in the picture below, then the preferred unit can be selected for each unit group. Note that changing the preferred units in this way will still change the unit of all other parameters of that unit group so in this case all "Heating Value Liquid" parameters will affected with the new unit selection.


[[File:ChangeUnitfromContext.png|thumb|right|400px|Change Unit preferences from the context menu]]
The preferred unit for a parameter can also be changed by right clicking on a textbox and going to "Change Unit". This will open a small window which allows changing what unit the value will be displayed in. If the value has multiple units associated with it, such as with the "Heating Value Liquid" in the picture below, then the preferred unit can be selected for each unit group.
 
Note that changing the preferred units in this way will still change the unit of all other parameters of that unit group so in this case all "Heating Value Liquid" parameters will be affected with the new unit selection.
 
To switch back to the original units simply follow the same procedure and select the previous units chosen. Their is no harm in switching back and forth the unit system was implemented for the convenience of scientists and engineers to avoid worrying about trivial unit systems.
 
[[File:ChangeUnitfromContext.png]]
 
===How to Define a New Unit===
[[File:DefineNewUnit.png|thumb|right|200px|Defining a New Unit in Greet]]
If a user wishes to interact with the data using a unit not provided in Greet the software allows the user to define their own custom units. This can be done by pressing "Preferences", "General Settings", then clicking "Custom Units", and selecting "Add Custom Unit". A new window should pup up that will allow you to create the new unit. This window is shown on the right.
 
Defining a new unit is a straight forward process. First you must give the unit a name. In the screenshot shown the user named their unit "New_Mass_Unit". The next parameter to choose is the "Unit Group" of the new unit. A "Unit Group" defines what the new unit will measure. May it be mass, distance, volume, etc. In the screenshot shown the user selected mass. Next we can give the unit an abbreviation just as we use "m" for meter or "j" for joules. The abbreviation will be presented next to a value that uses this unit in Greet. In the example of the screenshot: If something weighed four New_Mass_Units, it would be displayed in Greet as "4 NMU".
 
Lastly you must define the conversion formula to convert the newly defined unit to the default unit in the selected unit group. For example in the screenshot the user selected the unit group mass. The default mass unit is kilograms which is shown on the bottom of the "Add New Unit" window. If the user were to select distance the default unit would be meters. In the screenshot the user indicated that in order to convert the New_Mass_Unit into kilograms one must divide it by 685. In other words the user defined that: 685 New_Mass_Unit = 1 Kilogram. After all the parameters have been defined press the "Save" button on the bottom of the "Add New Unit" window.
 
===Technical Notes on Unit System===
Essentially the unit system works by storing a value's unit for every parameter in the database, and then defining conversions to other defined units. The units in Greet are split up into groups. These groups contain valid units that the value can be converted in to. There are two types of groups: base groups and derived groups.
 
A base group stores the units for basic unit measurements such as distance, area, and mass. A derived group contains multiple base groups. This system allows independently storing preferred units for each group. Each group defines default units for conversion which determines what conversion mathematics that need to be done to convert to other units. The conversion is a two stage process in which the original value is converted to the group's default units and then converted to the desired unit.
 
==Internal Links==
* [[How_to|How to]]
* [[Input Tables and Formulas]]
* [[Create and Edit Technologies]]

Latest revision as of 22:16, January 23, 2012

The GREET unit system facilitates tracking which measurements each parameter is recorded in and allows changing what units the parameter uses for display in the graphical user interface.

Setting Unit Preferences

The primary reason for creating a flexible unit system was to allow a user to change the way various parameters are displayed. The design now allows users to view input parameters and results in imperial units if that is what they are familiar with, or S.I. units if they prefer, or create their own units entirely. In addition the user has the ability to define the unit in which they would want to input their data. For example if your one set of data is in pounds, and your second set of data is in kilograms you can adjust the software to fit your application, and avoid tedious manual unit conversions.

Preferences from General Settings

Change Unit Options Using General Settings

Units can be adjusted via the "General Settings" page of Greet. To access the "General Settings" press "Preferences" and choose "General Settings". A window should pop up similar to the one shown on the right. The unit settings can be adjusted via the "Preferred Units" tab. This tab should be selected by default when opening "General Settings".

Once open you will be presented with a table. This table can be used to adjust unit preferences. The first column represents what type of unit, the second represents its default unit and the third column represents the user preferred unit. The third column can be modified by using the tiny gray down arrows that reveal a drop down menu of available units. For example with the current settings shown in the screen shot process inputs will be displayed in BTU's. However, if I were to utilize the drop down menu and choose J (for joules) as the user defined unit for energy the inputs will be displayed in Joules instead.

Other settings can also be adjusted via the "Preferred Units" tab. These settings pertain to how the numbers are displayed in the selected units. If the "Automatically add prefixes" check box is checked the software will automatically display numbers like 1000000 btu as 1 mmbtu for aesthetics, if toggled off it will just display 1000000 btu. In addition because number can be represented in so many ways the user has three main ways to view numbers in Greet. Currently in the screen shot shown "Display Numbers with database preferences" is selected. This is fine for most cases. However, the user also has the ability to "Display number with maximum precision". Using this option will display all 16 digits of precision Greet uses in calculations. Alternatively you can also select "Display number in scientific notation", and specify the "Significant digits to use".

Preferences from textbox context menu

The preferred unit for a parameter can also be changed by right clicking on a textbox and going to "Change Unit". This will open a small window which allows changing what unit the value will be displayed in. If the value has multiple units associated with it, such as with the "Heating Value Liquid" in the picture below, then the preferred unit can be selected for each unit group.

Note that changing the preferred units in this way will still change the unit of all other parameters of that unit group so in this case all "Heating Value Liquid" parameters will be affected with the new unit selection.

To switch back to the original units simply follow the same procedure and select the previous units chosen. Their is no harm in switching back and forth the unit system was implemented for the convenience of scientists and engineers to avoid worrying about trivial unit systems.

ChangeUnitfromContext.png

How to Define a New Unit

Defining a New Unit in Greet

If a user wishes to interact with the data using a unit not provided in Greet the software allows the user to define their own custom units. This can be done by pressing "Preferences", "General Settings", then clicking "Custom Units", and selecting "Add Custom Unit". A new window should pup up that will allow you to create the new unit. This window is shown on the right.

Defining a new unit is a straight forward process. First you must give the unit a name. In the screenshot shown the user named their unit "New_Mass_Unit". The next parameter to choose is the "Unit Group" of the new unit. A "Unit Group" defines what the new unit will measure. May it be mass, distance, volume, etc. In the screenshot shown the user selected mass. Next we can give the unit an abbreviation just as we use "m" for meter or "j" for joules. The abbreviation will be presented next to a value that uses this unit in Greet. In the example of the screenshot: If something weighed four New_Mass_Units, it would be displayed in Greet as "4 NMU".

Lastly you must define the conversion formula to convert the newly defined unit to the default unit in the selected unit group. For example in the screenshot the user selected the unit group mass. The default mass unit is kilograms which is shown on the bottom of the "Add New Unit" window. If the user were to select distance the default unit would be meters. In the screenshot the user indicated that in order to convert the New_Mass_Unit into kilograms one must divide it by 685. In other words the user defined that: 685 New_Mass_Unit = 1 Kilogram. After all the parameters have been defined press the "Save" button on the bottom of the "Add New Unit" window.

Technical Notes on Unit System

Essentially the unit system works by storing a value's unit for every parameter in the database, and then defining conversions to other defined units. The units in Greet are split up into groups. These groups contain valid units that the value can be converted in to. There are two types of groups: base groups and derived groups.

A base group stores the units for basic unit measurements such as distance, area, and mass. A derived group contains multiple base groups. This system allows independently storing preferred units for each group. Each group defines default units for conversion which determines what conversion mathematics that need to be done to convert to other units. The conversion is a two stage process in which the original value is converted to the group's default units and then converted to the desired unit.

Internal Links