fpt and WinFPT Reference Manual - Command-line Commands
| SimCon Home | Ref Manual Home |
SHOW UNITS
Syntax:
[DO NOT] SHOW UNITS
FPT Version
This command is implemented experimentally in version 3.6-b of fpt and later.
Function:
fpt automatically determines the physical units of all scalar real and complex variables. It reports:
fpt infers units from the use of variables in algebraic expressions. If two variable lives are connected by assignment, addition, subtraction or relational operators they must have the same units. If two variable lives are connected by multiplication, division or exponentiation operators, a relationship is inferred between the units associated with the lives. The arguments and reslts of many intrinsic functions have predeterined units. For example, the argument to SIND has units of degrees of arc and the result is dimensionless.
Pattern matching is used to identify equivalence between units. If two different units are found to equivalent to the same algebraic combination of other unts, the two units are recognised as equivalent.
Notation:
The notation for the reported units is as follows:
Precedence:
When two units are found to be equivalent, a single name is used to represent them. The names take precedence in the order:
Where to Use this Command
| Operating system command line | Yes |
| Configuration file, config.fsp | Yes |
| Specification (fsp) files, *.fsp | Yes |
| Interactively, to FPT> prompt | Yes |
| Interactive command files | Yes |
| Embedded in the Fortran code | Yes |
Example
Parts of an example listing are shown below:
Units(T_OMEGA) == Units(TIME) ** -1 == Units(TVEL) ** 1 * Units(T_RADIUS) ** -1 Variables or variable lives Life(M_OMEGA,0) Life(M_OMEGA,1) T_OMEGA SHAFT_W Units(TIME) Variables or variable lives DT RPT_TIME TIME UNITS OF SYMBOLS ================ AZCLM Undetermined AZIN Dimensionless AZP Units(/XFLOAT/AX,1) BSP has multiple units. Lives: ------------------------------------------------------------------------------ Life: 1 Units(SPAN), Assignments: Line: 5626, File: e:\projects\fpt\fpttests\hel1\original_source\bench.f BSP=8.322 ------------------------------------------------------------------------------ Life: 2 Units(CRPSI), Assignments: **** Uninitialised state **** Line: 5691, File: e:\projects\fpt\fpttests\hel1\original_source\bench.f BSP=BR*SRPSI ------------------------------------------------------------------------------
Copyright ©1995 to 2025 Software Validation Ltd. All rights reserved.