fpt and WinFPT Reference Manual - Command-line Commands
| SimCon Home | Ref Manual Home |
CHECK UNITS
Syntax:
[DO NOT] CHECK 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 any inconsistencies in units detected during the analysis. A table of the different units identified and the relationships between them may be generated by the SHOW UNITS command. The report generated by CHECK UNITS is limited to the inconsistencies detected.
fpt infers units from the use of variables in algebraic expressions. It first analyses the use of every REAL or COMPLEX variable to determine which uses are independent of one another and are therefore not required to have the same units. The independent usages are termed "lives". Please see the command SHOW LIVES for a description of this analysis. The physical units and dimensions are then analysed as follows:
All inconsistencies between units could be resolved by the assumption that all units are dimensionless. fpt therefore assumes that no real or complex variables represent dimensionless quantities unless they have been declared to be dimensionless by the user, in a UNITS command, or they have been used in intrinsic functions in such a way that they must be dimensionless.
Notation:
The notation for the reported units is as follows:
Format of the Report
Inconsistencies in units are detected during the analysis of algebraic expressions. When an inconsistency is detected, fpt reports an audit trail of the successive units substitutions made in analysing the expression. An inconsistency implies either the use of an undeclared dimensionless quantity, or an error in the code. The audit trail should assist in identifying the problem.
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 |
Default
No check is made by default.
Example
A section of a report is shown below:
------------------------------------------------------------- WARNING Number 3253 Severity 1 (Worst 1) Count 48 File: e:\projects\fpt\fpttests\uh60a\original_source\bench.f C4Q=1.0-C1Q-C2Q-C3Q ^ Inconsistency detected in units and dimensions -------------------------------------------------------------- Units of the objects -------------------- C1Q Units(C2Q) C2Q Units(C2Q) C3Q Units(EZWNTQ) Successive substitutions in analysing units ------------------------------------------- Initial units of sub-expression: <Undetermined> - Units(C2Q) - Units(C2Q) - Units(EZWNTQ) Units(C2Q) + Units(C2Q) + Units(EZWNTQ) Units(C2Q) + Units(EZWNTQ) These units are inconsistent
See Also
Copyright ©1995 to 2024 Software Validation Ltd. All rights reserved.