FNC Physics Components in TMS Analytics & Physics 3.3
TMS Analytics & Physics library is a set of classes that provide functionality for building powerful math and engineering applications with Delphi IDE. In the new version 3.3 of the library, we introduced special FNC physics components to take advantage of Delphi’s rapid application development. In this article, we’ll consider the base concepts of the FNC physics components and provide information on how to work with units of measurement. Let’s consider the following FNC physics components: TFNCUnitProvider – creates a physics environment for the application; contains information about registered physics entities and provides units of measurement to other physics components. TFNCUnitConverter – provides properties and functionality to convert physical values measured in two different units. To begin an FNC physics application we first need to put a TFNCUnitProvider component on the form. The component has the following published properties: Quantities (TQuantityCollection) – a collection of registered physical quantities. Prefixes (TPrefixCollection) – a collection of registered prefixes that can be used to create units with multiplier factors (like kilo-, milli-, and so on). Units (TUnitCollection) – a collection of registered units of measurement that can be used to create complicated derived units. When you put a TFNCUnitProvider on the form in design-time, it automatically finds all registered quantities, prefixes, and units. The collections of these items are not editable, they only provide information about available physical entities. When an item is selected in a collection, its properties are shown in the Object Inspector. In the picture below, you can see a collection of physical quantities: Any quantity has the following properties: Name (string) – the name of the quantity. Symbol (string) – a common symbol for the quantity designation. Dimension (string) – physical dimension of the quantity. As an example, we showed the ‘Area’ quantity. Its physical dimension is ‘L^2’ – squared length. More information about physical dimensions can be found in the documentation for the library. Analogously, you can view information about all registered unit prefixes, as shown in the picture below. A prefix provides the following properties: Name (string) – the name of the prefix. Symbol (string) – symbol, identifying the prefix in composite units. Value (real) – the multiplier factor of the prefix. And finally, you can view all available units of measurements. Any unit provides the following properties: Name (string) – the name of the unit. Symbol (string) – the symbol of the unit that is used to identify this unit for conversion algorithm and other manipulations. Dimension (string) – physical dimension of the unit. The unit provider component supplies the physical entities to other components, for example, to the TFNCUnitConverter. This component is intended to convert physical values measured in two different units and has the following properties: Provider (TFNCUnitProvider) – a unit provider. Unit1 (TUnitProperty) – the first unit of measurement for conversion. Unit2 (TUnitProperty) – the second unit of measurement for conversion. Value1 (real) – the first value, measured in the first unit of measurement. Value2 (real) – the second value, measured in the second unit of measurement. Valid (boolean) – read-only value defining if all input items are valid for conversion. Error (string) – read-only text of an error that occurred during conversion. IntervalConversion (boolean) – defines if making the interval conversion or not. First of all, you need to […]
