HansBug commited on
Commit
5070096
1 Parent(s): 3276322

Sync raw source code, with 301 records, on 2024-08-14 05:51:28 CST

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. README.md +323 -0
  2. source.parquet +3 -0
  3. src/sysml.library/Domain Libraries/Analysis/AnalysisTooling.sysml +34 -0
  4. src/sysml.library/Domain Libraries/Analysis/SampledFunctions.sysml +119 -0
  5. src/sysml.library/Domain Libraries/Analysis/StateSpaceRepresentation.sysml +143 -0
  6. src/sysml.library/Domain Libraries/Analysis/TradeStudies.sysml +179 -0
  7. src/sysml.library/Domain Libraries/Cause and Effect/CausationConnections.sysml +76 -0
  8. src/sysml.library/Domain Libraries/Cause and Effect/CauseAndEffect.sysml +81 -0
  9. src/sysml.library/Domain Libraries/Geometry/ShapeItems.sysml +835 -0
  10. src/sysml.library/Domain Libraries/Geometry/SpatialItems.sysml +156 -0
  11. src/sysml.library/Domain Libraries/Metadata/ImageMetadata.sysml +78 -0
  12. src/sysml.library/Domain Libraries/Metadata/ModelingMetadata.sysml +143 -0
  13. src/sysml.library/Domain Libraries/Metadata/ParametersOfInterestMetadata.sysml +39 -0
  14. src/sysml.library/Domain Libraries/Metadata/RiskMetadata.sysml +100 -0
  15. src/sysml.library/Domain Libraries/Quantities and Units/ISQ.sysml +42 -0
  16. src/sysml.library/Domain Libraries/Quantities and Units/ISQAcoustics.sysml +444 -0
  17. src/sysml.library/Domain Libraries/Quantities and Units/ISQAtomicNuclear.sysml +0 -0
  18. src/sysml.library/Domain Libraries/Quantities and Units/ISQBase.sysml +206 -0
  19. src/sysml.library/Domain Libraries/Quantities and Units/ISQCharacteristicNumbers.sysml +0 -0
  20. src/sysml.library/Domain Libraries/Quantities and Units/ISQChemistryMolecular.sysml +1353 -0
  21. src/sysml.library/Domain Libraries/Quantities and Units/ISQCondensedMatter.sysml +1229 -0
  22. src/sysml.library/Domain Libraries/Quantities and Units/ISQElectromagnetism.sysml +0 -0
  23. src/sysml.library/Domain Libraries/Quantities and Units/ISQInformation.sysml +958 -0
  24. src/sysml.library/Domain Libraries/Quantities and Units/ISQLight.sysml +0 -0
  25. src/sysml.library/Domain Libraries/Quantities and Units/ISQMechanics.sysml +1583 -0
  26. src/sysml.library/Domain Libraries/Quantities and Units/ISQSpaceTime.sysml +1171 -0
  27. src/sysml.library/Domain Libraries/Quantities and Units/ISQThermodynamics.sysml +1256 -0
  28. src/sysml.library/Domain Libraries/Quantities and Units/MeasurementRefCalculations.sysml +30 -0
  29. src/sysml.library/Domain Libraries/Quantities and Units/MeasurementReferences.sysml +526 -0
  30. src/sysml.library/Domain Libraries/Quantities and Units/Quantities.sysml +107 -0
  31. src/sysml.library/Domain Libraries/Quantities and Units/QuantityCalculations.sysml +70 -0
  32. src/sysml.library/Domain Libraries/Quantities and Units/SI.sysml +367 -0
  33. src/sysml.library/Domain Libraries/Quantities and Units/SIPrefixes.sysml +48 -0
  34. src/sysml.library/Domain Libraries/Quantities and Units/TensorCalculations.sysml +50 -0
  35. src/sysml.library/Domain Libraries/Quantities and Units/Time.sysml +279 -0
  36. src/sysml.library/Domain Libraries/Quantities and Units/USCustomaryUnits.sysml +255 -0
  37. src/sysml.library/Domain Libraries/Quantities and Units/VectorCalculations.sysml +62 -0
  38. src/sysml.library/Domain Libraries/Requirement Derivation/DerivationConnections.sysml +61 -0
  39. src/sysml.library/Domain Libraries/Requirement Derivation/RequirementDerivation.sysml +39 -0
  40. src/sysml.library/Systems Library/Actions.sysml +505 -0
  41. src/sysml.library/Systems Library/Allocations.sysml +29 -0
  42. src/sysml.library/Systems Library/AnalysisCases.sysml +38 -0
  43. src/sysml.library/Systems Library/Attributes.sysml +25 -0
  44. src/sysml.library/Systems Library/Calculations.sysml +37 -0
  45. src/sysml.library/Systems Library/Cases.sysml +71 -0
  46. src/sysml.library/Systems Library/Connections.sysml +153 -0
  47. src/sysml.library/Systems Library/Constraints.sysml +44 -0
  48. src/sysml.library/Systems Library/Interfaces.sysml +48 -0
  49. src/sysml.library/Systems Library/Items.sysml +149 -0
  50. src/sysml.library/Systems Library/Metadata.sysml +30 -0
README.md ADDED
@@ -0,0 +1,323 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ task_categories:
3
+ - text2text-generation
4
+ tags:
5
+ - modeling
6
+ - code
7
+ license: other
8
+ language:
9
+ - code
10
+ size_categories:
11
+ - n<1K
12
+ ---
13
+
14
+ # Raw Example Code of SysMLv2
15
+
16
+ This is the raw source code of SysMLv2, based on [Systems-Modeling/SysML-v2-Release](https://github.com/Systems-Modeling/SysML-v2-Release).
17
+
18
+ 301 source code files in total, 57 of them are standard library files.
19
+
20
+ | id | path | is_library | lines |
21
+ |-----:|:--------------------------------------------------------------------------------------------------------------------------|:-------------|--------:|
22
+ | 1 | src/sysml/src/training/40. Language Extension/User Keyword Example.sysml | False | 32 |
23
+ | 2 | src/sysml/src/training/40. Language Extension/Semantic Metadata Example.sysml | False | 25 |
24
+ | 3 | src/sysml/src/training/40. Language Extension/Model Library Example.sysml | False | 35 |
25
+ | 4 | src/sysml/src/training/21. Opaque Actions/Opaque Action Example.sysml | False | 19 |
26
+ | 5 | src/sysml/src/training/37. Allocation/Allocation Usage Example.sysml | False | 34 |
27
+ | 6 | src/sysml/src/training/37. Allocation/Allocation Definition Example.sysml | False | 38 |
28
+ | 7 | src/sysml/src/training/09. Connections/Connections Example.sysml | False | 42 |
29
+ | 8 | src/sysml/src/training/34. Use Cases/Use Case Usage Example.sysml | False | 37 |
30
+ | 9 | src/sysml/src/training/34. Use Cases/Use Case Definition Example.sysml | False | 34 |
31
+ | 10 | src/sysml/src/training/14. Action Definitions/Action Definition Example.sysml | False | 21 |
32
+ | 11 | src/sysml/src/training/14. Action Definitions/Action Succession Example-2.sysml | False | 24 |
33
+ | 12 | src/sysml/src/training/14. Action Definitions/Action Shorthand Example.sysml | False | 26 |
34
+ | 13 | src/sysml/src/training/14. Action Definitions/Action Succession Example-1.sysml | False | 26 |
35
+ | 14 | src/sysml/src/training/24. Transitions/Change and Time Triggers.sysml | False | 43 |
36
+ | 15 | src/sysml/src/training/24. Transitions/Local Clock Example.sysml | False | 32 |
37
+ | 16 | src/sysml/src/training/24. Transitions/Transition Actions.sysml | False | 44 |
38
+ | 17 | src/sysml/src/training/07. Parts/Parts Example-1.sysml | False | 29 |
39
+ | 18 | src/sysml/src/training/07. Parts/Parts Example-2.sysml | False | 29 |
40
+ | 19 | src/sysml/src/training/11. Interfaces/Interface Example.sysml | False | 19 |
41
+ | 20 | src/sysml/src/training/11. Interfaces/Interface Decomposition Example.sysml | False | 23 |
42
+ | 21 | src/sysml/src/training/15. Actions/Action Decomposition.sysml | False | 27 |
43
+ | 22 | src/sysml/src/training/03. Generalization/Generalization Example.sysml | False | 19 |
44
+ | 23 | src/sysml/src/training/36. Dependencies/Dependency Example.sysml | False | 27 |
45
+ | 24 | src/sysml/src/training/27. Individuals/Individuals and Roles-1.sysml | False | 22 |
46
+ | 25 | src/sysml/src/training/27. Individuals/Individuals and Snapshots Example.sysml | False | 24 |
47
+ | 26 | src/sysml/src/training/27. Individuals/Individuals and Time Slices.sysml | False | 26 |
48
+ | 27 | src/sysml/src/training/39. Filtering/Filtering Example-1.sysml | False | 37 |
49
+ | 28 | src/sysml/src/training/39. Filtering/Filtering Example-2.sysml | False | 35 |
50
+ | 29 | src/sysml/src/training/05. Redefinition/Redefinition Example.sysml | False | 24 |
51
+ | 30 | src/sysml/src/training/32. Analysis/Trade Study Analysis Example.sysml | False | 43 |
52
+ | 31 | src/sysml/src/training/32. Analysis/Analysis Case Usage Example.sysml | False | 33 |
53
+ | 32 | src/sysml/src/training/32. Analysis/Analysis Case Definition Example.sysml | False | 86 |
54
+ | 33 | src/sysml/src/training/33. Verification/Verification Case Usage Example.sysml | False | 52 |
55
+ | 34 | src/sysml/src/training/33. Verification/Verification Case Definition Example.sysml | False | 44 |
56
+ | 35 | src/sysml/src/training/19. Assignment Actions/Assignment Example.sysml | False | 41 |
57
+ | 36 | src/sysml/src/training/31. Requirements/Requirement Definitions.sysml | False | 42 |
58
+ | 37 | src/sysml/src/training/31. Requirements/Requirement Usages.sysml | False | 25 |
59
+ | 38 | src/sysml/src/training/31. Requirements/Requirement Groups.sysml | False | 33 |
60
+ | 39 | src/sysml/src/training/31. Requirements/Requirement Satisfaction.sysml | False | 27 |
61
+ | 40 | src/sysml/src/training/23. States/State Decomposition-2.sysml | False | 32 |
62
+ | 41 | src/sysml/src/training/23. States/State Actions.sysml | False | 35 |
63
+ | 42 | src/sysml/src/training/23. States/State Decomposition-1.sysml | False | 25 |
64
+ | 43 | src/sysml/src/training/04. Subsetting/Subsetting Example.sysml | False | 15 |
65
+ | 44 | src/sysml/src/training/28. Expressions/Car Mass Rollup Example 1.sysml | False | 38 |
66
+ | 45 | src/sysml/src/training/28. Expressions/Car Mass Rollup Example 2.sysml | False | 38 |
67
+ | 46 | src/sysml/src/training/28. Expressions/MassRollup1.sysml | False | 19 |
68
+ | 47 | src/sysml/src/training/28. Expressions/MassRollup2.sysml | False | 21 |
69
+ | 48 | src/sysml/src/training/02. Part Definitions/Part Definition Example.sysml | False | 20 |
70
+ | 49 | src/sysml/src/training/08. Items/Items Example.sysml | False | 17 |
71
+ | 50 | src/sysml/src/training/38. Metadata/Metadata Example-1.sysml | False | 32 |
72
+ | 51 | src/sysml/src/training/38. Metadata/Metadata Example-2.sysml | False | 20 |
73
+ | 52 | src/sysml/src/training/01. Packages/Documentation Example.sysml | False | 14 |
74
+ | 53 | src/sysml/src/training/01. Packages/Comment Example.sysml | False | 24 |
75
+ | 54 | src/sysml/src/training/01. Packages/Package Example.sysml | False | 9 |
76
+ | 55 | src/sysml/src/training/22. State Definitions/State Definition Example-2.sysml | False | 23 |
77
+ | 56 | src/sysml/src/training/22. State Definitions/State Definition Example-1.sysml | False | 32 |
78
+ | 57 | src/sysml/src/training/12. Binding Connectors/Binding Connectors Example-2.sysml | False | 26 |
79
+ | 58 | src/sysml/src/training/12. Binding Connectors/Binding Connectors Example-1.sysml | False | 29 |
80
+ | 59 | src/sysml/src/training/17. Control/Merge Example.sysml | False | 42 |
81
+ | 60 | src/sysml/src/training/17. Control/Control Structures Example.sysml | False | 29 |
82
+ | 61 | src/sysml/src/training/17. Control/Decision Example.sysml | False | 34 |
83
+ | 62 | src/sysml/src/training/17. Control/Fork Join Example.sysml | False | 41 |
84
+ | 63 | src/sysml/src/training/17. Control/Camera.sysml | False | 25 |
85
+ | 64 | src/sysml/src/training/20. Asynchronous Messaging/Messaging Example.sysml | False | 33 |
86
+ | 65 | src/sysml/src/training/20. Asynchronous Messaging/Messaging with Ports.sysml | False | 40 |
87
+ | 66 | src/sysml/src/training/13. Flow Connections/Flow Connection Interface Example.sysml | False | 22 |
88
+ | 67 | src/sysml/src/training/13. Flow Connections/Flow Connection Definition Example.sysml | False | 21 |
89
+ | 68 | src/sysml/src/training/13. Flow Connections/Flow Connection Usage Example.sysml | False | 18 |
90
+ | 69 | src/sysml/src/training/16. Conditional Succession/Conditional Succession Example-2.sysml | False | 31 |
91
+ | 70 | src/sysml/src/training/16. Conditional Succession/Conditional Succession Example-1.sysml | False | 32 |
92
+ | 71 | src/sysml/src/training/29. Calculations/Calculation Definitions.sysml | False | 23 |
93
+ | 72 | src/sysml/src/training/29. Calculations/Calculation Usages-2.sysml | False | 29 |
94
+ | 73 | src/sysml/src/training/29. Calculations/Calculation Usages-1.sysml | False | 42 |
95
+ | 74 | src/sysml/src/training/06. Enumeration Definitions/Enumeration Definitions-1.sysml | False | 17 |
96
+ | 75 | src/sysml/src/training/06. Enumeration Definitions/Enumeration Definitions-2.sysml | False | 32 |
97
+ | 76 | src/sysml/src/training/18. Action Performance/Action Performance Example.sysml | False | 21 |
98
+ | 77 | src/sysml/src/training/26. Occurrences/Time Slice and Snapshot Example.sysml | False | 27 |
99
+ | 78 | src/sysml/src/training/26. Occurrences/Interaction Example-2.sysml | False | 34 |
100
+ | 79 | src/sysml/src/training/26. Occurrences/Interaction Example-1.sysml | False | 23 |
101
+ | 80 | src/sysml/src/training/26. Occurrences/Event Occurrence Example.sysml | False | 29 |
102
+ | 81 | src/sysml/src/training/26. Occurrences/Interaction Realization-1.sysml | False | 55 |
103
+ | 82 | src/sysml/src/training/26. Occurrences/Message Payload Example.sysml | False | 36 |
104
+ | 83 | src/sysml/src/training/26. Occurrences/Interaction Realization-2.sysml | False | 82 |
105
+ | 84 | src/sysml/src/training/10. Ports/Port Conjugation Example.sysml | False | 20 |
106
+ | 85 | src/sysml/src/training/10. Ports/Port Example.sysml | False | 26 |
107
+ | 86 | src/sysml/src/training/35. Variability/Variation Usages.sysml | False | 25 |
108
+ | 87 | src/sysml/src/training/35. Variability/Variation Definitions.sysml | False | 35 |
109
+ | 88 | src/sysml/src/training/35. Variability/Variation Configuration.sysml | False | 14 |
110
+ | 89 | src/sysml/src/training/41. Views/Viewpoint Example.sysml | False | 38 |
111
+ | 90 | src/sysml/src/training/41. Views/Views Example.sysml | False | 35 |
112
+ | 91 | src/sysml/src/training/25. State Exhibition/State Exhibition Example.sysml | False | 15 |
113
+ | 92 | src/sysml/src/training/30. Constraints/Time Constraints.sysml | False | 37 |
114
+ | 93 | src/sysml/src/training/30. Constraints/Analytical Constraints.sysml | False | 43 |
115
+ | 94 | src/sysml/src/training/30. Constraints/Constraint Assertions-1.sysml | False | 32 |
116
+ | 95 | src/sysml/src/training/30. Constraints/Constraints Example-1.sysml | False | 32 |
117
+ | 96 | src/sysml/src/training/30. Constraints/Constraints Example-2.sysml | False | 32 |
118
+ | 97 | src/sysml/src/training/30. Constraints/Derivation Constraints.sysml | False | 25 |
119
+ | 98 | src/sysml/src/training/30. Constraints/Constraint Assertions-2.sysml | False | 37 |
120
+ | 99 | src/sysml/src/examples/Metadata Examples/IssueMetadataExample.sysml | False | 30 |
121
+ | 100 | src/sysml/src/examples/Metadata Examples/RationaleMetadataExample.sysml | False | 24 |
122
+ | 101 | src/sysml/src/examples/Metadata Examples/RequirementMetadataExample.sysml | False | 34 |
123
+ | 102 | src/sysml/src/examples/Metadata Examples/RiskMetadataExample.sysml | False | 19 |
124
+ | 103 | src/sysml/src/examples/Metadata Examples/VerificationMetadataExample.sysml | False | 15 |
125
+ | 104 | src/sysml/src/examples/Interaction Sequencing Examples/ServerSequenceRealization-3.sysml | False | 151 |
126
+ | 105 | src/sysml/src/examples/Interaction Sequencing Examples/ServerSequenceRealization-2.sysml | False | 106 |
127
+ | 106 | src/sysml/src/examples/Interaction Sequencing Examples/ServerSequenceModel.sysml | False | 42 |
128
+ | 107 | src/sysml/src/examples/Interaction Sequencing Examples/ServerSequenceOutsideRealization-2.sysml | False | 101 |
129
+ | 108 | src/sysml/src/examples/Interaction Sequencing Examples/ServerSequenceOutsideRealization-3.sysml | False | 159 |
130
+ | 109 | src/sysml/src/examples/Interaction Sequencing Examples/ServerSequenceModelOutside.sysml | False | 20 |
131
+ | 110 | src/sysml/src/examples/v1 Spec Examples/D.4.7.8 Dynamics/HSUVDynamics.sysml | False | 88 |
132
+ | 111 | src/sysml/src/examples/v1 Spec Examples/8.4.1 Wheel Hub Assembly/Wheel Package.sysml | False | 94 |
133
+ | 112 | src/sysml/src/examples/v1 Spec Examples/8.4.1 Wheel Hub Assembly/Wheel Package - Updated.sysml | False | 92 |
134
+ | 113 | src/sysml/src/examples/v1 Spec Examples/8.4.5 Constraining Decomposition/Vehicle Decomposition - Updated.sysml | False | 68 |
135
+ | 114 | src/sysml/src/examples/v1 Spec Examples/8.4.5 Constraining Decomposition/Vehicle Decomposition.sysml | False | 55 |
136
+ | 115 | src/sysml/src/examples/Arrowhead Framework Example/AHFSequences.sysml | False | 122 |
137
+ | 116 | src/sysml/src/examples/Arrowhead Framework Example/AHFCoreLib.sysml | False | 55 |
138
+ | 117 | src/sysml/src/examples/Arrowhead Framework Example/AHFNorwayTopics.sysml | False | 160 |
139
+ | 118 | src/sysml/src/examples/Arrowhead Framework Example/AHFProfileLib.sysml | False | 117 |
140
+ | 119 | src/sysml/src/examples/Requirements Examples/RequirementDerivationExample.sysml | False | 39 |
141
+ | 120 | src/sysml/src/examples/Requirements Examples/VehicleRequirementDerivation.sysml | False | 40 |
142
+ | 121 | src/sysml/src/examples/Requirements Examples/HSUVRequirements.sysml | False | 39 |
143
+ | 122 | src/sysml/src/examples/Variability Examples/VehicleVariabilityModel.sysml | False | 165 |
144
+ | 123 | src/sysml/src/examples/Import Tests/QualifiedNameImportTest.sysml | False | 13 |
145
+ | 124 | src/sysml/src/examples/Import Tests/AliasImport.sysml | False | 13 |
146
+ | 125 | src/sysml/src/examples/Import Tests/PrivateImportTest.sysml | False | 33 |
147
+ | 126 | src/sysml/src/examples/Import Tests/CircularImport.sysml | False | 27 |
148
+ | 127 | src/sysml/src/examples/Camera Example/PictureTaking.sysml | False | 12 |
149
+ | 128 | src/sysml/src/examples/Camera Example/Camera.sysml | False | 14 |
150
+ | 129 | src/sysml/src/examples/Vehicle Example/VehicleIndividuals.sysml | False | 111 |
151
+ | 130 | src/sysml/src/examples/Vehicle Example/VehicleUsages.sysml | False | 96 |
152
+ | 131 | src/sysml/src/examples/Vehicle Example/VehicleDefinitions.sysml | False | 54 |
153
+ | 132 | src/sysml/src/examples/Vehicle Example/SysML v2 Spec Annex A SimpleVehicleModel.sysml | False | 1580 |
154
+ | 133 | src/sysml/src/examples/Flashlight Example/Flashlight Example.sysml | False | 60 |
155
+ | 134 | src/sysml/src/examples/Cause and Effect Examples/CauseAndEffectExample.sysml | False | 55 |
156
+ | 135 | src/sysml/src/examples/Cause and Effect Examples/MedicalDeviceFailure.sysml | False | 25 |
157
+ | 136 | src/sysml/src/examples/Simple Tests/ActionTest.sysml | False | 33 |
158
+ | 137 | src/sysml/src/examples/Simple Tests/EnumerationTest.sysml | False | 54 |
159
+ | 138 | src/sysml/src/examples/Simple Tests/TradeStudyTest.sysml | False | 21 |
160
+ | 139 | src/sysml/src/examples/Simple Tests/AliasTest.sysml | False | 22 |
161
+ | 140 | src/sysml/src/examples/Simple Tests/ConnectionTest.sysml | False | 49 |
162
+ | 141 | src/sysml/src/examples/Simple Tests/DependencyTest.sysml | False | 20 |
163
+ | 142 | src/sysml/src/examples/Simple Tests/MetadataTest.sysml | False | 42 |
164
+ | 143 | src/sysml/src/examples/Simple Tests/ImportTest.sysml | False | 18 |
165
+ | 144 | src/sysml/src/examples/Simple Tests/ControlNodeTest.sysml | False | 15 |
166
+ | 145 | src/sysml/src/examples/Simple Tests/RequirementTest.sysml | False | 29 |
167
+ | 146 | src/sysml/src/examples/Simple Tests/ConjugationTest.sysml | False | 35 |
168
+ | 147 | src/sysml/src/examples/Simple Tests/ViewTest.sysml | False | 44 |
169
+ | 148 | src/sysml/src/examples/Simple Tests/RootPackageTest.sysml | False | 14 |
170
+ | 149 | src/sysml/src/examples/Simple Tests/PartTest.sysml | False | 44 |
171
+ | 150 | src/sysml/src/examples/Simple Tests/ConstraintTest.sysml | False | 90 |
172
+ | 151 | src/sysml/src/examples/Simple Tests/AssignmentTest.sysml | False | 52 |
173
+ | 152 | src/sysml/src/examples/Simple Tests/ParameterTest.sysml | False | 16 |
174
+ | 153 | src/sysml/src/examples/Simple Tests/TextualRepresentationTest.sysml | False | 22 |
175
+ | 154 | src/sysml/src/examples/Simple Tests/StateTest.sysml | False | 56 |
176
+ | 155 | src/sysml/src/examples/Simple Tests/DecisionTest.sysml | False | 22 |
177
+ | 156 | src/sysml/src/examples/Simple Tests/CalculationTest.sysml | False | 30 |
178
+ | 157 | src/sysml/src/examples/Simple Tests/VerificationTest.sysml | False | 39 |
179
+ | 158 | src/sysml/src/examples/Simple Tests/ItemTest.sysml | False | 23 |
180
+ | 159 | src/sysml/src/examples/Simple Tests/OccurrenceTest.sysml | False | 33 |
181
+ | 160 | src/sysml/src/examples/Simple Tests/MultiplicityTest.sysml | False | 19 |
182
+ | 161 | src/sysml/src/examples/Simple Tests/StructuredControlTest.sysml | False | 36 |
183
+ | 162 | src/sysml/src/examples/Simple Tests/AnalysisTest.sysml | False | 38 |
184
+ | 163 | src/sysml/src/examples/Simple Tests/DefaultValueTest.sysml | False | 18 |
185
+ | 164 | src/sysml/src/examples/Simple Tests/VariabilityTest.sysml | False | 41 |
186
+ | 165 | src/sysml/src/examples/Simple Tests/FeaturePathTest.sysml | False | 43 |
187
+ | 166 | src/sysml/src/examples/Simple Tests/CommentTest.sysml | False | 44 |
188
+ | 167 | src/sysml/src/examples/Simple Tests/UseCaseTest.sysml | False | 36 |
189
+ | 168 | src/sysml/src/examples/Simple Tests/AllocationTest.sysml | False | 35 |
190
+ | 169 | src/sysml/src/examples/Mass Roll-up Example/MassConstraintExample.sysml | False | 117 |
191
+ | 170 | src/sysml/src/examples/Mass Roll-up Example/Vehicles.sysml | False | 37 |
192
+ | 171 | src/sysml/src/examples/Mass Roll-up Example/MassRollup.sysml | False | 27 |
193
+ | 172 | src/sysml/src/examples/Room Model/RoomModel.sysml | False | 77 |
194
+ | 173 | src/sysml/src/examples/State Space Representation Examples/CartSample.sysml | False | 64 |
195
+ | 174 | src/sysml/src/examples/State Space Representation Examples/EVSample.sysml | False | 319 |
196
+ | 175 | src/sysml/src/examples/Analysis Examples/AnalysisAnnotation.sysml | False | 26 |
197
+ | 176 | src/sysml/src/examples/Analysis Examples/Turbojet Stage Analysis.sysml | False | 110 |
198
+ | 177 | src/sysml/src/examples/Analysis Examples/Vehicle Analysis Demo.sysml | False | 286 |
199
+ | 178 | src/sysml/src/examples/Analysis Examples/Dynamics.sysml | False | 91 |
200
+ | 179 | src/sysml/src/examples/Geometry Examples/CarWithEnvelopingShape.sysml | False | 17 |
201
+ | 180 | src/sysml/src/examples/Geometry Examples/SimpleQuadcopter.sysml | False | 247 |
202
+ | 181 | src/sysml/src/examples/Geometry Examples/ExternalShapeRefExample.sysml | False | 31 |
203
+ | 182 | src/sysml/src/examples/Geometry Examples/CarWithShapeAndCSG.sysml | False | 88 |
204
+ | 183 | src/sysml/src/examples/Geometry Examples/VehicleGeometryAndCoordinateFrames.sysml | False | 131 |
205
+ | 184 | src/sysml/src/examples/Packet Example/Packets.sysml | False | 35 |
206
+ | 185 | src/sysml/src/examples/Packet Example/PacketUsage.sysml | False | 16 |
207
+ | 186 | src/sysml/src/examples/Comment Examples/Comments.sysml | False | 15 |
208
+ | 187 | src/sysml/src/examples/Individuals Examples/JohnIndividualExample.sysml | False | 57 |
209
+ | 188 | src/sysml/src/examples/Individuals Examples/AnalysisIndividualExample.sysml | False | 95 |
210
+ | 189 | src/sysml/src/validation/09-Verification/9-Verification-simplified.sysml | False | 115 |
211
+ | 190 | src/sysml/src/validation/18-Use Case/18-Use Case.sysml | False | 87 |
212
+ | 191 | src/sysml/src/validation/04-Functional Allocation/4a-Functional Allocation.sysml | False | 110 |
213
+ | 192 | src/sysml/src/validation/05-State-based Behavior/5-State-based Behavior-1.sysml | False | 236 |
214
+ | 193 | src/sysml/src/validation/05-State-based Behavior/5-State-based Behavior-2.sysml | False | 128 |
215
+ | 194 | src/sysml/src/validation/05-State-based Behavior/5-State-based Behavior-1a.sysml | False | 238 |
216
+ | 195 | src/sysml/src/validation/03-Function-based Behavior/3a-Function-based Behavior-2.sysml | False | 85 |
217
+ | 196 | src/sysml/src/validation/03-Function-based Behavior/3d-Function-based Behavior-item.sysml | False | 83 |
218
+ | 197 | src/sysml/src/validation/03-Function-based Behavior/3a-Function-based Behavior-1.sysml | False | 137 |
219
+ | 198 | src/sysml/src/validation/03-Function-based Behavior/3a-Function-based Behavior-3.sysml | False | 73 |
220
+ | 199 | src/sysml/src/validation/03-Function-based Behavior/3c-Function-based Behavior-structure mod-2.sysml | False | 49 |
221
+ | 200 | src/sysml/src/validation/03-Function-based Behavior/3e-Function-based Behavior-item.sysml | False | 64 |
222
+ | 201 | src/sysml/src/validation/03-Function-based Behavior/3c-Function-based Behavior-structure mod-1.sysml | False | 51 |
223
+ | 202 | src/sysml/src/validation/03-Function-based Behavior/3c-Function-based Behavior-structure mod-3.sysml | False | 33 |
224
+ | 203 | src/sysml/src/validation/10-Analysis and Trades/10c-Fuel Economy Analysis.sysml | False | 168 |
225
+ | 204 | src/sysml/src/validation/10-Analysis and Trades/10d-Dynamics Analysis.sysml | False | 80 |
226
+ | 205 | src/sysml/src/validation/10-Analysis and Trades/10a-Analysis.sysml | False | 74 |
227
+ | 206 | src/sysml/src/validation/10-Analysis and Trades/10b-Trade-off Among Alternative Configurations.sysml | False | 97 |
228
+ | 207 | src/sysml/src/validation/17-Sequence Modeling/17b-Sequence-Modeling.sysml | False | 42 |
229
+ | 208 | src/sysml/src/validation/17-Sequence Modeling/17a-Sequence-Modeling.sysml | False | 42 |
230
+ | 209 | src/sysml/src/validation/06-Individual and Snapshots/6-Individual and Snapshots.sysml | False | 167 |
231
+ | 210 | src/sysml/src/validation/01-Parts Tree/1a-Parts Tree.sysml | False | 125 |
232
+ | 211 | src/sysml/src/validation/01-Parts Tree/1c-Parts Tree Redefinition.sysml | False | 86 |
233
+ | 212 | src/sysml/src/validation/01-Parts Tree/1d-Parts Tree with Reference.sysml | False | 51 |
234
+ | 213 | src/sysml/src/validation/15-Properties-Values-Expressions/15_04-Logical Expressions.sysml | False | 30 |
235
+ | 214 | src/sysml/src/validation/15-Properties-Values-Expressions/15_07-System of Units and Scales.sysml | False | 46 |
236
+ | 215 | src/sysml/src/validation/15-Properties-Values-Expressions/15_03-Value Expression.sysml | False | 30 |
237
+ | 216 | src/sysml/src/validation/15-Properties-Values-Expressions/15_19-Materials with Properties.sysml | False | 82 |
238
+ | 217 | src/sysml/src/validation/15-Properties-Values-Expressions/15_02-Basic Value Properties.sysml | False | 25 |
239
+ | 218 | src/sysml/src/validation/15-Properties-Values-Expressions/15_08-Range Restriction.sysml | False | 19 |
240
+ | 219 | src/sysml/src/validation/15-Properties-Values-Expressions/15_06-System of Quantities.sysml | False | 40 |
241
+ | 220 | src/sysml/src/validation/15-Properties-Values-Expressions/15_10-Primitive Data Types.sysml | False | 89 |
242
+ | 221 | src/sysml/src/validation/15-Properties-Values-Expressions/15_12-Compound Value Type.sysml | False | 31 |
243
+ | 222 | src/sysml/src/validation/15-Properties-Values-Expressions/15_11-Variable Length Collection Types.sysml | False | 36 |
244
+ | 223 | src/sysml/src/validation/15-Properties-Values-Expressions/15_13-Discretely Sampled Function Value.sysml | False | 76 |
245
+ | 224 | src/sysml/src/validation/15-Properties-Values-Expressions/15_19a-Materials with Properties.sysml | False | 69 |
246
+ | 225 | src/sysml/src/validation/15-Properties-Values-Expressions/15_05-Unification of Expression and Constraint Definition.sysml | False | 56 |
247
+ | 226 | src/sysml/src/validation/15-Properties-Values-Expressions/15_01-Constants.sysml | False | 55 |
248
+ | 227 | src/sysml/src/validation/13-Model Containment/13a-Model Containment.sysml | False | 62 |
249
+ | 228 | src/sysml/src/validation/13-Model Containment/13b-Safety and Security Features Element Group.sysml | False | 40 |
250
+ | 229 | src/sysml/src/validation/13-Model Containment/13b-Safety and Security Features Element Group-2.sysml | False | 52 |
251
+ | 230 | src/sysml/src/validation/13-Model Containment/13b-Safety and Security Features Element Group-1.sysml | False | 56 |
252
+ | 231 | src/sysml/src/validation/02-Parts Interconnection/2c-Parts Interconnection-Multiple Decompositions.sysml | False | 90 |
253
+ | 232 | src/sysml/src/validation/02-Parts Interconnection/2a-Parts Interconnection.sysml | False | 206 |
254
+ | 233 | src/sysml/src/validation/12-Dependency Relationships/12a-Dependency.sysml | False | 16 |
255
+ | 234 | src/sysml/src/validation/12-Dependency Relationships/12b-Allocation.sysml | False | 26 |
256
+ | 235 | src/sysml/src/validation/12-Dependency Relationships/12b-Allocation-1.sysml | False | 56 |
257
+ | 236 | src/sysml/src/validation/08-Requirements/8-Requirements.sysml | False | 205 |
258
+ | 237 | src/sysml/src/validation/14-Language Extensions/14a-Language Extensions.sysml | False | 31 |
259
+ | 238 | src/sysml/src/validation/14-Language Extensions/14b-Language Extensions.sysml | False | 51 |
260
+ | 239 | src/sysml/src/validation/14-Language Extensions/14c-Language Extensions.sysml | False | 208 |
261
+ | 240 | src/sysml/src/validation/07-Variant Configuration/7a-Variant Configuration - General Concept.sysml | False | 53 |
262
+ | 241 | src/sysml/src/validation/07-Variant Configuration/7b-Variant Configurations.sysml | False | 140 |
263
+ | 242 | src/sysml/src/validation/07-Variant Configuration/7a1-Variant Configuration - General Concept-a.sysml | False | 79 |
264
+ | 243 | src/sysml/src/validation/11-View and Viewpoint/11a-View-Viewpoint.sysml | False | 56 |
265
+ | 244 | src/sysml/src/validation/11-View and Viewpoint/11b-Safety and Security Feature Views.sysml | False | 65 |
266
+ | 245 | src/sysml.library/Domain Libraries/Requirement Derivation/RequirementDerivation.sysml | True | 39 |
267
+ | 246 | src/sysml.library/Domain Libraries/Requirement Derivation/DerivationConnections.sysml | True | 61 |
268
+ | 247 | src/sysml.library/Domain Libraries/Metadata/RiskMetadata.sysml | True | 100 |
269
+ | 248 | src/sysml.library/Domain Libraries/Metadata/ImageMetadata.sysml | True | 78 |
270
+ | 249 | src/sysml.library/Domain Libraries/Metadata/ParametersOfInterestMetadata.sysml | True | 39 |
271
+ | 250 | src/sysml.library/Domain Libraries/Metadata/ModelingMetadata.sysml | True | 143 |
272
+ | 251 | src/sysml.library/Domain Libraries/Cause and Effect/CauseAndEffect.sysml | True | 81 |
273
+ | 252 | src/sysml.library/Domain Libraries/Cause and Effect/CausationConnections.sysml | True | 76 |
274
+ | 253 | src/sysml.library/Domain Libraries/Quantities and Units/ISQAtomicNuclear.sysml | True | 2734 |
275
+ | 254 | src/sysml.library/Domain Libraries/Quantities and Units/ISQInformation.sysml | True | 958 |
276
+ | 255 | src/sysml.library/Domain Libraries/Quantities and Units/QuantityCalculations.sysml | True | 70 |
277
+ | 256 | src/sysml.library/Domain Libraries/Quantities and Units/ISQCharacteristicNumbers.sysml | True | 1991 |
278
+ | 257 | src/sysml.library/Domain Libraries/Quantities and Units/ISQThermodynamics.sysml | True | 1256 |
279
+ | 258 | src/sysml.library/Domain Libraries/Quantities and Units/ISQ.sysml | True | 42 |
280
+ | 259 | src/sysml.library/Domain Libraries/Quantities and Units/ISQCondensedMatter.sysml | True | 1229 |
281
+ | 260 | src/sysml.library/Domain Libraries/Quantities and Units/ISQAcoustics.sysml | True | 444 |
282
+ | 261 | src/sysml.library/Domain Libraries/Quantities and Units/VectorCalculations.sysml | True | 62 |
283
+ | 262 | src/sysml.library/Domain Libraries/Quantities and Units/USCustomaryUnits.sysml | True | 255 |
284
+ | 263 | src/sysml.library/Domain Libraries/Quantities and Units/SI.sysml | True | 367 |
285
+ | 264 | src/sysml.library/Domain Libraries/Quantities and Units/SIPrefixes.sysml | True | 48 |
286
+ | 265 | src/sysml.library/Domain Libraries/Quantities and Units/ISQElectromagnetism.sysml | True | 2365 |
287
+ | 266 | src/sysml.library/Domain Libraries/Quantities and Units/MeasurementReferences.sysml | True | 526 |
288
+ | 267 | src/sysml.library/Domain Libraries/Quantities and Units/Quantities.sysml | True | 107 |
289
+ | 268 | src/sysml.library/Domain Libraries/Quantities and Units/ISQSpaceTime.sysml | True | 1171 |
290
+ | 269 | src/sysml.library/Domain Libraries/Quantities and Units/ISQBase.sysml | True | 206 |
291
+ | 270 | src/sysml.library/Domain Libraries/Quantities and Units/ISQLight.sysml | True | 1537 |
292
+ | 271 | src/sysml.library/Domain Libraries/Quantities and Units/ISQChemistryMolecular.sysml | True | 1353 |
293
+ | 272 | src/sysml.library/Domain Libraries/Quantities and Units/ISQMechanics.sysml | True | 1583 |
294
+ | 273 | src/sysml.library/Domain Libraries/Quantities and Units/Time.sysml | True | 279 |
295
+ | 274 | src/sysml.library/Domain Libraries/Quantities and Units/TensorCalculations.sysml | True | 50 |
296
+ | 275 | src/sysml.library/Domain Libraries/Quantities and Units/MeasurementRefCalculations.sysml | True | 30 |
297
+ | 276 | src/sysml.library/Domain Libraries/Analysis/TradeStudies.sysml | True | 179 |
298
+ | 277 | src/sysml.library/Domain Libraries/Analysis/StateSpaceRepresentation.sysml | True | 143 |
299
+ | 278 | src/sysml.library/Domain Libraries/Analysis/SampledFunctions.sysml | True | 119 |
300
+ | 279 | src/sysml.library/Domain Libraries/Analysis/AnalysisTooling.sysml | True | 34 |
301
+ | 280 | src/sysml.library/Domain Libraries/Geometry/SpatialItems.sysml | True | 156 |
302
+ | 281 | src/sysml.library/Domain Libraries/Geometry/ShapeItems.sysml | True | 835 |
303
+ | 282 | src/sysml.library/Systems Library/States.sysml | True | 101 |
304
+ | 283 | src/sysml.library/Systems Library/Cases.sysml | True | 71 |
305
+ | 284 | src/sysml.library/Systems Library/Metadata.sysml | True | 30 |
306
+ | 285 | src/sysml.library/Systems Library/VerificationCases.sysml | True | 103 |
307
+ | 286 | src/sysml.library/Systems Library/Actions.sysml | True | 505 |
308
+ | 287 | src/sysml.library/Systems Library/Attributes.sysml | True | 25 |
309
+ | 288 | src/sysml.library/Systems Library/SysML.sysml | True | 536 |
310
+ | 289 | src/sysml.library/Systems Library/Ports.sysml | True | 34 |
311
+ | 290 | src/sysml.library/Systems Library/Interfaces.sysml | True | 48 |
312
+ | 291 | src/sysml.library/Systems Library/Connections.sysml | True | 153 |
313
+ | 292 | src/sysml.library/Systems Library/Requirements.sysml | True | 194 |
314
+ | 293 | src/sysml.library/Systems Library/Constraints.sysml | True | 44 |
315
+ | 294 | src/sysml.library/Systems Library/UseCases.sysml | True | 57 |
316
+ | 295 | src/sysml.library/Systems Library/Parts.sysml | True | 81 |
317
+ | 296 | src/sysml.library/Systems Library/Calculations.sysml | True | 37 |
318
+ | 297 | src/sysml.library/Systems Library/Items.sysml | True | 149 |
319
+ | 298 | src/sysml.library/Systems Library/AnalysisCases.sysml | True | 38 |
320
+ | 299 | src/sysml.library/Systems Library/Views.sysml | True | 163 |
321
+ | 300 | src/sysml.library/Systems Library/StandardViewDefinitions.sysml | True | 123 |
322
+ | 301 | src/sysml.library/Systems Library/Allocations.sysml | True | 29 |
323
+
source.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5f6d955f2b83318365ad41a8946e02a42cc1a0441e31e3b6e45994e9ed83ecd4
3
+ size 448282
src/sysml.library/Domain Libraries/Analysis/AnalysisTooling.sysml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package AnalysisTooling {
2
+ doc
3
+ /*
4
+ * This package contains definitions for metadata annotations related
5
+ * to analysis tool integration.
6
+ */
7
+
8
+ private import ScalarValues::*;
9
+
10
+ metadata def ToolExecution {
11
+ doc
12
+ /*
13
+ * ToolExecution metadata identifies an external analysis tool to be
14
+ * used to implement the annotated action.
15
+ */
16
+
17
+ attribute toolName : String;
18
+ attribute uri : String;
19
+ }
20
+
21
+ metadata def ToolVariable {
22
+ doc
23
+ /*
24
+ * ToolVariable metadata is used in the context of an action that has
25
+ * been annotated with ToolExecution metadata. It is used to annotate
26
+ * a parameter or other feature of the action with the name of the
27
+ * variable in the tool that is to correspond to the annotated
28
+ * feature.
29
+ */
30
+
31
+ attribute name : String;
32
+ }
33
+
34
+ }
src/sysml.library/Domain Libraries/Analysis/SampledFunctions.sysml ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package SampledFunctions {
2
+ doc
3
+ /*
4
+ * This package provides a library model of discretely sampled mathematical functions.
5
+ */
6
+
7
+ private import Base::Anything;
8
+ private import ScalarValues::Positive;
9
+ private import Collections::KeyValuePair;
10
+ private import Collections::OrderedMap;
11
+ private import SequenceFunctions::size;
12
+ private import ControlFunctions::forAll;
13
+ private import ControlFunctions::collect;
14
+ private import ControlFunctions::select;
15
+
16
+ attribute def SamplePair :> KeyValuePair {
17
+ doc
18
+ /*
19
+ * SamplePair is a key-value pair of a domain-value and a range-value, used as a sample element in SampledFunction.
20
+ */
21
+
22
+ attribute domainValue :>> key;
23
+ attribute rangeValue :>> val;
24
+ }
25
+
26
+ attribute def SampledFunction :> OrderedMap {
27
+ doc
28
+ /*
29
+ * SampledFunction is a variable-size, ordered collection of 'SamplePair' elements that represents a generic, discretely sampled,
30
+ * uni-variate or multi-variate mathematical function. The function must be montonic, either strictly increasing or strictly
31
+ * decreasing.
32
+ *
33
+ * It maps discrete domain values to discrete range values.
34
+ * The domain of the function is represented by the sequence of 'domainValue' of each 'SamplePair' in 'samples', and
35
+ * the range of the function is represented by the sequence of 'rangeValue' of each 'SamplePair' in 'samples'.
36
+ */
37
+
38
+ attribute samples: SamplePair[0..*] ordered :>> elements;
39
+
40
+ assert constraint {
41
+ // Note: Assumes the functions '<' and '>' are defined for the domain type.
42
+ (1..size(samples)-1)->forAll { in i; (samples.domainValue#(i) < samples.domainValue#(i+1)) } or // Strictly increasing
43
+ (1..size(samples)-1)->forAll { in i; (samples.domainValue#(i) > samples.domainValue#(i+1)) } // Strictly decreasing
44
+ }
45
+ }
46
+
47
+ calc def Domain {
48
+ doc
49
+ /*
50
+ * Domain returns the sequence of the domainValues of all samples in a SampledFunction.
51
+ */
52
+
53
+ in fn : SampledFunction;
54
+ return : Anything[0..*] = fn.samples.domainValue;
55
+ }
56
+
57
+ calc def Range {
58
+ doc
59
+ /*
60
+ * Range returns the sequence of the rangeValues of all samples in a SampledFunction.
61
+ */
62
+
63
+ in fn : SampledFunction;
64
+ return : Anything[0..*] = fn.samples.rangeValue;
65
+ }
66
+
67
+ calc def Sample {
68
+ doc
69
+ /*
70
+ * Sample returns a SampledFunction that samples a given calculation over a sequence of domainValues.
71
+ */
72
+
73
+ in calc calculation { in x; }
74
+ in attribute domainValues [0..*];
75
+ return sampling = SampledFunction (
76
+ samples = domainValues->collect { in x; SamplePair(x, calculation(x)) }
77
+ );
78
+ }
79
+
80
+ calc def Interpolate {
81
+ doc
82
+ /*
83
+ * An Interpolate calculation returns an interpolated range value from a given SampledFunction for a given domain value.
84
+ * If the input domain value is outside the bounds of the domainValues of the SampleFunction, null is returned.
85
+ */
86
+
87
+ in attribute fn : SampledFunction;
88
+ in attribute value;
89
+ return attribute result;
90
+ }
91
+
92
+ calc interpolateLinear : Interpolate {
93
+ doc
94
+ /*
95
+ * interpolateLinear is an Interpolate calculation assuming a linear functional form between SamplePairs.
96
+ */
97
+
98
+ in attribute fn : SampledFunction;
99
+ in attribute value;
100
+
101
+ private attribute domainValues = Domain(fn);
102
+ private attribute index : Positive[0..1] =
103
+ (1..size(domainValues))->select { in i : Positive; domainValues#(i) <= value }#(1);
104
+
105
+ private calc def Linear {
106
+ in attribute lowerSample : SamplePair;
107
+ in attribute upperSample : SamplePair;
108
+ in attribute value;
109
+ private attribute f = (value - lowerSample.domainValue) / (lowerSample.domainValue - upperSample.domainValue);
110
+ return result = upperSample.rangeValue + f * (lowerSample.rangeValue - upperSample.rangeValue);
111
+ }
112
+
113
+ return result [0..1] =
114
+ if index == null or index == size(domainValues)? null
115
+ else if domainValues#(index) < domainValues#(index+1)? Linear(fn.samples#(index), fn.samples#(index+1), value)
116
+ else Linear(fn.samples#(index+1), fn.samples#(index), value);
117
+ }
118
+
119
+ }
src/sysml.library/Domain Libraries/Analysis/StateSpaceRepresentation.sysml ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package StateSpaceRepresentation {
2
+ doc
3
+ /*
4
+ * This package provides a model of the foundational state-space system representation,
5
+ * commonly used in control systems.
6
+ */
7
+
8
+ private import ISQ::DurationValue;
9
+ private import Quantities::VectorQuantityValue;
10
+ private import VectorCalculations::*;
11
+
12
+ abstract attribute def StateSpace :> VectorQuantityValue;
13
+ abstract attribute def Input :> VectorQuantityValue;
14
+ abstract attribute def Output :> VectorQuantityValue;
15
+
16
+ abstract calc def GetNextState {
17
+ in input: Input;
18
+ in stateSpace: StateSpace;
19
+ in timeStep: DurationValue;
20
+ return : StateSpace;
21
+ }
22
+ abstract calc def GetOutput {
23
+ in input: Input;
24
+ in stateSpace: StateSpace;
25
+ return : Output;
26
+ }
27
+
28
+ abstract action def StateSpaceEventDef {
29
+ doc
30
+ /*
31
+ * Events to be received.
32
+ */
33
+ }
34
+ action def ZeroCrossingEventDef :> StateSpaceEventDef;
35
+
36
+ item def StateSpaceItem {
37
+ doc
38
+ /*
39
+ * Item for SSR connection
40
+ */
41
+ }
42
+
43
+ abstract action def StateSpaceDynamics {
44
+ doc
45
+ /*
46
+ * StateSpaceDynamics is the simplest form of State Space Representation,
47
+ * and nextState directly computes the stateSpace of the next timestep.
48
+ */
49
+
50
+ in attribute input: Input;
51
+
52
+ abstract calc getNextState: GetNextState;
53
+ abstract calc getOutput: GetOutput;
54
+ attribute stateSpace: StateSpace;
55
+
56
+ out attribute output: Output = getOutput(input, stateSpace);
57
+ }
58
+
59
+ abstract attribute def StateDerivative :> VectorQuantityValue {
60
+ doc
61
+ /*
62
+ * The definition of the time derivative of StateSpace, which means dx/dt, where x is StateSpace
63
+ */
64
+
65
+ ref stateSpace: StateSpace;
66
+ constraint { stateSpace.order == order }
67
+ }
68
+
69
+ abstract calc def GetDerivative {
70
+ doc
71
+ /*
72
+ * Computes the time derivative of stateSpace, which corresponds dx/dt = f(u, x), where u is input and x is stateSpace.
73
+ */
74
+
75
+ in input: Input;
76
+ in stateSpace: StateSpace;
77
+ return : StateDerivative;
78
+ }
79
+
80
+ abstract calc def Integrate {
81
+ doc
82
+ /*
83
+ * Integrates stateSpace to compute the next stateSpace, which corresponds to x + int dx/dt dt.
84
+ * Its actual implementation should be given by a solver.
85
+ */
86
+
87
+ in getDerivative: GetDerivative;
88
+ in input: Input;
89
+ in initialState: StateSpace;
90
+ in timeInterval: DurationValue;
91
+ return result: StateSpace;
92
+ }
93
+
94
+ abstract action def ContinuousStateSpaceDynamics :> StateSpaceDynamics {
95
+ doc
96
+ /*
97
+ * ContinuousStateSpaceDynamics represents continuous behavior.
98
+ * derivative needs to return a time derivative of stateSpace, i.e. dx/dt.
99
+ */
100
+
101
+ abstract calc getDerivative: GetDerivative;
102
+ calc :>> getNextState: GetNextState {
103
+ /* We compute nextState by Integrate defined above by giving derivative calc. */
104
+ calc integrate: Integrate {
105
+ in getDerivative = ContinuousStateSpaceDynamics::getDerivative;
106
+ in input = GetNextState::input;
107
+ in initialState = GetNextState::stateSpace;
108
+ in timeInterval = GetNextState::timeStep;
109
+ }
110
+ return result = integrate.result;
111
+ }
112
+
113
+ event occurrence zeroCrossingEvents[0..*] : ZeroCrossingEventDef {
114
+ /* ContinuousStateSpaceDynamics may cause zero crossings anomaly. */
115
+ }
116
+ }
117
+
118
+ abstract calc def GetDifference {
119
+ doc
120
+ /*
121
+ * Computes difference of stateSpace by one timestep, that is x(k+1) - x(k),
122
+ * where k is the timestep number.
123
+ */
124
+
125
+ in input: Input;
126
+ in stateSpace: StateSpace;
127
+ return : StateSpace;
128
+ }
129
+
130
+ abstract action def DiscreteStateSpaceDynamics :> StateSpaceDynamics {
131
+ doc
132
+ /*
133
+ * DiscreteStateSpaceDynamics represents discrete behavior.
134
+ * differences needs to return difference of the stateSpace for each timestep.
135
+ */
136
+
137
+ abstract calc getDifference: GetDifference;
138
+ calc :>> getNextState: GetNextState {
139
+ attribute diff: StateSpace = getDifference(input, stateSpace);
140
+ return result = stateSpace + diff;
141
+ }
142
+ }
143
+ }
src/sysml.library/Domain Libraries/Analysis/TradeStudies.sysml ADDED
@@ -0,0 +1,179 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package TradeStudies {
2
+ doc
3
+ /*
4
+ * This package provides a simple framework for defining trade-off study analysis cases.
5
+ */
6
+
7
+ private import Base::Anything;
8
+ private import ScalarValues::*;
9
+ private import ScalarFunctions::*;
10
+ private import ControlFunctions::*;
11
+
12
+ abstract calc def EvaluationFunction {
13
+ doc
14
+ /*
15
+ * An EvaluationFunction is a calculation that evaluates a TradeStudy alternative,
16
+ * producing a ScalarValue that can be comparted with the evaluation of other
17
+ * alternatives.
18
+ */
19
+
20
+ in ref alternative : Anything {
21
+ doc
22
+ /*
23
+ * The alternative to be evaluated.
24
+ */
25
+ }
26
+
27
+ return attribute result : ScalarValue[1] {
28
+ doc
29
+ /*
30
+ * A ScalarValue representing the evaluation of the given alternative.
31
+ */
32
+ }
33
+ }
34
+
35
+ abstract requirement def TradeStudyObjective {
36
+ doc
37
+ /*
38
+ * A TradeStudyObjective is the base definition for the objective of a TradeStudy.
39
+ * The requirement is to choose from a given set of alternatives the selectedAlternative
40
+ * for that has the best evaluation according to a given EvaluationFunction. What
41
+ * value is considered "best" is not defined in the abstract base definition but must be
42
+ * computed in any concrete specialization.
43
+ */
44
+
45
+ subject selectedAlternative : Anything {
46
+ doc
47
+ /*
48
+ * The alternative that should be selected, as evaluated using the given
49
+ * ObjectiveFunction.
50
+ */
51
+ }
52
+
53
+ in ref alternatives : Anything[1..*] {
54
+ doc
55
+ /*
56
+ * The alternatives being considered in the TradeStudy for which this TradeStudyObjective
57
+ * is the objective.
58
+ */
59
+ }
60
+
61
+ in calc fn : EvaluationFunction {
62
+ doc
63
+ /*
64
+ * The EvaluationFunction to be used in evaluating the given alternatives.
65
+ */
66
+ }
67
+
68
+ out attribute best : ScalarValue {
69
+ doc
70
+ /*
71
+ * Out of the evaluation results of all the given alternatives, the one that is considered
72
+ * "best", in the sense that it is the value the selectedAlternative should have. This
73
+ * value must be computed in any concrete specialization of TradeStudyObjective.
74
+ */
75
+ }
76
+
77
+ require constraint { fn(selectedAlternative) == best }
78
+ }
79
+
80
+ requirement def MinimizeObjective :> TradeStudyObjective {
81
+ doc
82
+ /*
83
+ * A MinimizeObjective is a TradeStudyObjective that requires that the
84
+ * selectedAlternative have the minimum ObjectiveFunction value of all the
85
+ * given alternatives.
86
+ */
87
+
88
+ subject :>> selectedAlternative;
89
+ in ref :>> alternatives;
90
+ in calc :>>fn;
91
+
92
+ out attribute :>> best = alternatives->minimize {
93
+ doc
94
+ /*
95
+ * For a MinimizeObjective, the best value is the minimum one.
96
+ */
97
+
98
+ in x; fn(x)
99
+ };
100
+ }
101
+
102
+ requirement def MaximizeObjective :> TradeStudyObjective {
103
+ doc
104
+ /*
105
+ * A MaximizeObjective is a TradeStudyObjective that requires that the
106
+ * selectedAlternative have the maximum ObjectiveFunction value of all the
107
+ * given alternatives.
108
+ */
109
+
110
+ subject :>> selectedAlternative;
111
+ in ref :>> alternatives;
112
+ in calc :>>fn;
113
+
114
+ out attribute :>> best = alternatives->maximize {
115
+ doc
116
+ /*
117
+ * For a MinimizeObjective, the best value is the maximum one.
118
+ */
119
+
120
+ in x; fn(x)
121
+ };
122
+ }
123
+
124
+ abstract analysis def TradeStudy {
125
+ doc
126
+ /*
127
+ * A TradeStudy is an analysis case whose subject is a set of alternatives
128
+ * (at least one) and whose result is a selection of one of those alternatives.
129
+ * The alternatives are evaluated based on a given ObjectiveFunction and the
130
+ * selection is made such that it satisfies the objective of the TradeStudy
131
+ * (which must be a TradeStudyObjective).
132
+ */
133
+
134
+ subject studyAlternatives : Anything[1..*] {
135
+ doc
136
+ /*
137
+ * The set of alternatives being considered in this TradeStudy.
138
+ *
139
+ * In a TradeStudy usage, bind this feature to the actual collection of
140
+ * alternatives to be considered.
141
+ */
142
+ }
143
+
144
+ abstract calc evaluationFunction : EvaluationFunction {
145
+ doc
146
+ /*
147
+ * The EvaluationFunction to be used to evaluate the alternatives.
148
+ *
149
+ * In a TradeStudy usage, redefine this feature to provide the desired
150
+ * calculation (or bind it to a calculation usage that does so).
151
+ */
152
+ }
153
+
154
+ objective tradeStudyObjective : TradeStudyObjective {
155
+ doc
156
+ /*
157
+ * The objective of this TradeStudy.
158
+ *
159
+ * Redefine this feature to give it a definition that is a concrete
160
+ * specialization of TradeStudyObjective. That can either be one of the
161
+ * specializations provided in this package, or a more specific user-
162
+ * defined one.
163
+ */
164
+
165
+ subject :>> selectedAlternative;
166
+ in ref :>> alternatives = studyAlternatives;
167
+ in calc :>> fn = evaluationFunction;
168
+ }
169
+
170
+ return selectedAlternative : Anything = studyAlternatives->selectOne {in ref a {
171
+ doc
172
+ /*
173
+ * The alternative selected by this TradeStudy, which is the one that meets the
174
+ * requirement of the tradeStudyObjective.
175
+ */
176
+ } tradeStudyObjective(selectedAlternative = a)};
177
+ }
178
+
179
+ }
src/sysml.library/Domain Libraries/Cause and Effect/CausationConnections.sysml ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package CausationConnections {
2
+ doc
3
+ /*
4
+ * This package provides a library model modeling causes, effects, and causation connections
5
+ * between them.
6
+ */
7
+
8
+ private import SequenceFunctions::isEmpty;
9
+ private import SequenceFunctions::size;
10
+ private import SequenceFunctions::intersection;
11
+
12
+ abstract occurrence causes[*] {
13
+ doc /* Occurrences that are causes. */
14
+ }
15
+
16
+ abstract occurrence effects[*] {
17
+ doc /* Occurrences that are effects. */
18
+ }
19
+
20
+ abstract connection def Multicausation {
21
+ doc
22
+ /*
23
+ * A Multicausation connection models the situation in which one set of
24
+ * occurrences causes another.
25
+ *
26
+ * To create a Multicausation connection, specialize this connection definition
27
+ * adding specific end features of the relavent types. Ends representing causes
28
+ * should subset 'causes', while ends representing effects should subset 'effects'.
29
+ * There must be at least one cause and at least one effect.
30
+ */
31
+
32
+ ref occurrence causes[1..*] :>> causes :> participant {
33
+ doc /* The causing occurrences. */
34
+ }
35
+ ref occurrence effects[1..*] :>> effects :> participant {
36
+ doc /* The effect occurrences caused by the causing occurrences. */
37
+ }
38
+
39
+ private assert constraint disjointCauseEffect {
40
+ doc /* causes must be disjoint from effects. */
41
+ isEmpty(intersection(causes, effects))
42
+ }
43
+
44
+ private succession causalOrdering first causes.startShot[nCauses] then effects[nEffects] {
45
+ doc /* All causes must exist before all effects. */
46
+ attribute nCauses = size(causes);
47
+ attribute nEffects = size(effects);
48
+ }
49
+ }
50
+
51
+ abstract connection multicausations : Multicausation[*] {
52
+ doc /* multicausations is the base feature for Multicausation ConnectionUsages. */
53
+ }
54
+
55
+ connection def Causation :> Multicausation {
56
+ doc
57
+ /*
58
+ * A Causation is a binary Multicausation in which a single cause occurrence
59
+ * causes a single effect occurrence. (However, a single cause can separately
60
+ * have multiple effects, and a single effect can have separate Causation
61
+ * connections with multiple causes.)
62
+ */
63
+
64
+ end occurrence theCause[*] :>> causes :>> source {
65
+ doc /* The single causing occurrence. */
66
+ }
67
+
68
+ end occurrence theEffect[*] :>> effects :>> target {
69
+ doc /* The single effect occurrence resulting from the cause. */
70
+ }
71
+ }
72
+
73
+ abstract connection causations : Causation[*] :> multicausations {
74
+ doc /* causations is the base feature for Causation ConnectionUsages. */
75
+ }
76
+ }
src/sysml.library/Domain Libraries/Cause and Effect/CauseAndEffect.sysml ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package CauseAndEffect {
2
+ doc /* This package provides language-extension metadata for cause-effect modeling. */
3
+
4
+ public import CausationConnections::*;
5
+ private import ScalarValues::*;
6
+ private import Metaobjects::SemanticMetadata;
7
+
8
+ metadata def <cause> CauseMetadata :> SemanticMetadata {
9
+ doc
10
+ /*
11
+ * CauseMetadata identifies a usage as being a cause occurrence.
12
+ * It is intended to be used to tag the cause ends of a Multicausation.
13
+ */
14
+
15
+ ref :>> annotatedElement : SysML::Usage;
16
+ ref :>> baseType = causes as SysML::Usage;
17
+ }
18
+
19
+ metadata def <effect> EffectMetadata :> SemanticMetadata {
20
+ doc
21
+ /*
22
+ * EffectMetadata identifies a usage as being an effect occurrence.
23
+ * It is intended to be used to tag the effect ends of a Multicausation.
24
+ */
25
+
26
+ ref :>> annotatedElement : SysML::Usage;
27
+ ref :>> baseType = effects as SysML::Usage;
28
+ }
29
+
30
+ metadata def CausationMetadata {
31
+ doc
32
+ /*
33
+ * CausationMetadata allows for the specification of additional metadata about
34
+ * a cause-effect connection definition or usage.
35
+ */
36
+
37
+ ref :> annotatedElement : SysML::ConnectionDefinition;
38
+ ref :> annotatedElement : SysML::ConnectionUsage;
39
+
40
+ attribute isNecessary : Boolean default false {
41
+ doc
42
+ /*
43
+ * Whether all the causes are necessary for all the effects to occur.
44
+ * If this is false (the default), then some or all of the effects may
45
+ * still have occurred even if some of the causes did not.
46
+ */
47
+ }
48
+
49
+ attribute isSufficient : Boolean default false {
50
+ doc
51
+ /*
52
+ * Whether the causes were sufficient for all the effects to occur.
53
+ * If this is false (the default), then it may be the case that some
54
+ * other occurrences were also necessary for some or all of the effects
55
+ * to have occurred.
56
+ */
57
+ }
58
+
59
+ attribute probability : Real[0..1] {
60
+ doc /* The probability that the causes will actually result in effects occurring. */
61
+ }
62
+ }
63
+
64
+ metadata def <multicausation> MulticausationSemanticMetadata :> CausationMetadata, SemanticMetadata {
65
+ doc
66
+ /*
67
+ * MulticausationMetadata is SemanticMetadata for a Multicausation connection.
68
+ */
69
+
70
+ ref :>> baseType = multicausations meta SysML::Usage;
71
+ }
72
+
73
+ metadata def <causation> CausationSemanticMetadadata :> CausationMetadata, SemanticMetadata {
74
+ doc
75
+ /*
76
+ * CausationMetadata is SemanticMetadata for a Causation connection.
77
+ */
78
+
79
+ ref :>> baseType = causations meta SysML::Usage;
80
+ }
81
+ }
src/sysml.library/Domain Libraries/Geometry/ShapeItems.sysml ADDED
@@ -0,0 +1,835 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package ShapeItems {
2
+ doc
3
+ /*
4
+ * This package provides a model of items that represent basic geometric shapes.
5
+ */
6
+
7
+ private import ScalarValues::Boolean;
8
+ private import ScalarValues::Positive;
9
+ private import ISQ::*;
10
+ private import SI::m;
11
+ private import Occurrences::MatesWith;
12
+ private import Objects::*;
13
+ private import Items::Item;
14
+ private import SequenceFunctions::equals;
15
+ private import SequenceFunctions::isEmpty;
16
+ private import SequenceFunctions::notEmpty;
17
+ private import SequenceFunctions::size;
18
+ private import SequenceFunctions::includes;
19
+ private import ControlFunctions::'if';
20
+ private import ControlFunctions::forAll;
21
+ private import ControlFunctions::exists;
22
+ private import Quantities::scalarQuantities;
23
+
24
+ item def PlanarCurve :> Curve {
25
+ doc
26
+ /*
27
+ * A PlanarCurve is a Curve with a given length embeddable in a plane.
28
+ */
29
+
30
+ attribute :>> length [1];
31
+
32
+ attribute :>> outerSpaceDimension;
33
+ assert constraint { notEmpty(outerSpaceDimension) & outerSpaceDimension <= 2 }
34
+ }
35
+
36
+ item def PlanarSurface :> Surface {
37
+ doc
38
+ /*
39
+ * A PlanarSurface is a flat Surface with a given area.
40
+ */
41
+
42
+ attribute :>> area [1];
43
+ attribute :>> outerSpaceDimension = 2;
44
+
45
+ item :>> shape : PlanarCurve;
46
+ }
47
+
48
+ item def Line :> PlanarCurve {
49
+ doc
50
+ /*
51
+ * A Line is a Curve that is a straight line of a given length.
52
+ */
53
+
54
+ attribute :>> length [1];
55
+ attribute :>> outerSpaceDimension = 1;
56
+ }
57
+
58
+ abstract item def Path :> StructuredSpaceObject, Curve {
59
+ doc
60
+ /*
61
+ * Path is the most general structured Curve.
62
+ */
63
+
64
+ item :>> faces [0];
65
+ item :>> edges [1..*] {
66
+ item :>> vertices [0..2];
67
+ }
68
+ item :>> vertices = edges.vertices;
69
+
70
+ assert constraint { isClosed == vertices->forAll{in p1 : Point;
71
+ vertices->exists{p2 : Point; p1 != p2 and
72
+ includes(p1.matingOccurrences, p2) } } }
73
+ }
74
+
75
+ attribute semiMajorAxis : LengthValue [0..*] :> scalarQuantities;
76
+ attribute semiMinorAxis : LengthValue [0..*] :> scalarQuantities;
77
+ attribute xoffset : LengthValue [0..*] :> scalarQuantities default 0 [m];
78
+ attribute yoffset : LengthValue [0..*] :> scalarQuantities default 0 [m];
79
+ attribute baseLength : LengthValue [0..*] :> scalarQuantities;
80
+ attribute baseWidth : LengthValue [0..*] :> scalarQuantities;
81
+
82
+ item def ConicSection :> Path, PlanarCurve {
83
+ doc
84
+ /*
85
+ * A ConicSection is a closed PlanarCurve, possibly disconnected, see Hyperbola.
86
+ */
87
+
88
+
89
+ item :>> edges [1..2];
90
+
91
+ item :>> vertices [0];
92
+ }
93
+
94
+ item def Ellipse :> ConicSection {
95
+ doc
96
+ /*
97
+ * An Ellipse is a ConicSection in the shape of an ellipse of a given semiaxes.
98
+ */
99
+
100
+ attribute :>> semiMajorAxis [1];
101
+ attribute :>> semiMinorAxis [1];
102
+
103
+ item :>> edges [1];
104
+ }
105
+
106
+ item def Circle :> Ellipse {
107
+ doc
108
+ /*
109
+ * A Circle is an Ellipse with semiaxes equal to its radius.
110
+ */
111
+
112
+ attribute :>> radius [1];
113
+ attribute :>> semiMajorAxis [1] = radius;
114
+ attribute :>> semiMinorAxis [1] = radius;
115
+
116
+ item :>> edges {
117
+ attribute length [1] = Circle::radius * TrigFunctions::pi * 2;
118
+ }
119
+ }
120
+
121
+ item def Parabola :> ConicSection {
122
+ doc
123
+ /*
124
+ * A Parabola is a ConicSection in the shape of a parabola of a given focal length.
125
+ */
126
+
127
+ attribute focalDistance : LengthValue [1] :> scalarQuantities;
128
+
129
+ item :>> edges [1];
130
+ }
131
+
132
+ item def Hyperbola :> ConicSection {
133
+ doc
134
+ /*
135
+ * A Hyperbola is a ConicSection in the shape of a hyperbola with given axes.
136
+ */
137
+
138
+ attribute tranverseAxis : LengthValue [1] :> scalarQuantities;
139
+ attribute conjugateAxis : LengthValue [1] :> scalarQuantities;
140
+ }
141
+
142
+ item def Polygon :> Path, PlanarCurve {
143
+ doc
144
+ /*
145
+ * A Polygon is a closed planar Path with straight edges.
146
+ */
147
+
148
+ item :>> edges : Line { item :>> vertices [2]; }
149
+
150
+ attribute :>> isClosed = true;
151
+
152
+ assert constraint { (1..size(edges))->forAll {in i;
153
+ edges#(i).vertices->equals((vertices#((2*i)-1), vertices#(2*i))) and
154
+ includes((edges#(i).vertices#(2) as Item).matingOccurrences,
155
+ edges#(if i==size(edges) ? 1 else i+1).vertices#(1)) } }
156
+ }
157
+
158
+ item def Triangle :> Polygon {
159
+ doc
160
+ /*
161
+ * A Triangle is three-sided Polygon with given length (base), width (perpendicular distance
162
+ * from base to apex), and offset of this perpendicular at the base from the center of the base.
163
+ */
164
+
165
+ attribute :>> length [1];
166
+ attribute :>> width [1];
167
+ attribute :>> xoffset [1];
168
+
169
+ item :>> edges [3] = (base, e2, e3);
170
+ item base [1] { length = Triangle::length; }
171
+ item e2 [1];
172
+ item e3 [1];
173
+
174
+ item :>> vertices [6];
175
+ item v12 [2] ordered = (vertices#(2), vertices#(3));
176
+ item apex [2] ordered = (vertices#(4), vertices#(5));
177
+ item v31 [2] ordered = (vertices#(6), vertices#(1));
178
+ }
179
+
180
+ item def RightTriangle :> Triangle {
181
+ doc
182
+ /*
183
+ * A RightTriangle is a Triangle with sides opposite the hypotenuse at right angles.
184
+ */
185
+
186
+ attribute :>> xoffset = length / 2;
187
+
188
+ item :>> e2 { attribute :>> length = Triangle::width; }
189
+
190
+ item hypotenuse :>> e3 {
191
+ attribute :>> length = ( Triangle::length^2 + Triangle::width^2 );
192
+ }
193
+ }
194
+
195
+ item def Quadrilateral :> Polygon {
196
+ doc
197
+ /*
198
+ * A Quadrilateral is a four-sided Polygon.
199
+ */
200
+
201
+ item :>> edges [4] = (e1, e2, e3, e4);
202
+ item e1 [1];
203
+ item e2 [1];
204
+ item e3 [1];
205
+ item e4 [1];
206
+
207
+ item :>> vertices [8];
208
+ item v12 [2] ordered = (vertices#(2), vertices#(3));
209
+ item v23 [2] ordered = (vertices#(4), vertices#(5));
210
+ item v34 [2] ordered = (vertices#(6), vertices#(7));
211
+ item v41 [2] ordered = (vertices#(6), vertices#(1));
212
+ }
213
+
214
+ item def Rectangle :> Quadrilateral {
215
+ doc
216
+ /*
217
+ * A Rectangle is a Quadrilateral four right angles and given length and width.
218
+ */
219
+
220
+ attribute :>> length [1];
221
+ attribute :>> width [1];
222
+
223
+ item :>> e1 { attribute :>> length = Rectangle::length; }
224
+ item :>> e2 { attribute :>> length = Rectangle::width; }
225
+ item :>> e3 { attribute :>> length = e1.length; }
226
+ item :>> e4 { attribute :>> length = e2.length; }
227
+ }
228
+
229
+ abstract item def Shell :> StructuredSpaceObject, Surface {
230
+ doc
231
+ /*
232
+ * Shell is the most general structured Surface.
233
+ */
234
+ }
235
+
236
+ item def Disc :> Shell, PlanarSurface {
237
+ doc
238
+ /*
239
+ * A Disc is a Shell bound by an Ellipse.
240
+ */
241
+
242
+ attribute :>> semiMajorAxis [1];
243
+ attribute :>> semiMinorAxis [1];
244
+
245
+ item :>> shape : Ellipse [1] {
246
+ attribute :>> semiMajorAxis = Disc::semiMajorAxis;
247
+ attribute :>> semiMinorAxis = Disc::semiMinorAxis;
248
+ }
249
+
250
+ item :>> faces : PlanarSurface [1] {
251
+ item :>> edges [1];
252
+ }
253
+ item :>> edges : Ellipse [1] = shape;
254
+ item :>> vertices [0];
255
+ }
256
+
257
+ item def CircularDisc :> Disc {
258
+ doc
259
+ /*
260
+ * A CircularDisc is a Disc bound by a Circle.
261
+ */
262
+
263
+ attribute :>> radius [1] = semiMajorAxis;
264
+ item :>> shape : Circle;
265
+ item :>> edges : Circle;
266
+ }
267
+
268
+ item def ConicSurface :> Shell {
269
+ doc
270
+ /*
271
+ * A ConicSurface is a Surface that has ConicSection cross-sections.
272
+ */
273
+
274
+ item :>> faces [1..2];
275
+ item :>> edges [0];
276
+ item :>> vertices [0];
277
+
278
+ attribute :>> genus = 0;
279
+ }
280
+
281
+ item def Ellipsoid :> ConicSurface {
282
+ doc
283
+ /*
284
+ * An Ellipsoid is a ConicSurface with only elliptical cross-sections.
285
+ */
286
+
287
+ attribute semiAxis1 : LengthValue [1] :> scalarQuantities;
288
+ attribute semiAxis2 : LengthValue [1] :> scalarQuantities;
289
+ attribute semiAxis3 : LengthValue [1] :> scalarQuantities;
290
+
291
+ item :>> faces [1];
292
+ }
293
+
294
+ item def Sphere :> Ellipsoid {
295
+ doc
296
+ /*
297
+ * A Sphere is an Ellipsoid with all the same semiaxes.
298
+ */
299
+
300
+ attribute :>> radius [1] = semiAxis1;
301
+
302
+ assert constraint { ( semiAxis1 == semiAxis2 ) &
303
+ ( semiAxis2 == semiAxis3 ) }
304
+ }
305
+
306
+ item def Paraboloid :> ConicSurface {
307
+ doc
308
+ /*
309
+ * A Paraboloid is a ConicSurface with only parabolic cross-sections.
310
+ */
311
+
312
+ attribute focalDistance : LengthValue [1] :> scalarQuantities;
313
+
314
+ item :>> faces [1];
315
+ }
316
+
317
+ item def Hyperboloid :> ConicSurface {
318
+ doc
319
+ /*
320
+ * A Hyperboloid is a ConicSurface with only hyperbolic cross-sections.
321
+ */
322
+
323
+ attribute transverseAxis : LengthValue [1] :> scalarQuantities;
324
+ attribute conjugateAxis : LengthValue [1] :> scalarQuantities;
325
+ }
326
+
327
+ item def Toroid :> Shell {
328
+ doc
329
+ /*
330
+ * A Toroid is a surface generated from revolving a planar closed curve about an line coplanar
331
+ * with the curve. It is single sided with one hole.
332
+ */
333
+
334
+ attribute revolutionRadius : LengthValue [1] :> scalarQuantities;
335
+
336
+ item revolvedCurve : PlanarCurve [1] { attribute :>> isClosed = true; }
337
+
338
+ item :>> faces [1];
339
+ item :>> edges [0];
340
+ item :>> vertices [0];
341
+
342
+ attribute :>> genus = 1;
343
+ }
344
+
345
+ item def Torus :> Toroid {
346
+ doc
347
+ /*
348
+ * A Torus is a revolution of a Circle.
349
+ */
350
+
351
+ attribute majorRadius :>> revolutionRadius;
352
+ attribute minorRadius : LengthValue [1] :> scalarQuantities;
353
+
354
+ item :>> revolvedCurve: Circle [1] { attribute :>> radius = minorRadius; }
355
+ }
356
+
357
+
358
+ item def RectangularToroid :> Toroid {
359
+ doc
360
+ /*
361
+ * A RectangularToroid is a revolution of a Rectangle.
362
+ */
363
+
364
+ attribute rectangleLength : LengthValue [1] :> scalarQuantities;
365
+ attribute rectangleWidth : LengthValue [1] :> scalarQuantities;
366
+
367
+ item :>> revolvedCurve: Rectangle [1] {
368
+ attribute :>> length = rectangleLength;
369
+ attribute :>> width = rectangleWidth;
370
+ }
371
+ }
372
+
373
+ item def ConeOrCylinder :> Shell {
374
+ doc
375
+ /*
376
+ * A ConeOrCylinder is Shell that a Cone or a Cylinder with a given elliptical base,
377
+ * height, width (perpendicular distance from the base to the center of the top side or vertex),
378
+ * and offsets of this perpendicular at the base from the center of the base.
379
+ */
380
+
381
+ attribute :>> semiMajorAxis [1];
382
+ attribute :>> semiMinorAxis [1];
383
+ attribute :>> height [1];
384
+
385
+ attribute :>> xoffset [1];
386
+ attribute :>> yoffset [1];
387
+
388
+ item :>> faces [2..3];
389
+ item base : Disc [1] :> faces;
390
+ item af : Disc [0..1] :> faces;
391
+ item cf : Surface [1] :> faces;
392
+
393
+ item :>> edges [2..4] = faces.edges;
394
+ item be [2] :> edges {
395
+ attribute :>> semiMajorAxis = ConeOrCylinder::semiMajorAxis;
396
+ attribute :>> semiMinorAxis = ConeOrCylinder::semiMinorAxis;
397
+ }
398
+ item ae [0..2] :> edges {
399
+ attribute :>> semiMajorAxis = be.semiMajorAxis;
400
+ attribute :>> semiMinorAxis = be.semiMinorAxis;
401
+ }
402
+ assert constraint { size(ae) == (if isEmpty(af) ? 0 else 2) and
403
+ size(edges) == (if isEmpty(af) ? 2 else 4) }
404
+
405
+ item :>> vertices [0..1] = faces.vertices;
406
+ assert constraint { isEmpty(af) == notEmpty(vertices) }
407
+
408
+ /* Bind face edges to specific edges */
409
+ binding [1] bind base.edges [0..*] = be [0..*];
410
+ binding [1] bind cf.edges [0..*] = be [0..*];
411
+
412
+ /* Meeting edges */
413
+ connection :MatesWith connect be [1] to be [1];
414
+
415
+ attribute :>> genus = 0;
416
+ }
417
+
418
+ item def Cone :> ConeOrCylinder {
419
+ doc
420
+ /*
421
+ * A Cone has one elliptical sides joined to a point by a curved side.
422
+ */
423
+
424
+ item :>> faces [2];
425
+
426
+ item apex :>> vertices;
427
+
428
+ /* Bind face vertices to specific vertices */
429
+ binding [1] bind cf.vertices [0..*] = apex [0..*];
430
+ }
431
+
432
+ item def EccentricCone :> Cone {
433
+ doc
434
+ /*
435
+ * An EccentricCone is a Cone with least one positive offset.
436
+ */
437
+
438
+ assert constraint { xoffset > 0 or yoffset > 0 }
439
+ }
440
+
441
+ item def CircularCone :> Cone {
442
+ doc
443
+ /*
444
+ * A CircularCone is a Cone with a circular base.
445
+ */
446
+
447
+ attribute :>> radius [1] = semiMajorAxis;
448
+
449
+ assert constraint { semiMajorAxis == semiMinorAxis }
450
+
451
+ item :>> base : CircularDisc;
452
+ }
453
+
454
+ item def RightCircularCone :> CircularCone {
455
+ doc
456
+ /*
457
+ * A RightCircularCone is a CircularCone with zero offsets.
458
+ */
459
+
460
+ attribute :>> xoffset { attribute :>> num = 0; }
461
+ attribute :>> yoffset { attribute :>> num = 0; }
462
+ }
463
+
464
+ item def Cylinder :> ConeOrCylinder {
465
+ doc
466
+ /*
467
+ * A Cylinder has two elliptical sides joined by a curved side.
468
+ */
469
+
470
+ item :>> af [1];
471
+
472
+ binding [1] bind cf.edges [0..*] = ae [0..*];
473
+
474
+ connection :MatesWith connect ae [1] to ae [1] {
475
+ doc /* Meeting edges */
476
+ }
477
+ }
478
+
479
+ item def EccentricCylinder :> Cylinder {
480
+ doc
481
+ /*
482
+ * An EccentricCylinder is a Cylinder with least one positive offset.
483
+ */
484
+
485
+ assert constraint { xoffset > 0 or yoffset > 0 }
486
+ }
487
+
488
+ item def CircularCylinder :> Cylinder {
489
+ doc
490
+ /*
491
+ * A CircularCylinder is a Cylinder with two circular sides.
492
+ */
493
+
494
+ attribute :>> radius [1] = semiMajorAxis;
495
+
496
+ assert constraint { semiMajorAxis == semiMinorAxis }
497
+
498
+ item :>> base : CircularDisc;
499
+ item :>> af : CircularDisc;
500
+ }
501
+
502
+ item def RightCircularCylinder :> CircularCylinder {
503
+ doc
504
+ /*
505
+ * A RightCircularCylinder is a CircularCylinder with zero offsets.
506
+ */
507
+
508
+ attribute :>> xoffset { attribute :>> num = 0; }
509
+ attribute :>> yoffset { attribute :>> num = 0; }
510
+ }
511
+
512
+ item def Polyhedron :> Shell {
513
+ doc
514
+ /*
515
+ * A Polyhedron is a closed Shell with polygonal sides.
516
+ */
517
+
518
+ attribute :>> isClosed = true;
519
+
520
+ item :>> faces : Polygon [2..*];
521
+
522
+ item :>> edges = faces.edges;
523
+
524
+ attribute :>> outerSpaceDimension = if size(faces) > 2 ? 3 else 2;
525
+
526
+ attribute :>> genus = 0;
527
+ }
528
+
529
+ item def CuboidOrTriangularPrism :> Polyhedron {
530
+ doc
531
+ /*
532
+ * A CuboidOrTriangularPrism is a Polyhedron that is either a Cuboid or TriangularPrism.
533
+ */
534
+
535
+ item :>> faces [5..6];
536
+ item tf : Quadrilateral [1] :> faces;
537
+ item bf : Quadrilateral [1] :> faces;
538
+ item ff : Polygon [1] :> faces { item :>> edges [3..4]; }
539
+ item rf : Polygon [1] :> faces { item :>> edges [3..4]; }
540
+ item slf : Quadrilateral [1] :> faces;
541
+ item srf : Quadrilateral [0..1] :> faces;
542
+
543
+ item :>> edges;
544
+ assert constraint { size(edges) == 18 or size(edges) == 24 }
545
+
546
+ item tfe [2] :> edges;
547
+ item tre [2] :> edges;
548
+ item tsle [2] :> edges;
549
+ item tsre [0..2] :> edges;
550
+ item bfe [2] :> edges;
551
+ item bre [2] :> edges;
552
+ item bsle [2] :> edges;
553
+ item bsre [2] :> edges;
554
+ item ufle [2] :> edges;
555
+ item ufre [0..2] :> edges;
556
+ item urle [2] :> edges;
557
+ item urre [0..2] :> edges;
558
+
559
+ assert constraint { ( isEmpty(srf) implies isEmpty(tsre) ) and
560
+ ( isEmpty(tsre) == isEmpty(ufre) ) and
561
+ ( isEmpty(ufre) == isEmpty(urre) ) }
562
+
563
+ item :>> vertices;
564
+ assert constraint { size(vertices) == size(edges) }
565
+
566
+ item tflv [3] :> vertices;
567
+ item tfrv [0..3] :> vertices;
568
+ item trlv [3] :> vertices;
569
+ item trrv [0..3] :> vertices;
570
+ item bflv [3] :> vertices;
571
+ item bfrv [3] :> vertices;
572
+ item brlv [3] :> vertices;
573
+ item brrv [3] :> vertices;
574
+
575
+ assert constraint { ( isEmpty(tfrv) == isEmpty(trrv) ) }
576
+
577
+ /* Bind face edges to specific edges */
578
+ binding [1] bind tf.edges [0..1] = tfe [0..1];
579
+ binding [1] bind tf.edges [0..1] = tre [0..1];
580
+ binding [1] bind tf.edges [0..1] = tsle [0..1];
581
+ binding [1] bind bf.edges [0..1] = bfe [0..1];
582
+ binding [1] bind bf.edges [0..1] = bre [0..1];
583
+ binding [1] bind bf.edges [0..1] = bsle [0..1];
584
+ binding [1] bind bf.edges [0..1] = bsre [0..1];
585
+
586
+ binding [1] bind ff.edges [0..1] = tfe [0..1];
587
+ binding [1] bind ff.edges [0..1] = bfe [0..1];
588
+ binding [1] bind ff.edges [0..1] = ufle [0..1];
589
+
590
+ binding [1] bind rf.edges [0..1] = tre [0..1];
591
+ binding [1] bind rf.edges [0..1] = bre [0..1];
592
+ binding [1] bind rf.edges [0..1] = urle [0..1];
593
+
594
+ /* Bind edge vertices to specific vertices */
595
+ binding [1] bind tfe.vertices [0..1] = tflv [0..1];
596
+ binding [1] bind tre.vertices [0..1] = trlv [0..1];
597
+ binding [1] bind tsle.vertices [0..1] = tflv [0..1];
598
+ binding [1] bind tsle.vertices [0..1] = trlv [0..1];
599
+
600
+ binding [1] bind bfe.vertices [0..1] = bflv [0..1];
601
+ binding [1] bind bfe.vertices [0..1] = bfrv [0..1];
602
+ binding [1] bind bre.vertices [0..1] = brlv [0..1];
603
+ binding [1] bind bre.vertices [0..1] = brrv [0..1];
604
+ binding [1] bind bsle.vertices [0..1] = bflv [0..1];
605
+ binding [1] bind bsle.vertices [0..1] = brlv [0..1];
606
+ binding [1] bind bsre.vertices [0..1] = bfrv [0..1];
607
+ binding [1] bind bsre.vertices [0..1] = brrv [0..1];
608
+
609
+ binding [1] bind ufle.vertices [0..1] = tflv [0..1];
610
+ binding [1] bind ufle.vertices [0..1] = bflv [0..1];
611
+ binding [1] bind urle.vertices [0..1] = trlv [0..1];
612
+ binding [1] bind urle.vertices [0..1] = brlv [0..1];
613
+
614
+ /* Meeting edges */
615
+ connection :MatesWith connect tfe [1] to tfe [1];
616
+ connection :MatesWith connect tre [1] to tre [1];
617
+ connection :MatesWith connect tsle [1] to tsle [1];
618
+ connection :MatesWith connect bfe [1] to bfe [1];
619
+ connection :MatesWith connect bre [1] to bre [1];
620
+ connection :MatesWith connect bsle [1] to bsle [1];
621
+ connection :MatesWith connect bsre [1] to bsre [1];
622
+ connection :MatesWith connect ufle [1] to ufle [1];
623
+ connection :MatesWith connect urle [1] to urle [1];
624
+ connection :MatesWith connect bsre [1] to bsre [1];
625
+
626
+ /* Meeting vertices */
627
+ connection :MatesWith connect tflv [2] to tflv [2];
628
+ connection :MatesWith connect trlv [2] to trlv [2];
629
+ connection :MatesWith connect bflv [2] to bflv [2];
630
+ connection :MatesWith connect bfrv [2] to bfrv [2];
631
+ connection :MatesWith connect brlv [2] to brlv [2];
632
+ connection :MatesWith connect brrv [2] to brrv [2];
633
+ }
634
+
635
+ item def TriangularPrism :> CuboidOrTriangularPrism {
636
+ doc
637
+ /*
638
+ * A TriangularPrism is a Polyhedron with five sides, two triangular and
639
+ * the others quadrilateral.
640
+ */
641
+
642
+
643
+ item :>> faces [5];
644
+ item :>> ff : Triangle;
645
+ item :>> rf : Triangle;
646
+
647
+ item :>> edges [18];
648
+
649
+ item :>> vertices;
650
+
651
+ /* Bind face edges to specific edges */
652
+ binding [1] bind tf.edges [0..1] = bsre [0..1];
653
+
654
+ /* Bind edge vertices to specific vertices */
655
+ binding [1] bind tfe.vertices [0..1] = bfrv [0..1];
656
+ binding [1] bind tre.vertices [0..1] = bfrv [0..1];
657
+ }
658
+
659
+ item def RightTriangularPrism :> TriangularPrism {
660
+ doc
661
+ /*
662
+ * A RightTriangularPrism a TriangularPrism with two right triangluar sides,
663
+ * with given length, width, and height.
664
+ */
665
+
666
+ attribute :>> length [1];
667
+ attribute :>> width [1];
668
+ attribute :>> height [1];
669
+
670
+ item :>> tf : Rectangle;
671
+ item :>> bf : Rectangle;
672
+ item :>> ff : RightTriangle {
673
+ attribute :>> length = RightTriangularPrism::length;
674
+ attribute :>> width = RightTriangularPrism::width;
675
+ }
676
+ item :>> rf : RightTriangle {
677
+ attribute :>> length = ff.length;
678
+ attribute :>> width = rf.width;
679
+ }
680
+ item :>> slf : Rectangle;
681
+ item :>> srf : Rectangle;
682
+
683
+ item :>> tfe { attribute :>> length = ff.hypotenuse.length; }
684
+ item :>> tre { attribute :>> length = tfe.length; }
685
+ item :>> tsle { attribute :>> length = height; }
686
+ item :>> bfe { attribute :>> length = RightTriangularPrism::length; }
687
+ item :>> bre { attribute :>> length = RightTriangularPrism::length; }
688
+ item :>> bsle { attribute :>> length = height; }
689
+ item :>> bsre { attribute :>> length = height; }
690
+ item :>> ufle { attribute :>> length = width; }
691
+ item :>> urle { attribute :>> length = width; }
692
+ }
693
+ alias Wedge for RightTriangularPrism;
694
+
695
+ item def Cuboid :> CuboidOrTriangularPrism {
696
+ doc
697
+ /*
698
+ * A Cuboid is a Polyhedron with six sides, all quadrilateral.
699
+ */
700
+
701
+ item :>> faces [6];
702
+ item :>> ff : Quadrilateral;
703
+ item :>> rf : Quadrilateral;
704
+
705
+ item :>> edges [24];
706
+
707
+ item :>> vertices;
708
+
709
+ /* Bind face edges to specific edges */
710
+ binding [1] bind tf.edges [0..1] = tsre [0..1];
711
+ binding [1] bind ff.edges [0..1] = ufre [0..1];
712
+ binding [1] bind rf.edges [0..1] = urre [0..1];
713
+
714
+ binding [1] bind srf.edges [0..1] = tsre [0..1];
715
+ binding [1] bind srf.edges [0..1] = bsre [0..1];
716
+ binding [1] bind srf.edges [0..1] = ufre [0..1];
717
+ binding [1] bind srf.edges [0..1] = urre [0..1];
718
+
719
+ /* Bind edge vertices to specific vertices */
720
+ binding [1] bind tfe.vertices [0..1] = tfrv [0..1];
721
+ binding [1] bind tre.vertices [0..1] = trrv [0..1];
722
+ binding [1] bind tsre.vertices [0..1] = tfrv [0..1];
723
+ binding [1] bind tsre.vertices [0..1] = trrv [0..1];
724
+
725
+ binding [1] bind ufre.vertices [0..1] = tfrv [0..1];
726
+ binding [1] bind ufre.vertices [0..1] = bfrv [0..1];
727
+ binding [1] bind urre.vertices [0..1] = trrv [0..1];
728
+ binding [1] bind urre.vertices [0..1] = brrv [0..1];
729
+
730
+ /* Meeting edges */
731
+ connection :MatesWith connect tsre [1] to tsre [1];
732
+ connection :MatesWith connect ufre [1] to ufre [1];
733
+ connection :MatesWith connect urre [1] to urre [1];
734
+ connection :MatesWith connect bsre [1] to bsre [1];
735
+
736
+ /* Meeting vertices */
737
+ connection :MatesWith connect tfrv [2] to tfrv [2];
738
+ connection :MatesWith connect trrv [2] to trrv [2];
739
+ }
740
+
741
+ item def RectangularCuboid :> Cuboid {
742
+ doc
743
+ /*
744
+ * A RectangularCuboid is a Cuboid with all Rectangular sides.
745
+ */
746
+
747
+ attribute :>> length [1];
748
+ attribute :>> width [1];
749
+ attribute :>> height [1];
750
+
751
+ item :>> tf : Rectangle { attribute :>> length = RectangularCuboid::length;
752
+ attribute :>> width = RectangularCuboid::height; }
753
+ item :>> bf : Rectangle { attribute :>> length = RectangularCuboid::length;
754
+ attribute :>> width = RectangularCuboid::height; }
755
+ item :>> ff : Rectangle { attribute :>> length = RectangularCuboid::length;
756
+ attribute :>> width = RectangularCuboid::width; }
757
+ item :>> rf : Rectangle { attribute :>> length = RectangularCuboid::length;
758
+ attribute :>> width = RectangularCuboid::width; }
759
+ item :>> slf : Rectangle { attribute :>> length = RectangularCuboid::height;
760
+ attribute :>> width = RectangularCuboid::width; }
761
+ item :>> srf : Rectangle { attribute :>> length = RectangularCuboid::height;
762
+ attribute :>> width = RectangularCuboid::width; }
763
+ }
764
+ alias Box for RectangularCuboid;
765
+
766
+ item def Pyramid :> Polyhedron {
767
+ doc
768
+ /*
769
+ * A Pyramid is a Polyhedron with the sides of a polygon (base) forming the bases of triangles
770
+ * that join at an apex point. Its height is the perpendicular distance from the base to the apex,
771
+ * and its offsets are between this perpendicular at the base and the center of the base.
772
+ */
773
+
774
+ attribute :>> height [1];
775
+ attribute :>> xoffset;
776
+ attribute :>> yoffset;
777
+
778
+ item :>> faces;
779
+ item base [1] :> faces;
780
+ item wall : Triangle :> faces;
781
+ attribute wallNumber : Positive = size(wall);
782
+
783
+ assert constraint { size(faces) == wallNumber + 1 }
784
+ assert constraint { size(wall) == size(base.edges) }
785
+
786
+ item :>> edges;
787
+
788
+ assert constraint { size(edges) == wallNumber * 4 }
789
+
790
+ item :>> vertices;
791
+ item apex :> vertices = wall.apex;
792
+
793
+ assert constraint { size(apex) == wallNumber }
794
+
795
+ /* Base to wall and wall to wall edge mating. */
796
+ assert constraint { (1..wallNumber)->forAll {in i;
797
+ includes(wall#(i).base.matingOccurrences,
798
+ Pyramid::base.edges#(i)) and
799
+ includes((wall#(i).edges#(3) as Item).matingOccurrences,
800
+ wall#(if i==wallNumber ? 1 else i+1).edges#(2)) } }
801
+
802
+ /* Meeting apices. */
803
+ connection :MatesWith connect apex [wallNumber] to apex [wallNumber];
804
+ }
805
+
806
+ item def Tetrahedron :> Pyramid {
807
+ doc
808
+ /*
809
+ * A Tetrahedron is Pyramid with a triangular base.
810
+ */
811
+
812
+ attribute :>> baseLength [1];
813
+ attribute :>> baseWidth [1];
814
+
815
+ item :>> base : Triangle {
816
+ attribute :>> length = Tetrahedron::baseLength;
817
+ attribute :>> width = Tetrahedron::baseWidth;
818
+ }
819
+ }
820
+
821
+ item def RectangularPyramid :> Pyramid {
822
+ doc
823
+ /*
824
+ * A RectangularPyramid is Pyramid with a rectangular base.
825
+ */
826
+
827
+ attribute :>> baseLength [1];
828
+ attribute :>> baseWidth [1];
829
+
830
+ item :>> base : Rectangle {
831
+ attribute :>> length = RectangularPyramid::baseLength;
832
+ attribute :>> width = RectangularPyramid::baseWidth;
833
+ }
834
+ }
835
+ }
src/sysml.library/Domain Libraries/Geometry/SpatialItems.sysml ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package SpatialItems {
2
+ doc
3
+ /*
4
+ * This package models physical items that have a spatial extent and act as a spatial frame of reference
5
+ * for obtaining position and displacement vectors of points within them.
6
+ */
7
+
8
+ private import Objects::Point;
9
+ private import SpatialFrames::SpatialFrame;
10
+ private import Quantities::VectorQuantityValue;
11
+ private import MeasurementReferences::ThreeDCoordinateFrame;
12
+ private import MeasurementReferences::nullTransformation;
13
+ private import Time::Clock;
14
+ private import Time::TimeInstantValue;
15
+ private import ScalarValues::Natural;
16
+ private import ISQ::universalCartesianSpatial3dCoordinateFrame;
17
+ private import ISQ::Position3dVector;
18
+ private import ISQ::Displacement3dVector;
19
+ private import VectorFunctions::isZeroVector;
20
+ private import SequenceFunctions::isEmpty;
21
+ private import ControlFunctions::forAll;
22
+
23
+ item def SpatialItem :> SpatialFrame {
24
+ doc
25
+ /*
26
+ * A SpatialItem is an Item with a three-dimensional spatial extent that also acts as a SpatialFrame of reference.
27
+ */
28
+
29
+ ref item :>> localClock : Clock[1] default Time::universalClock {
30
+ doc
31
+ /*
32
+ * A local Clock to be used as the corresponding time reference within this SpatialItem.
33
+ * By default this is the singleton universalClock.
34
+ */
35
+ }
36
+
37
+ attribute coordinateFrame : ThreeDCoordinateFrame[1] default universalCartesianSpatial3dCoordinateFrame {
38
+ doc
39
+ /*
40
+ * The three-dimensional CoordinateFrame to be used as the measurement reference for position
41
+ * and displacement vector values relative to this SpatialItem.
42
+ * By default this is the singleton universalCartesianSpatial3dCoordinateFrame.
43
+ */
44
+ }
45
+
46
+ item originPoint : Point[1] :> spaceShots {
47
+ doc
48
+ /*
49
+ * The Point at the origin of the coordinateFrame of this SpatialItem.
50
+ */
51
+ }
52
+
53
+ assert constraint originPointConstraint {
54
+ doc
55
+ /*
56
+ * The CurrentPositionOf the originPoint must always be a zero vector.
57
+ */
58
+
59
+ isZeroVector(CurrentPositionOf(originPoint, that))
60
+ }
61
+
62
+ item componentItems : SpatialItem[1..*] :> subitems {
63
+ doc
64
+ /*
65
+ * A SpatialItem with componentItems is entirely made up of those items (the SpatialItem occurs only
66
+ * as a collection of its componentItems). By default they have the same localClock and equivalent
67
+ * coordinate frame as the SpatialItem they make up. A SpatialItem without componentItems occurs
68
+ * on its own, separately from its subitems.
69
+ */
70
+ item :>> localClock default (that as SpatialItem).localClock;
71
+ attribute :>> coordinateFrame {
72
+ attribute :>> mRefs default (that.that as SpatialItem).coordinateFrame.mRefs;
73
+ attribute :>> transformation[1] default nullTransformation {
74
+ attribute :>> source default (that.that.that as SpatialItem).coordinateFrame;
75
+ }
76
+ }
77
+ }
78
+
79
+ private attribute cunionNum: Natural [1] = if isEmpty(componentItems) ? 0 else 1;
80
+ private attribute componentUnion[cunionNum] :> unionsOf {
81
+ doc
82
+ /*
83
+ * A SpatialItem with componentItems is is a spatial union of them.
84
+ */
85
+
86
+ item :>> elements : SpatialItem [1..*] = componentItems;
87
+ }
88
+ }
89
+
90
+ calc def PositionOf :> SpatialFrames::PositionOf {
91
+ doc
92
+ /*
93
+ * The PositionOf a Point relative to a SpatialItem, at a specific TimeInstantValue relative to a given Clock,
94
+ * is a positionVector that is a VectorQuantityValue in the coordinateFrame of the SpatialItem.
95
+ * The default Clock is the localClock of the SpatialItem.
96
+ */
97
+
98
+ in point : Point[1];
99
+ in timeInstant : TimeInstantValue[1];
100
+ in enclosingItem :>> 'frame' : SpatialItem[1];
101
+ in clock : Clock[1] default enclosingItem.localClock;
102
+ return positionVector : Position3dVector[1] {
103
+ attribute :>> mRef = enclosingItem.coordinateFrame;
104
+ }
105
+ }
106
+
107
+ calc def CurrentPositionOf :> SpatialFrames::CurrentPositionOf {
108
+ doc
109
+ /*
110
+ * The CurrentPositionOf a Point relative to a SpatialItem and a Clock is the PositionOf
111
+ * the Point relative to the SpatialItem at the currentTime of the Clock.
112
+ */
113
+
114
+ in point : Point[1];
115
+ in enclosingItem :>> 'frame' : SpatialItem[1];
116
+ in clock : Clock[1] default enclosingItem.localClock;
117
+ return positionVector : Position3dVector[1] {
118
+ attribute :>> mRef = enclosingItem.coordinateFrame;
119
+ }
120
+ }
121
+
122
+ calc def DisplacementOf :> SpatialFrames::DisplacementOf {
123
+ doc
124
+ /*
125
+ * The DisplacementOf two Points relative to a SpatialItem, at a specific TimeInstantValue relative to a
126
+ * given Clock, is the displacementVector computed as the difference between the PositionOf the
127
+ * first Point and PositionOf the second Point, relative to that SpatialItem, at that timeInstant.
128
+ */
129
+
130
+ in point1 : Point[1];
131
+ in point2 : Point[1];
132
+ in timeInstant : TimeInstantValue[1];
133
+ in spatialItem :>> 'frame' : SpatialItem[1];
134
+ in clock : Clock[1] default spatialItem.localClock;
135
+ return displacementVector : Displacement3dVector[1] {
136
+ attribute :>> mRef = spatialItem.coordinateFrame;
137
+ }
138
+ }
139
+
140
+ calc def CurrentDisplacementOf :> SpatialFrames::CurrentDisplacementOf {
141
+ doc
142
+ /*
143
+ * The CurrentDisplacementOf two Points relative to a SpatialItem and a Clock is the DisplacementOf
144
+ * the Points relative to the SpatialItem, at the currentTime of the Clock.
145
+ */
146
+
147
+ in point1 : Point[1];
148
+ in point2 : Point[1];
149
+ in spatialItem :>> 'frame' : SpatialItem[1];
150
+ in clock : Clock[1] default spatialItem.localClock;
151
+ return displacementVector : Displacement3dVector[1] {
152
+ attribute :>> mRef = spatialItem.coordinateFrame;
153
+ }
154
+ }
155
+
156
+ }
src/sysml.library/Domain Libraries/Metadata/ImageMetadata.sysml ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package ImageMetadata {
2
+ doc
3
+ /*
4
+ * This package provides attributive data and metadata to allow a model element to be
5
+ * annotated with an image to be used in its graphical rendering or as a marker to
6
+ * adorn graphical or textual renderings.
7
+ */
8
+
9
+ private import ScalarValues::String;
10
+
11
+ attribute def Image {
12
+ doc
13
+ /*
14
+ * Image provides the data necessary for the physical definition of
15
+ * a graphical image.
16
+ */
17
+
18
+ attribute content : String[0..1] {
19
+ doc
20
+ /*
21
+ * Binary data for the image according to the given MIME type,
22
+ * encoded as given by the encoding.
23
+ */
24
+ }
25
+
26
+ attribute encoding : String[0..1] {
27
+ doc
28
+ /*
29
+ * Describes how characters in the content are to be decoded into
30
+ * binary data. At least "base64", "hex", "identify", and "JSONescape"
31
+ * shall be supported.
32
+ */
33
+ }
34
+
35
+ attribute type : String[0..1] {
36
+ doc
37
+ /*
38
+ * The MIME type according to which the content should be interpreted.
39
+ */
40
+ }
41
+
42
+ attribute location : String[0..1] {
43
+ doc
44
+ /*
45
+ * A URI for the location of a resource containing the image content,
46
+ * as an alternative for embedding it in the content attribute.
47
+ */
48
+ }
49
+ }
50
+
51
+ metadata def Icon {
52
+ doc
53
+ /*
54
+ * Icon metadata can be used to annotate a model element with an image to be used
55
+ * to show render the element on a diagram and/or a small image to be used as an
56
+ * adornment on a graphical or textual rendering. Alternatively, another metadata
57
+ * definition can be annotated with an Icon to indicate that any model element
58
+ * annotated by the containing metadata can be rendered according to the Icon.
59
+ */
60
+
61
+ attribute fullImage : Image[0..1] {
62
+ doc
63
+ /*
64
+ * A full-sized image that can be used to render the annotated element on a
65
+ * graphical view, potentially as an alternative to its standard rendering.
66
+ */
67
+ }
68
+
69
+ attribute smallImage : Image[0..1] {
70
+ doc
71
+ /*
72
+ * A smaller image that can be used as an adornment on the graphical rendering
73
+ * of the annotated element or as a marker in a textual rendering.
74
+ */
75
+ }
76
+ }
77
+
78
+ }
src/sysml.library/Domain Libraries/Metadata/ModelingMetadata.sysml ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package ModelingMetadata {
2
+ doc
3
+ /*
4
+ * This package contains definitions of metadata generally useful for annotating models.
5
+ */
6
+
7
+ private import Base::Anything;
8
+ private import ScalarValues::String;
9
+ private import RiskMetadata::Risk;
10
+
11
+ enum def StatusKind {
12
+ doc
13
+ /*
14
+ * StatusKind enumerates the possible statuses of work on a model element.
15
+ */
16
+
17
+ open {
18
+ doc
19
+ /*
20
+ * Status is open.
21
+ */
22
+ }
23
+
24
+ tbd {
25
+ doc
26
+ /*
27
+ * Status is to be determined.
28
+ */
29
+ }
30
+
31
+ tbr {
32
+ doc
33
+ /*
34
+ * Status is to be resolved.
35
+ */
36
+ }
37
+
38
+ tbc {
39
+ doc
40
+ /*
41
+ * Status is to be confirmed.
42
+ */
43
+ }
44
+
45
+ done {
46
+ doc
47
+ /*
48
+ * Status is done.
49
+ */
50
+ }
51
+
52
+ closed {
53
+ doc
54
+ /*
55
+ * Status is closed.
56
+ */
57
+ }
58
+ }
59
+
60
+ metadata def StatusInfo {
61
+ doc
62
+ /*
63
+ * StatusInfo is used to annotate a model element with status information.
64
+ */
65
+
66
+ attribute originator : String [0..1] {
67
+ doc
68
+ /*
69
+ * The originator of the annotated element.
70
+ */
71
+ }
72
+
73
+ attribute owner : String [0..1] {
74
+ doc
75
+ /*
76
+ * The current owner of the annotated element.
77
+ */
78
+ }
79
+
80
+ attribute status : StatusKind {
81
+ doc
82
+ /*
83
+ * The current status of work on the annotated element (required).
84
+ */
85
+ }
86
+
87
+ item risk : Risk [0..1] {
88
+ doc
89
+ /*
90
+ * An assessment of risk for the annotated element.
91
+ */
92
+ }
93
+ }
94
+
95
+ metadata def Rationale {
96
+ doc
97
+ /*
98
+ * Rationale is used to explain a choice or other decision made related to the
99
+ * annotated element.
100
+ */
101
+
102
+ attribute text : String {
103
+ doc
104
+ /*
105
+ * A textual description of the rationale (required).
106
+ */
107
+ }
108
+
109
+ ref explanation : Anything [0..1] {
110
+ doc
111
+ /*
112
+ * A reference to a feature that provides a formal explanation of the rationale.
113
+ * (For example, a trade study whose result explains the choice of a certain alternative).
114
+ */
115
+ }
116
+ }
117
+
118
+ metadata def Issue {
119
+ doc
120
+ /*
121
+ * Issue is used to record some issue concerning the annotated element.
122
+ */
123
+
124
+ attribute text : String {
125
+ doc
126
+ /*
127
+ * A textual description of the issue.
128
+ */
129
+ }
130
+ }
131
+
132
+ metadata def <refinement> Refinement {
133
+ doc
134
+ /*
135
+ * Refinement is used to identify a dependency as modeling a refinement relationship.
136
+ * In such a relationship, the source elements of the relationship provide a more precise and/or
137
+ * accurate representation than the target elements.
138
+ */
139
+
140
+ :>> annotatedElement : SysML::Dependency;
141
+ }
142
+
143
+ }
src/sysml.library/Domain Libraries/Metadata/ParametersOfInterestMetadata.sysml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package ParametersOfInterestMetadata {
2
+ doc
3
+ /*
4
+ * This package contains definitions of metadata to identify key parameters of interest,
5
+ * including measures of effectiveness (MOE) and other key measures of performance (MOP).
6
+ */
7
+
8
+ private import Metaobjects::SemanticMetadata;
9
+
10
+ attribute measuresOfEffectiveness[*] nonunique {
11
+ doc /* Base feature for attributes that are measures of effectiveness. */
12
+ }
13
+
14
+ attribute measuresOfPerformance[*] nonunique {
15
+ doc /* Base feature for attributes that are measures of performance. */
16
+ }
17
+
18
+ metadata def <moe> MeasureOfEffectiveness :> SemanticMetadata {
19
+ doc
20
+ /*
21
+ * MeasureOfEffectiveness is semantic metadata for identifying an attribute as a
22
+ * measure of effectiveness.
23
+ */
24
+
25
+ :>> annotatedElement : SysML::Usage;
26
+ :>> baseType = measuresOfEffectiveness meta SysML::Usage;
27
+ }
28
+
29
+ metadata def <mop> MeasureOfPerformance :> SemanticMetadata {
30
+ doc
31
+ /*
32
+ * MeasureOfPerformance is semantic metadata for identifying an attribute as a
33
+ * measure of performance.
34
+ */
35
+
36
+ :>> annotatedElement : SysML::Usage;
37
+ :>> baseType = measuresOfPerformance meta SysML::Usage;
38
+ }
39
+ }
src/sysml.library/Domain Libraries/Metadata/RiskMetadata.sysml ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package RiskMetadata {
2
+ doc
3
+ /*
4
+ * This package defines metadata for annotating model elements with assessments of risk.
5
+ */
6
+
7
+ private import ScalarValues::Real;
8
+
9
+ attribute def Level :> Real {
10
+ doc
11
+ /*
12
+ * A Level is a Real number in the interval 0.0 to 1.0, inclusive.
13
+ */
14
+
15
+ assert constraint { that >= 0.0 and that <= 1.0 }
16
+ }
17
+
18
+ enum def LevelEnum :> Level {
19
+ doc
20
+ /*
21
+ * LevelEnum provides standard probability Levels for low, medium and high risks.
22
+ */
23
+
24
+ low = 0.25;
25
+ medium = 0.50;
26
+ high = 0.75;
27
+ }
28
+
29
+ attribute def RiskLevel {
30
+ doc
31
+ /*
32
+ * RiskLevel gives the probability of a risk occurring and, optionally, the impact
33
+ * if the risk occurs.
34
+ */
35
+
36
+ attribute probability : Level {
37
+ doc
38
+ /*
39
+ * The probability that a risk will occur.
40
+ */
41
+ }
42
+
43
+ attribute impact : Level [0..1] {
44
+ doc
45
+ /*
46
+ * The impact of the risk if it occurs (with 0.0 being no impact and 1.0 being
47
+ * the most severe impact).
48
+ */
49
+ }
50
+ }
51
+
52
+ enum def RiskLevelEnum :> RiskLevel {
53
+ doc
54
+ /*
55
+ * RiskLevelEnum enumerates standard RiskLevels for low, medium and high risks
56
+ * (without including impact).
57
+ */
58
+
59
+ low = RiskLevel(probability = LevelEnum::low);
60
+ medium = RiskLevel(probability = LevelEnum::medium);
61
+ high = RiskLevel(probability = LevelEnum::high);
62
+ }
63
+
64
+ metadata def Risk {
65
+ doc
66
+ /*
67
+ * Risk is used to annotate a model element with an assessment of the risk related to it
68
+ * in some typical risk areas.
69
+ */
70
+
71
+ attribute totalRisk : RiskLevel [0..1] {
72
+ doc
73
+ /*
74
+ * The total risk associated with the annotated element.
75
+ */
76
+ }
77
+
78
+ attribute technicalRisk : RiskLevel [0..1] {
79
+ doc
80
+ /*
81
+ * The risk of unresolved technical issues regarding the annotated element.
82
+ */
83
+ }
84
+
85
+ attribute scheduleRisk : RiskLevel [0..1] {
86
+ doc
87
+ /*
88
+ * The risk that work on the annotated element will not be completed on schedule.
89
+ */
90
+ }
91
+
92
+ attribute costRisk : RiskLevel [0..1] {
93
+ doc
94
+ /*
95
+ * The risk that work on the annotated element will exceed its planned cost.
96
+ */
97
+ }
98
+ }
99
+
100
+ }
src/sysml.library/Domain Libraries/Quantities and Units/ISQ.sysml ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package ISQ {
2
+ doc
3
+ /*
4
+ * International system of quantities (ISQ), as defined in ISO/IEC 80000
5
+ */
6
+
7
+ private import ScalarValues::Real;
8
+ private import Quantities::*;
9
+ private import MeasurementReferences::*;
10
+
11
+ public import ISQBase::*; // ISO/IEC 80000 base quantities and general concepts
12
+ public import ISQSpaceTime::*; // ISO 80000-3 "Space and Time"
13
+ public import ISQMechanics::*; // ISO 80000-4 "Mechanics"
14
+ public import ISQThermodynamics::*; // ISO 80000-5 "Thermodynamics"
15
+ public import ISQElectromagnetism::*; // IEC 80000-6 "Electromagnetism"
16
+ public import ISQLight::*; // ISO 80000-7 "Light"
17
+ public import ISQAcoustics::*; // ISO 80000-8 "Acoustics"
18
+ public import ISQChemistryMolecular::*; // ISO 80000-9 "Physical chemistry and molecular physics"
19
+ public import ISQAtomicNuclear::*; // ISO 80000-10 "Atomic and nuclear physics"
20
+ public import ISQCharacteristicNumbers::*; // ISO 80000-11 "Characteristic numbers"
21
+ public import ISQCondensedMatter::*; // ISO 80000-12 "Condensed matter physics"
22
+ public import ISQInformation::*; // IEC 80000-13 "Information science and technology"
23
+
24
+ /* Additional quantity declarations */
25
+
26
+ attribute def TemperatureDifferenceValue :> ScalarQuantityValue {
27
+ doc
28
+ /*
29
+ * temperature difference
30
+ * A separate temperature difference quantity and unit are needed in order to support °C, °F and centrigrade temperature differences
31
+ */
32
+ attribute :>> num: Real;
33
+ attribute :>> mRef: TemperatureDifferenceUnit[1];
34
+ }
35
+
36
+ attribute temperatureDifference: TemperatureDifferenceValue [*] nonunique :> scalarQuantities;
37
+
38
+ attribute def TemperatureDifferenceUnit :> SimpleUnit {
39
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = 1; }
40
+ attribute :>> quantityDimension { :>> quantityPowerFactors = thermodynamicTemperaturePF; }
41
+ }
42
+ }
src/sysml.library/Domain Libraries/Quantities and Units/ISQAcoustics.sysml ADDED
@@ -0,0 +1,444 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package ISQAcoustics {
2
+ doc
3
+ /*
4
+ * International System of Quantities and Units
5
+ * Generated on 2022-08-07T14:44:27Z from standard ISO-80000-8:2020 "Acoustics"
6
+ * see also https://www.iso.org/obp/ui/#iso:std:iso:80000:-8:ed-2:v1:en
7
+ *
8
+ * Note 1: In documentation comments, AsciiMath notation (see http://asciimath.org/) is used for mathematical concepts,
9
+ * with Greek letters in Unicode encoding. In running text, AsciiMath is placed between backticks.
10
+ * Note 2: For vector and tensor quantities currently the unit and quantity value type for their (scalar) magnitude is
11
+ * defined, as well as their typical Cartesian 3d VectorMeasurementReference (i.e. coordinate system)
12
+ * or TensorMeasurementReference.
13
+ */
14
+
15
+ private import ScalarValues::Real;
16
+ private import Quantities::*;
17
+ private import MeasurementReferences::*;
18
+ private import ISQBase::*;
19
+
20
+ /* Quantity definitions referenced from other ISQ packages */
21
+ private import ISQMechanics::PowerValue;
22
+ private import ISQMechanics::PressureValue;
23
+ private import ISQSpaceTime::CartesianSpatial3dCoordinateFrame;
24
+ private import ISQSpaceTime::SpeedValue;
25
+ private import ISQSpaceTime::CartesianVelocity3dCoordinateFrame;
26
+ private import ISQSpaceTime::AccelerationValue;
27
+ private import ISQSpaceTime::CartesianAcceleration3dCoordinateFrame;
28
+ private import ISQThermodynamics::EnergyValue;
29
+
30
+ /* ISO-80000-8 item 8-1 logarithmic frequency range */
31
+ attribute def LogarithmicFrequencyRangeValue :> ScalarQuantityValue {
32
+ doc
33
+ /*
34
+ * source: item 8-1 logarithmic frequency range
35
+ * symbol(s): `G`
36
+ * application domain: generic
37
+ * name: LogarithmicFrequencyRange
38
+ * quantity dimension: 1
39
+ * measurement unit(s): oct, dec
40
+ * tensor order: 0
41
+ * definition: quantity given by: `G = log_2(f_2/f_1) "[oct]" = log_10(f_2/f_1) "[dec]"`, where `f_1` and `f_2` are two frequencies (ISO 80000-3)
42
+ * remarks: One octave (oct) is the logarithmic frequency range between `f_1` and `f_2` when `f_2/f_1 = 2`. Similarly, one decade (dec) is the logarithmic frequency range between `f_1` and `f_2` when `f_2/f_1 = 10`; thus `1 "[dec]" = log_2(10) "[oct]" ≈ 3.322 "[oct]"`. ISO 266 specifies preferred frequencies for acoustics separated by logarithmic frequency ranges equal to one tenth of a decade (`0.1 "[dec]"`). Each `0.1 "[dec]"` logarithmic frequency range is referred to in ISO 266 as a "one-third-octave interval" because `0.1 "[dec]"` is approximately equal to `1/3 "[oct]"`. Similarly, a logarithmic frequency range of `0.3 "[dec]"` is referred to as a "one-octave interval" because `0.3 "[dec]"` is approximately equal to `1 "[oct]"`. A logarithmic frequency range equal to one tenth of a decade can be referred to as a decidecade.
43
+ */
44
+ attribute :>> num: Real;
45
+ attribute :>> mRef: LogarithmicFrequencyRangeUnit[1];
46
+ }
47
+
48
+ attribute logarithmicFrequencyRange: LogarithmicFrequencyRangeValue[*] nonunique :> scalarQuantities;
49
+
50
+ attribute def LogarithmicFrequencyRangeUnit :> DimensionOneUnit {
51
+ }
52
+
53
+ /* ISO-80000-8 item 8-2.1 static pressure */
54
+ attribute staticPressure: PressureValue :> scalarQuantities {
55
+ doc
56
+ /*
57
+ * source: item 8-2.1 static pressure
58
+ * symbol(s): `p_s`
59
+ * application domain: generic
60
+ * name: StaticPressure (specializes Pressure)
61
+ * quantity dimension: L^-1*M^1*T^-2
62
+ * measurement unit(s): Pa, kg*m^-1*s^-2
63
+ * tensor order: 0
64
+ * definition: pressure (ISO 80000-4) in a medium when no sound wave is present
65
+ * remarks: This definition applies to a medium with zero flow.
66
+ */
67
+ }
68
+
69
+ /* ISO-80000-8 item 8-2.2 sound pressure */
70
+ attribute soundPressure: PressureValue :> scalarQuantities {
71
+ doc
72
+ /*
73
+ * source: item 8-2.2 sound pressure
74
+ * symbol(s): `p`
75
+ * application domain: generic
76
+ * name: SoundPressure (specializes Pressure)
77
+ * quantity dimension: L^-1*M^1*T^-2
78
+ * measurement unit(s): Pa, kg*m^-1*s^-2
79
+ * tensor order: 0
80
+ * definition: difference between instantaneous total pressure and static pressure (item 8-2.1)
81
+ * remarks: None.
82
+ */
83
+ }
84
+
85
+ /* ISO-80000-8 item 8-3 sound particle displacement */
86
+ attribute def Cartesian3dSoundParticleDisplacementVector :> VectorQuantityValue {
87
+ doc
88
+ /*
89
+ * source: item 8-3 sound particle displacement
90
+ * symbol(s): `vec(δ)`
91
+ * application domain: generic
92
+ * name: SoundParticleDisplacement (specializes Displacement)
93
+ * quantity dimension: L^1
94
+ * measurement unit(s): m
95
+ * tensor order: 1
96
+ * definition: vector (ISO 80000-2) quantity giving the instantaneous displacement (ISO 80000-3) of a particle in a medium from what would be its position in the absence of sound waves
97
+ * remarks: None.
98
+ */
99
+ attribute :>> isBound = false;
100
+ attribute :>> num: Real[3];
101
+ attribute :>> mRef: CartesianSpatial3dCoordinateFrame[1];
102
+ }
103
+
104
+ attribute soundParticleDisplacementVector: Cartesian3dSoundParticleDisplacementVector :> vectorQuantities;
105
+
106
+ /* ISO-80000-8 item 8-4 sound particle velocity */
107
+ attribute def Cartesian3dSoundParticleVelocityVector :> VectorQuantityValue {
108
+ doc
109
+ /*
110
+ * source: item 8-4 sound particle velocity
111
+ * symbol(s): `vec(u)`, `(vec(v))`
112
+ * application domain: generic
113
+ * name: SoundParticleVelocity (specializes Velocity)
114
+ * quantity dimension: L^1*T^-1
115
+ * measurement unit(s): m*s^-1
116
+ * tensor order: 1
117
+ * definition: vector (ISO 80000-2) quantity given by: `vec(u) = del(vec(δ))/del(t)`, where `vec(δ)` is sound particle displacement (item 8-3) and `t` is time (ISO 80000-3)
118
+ * remarks: The definition is limited to small-amplitude acoustic disturbances such that the magnitude of `vec(u)` is small relative to the phase speed (ISO 80000-3) of sound.
119
+ */
120
+ attribute :>> isBound = false;
121
+ attribute :>> num: Real[3];
122
+ attribute :>> mRef: CartesianVelocity3dCoordinateFrame[1];
123
+ }
124
+
125
+ attribute soundParticleVelocityVector: Cartesian3dSoundParticleVelocityVector :> vectorQuantities;
126
+
127
+ /* ISO-80000-8 item 8-5 sound particle acceleration */
128
+ attribute def Cartesian3dSoundParticleAccelerationVector :> VectorQuantityValue {
129
+ doc
130
+ /*
131
+ * source: item 8-5 sound particle acceleration
132
+ * symbol(s): `vec(a)`
133
+ * application domain: generic
134
+ * name: SoundParticleAcceleration (specializes Acceleration)
135
+ * quantity dimension: L^1*T^-2
136
+ * measurement unit(s): m*s^-2
137
+ * tensor order: 1
138
+ * definition: vector (ISO 80000-2) quantity given by: `vec(a) = (del(vec(u)))/(del(t))`, where `vec(u)` is sound particle velocity (item 8-4) and `t` is time
139
+ * remarks: The definition is limited to small-amplitude acoustic disturbances such that the magnitude of `vec(u)` is small relative to the phase speed (ISO 80000-3) of sound.
140
+ */
141
+ attribute :>> isBound = false;
142
+ attribute :>> num: Real[3];
143
+ attribute :>> mRef: CartesianAcceleration3dCoordinateFrame[1];
144
+ }
145
+
146
+ attribute soundParticleAccelerationVector: Cartesian3dSoundParticleAccelerationVector :> vectorQuantities;
147
+
148
+ /* ISO-80000-8 item 8-6 volume velocity, volume flow rate */
149
+ attribute volumeVelocity: SpeedValue :> scalarQuantities {
150
+ doc
151
+ /*
152
+ * source: item 8-6 volume velocity, volume flow rate
153
+ * symbol(s): `q`, `q_v`
154
+ * application domain: generic
155
+ * name: VolumeVelocity (specializes Speed)
156
+ * quantity dimension: L^3*T^-1
157
+ * measurement unit(s): m^3*s^-1
158
+ * tensor order: 0
159
+ * definition: surface integral of the normal component of the sound particle velocity (item 8-4) over a defined surface
160
+ * remarks: None.
161
+ */
162
+ }
163
+
164
+ alias volumeFlowRate for volumeVelocity;
165
+
166
+ /* ISO-80000-8 item 8-7 sound energy density */
167
+ attribute def SoundEnergyDensityValue :> ScalarQuantityValue {
168
+ doc
169
+ /*
170
+ * source: item 8-7 sound energy density
171
+ * symbol(s): `w`
172
+ * application domain: generic
173
+ * name: SoundEnergyDensity
174
+ * quantity dimension: L^-1*M^1*T^-2
175
+ * measurement unit(s): J/m^3, kg*m^-1*s^-2
176
+ * tensor order: 0
177
+ * definition: quantity given by: `w = 1/2 ρ_m u^2 + 1/2 p^2/(ρ_m c^2)`, where `ρ_m` is mean density (ISO 80000-4), `u` is the magnitude of the sound particle velocity (item 8-4), `p` is sound pressure (item 8-2.2), and `c` is the phase speed (ISO 80000-3) of sound
178
+ * remarks: In formula form: `E = int_(t_1)^(t_2) p^2 dt`, where `t_1` and `t_2` are the starting and ending times for the integral and `p` is sound pressure (item 8-2.2). In airborne acoustics, the sound pressure is frequency-weighted and frequency-band-limited. If frequency weightings as specified in IEC 61672-1 are applied, this should be indicated by appropriate subscripts to the symbol `E`. In underwater acoustics, the term ""sound exposure"" indicates an unweighted quantity unless indicated otherwise.
179
+ */
180
+ attribute :>> num: Real;
181
+ attribute :>> mRef: SoundEnergyDensityUnit[1];
182
+ }
183
+
184
+ attribute soundEnergyDensity: SoundEnergyDensityValue[*] nonunique :> scalarQuantities;
185
+
186
+ attribute def SoundEnergyDensityUnit :> DerivedUnit {
187
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; }
188
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
189
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
190
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
191
+ }
192
+
193
+ /* ISO-80000-8 item 8-8 sound energy */
194
+ attribute soundEnergy: EnergyValue :> scalarQuantities {
195
+ doc
196
+ /*
197
+ * source: item 8-8 sound energy
198
+ * symbol(s): `Q`
199
+ * application domain: generic
200
+ * name: SoundEnergy (specializes Energy)
201
+ * quantity dimension: L^2*M^1*T^-2
202
+ * measurement unit(s): J, kg*m^2*s^-2
203
+ * tensor order: 0
204
+ * definition: integral of sound energy density (item 8-7) over a specified volume
205
+ * remarks: The sound energy in region `R` can be expressed by: `Q = oint_R w(x) d^3x`, where `d^3x` is an element of volume.
206
+ */
207
+ }
208
+
209
+ /* ISO-80000-8 item 8-9 sound power */
210
+ attribute soundPower: PowerValue :> scalarQuantities {
211
+ doc
212
+ /*
213
+ * source: item 8-9 sound power
214
+ * symbol(s): `P`, `W`
215
+ * application domain: generic
216
+ * name: SoundPower (specializes Power)
217
+ * quantity dimension: L^2*M^1*T^-3
218
+ * measurement unit(s): W, kg*m^2*s^-3
219
+ * tensor order: 0
220
+ * definition: integral over a surface of the product of sound pressure, `p` (item 8-2.2), and the component `u_n` of the particle velocity (item 8-4) in the direction normal to the surface, at a point on the surface
221
+ * remarks: This definition holds for waves in the volume of homogenous fluids or gases. This definition can become inapplicable in situations with a high mean fluid flow. Sound power is for example used to indicate the rate at which energy is radiated by a sound source. Sound power is an oscillatory quantity that can be positive or negative. A positive sound power indicates that the sound power is radiated out of the surface. A negative sound power indicates that the sound power is absorbed into the surface.
222
+ */
223
+ }
224
+
225
+ /* ISO-80000-8 item 8-10 sound intensity */
226
+ attribute def SoundIntensityValue :> ScalarQuantityValue {
227
+ doc
228
+ /*
229
+ * source: item 8-10 sound intensity (magnitude)
230
+ * symbol(s): `I`
231
+ * application domain: generic
232
+ * name: SoundIntensity
233
+ * quantity dimension: M^1*T^-3
234
+ * measurement unit(s): W/m^2, kg*s^-3
235
+ * tensor order: 0
236
+ * definition: vector (ISO 80000-2) quantity given by: `vec(I) = p vec(u)`, where `p` is sound pressure (item 8-2.2) and `vec(u)` is sound particle velocity (item 8-4)
237
+ * remarks: This definition can become inapplicable in situations with a high mean fluid flow.
238
+ */
239
+ attribute :>> num: Real;
240
+ attribute :>> mRef: SoundIntensityUnit[1];
241
+ }
242
+
243
+ attribute soundIntensity: SoundIntensityValue[*] nonunique :> scalarQuantities;
244
+
245
+ attribute def SoundIntensityUnit :> DerivedUnit {
246
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
247
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; }
248
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF); }
249
+ }
250
+
251
+ attribute def Cartesian3dSoundIntensityVector :> VectorQuantityValue {
252
+ doc
253
+ /*
254
+ * source: item 8-10 sound intensity (vector)
255
+ * symbol(s): `vec(I)`
256
+ * application domain: generic
257
+ * name: SoundIntensity
258
+ * quantity dimension: M^1*T^-3
259
+ * measurement unit(s): W/m^2, kg*s^-3
260
+ * tensor order: 1
261
+ * definition: vector (ISO 80000-2) quantity given by: `vec(I) = p vec(u)`, where `p` is sound pressure (item 8-2.2) and `vec(u)` is sound particle velocity (item 8-4)
262
+ * remarks: This definition can become inapplicable in situations with a high mean fluid flow.
263
+ */
264
+ attribute :>> isBound = false;
265
+ attribute :>> num: Real[3];
266
+ attribute :>> mRef: Cartesian3dSoundIntensityCoordinateFrame[1];
267
+ }
268
+
269
+ attribute soundIntensityVector: Cartesian3dSoundIntensityVector :> vectorQuantities;
270
+
271
+ attribute def Cartesian3dSoundIntensityCoordinateFrame :> VectorMeasurementReference {
272
+ attribute :>> dimensions = 3;
273
+ attribute :>> isBound = false;
274
+ attribute :>> isOrthogonal = true;
275
+ attribute :>> mRefs: SoundIntensityUnit[3];
276
+ }
277
+
278
+ /* ISO-80000-8 item 8-11 sound exposure */
279
+ attribute def SoundExposureValue :> ScalarQuantityValue {
280
+ doc
281
+ /*
282
+ * source: item 8-11 sound exposure
283
+ * symbol(s): `E`
284
+ * application domain: generic
285
+ * name: SoundExposure
286
+ * quantity dimension: L^-2*M^2*T^-3
287
+ * measurement unit(s): Pa^2*s, kg^2*m^-2*s^-3
288
+ * tensor order: 0
289
+ * definition: time-integrated squared sound pressure (item 8-2.2)
290
+ * remarks: In formula form: `E = int_(t_1)^(t_2) p^2 dt`, where `t_1` and `t_2` are the starting and ending times for the integral and `p` is sound pressure (item 8-2.2). In airborne acoustics, the sound pressure is frequency-weighted and frequency-band-limited. If frequency weightings as specified in IEC 61672-1 are applied, this should be indicated by appropriate subscripts to the symbol `E`. In underwater acoustics, the term "sound exposure" indicates an unweighted quantity unless indicated otherwise.
291
+ */
292
+ attribute :>> num: Real;
293
+ attribute :>> mRef: SoundExposureUnit[1];
294
+ }
295
+
296
+ attribute soundExposure: SoundExposureValue[*] nonunique :> scalarQuantities;
297
+
298
+ attribute def SoundExposureUnit :> DerivedUnit {
299
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; }
300
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 2; }
301
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; }
302
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
303
+ }
304
+
305
+ /* ISO-80000-8 item 8-12 characteristic impedance of a medium for longitudinal waves */
306
+ attribute def CharacteristicImpedanceOfAMediumForLongitudinalWavesValue :> ScalarQuantityValue {
307
+ doc
308
+ /*
309
+ * source: item 8-12 characteristic impedance of a medium for longitudinal waves
310
+ * symbol(s): `Z_c`
311
+ * application domain: generic
312
+ * name: CharacteristicImpedanceOfAMediumForLongitudinalWaves
313
+ * quantity dimension: L^-2*M^1*T^-1
314
+ * measurement unit(s): Pa*s/m, kg*m^-2*s^-1
315
+ * tensor order: 0
316
+ * definition: quotient of sound pressure (item 8-2.2) and the component of the sound particle velocity (item 8-4) in the direction of the wave propagation
317
+ * remarks: The definition is limited to a progressive plane wave in a non-dissipative homogenous gas or fluid. Characteristic impedance is a property of the medium and is equal to `ρ c` where `ρ` is the time-averaged density (ISO 80000-4) of the medium and `c` the phase speed of sound (ISO 80000-3). Longitudinal waves are waves in which the displacement of the medium is in the same direction as, or the opposite direction to, the direction of propagation of the wave.
318
+ */
319
+ attribute :>> num: Real;
320
+ attribute :>> mRef: CharacteristicImpedanceOfAMediumForLongitudinalWavesUnit[1];
321
+ }
322
+
323
+ attribute characteristicImpedanceOfAMediumForLongitudinalWaves: CharacteristicImpedanceOfAMediumForLongitudinalWavesValue[*] nonunique :> scalarQuantities;
324
+
325
+ attribute def CharacteristicImpedanceOfAMediumForLongitudinalWavesUnit :> DerivedUnit {
326
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; }
327
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
328
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
329
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
330
+ }
331
+
332
+ /* ISO-80000-8 item 8-13 acoustic impedance */
333
+ attribute def AcousticImpedanceValue :> ScalarQuantityValue {
334
+ doc
335
+ /*
336
+ * source: item 8-13 acoustic impedance
337
+ * symbol(s): `Z_a`
338
+ * application domain: generic
339
+ * name: AcousticImpedance
340
+ * quantity dimension: L^-4*M^1*T^-1
341
+ * measurement unit(s): Pa*s/m^3, kg*m^-4*s^-1
342
+ * tensor order: 0
343
+ * definition: at a surface, quotient of the average sound pressure (item 8-2.2) over that surface and the sound volume flow rate (item 8-6) through that surface
344
+ * remarks: This definition applies to a sound pressure that is in phase with the volume flow rate. In this situation, the acoustic impedance is real. Both the sound pressure, `p`, and sound volume flow rate, `q`, are real quantities that fluctuate with time. If the fluctuations are in phase (phase difference equal to zero), the quotient `p/q` is a constant. If they are out of phase (phase difference not equal to zero), they can be represented by complex quantities in the frequency domain, the quotient of which is also complex.
345
+ */
346
+ attribute :>> num: Real;
347
+ attribute :>> mRef: AcousticImpedanceUnit[1];
348
+ }
349
+
350
+ attribute acousticImpedance: AcousticImpedanceValue[*] nonunique :> scalarQuantities;
351
+
352
+ attribute def AcousticImpedanceUnit :> DerivedUnit {
353
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -4; }
354
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
355
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
356
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
357
+ }
358
+
359
+ /* ISO-80000-8 item 8-14 sound pressure level */
360
+ attribute def SoundPressureLevelValue :> ScalarQuantityValue {
361
+ doc
362
+ /*
363
+ * source: item 8-14 sound pressure level
364
+ * symbol(s): `L_p`
365
+ * application domain: generic
366
+ * name: SoundPressureLevel
367
+ * quantity dimension: 1
368
+ * measurement unit(s): dB
369
+ * tensor order: 0
370
+ * definition: quantity given by: `L_p = 10 log_10((p_"RMS"^2)/p_0^2) "[dB]"`, where `p_"RMS"` is the root-mean-square sound pressure in the time domain and `p_0` is the reference value of sound pressure
371
+ * remarks: For sound in air and other gases, the reference value of sound pressure is given by `p_0 = 20 "[μPa]"`. For sound in water and other liquids, the reference value of sound pressure is given by `p_0 = 1 "[μPa]"`. When stating a value of sound pressure level, the reference value shall be specified. The value of sound pressure level depends on the selected frequency range and time duration. When stating a value of sound pressure level, the frequency range and time duration shall be specified. In accordance with ISO 80000-1, any attachment to the unit symbol as a means of giving information about the special nature of the quantity or context of measurement under consideration is not permitted. If specific frequency and time weightings as specified in IEC 61672-1 or specific frequency bands or time duration are applied, this should be indicated by appropriate subscripts to the quantity symbol. In some applications the level of the peak sound pressure is required. This is obtained by replacing the root-mean-square sound pressure, with the instantaneous sound pressure having the greatest absolute value during a stated time interval, in the definition of sound pressure level.
372
+ */
373
+ attribute :>> num: Real;
374
+ attribute :>> mRef: SoundPressureLevelUnit[1];
375
+ }
376
+
377
+ attribute soundPressureLevel: SoundPressureLevelValue[*] nonunique :> scalarQuantities;
378
+
379
+ attribute def SoundPressureLevelUnit :> DimensionOneUnit {
380
+ }
381
+
382
+ /* ISO-80000-8 item 8-15 sound power level */
383
+ attribute def SoundPowerLevelValue :> ScalarQuantityValue {
384
+ doc
385
+ /*
386
+ * source: item 8-15 sound power level
387
+ * symbol(s): `L_P`, `L_W`
388
+ * application domain: generic
389
+ * name: SoundPowerLevel
390
+ * quantity dimension: 1
391
+ * measurement unit(s): dB
392
+ * tensor order: 0
393
+ * definition: quantity given by: `L_P = 10 log_10 ((P_m)/P_0) "[dB]"`, where `P_m` is the magnitude of the time-averaged sound power (item 8-9) and `P_0` is the reference value of sound power
394
+ * remarks: The reference value of sound power is given by `P_0 = 1 "[pW]"`. When stating a value of sound power level, the reference value shall be specified. The value of sound power level depends on the selected frequency range and time duration. When stating a value of sound power level, the frequency range and time duration shall be specified. In accordance with ISO 80000-1, any attachment to the unit symbol as a means of giving information about the special nature of the quantity or context of measurement under consideration is not permitted. If specific frequency and time weightings as specified in IEC 61672-1 or specific frequency bands or time duration are applied, this should be indicated by appropriate subscripts to the quantity symbol.
395
+ */
396
+ attribute :>> num: Real;
397
+ attribute :>> mRef: SoundPowerLevelUnit[1];
398
+ }
399
+
400
+ attribute soundPowerLevel: SoundPowerLevelValue[*] nonunique :> scalarQuantities;
401
+
402
+ attribute def SoundPowerLevelUnit :> DimensionOneUnit {
403
+ }
404
+
405
+ /* ISO-80000-8 item 8-16 sound exposure level */
406
+ attribute def SoundExposureLevelValue :> ScalarQuantityValue {
407
+ doc
408
+ /*
409
+ * source: item 8-16 sound exposure level
410
+ * symbol(s): `L_E`
411
+ * application domain: generic
412
+ * name: SoundExposureLevel
413
+ * quantity dimension: 1
414
+ * measurement unit(s): dB
415
+ * tensor order: 0
416
+ * definition: quantity given by: `L_E = 10 log_10(E/E_0) "[dB]"`, where `E` is sound exposure (item 8-11) and `E_0` is the reference value of sound exposure
417
+ * remarks: For sound in air and other gases, the reference value of sound exposure is given by `E_0 = 400 "@"["μPa"^2*"s"]`. For sound in water and other liquids, the reference value of sound exposure is given by `E_0 = 1"@"["μPa"^2*"s"]`. When stating a value of sound exposure level, the reference value shall be specified. The value of sound exposure level depends on the selected frequency range and time duration. When stating a value of sound exposure level, the frequency range and time duration shall be specified. In accordance with ISO 80000-1, any attachment to the unit symbol as a means of giving information about the special nature of the quantity or context of measurement under consideration is not permitted. If specific frequency and time weightings as specified in IEC 61672-1 or specific frequency bands or time duration are applied, this should be indicated by appropriate subscripts to the quantity symbol.
418
+ */
419
+ attribute :>> num: Real;
420
+ attribute :>> mRef: SoundExposureLevelUnit[1];
421
+ }
422
+
423
+ attribute soundExposureLevel: SoundExposureLevelValue[*] nonunique :> scalarQuantities;
424
+
425
+ attribute def SoundExposureLevelUnit :> DimensionOneUnit {
426
+ }
427
+
428
+ /* ISO-80000-8 item 8-17 reverberation time */
429
+ attribute reverberationTime: DurationValue :> scalarQuantities {
430
+ doc
431
+ /*
432
+ * source: item 8-17 reverberation time
433
+ * symbol(s): `T`
434
+ * application domain: generic
435
+ * name: ReverberationTime (specializes Duration)
436
+ * quantity dimension: T^1
437
+ * measurement unit(s): s
438
+ * tensor order: 0
439
+ * definition: time duration (ISO 80000-3) required for the space-averaged sound energy density (item 8-7) to decrease to `10^(−6)` of its initial value (i.e. for its level to decrease by `60 "[dB]"`) after the source emission has stopped
440
+ * remarks: The reverberation time can be evaluated based on a dynamic range smaller than `60 "[dB]"` and extrapolated to a decay time of `60 "[dB]"`. It is then labelled accordingly `T_n`, where `n` is the dynamic range in `"[dB]"`. See also ISO 3382-1.
441
+ */
442
+ }
443
+
444
+ }
src/sysml.library/Domain Libraries/Quantities and Units/ISQAtomicNuclear.sysml ADDED
The diff for this file is too large to render. See raw diff
 
src/sysml.library/Domain Libraries/Quantities and Units/ISQBase.sysml ADDED
@@ -0,0 +1,206 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package ISQBase {
2
+ doc
3
+ /*
4
+ * International System of Quantities and Units
5
+ * Generated on 2022-08-07T14:44:27Z from standard ISO/IEC 80000
6
+ *
7
+ * Note 1: In documentation comments, AsciiMath notation (see http://asciimath.org/) is used for mathematical concepts,
8
+ * with Greek letters in Unicode encoding. In running text, AsciiMath is placed between backticks.
9
+ */
10
+
11
+ private import ScalarValues::Real;
12
+ private import Quantities::*;
13
+ private import MeasurementReferences::*;
14
+
15
+ /* ISO-80000-3 item 3-1.1 length */
16
+ attribute def LengthValue :> ScalarQuantityValue {
17
+ doc
18
+ /*
19
+ * source: item 3-1.1 length
20
+ * symbol(s): `l`, `L`
21
+ * application domain: generic
22
+ * name: Length
23
+ * quantity dimension: L^1
24
+ * measurement unit(s): m
25
+ * tensor order: 0
26
+ * definition: linear extent in space between any two points
27
+ * remarks: Length does not need to be measured along a straight line. Length is one of the seven base quantities in the International System of Units (ISO 80000-1).
28
+ */
29
+ attribute :>> num: Real;
30
+ attribute :>> mRef: LengthUnit[1];
31
+ }
32
+
33
+ attribute length: LengthValue[*] nonunique :> scalarQuantities;
34
+
35
+ attribute def LengthUnit :> SimpleUnit {
36
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; }
37
+ attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; }
38
+ }
39
+
40
+ /* ISO-80000-3 item 3-9 duration, time */
41
+ attribute def DurationValue :> ScalarQuantityValue {
42
+ doc
43
+ /*
44
+ * source: item 3-9 duration, time
45
+ * symbol(s): `t`
46
+ * application domain: generic
47
+ * name: Duration
48
+ * quantity dimension: T^1
49
+ * measurement unit(s): s
50
+ * tensor order: 0
51
+ * definition: measure of the time difference between two events
52
+ * remarks: Duration is often just called time. Time is one of the seven base quantities in the International System of Quantities, ISQ (see ISO 80000-1). Duration is a measure of a time interval.
53
+ */
54
+ attribute :>> num: Real;
55
+ attribute :>> mRef: DurationUnit[1];
56
+ }
57
+
58
+ attribute duration: DurationValue[*] nonunique :> scalarQuantities;
59
+
60
+ attribute def DurationUnit :> SimpleUnit {
61
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 1; }
62
+ attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; }
63
+ }
64
+
65
+ /* ISO-80000-4 item 4-1 mass */
66
+ attribute def MassValue :> ScalarQuantityValue {
67
+ doc
68
+ /*
69
+ * source: item 4-1 mass
70
+ * symbol(s): `m`
71
+ * application domain: generic
72
+ * name: Mass
73
+ * quantity dimension: M^1
74
+ * measurement unit(s): kg
75
+ * tensor order: 0
76
+ * definition: property of a body which expresses itself in terms of inertia with regard to changes in its state of motion as well as its gravitational attraction to other bodies
77
+ * remarks: The kilogram (kg) is one of the seven base units (see ISO 80000-1) of the International System of Units, the SI. See also IEC 60050-113.
78
+ */
79
+ attribute :>> num: Real;
80
+ attribute :>> mRef: MassUnit[1];
81
+ }
82
+
83
+ attribute mass: MassValue[*] nonunique :> scalarQuantities;
84
+
85
+ attribute def MassUnit :> SimpleUnit {
86
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
87
+ attribute :>> quantityDimension { :>> quantityPowerFactors = massPF; }
88
+ }
89
+
90
+ /* ISO-80000-5 item 5-1 thermodynamic temperature, temperature */
91
+ attribute def ThermodynamicTemperatureValue :> ScalarQuantityValue {
92
+ doc
93
+ /*
94
+ * source: item 5-1 thermodynamic temperature, temperature
95
+ * symbol(s): `T`, `Θ`
96
+ * application domain: generic
97
+ * name: ThermodynamicTemperature
98
+ * quantity dimension: Θ^1
99
+ * measurement unit(s): K
100
+ * tensor order: 0
101
+ * definition: partial derivative of internal energy with respect to entropy at constant volume and constant number of particles in the system: `T = ((partial U)/(partial S))_(V,N)` where `U` is internal energy (item 5-20.2), `S` is entropy (item 5-18), `V` is volume (ISO 80000-3), and `N` is number of particles
102
+ * remarks: It is measured with a primary thermometer, examples of which are gas thermometers of different kinds, noise thermometers, or radiation thermometers. The Boltzmann constant (ISO 80000-1) relates energy at the individual particle level with thermodynamic temperature. Differences of thermodynamic temperatures or changes may be expressed either in kelvin, symbol K, or in degrees Celsius, symbol °C (item 5-2). Thermodynamic temperature is one of the seven base quantities in the International System of Quantities, ISQ (see ISO 80000-1). The International Temperature Scale of 1990. For the purpose of practical measurements, the International Temperature Scale of 1990, ITS-90, was adopted by CIPM in 1989, which is a close approximation to the thermodynamic temperature scale. The quantities defined by this scale are denoted `T_90` and `t_90`, respectively (replacing `T_68` and `t_68` defined by the International Practical Temperature Scale of 1968, IPTS-68), where `t_90/(1 °C) = T_90/(1 K) - 273,15`. The units of `T_90` and `t_90` are the kelvin, symbol K, and the degree Celsius, symbol °C (item 5-2), respectively. For further information, see References [5], [6]. For ready conversion between temperatures reported on the International Temperature Scale and thermodynamic temperatures the systematic deviations can be found in Reference [7].
103
+ */
104
+ attribute :>> num: Real;
105
+ attribute :>> mRef: ThermodynamicTemperatureUnit[1];
106
+ }
107
+
108
+ attribute thermodynamicTemperature: ThermodynamicTemperatureValue[*] nonunique :> scalarQuantities;
109
+
110
+ attribute def ThermodynamicTemperatureUnit :> SimpleUnit {
111
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = 1; }
112
+ attribute :>> quantityDimension { :>> quantityPowerFactors = thermodynamicTemperaturePF; }
113
+ }
114
+
115
+ /* IEC-80000-6 item 6-1 electric current */
116
+ attribute def ElectricCurrentValue :> ScalarQuantityValue {
117
+ doc
118
+ /*
119
+ * source: item 6-1 electric current
120
+ * symbol(s): `I`, `i`
121
+ * application domain: generic
122
+ * name: ElectricCurrent
123
+ * quantity dimension: I^1
124
+ * measurement unit(s): A
125
+ * tensor order: 0
126
+ * definition: electric current is one of the base quantities in the International System of Quantities, ISQ, on which the International System of Units, SI, is based
127
+ * remarks: Electric current is the quantity that can often be measured with an ammeter. The electric current through a surface is the quotient of the electric charge (item 6-2) transferred through the surface during a time interval by the duration of that interval. For a more complete definition, see item 6-8 and IEC 60050-121, item 121-11-13.
128
+ */
129
+ attribute :>> num: Real;
130
+ attribute :>> mRef: ElectricCurrentUnit[1];
131
+ }
132
+
133
+ attribute electricCurrent: ElectricCurrentValue[*] nonunique :> scalarQuantities;
134
+
135
+ attribute def ElectricCurrentUnit :> SimpleUnit {
136
+ private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; }
137
+ attribute :>> quantityDimension { :>> quantityPowerFactors = electricCurrentPF; }
138
+ }
139
+
140
+ /* ISO-80000-7 item 7-14 luminous intensity */
141
+ attribute def LuminousIntensityValue :> ScalarQuantityValue {
142
+ doc
143
+ /*
144
+ * source: item 7-14 luminous intensity
145
+ * symbol(s): `I_v`, `(I)`
146
+ * application domain: generic
147
+ * name: LuminousIntensity
148
+ * quantity dimension: J^1
149
+ * measurement unit(s): cd
150
+ * tensor order: 0
151
+ * definition: density of luminous flux with respect to solid angle in a specified direction, expressed by `I_v = (dΦ_v)/(dΩ)` where `Φ_v` is the luminous flux (item 7-13) emitted in a specified direction, and `Ω` is the solid angle (ISO 80000-3) containing that direction
152
+ * remarks: The definition holds strictly only for a point source. The distribution of the luminous intensities as a function of the direction of emission, e.g. given by the polar angles `(θ,ϕ)`, is used to determine the luminous flux (item 7-13) within a certain solid angle (ISO 80000-3) `Ω` of a source: `Φ_v = int int_Ω I_v(θ,φ) sin(θ) dφ dθ`. Luminous intensity can be derived from the spectral radiant intensity distribution by `I_v = K_m int_0^∞ I_(e,λ)(λ) V(λ) dλ`, where `K_m` is maximum luminous efficacy (item 7-11.3), `I_(e,λ)(λ)` is the spectral radiant intensity (item 7-5.2) at wavelength `λ` (ISO 80000-3), and `V(λ)` is spectral luminous efficiency (item 7-10.2). The corresponding radiometric quantity is "radiant intensity" (item 7-5.1). The corresponding quantity for photons is "photon intensity" (item 7-21).
153
+ */
154
+ attribute :>> num: Real;
155
+ attribute :>> mRef: LuminousIntensityUnit[1];
156
+ }
157
+
158
+ attribute luminousIntensity: LuminousIntensityValue[*] nonunique :> scalarQuantities;
159
+
160
+ attribute def LuminousIntensityUnit :> SimpleUnit {
161
+ private attribute luminousIntensityPF: QuantityPowerFactor[1] { :>> quantity = isq.J; :>> exponent = 1; }
162
+ attribute :>> quantityDimension { :>> quantityPowerFactors = luminousIntensityPF; }
163
+ }
164
+
165
+ /* ISO-80000-9 item 9-2 amount of substance, number of moles */
166
+ attribute def AmountOfSubstanceValue :> ScalarQuantityValue {
167
+ doc
168
+ /*
169
+ * source: item 9-2 amount of substance, number of moles
170
+ * symbol(s): `n(X)`
171
+ * application domain: generic
172
+ * name: AmountOfSubstance
173
+ * quantity dimension: N^1
174
+ * measurement unit(s): mol
175
+ * tensor order: 0
176
+ * definition: quotient of number `N` of specified elementary entities of kind `X` (item 9-1) in a sample, and the Avogadro constant `N_A` (ISO 80000-1): `n(X) = N(X)/N_A`
177
+ * remarks: Amount of substance is one of the seven base quantities in the International System of Quantities, ISQ (see ISO 80000-1). Elementary entities, such as molecules, atoms, ions, electrons, holes and other quasi-particles, double bonds can be used. It is necessary to specify precisely the entity involved, e.g. atoms of hydrogen `H` vs. molecules of hydrogen `H_2`, preferably by giving the molecular chemical formula of the material involved. In the name "amount of substance", the words "of substance" could be replaced by words specifying the substance concerned, e.g. "amount of hydrogen chloride, `HCl`", or "amount of benzene, `C_6H_6`". The name "number of moles" is often used for "amount of substance", but this is deprecated because the name of a quantity should be distinguished from the name of the unit.
178
+ */
179
+ attribute :>> num: Real;
180
+ attribute :>> mRef: AmountOfSubstanceUnit[1];
181
+ }
182
+
183
+ attribute amountOfSubstance: AmountOfSubstanceValue[*] nonunique :> scalarQuantities;
184
+
185
+ attribute def AmountOfSubstanceUnit :> SimpleUnit {
186
+ private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = 1; }
187
+ attribute :>> quantityDimension { :>> quantityPowerFactors = amountOfSubstancePF; }
188
+ }
189
+
190
+ attribute <isq> 'International System of Quantities': SystemOfQuantities {
191
+ doc
192
+ /*
193
+ * Declaration of the International System of Quantities (ISQ),
194
+ * including its base quantities and symbols as specified in ISO 80000-1:2009.
195
+ */
196
+ attribute :>> baseQuantities = ( L, M, T, I, 'Θ', N, J );
197
+
198
+ attribute L: LengthValue[1];
199
+ attribute M: MassValue[1];
200
+ attribute T: DurationValue[1];
201
+ attribute I: ElectricCurrentValue[1];
202
+ attribute 'Θ': ThermodynamicTemperatureValue[1];
203
+ attribute N: AmountOfSubstanceValue[1];
204
+ attribute J: LuminousIntensityValue[1];
205
+ }
206
+ }
src/sysml.library/Domain Libraries/Quantities and Units/ISQCharacteristicNumbers.sysml ADDED
The diff for this file is too large to render. See raw diff
 
src/sysml.library/Domain Libraries/Quantities and Units/ISQChemistryMolecular.sysml ADDED
@@ -0,0 +1,1353 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package ISQChemistryMolecular {
2
+ doc
3
+ /*
4
+ * International System of Quantities and Units
5
+ * Generated on 2022-08-07T14:44:27Z from standard ISO-80000-9:2019 "Physical chemistry and molecular physics"
6
+ * see also https://www.iso.org/obp/ui/#iso:std:iso:80000:-9:ed-2:v1:en
7
+ *
8
+ * Note 1: In documentation comments, AsciiMath notation (see http://asciimath.org/) is used for mathematical concepts,
9
+ * with Greek letters in Unicode encoding. In running text, AsciiMath is placed between backticks.
10
+ * Note 2: For vector and tensor quantities currently the unit and quantity value type for their (scalar) magnitude is
11
+ * defined, as well as their typical Cartesian 3d VectorMeasurementReference (i.e. coordinate system)
12
+ * or TensorMeasurementReference.
13
+ */
14
+
15
+ private import ScalarValues::Real;
16
+ private import Quantities::*;
17
+ private import MeasurementReferences::*;
18
+ private import ISQBase::*;
19
+
20
+ /* Quantity definitions referenced from other ISQ packages */
21
+ private import ISQSpaceTime::AngularMeasureValue;
22
+ private import ISQThermodynamics::EnergyValue;
23
+
24
+ /* ISO-80000-9 item 9-1 number of entities */
25
+ attribute numberOfEntities: CountValue :> scalarQuantities {
26
+ doc
27
+ /*
28
+ * source: item 9-1 number of entities
29
+ * symbol(s): `N(X)`, `N_X`
30
+ * application domain: generic
31
+ * name: NumberOfEntities (specializes Count)
32
+ * quantity dimension: 1
33
+ * measurement unit(s): 1
34
+ * tensor order: 0
35
+ * definition: number of elementary entities of kind `X` in a system
36
+ * remarks: The elementary entities must be specified and can be atoms, molecules, ions, electrons, other particle, or a specified group of such particles. It is important to always give a precise specification of the entity involved; this should preferably be done by the empirical chemical formula of the material involved.
37
+ */
38
+ }
39
+
40
+ /* ISO-80000-9 item 9-2 amount of substance, number of moles */
41
+ /* See package ISQBase for the declarations of AmountOfSubstanceValue and AmountOfSubstanceUnit */
42
+
43
+ alias NumberOfMolesUnit for AmountOfSubstanceUnit;
44
+ alias NumberOfMolesValue for AmountOfSubstanceValue;
45
+ alias numberOfMoles for amountOfSubstance;
46
+
47
+ /* ISO-80000-9 item 9-3 relative atomic mass */
48
+ attribute def RelativeAtomicMassValue :> DimensionOneValue {
49
+ doc
50
+ /*
51
+ * source: item 9-3 relative atomic mass
52
+ * symbol(s): `A_r(X)`
53
+ * application domain: generic
54
+ * name: RelativeAtomicMass (specializes DimensionOneQuantity)
55
+ * quantity dimension: 1
56
+ * measurement unit(s): 1
57
+ * tensor order: 0
58
+ * definition: quotient of the average mass (ISO 80000-4) of atom `X` and the unified atomic mass (ISO 80000-10)
59
+ * remarks: A similar quantity "relative molecular mass" can be defined for molecules. EXAMPLE `A_r(Cl) ~~ 35.453` `A_r(CO_2) ~~ 44` The relative atomic or relative molecular mass depends on the nuclidic composition. The International Union of Pure and Applied Chemistry (IUPAC) accepts the use of the special names "atomic weight" and "molecular weight" for the quantities "relative atomic mass" and "relative molecular mass", respectively. The use of these traditional names is deprecated.
60
+ */
61
+ }
62
+ attribute relativeAtomicMass: RelativeAtomicMassValue :> scalarQuantities;
63
+
64
+ /* ISO-80000-9 item 9-4 molar mass */
65
+ attribute def MolarMassValue :> ScalarQuantityValue {
66
+ doc
67
+ /*
68
+ * source: item 9-4 molar mass
69
+ * symbol(s): `M(X)`
70
+ * application domain: generic
71
+ * name: MolarMass
72
+ * quantity dimension: M^1*N^-1
73
+ * measurement unit(s): g/mol, kg*mol^-1
74
+ * tensor order: 0
75
+ * definition: for a pure substance `X`, quotient of mass `m(X)` (ISO 80000-4) and amount `n` of substance (item 9-2): `M = m/n`
76
+ * remarks: None.
77
+ */
78
+ attribute :>> num: Real;
79
+ attribute :>> mRef: MolarMassUnit[1];
80
+ }
81
+
82
+ attribute molarMass: MolarMassValue[*] nonunique :> scalarQuantities;
83
+
84
+ attribute def MolarMassUnit :> DerivedUnit {
85
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
86
+ private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; }
87
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, amountOfSubstancePF); }
88
+ }
89
+
90
+ /* ISO-80000-9 item 9-5 molar volume */
91
+ attribute def MolarVolumeValue :> ScalarQuantityValue {
92
+ doc
93
+ /*
94
+ * source: item 9-5 molar volume
95
+ * symbol(s): `V_m`
96
+ * application domain: generic
97
+ * name: MolarVolume
98
+ * quantity dimension: L^3*N^-1
99
+ * measurement unit(s): m^3*mol^-1
100
+ * tensor order: 0
101
+ * definition: for a pure substance, quotient of its volume `V` (ISO 80000-3) and amount `n` of substance (item 9-2): `V_m = V/n`
102
+ * remarks: None.
103
+ */
104
+ attribute :>> num: Real;
105
+ attribute :>> mRef: MolarVolumeUnit[1];
106
+ }
107
+
108
+ attribute molarVolume: MolarVolumeValue[*] nonunique :> scalarQuantities;
109
+
110
+ attribute def MolarVolumeUnit :> DerivedUnit {
111
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 3; }
112
+ private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; }
113
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, amountOfSubstancePF); }
114
+ }
115
+
116
+ /* ISO-80000-9 item 9-6.1 molar internal energy */
117
+ attribute def MolarInternalEnergyValue :> ScalarQuantityValue {
118
+ doc
119
+ /*
120
+ * source: item 9-6.1 molar internal energy
121
+ * symbol(s): `U_m`
122
+ * application domain: generic
123
+ * name: MolarInternalEnergy
124
+ * quantity dimension: L^2*M^1*T^-2*N^-1
125
+ * measurement unit(s): J/mol, kg*m^2*s^-2*mol^-1
126
+ * tensor order: 0
127
+ * definition: quotient of internal energy `U` (ISO 80000-5) and amount `n` of substance (item 9-2): `U_m = U/n`
128
+ * remarks: Molar quantities are normally only used with reference to pure substances.
129
+ */
130
+ attribute :>> num: Real;
131
+ attribute :>> mRef: MolarInternalEnergyUnit[1];
132
+ }
133
+
134
+ attribute molarInternalEnergy: MolarInternalEnergyValue[*] nonunique :> scalarQuantities;
135
+
136
+ attribute def MolarInternalEnergyUnit :> DerivedUnit {
137
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
138
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
139
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
140
+ private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; }
141
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, amountOfSubstancePF); }
142
+ }
143
+
144
+ /* ISO-80000-9 item 9-6.2 molar enthalpy */
145
+ attribute def MolarEnthalpyValue :> ScalarQuantityValue {
146
+ doc
147
+ /*
148
+ * source: item 9-6.2 molar enthalpy
149
+ * symbol(s): `H_m`
150
+ * application domain: generic
151
+ * name: MolarEnthalpy
152
+ * quantity dimension: L^2*M^1*T^-2*N^-1
153
+ * measurement unit(s): J/mol, kg*m^2*s^-2*mol^-1
154
+ * tensor order: 0
155
+ * definition: quotient of enthalpy `H` (ISO 80000-5) and amount `n` of substance (item 9-2): `H_m = H/n`
156
+ * remarks: Molar quantities are normally only used with reference to pure substances.
157
+ */
158
+ attribute :>> num: Real;
159
+ attribute :>> mRef: MolarEnthalpyUnit[1];
160
+ }
161
+
162
+ attribute molarEnthalpy: MolarEnthalpyValue[*] nonunique :> scalarQuantities;
163
+
164
+ attribute def MolarEnthalpyUnit :> DerivedUnit {
165
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
166
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
167
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
168
+ private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; }
169
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, amountOfSubstancePF); }
170
+ }
171
+
172
+ /* ISO-80000-9 item 9-6.3 molar Helmholtz energy */
173
+ attribute def MolarHelmholtzEnergyValue :> ScalarQuantityValue {
174
+ doc
175
+ /*
176
+ * source: item 9-6.3 molar Helmholtz energy
177
+ * symbol(s): `F_m`
178
+ * application domain: generic
179
+ * name: MolarHelmholtzEnergy
180
+ * quantity dimension: L^2*M^1*T^-2*N^-1
181
+ * measurement unit(s): J/mol, kg*m^2*s^-2*mol^-1
182
+ * tensor order: 0
183
+ * definition: quotient of the Helmholtz energy `F` (ISO 80000-5) and amount `n` of substance (item 9-2): `F_m = F/n`
184
+ * remarks: Molar quantities are normally only used with reference to pure substances.
185
+ */
186
+ attribute :>> num: Real;
187
+ attribute :>> mRef: MolarHelmholtzEnergyUnit[1];
188
+ }
189
+
190
+ attribute molarHelmholtzEnergy: MolarHelmholtzEnergyValue[*] nonunique :> scalarQuantities;
191
+
192
+ attribute def MolarHelmholtzEnergyUnit :> DerivedUnit {
193
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
194
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
195
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
196
+ private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; }
197
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, amountOfSubstancePF); }
198
+ }
199
+
200
+ /* ISO-80000-9 item 9-6.4 molar Gibbs energy */
201
+ attribute def MolarGibbsEnergyValue :> ScalarQuantityValue {
202
+ doc
203
+ /*
204
+ * source: item 9-6.4 molar Gibbs energy
205
+ * symbol(s): `G_m`
206
+ * application domain: generic
207
+ * name: MolarGibbsEnergy
208
+ * quantity dimension: L^2*M^1*T^-2*N^-1
209
+ * measurement unit(s): J/mol, kg*m^2*s^-2*mol^-1
210
+ * tensor order: 0
211
+ * definition: quotient of the Gibbs energy `G` (ISO 80000-5) and amount `n` of substance (item 9-2): `G_m = G/n`
212
+ * remarks: Molar quantities are normally only used with reference to pure substances.
213
+ */
214
+ attribute :>> num: Real;
215
+ attribute :>> mRef: MolarGibbsEnergyUnit[1];
216
+ }
217
+
218
+ attribute molarGibbsEnergy: MolarGibbsEnergyValue[*] nonunique :> scalarQuantities;
219
+
220
+ attribute def MolarGibbsEnergyUnit :> DerivedUnit {
221
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
222
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
223
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
224
+ private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; }
225
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, amountOfSubstancePF); }
226
+ }
227
+
228
+ /* ISO-80000-9 item 9-7 molar heat capacity */
229
+ attribute def MolarHeatCapacityValue :> ScalarQuantityValue {
230
+ doc
231
+ /*
232
+ * source: item 9-7 molar heat capacity
233
+ * symbol(s): `C_m`
234
+ * application domain: generic
235
+ * name: MolarHeatCapacity
236
+ * quantity dimension: L^2*M^1*T^-2*Θ^-1*N^-1
237
+ * measurement unit(s): J/(mol*K), kg*m^2*s^-2*K^-1*mol^-1
238
+ * tensor order: 0
239
+ * definition: quotient of heat capacity `C` (ISO 80000-5) and amount of substance `n` (item 9-2): `C_m = C/n`
240
+ * remarks: Conditions (constant pressure or volume etc.) must be specified.
241
+ */
242
+ attribute :>> num: Real;
243
+ attribute :>> mRef: MolarHeatCapacityUnit[1];
244
+ }
245
+
246
+ attribute molarHeatCapacity: MolarHeatCapacityValue[*] nonunique :> scalarQuantities;
247
+
248
+ attribute def MolarHeatCapacityUnit :> DerivedUnit {
249
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
250
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
251
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
252
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; }
253
+ private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; }
254
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, thermodynamicTemperaturePF, amountOfSubstancePF); }
255
+ }
256
+
257
+ /* ISO-80000-9 item 9-8 molar entropy */
258
+ attribute def MolarEntropyValue :> ScalarQuantityValue {
259
+ doc
260
+ /*
261
+ * source: item 9-8 molar entropy
262
+ * symbol(s): `S_m`
263
+ * application domain: generic
264
+ * name: MolarEntropy
265
+ * quantity dimension: L^2*M^1*T^-2*Θ^-1*N^-1
266
+ * measurement unit(s): J/(mol*K), kg*m^2*s^-2*K^-1*mol^-1
267
+ * tensor order: 0
268
+ * definition: quotient of entropy `S` (ISO 80000-5) and amount `n` of substance (item 9-2): `S_m = S/n`
269
+ * remarks: Conditions (constant pressure or volume etc.) must be specified.
270
+ */
271
+ attribute :>> num: Real;
272
+ attribute :>> mRef: MolarEntropyUnit[1];
273
+ }
274
+
275
+ attribute molarEntropy: MolarEntropyValue[*] nonunique :> scalarQuantities;
276
+
277
+ attribute def MolarEntropyUnit :> DerivedUnit {
278
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
279
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
280
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
281
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; }
282
+ private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; }
283
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, thermodynamicTemperaturePF, amountOfSubstancePF); }
284
+ }
285
+
286
+ /* ISO-80000-9 item 9-9.1 particle concentration */
287
+ attribute def ParticleConcentrationValue :> ScalarQuantityValue {
288
+ doc
289
+ /*
290
+ * source: item 9-9.1 particle concentration
291
+ * symbol(s): `n`, `(C)`
292
+ * application domain: generic
293
+ * name: ParticleConcentration
294
+ * quantity dimension: L^-3
295
+ * measurement unit(s): m^-3
296
+ * tensor order: 0
297
+ * definition: quotient of number `N` of particles (item 9-1) and volume `V `(ISO 80000-3): `n = N/V`
298
+ * remarks: The term "number density" is also used.
299
+ */
300
+ attribute :>> num: Real;
301
+ attribute :>> mRef: ParticleConcentrationUnit[1];
302
+ }
303
+
304
+ attribute particleConcentration: ParticleConcentrationValue[*] nonunique :> scalarQuantities;
305
+
306
+ attribute def ParticleConcentrationUnit :> DerivedUnit {
307
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; }
308
+ attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; }
309
+ }
310
+
311
+ /* ISO-80000-9 item 9-9.2 molecular concentration */
312
+ attribute molecularConcentration: ParticleConcentrationValue :> scalarQuantities {
313
+ doc
314
+ /*
315
+ * source: item 9-9.2 molecular concentration
316
+ * symbol(s): `C(X)`, `C_X`
317
+ * application domain: generic
318
+ * name: MolecularConcentration (specializes ParticleConcentration)
319
+ * quantity dimension: L^-3
320
+ * measurement unit(s): m^-3
321
+ * tensor order: 0
322
+ * definition: for substance `X` in a mixture, quotient of number `N_X` of molecules of substance `X` and volume `V` (ISO 80000-3) of the mixture: `C_X = N_X/V`
323
+ * remarks: None.
324
+ */
325
+ }
326
+
327
+ /* ISO-80000-9 item 9-10 mass concentration */
328
+ attribute def MassConcentrationValue :> ScalarQuantityValue {
329
+ doc
330
+ /*
331
+ * source: item 9-10 mass concentration
332
+ * symbol(s): `γ_X`, `(ρ_X)`
333
+ * application domain: generic
334
+ * name: MassConcentration
335
+ * quantity dimension: L^-3*M^1
336
+ * measurement unit(s): g/l, kg*m^-3
337
+ * tensor order: 0
338
+ * definition: for substance `X` in a mixture, quotient of mass `m_X` (ISO 80000-4) of substance `X` and volume `V` (ISO 80000-3) of the mixture: `γ_X = m_X/V`
339
+ * remarks: Decided by the 16th CGPM (1979), both "l" and "L" are allowed for the symbols for the litre.
340
+ */
341
+ attribute :>> num: Real;
342
+ attribute :>> mRef: MassConcentrationUnit[1];
343
+ }
344
+
345
+ attribute massConcentration: MassConcentrationValue[*] nonunique :> scalarQuantities;
346
+
347
+ attribute def MassConcentrationUnit :> DerivedUnit {
348
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; }
349
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
350
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF); }
351
+ }
352
+
353
+ /* ISO-80000-9 item 9-11 mass fraction */
354
+ attribute def MassFractionValue :> DimensionOneValue {
355
+ doc
356
+ /*
357
+ * source: item 9-11 mass fraction
358
+ * symbol(s): `w_X`
359
+ * application domain: generic
360
+ * name: MassFraction (specializes DimensionOneQuantity)
361
+ * quantity dimension: 1
362
+ * measurement unit(s): 1
363
+ * tensor order: 0
364
+ * definition: for substance `X` in a mixture, quotient of mass `m_X` (ISO 80000-4) of substance `X` and total mass `m` of the mixture: `w_X = m_X/m`
365
+ * remarks: None.
366
+ */
367
+ }
368
+ attribute massFraction: MassFractionValue :> scalarQuantities;
369
+
370
+ /* ISO-80000-9 item 9-12.1 amount-of-substance concentration */
371
+ attribute def AmountOfSubstanceConcentrationValue :> ScalarQuantityValue {
372
+ doc
373
+ /*
374
+ * source: item 9-12.1 amount-of-substance concentration
375
+ * symbol(s): `c_X`
376
+ * application domain: generic
377
+ * name: AmountOfSubstanceConcentration
378
+ * quantity dimension: L^-3*N^1
379
+ * measurement unit(s): mol/l, mol*m^-3
380
+ * tensor order: 0
381
+ * definition: for substance `X` in a mixture, quotient of amount `n_X` of substance (item 9-2) of `X` and volume `V` (ISO 80000-3) of the mixture: `c_X = n_X/V`
382
+ * remarks: In chemistry, the name "amount-of-substance concentration" is generally abbreviated to the single word "concentration", it being assumed that the adjective "amount-of-substance" is intended. For this reason, however, the word "mass" should never be omitted from the name "mass concentration" in item 9-10. Decided by the 16th CGPM (1979), both "l" and "L" are allowed for the symbols for the litre.
383
+ */
384
+ attribute :>> num: Real;
385
+ attribute :>> mRef: AmountOfSubstanceConcentrationUnit[1];
386
+ }
387
+
388
+ attribute amountOfSubstanceConcentration: AmountOfSubstanceConcentrationValue[*] nonunique :> scalarQuantities;
389
+
390
+ attribute def AmountOfSubstanceConcentrationUnit :> DerivedUnit {
391
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; }
392
+ private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = 1; }
393
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, amountOfSubstancePF); }
394
+ }
395
+
396
+ /* ISO-80000-9 item 9-12.2 standard amount-of-substance concentration */
397
+ attribute standardAmountOfSubstanceConcentration: AmountOfSubstanceConcentrationValue :> scalarQuantities {
398
+ doc
399
+ /*
400
+ * source: item 9-12.2 standard amount-of-substance concentration
401
+ * symbol(s): `c^!(X)`
402
+ * application domain: generic
403
+ * name: StandardAmountOfSubstanceConcentration (specializes AmountOfSubstanceConcentration)
404
+ * quantity dimension: L^-3*N^1
405
+ * measurement unit(s): mol/l, mol*m^-3
406
+ * tensor order: 0
407
+ * definition: for substance `X`, one mole per litre
408
+ * remarks: Decided by the 16th CGPM (1979), both "l" and "L" are allowed for the symbols for the litre.
409
+ */
410
+ }
411
+
412
+ /* ISO-80000-9 item 9-13 amount-of-substance fraction mole fraction */
413
+ attribute def AmountOfSubstanceFractionMoleFractionValue :> DimensionOneValue {
414
+ doc
415
+ /*
416
+ * source: item 9-13 amount-of-substance fraction mole fraction
417
+ * symbol(s): `x_X`, `y_X`
418
+ * application domain: generic
419
+ * name: AmountOfSubstanceFractionMoleFraction (specializes DimensionOneQuantity)
420
+ * quantity dimension: 1
421
+ * measurement unit(s): 1
422
+ * tensor order: 0
423
+ * definition: for substance `X` in a mixture, quotient of amount of substance `n_X` (item 9-2) of `X` and total amount `n` of substance (item 9-2) in the mixture: `x_X = n_X/n`
424
+ * remarks: For condensed phases, `x_X` is used, and for gaseous mixtures `y_X` may be used. The unsystematic name "mole fraction" is still used. However, the use of this name is deprecated. For this quantity, the entity used to define the amount of substance should always be a single molecule for every species in the mixture.
425
+ */
426
+ }
427
+ attribute amountOfSubstanceFractionMoleFraction: AmountOfSubstanceFractionMoleFractionValue :> scalarQuantities;
428
+
429
+ /* ISO-80000-9 item 9-14 volume fraction */
430
+ attribute def VolumeFractionValue :> ScalarQuantityValue {
431
+ doc
432
+ /*
433
+ * source: item 9-14 volume fraction
434
+ * symbol(s): `φ_X`
435
+ * application domain: generic
436
+ * name: VolumeFraction
437
+ * quantity dimension: 1
438
+ * measurement unit(s): ml/l, 1
439
+ * tensor order: 0
440
+ * definition: for substance `X`, quotient of product of amount of substance fraction `x_X` (item 9-13) of `X` and molar volume `V_(m,X)` (item 9-5) of the pure substance `X` at the same temperature (ISO 80000-5) and pressure (ISO 80000-4), and sum over all substances `i` of products of amount-of-substance fractions `x_i` (item 9-13) of substance `i` and their molar volumes `V_(m,i)` (item 9-5): `φ_X = (x_X V_(m,X))/(sum_i x_i V_(m,i))`
441
+ * remarks: Generally, the volume fraction is temperature dependent. Decided by the 16th CGPM (1979), both "l" and "L" are allowed for the symbols for the litre.
442
+ */
443
+ attribute :>> num: Real;
444
+ attribute :>> mRef: VolumeFractionUnit[1];
445
+ }
446
+
447
+ attribute volumeFraction: VolumeFractionValue[*] nonunique :> scalarQuantities;
448
+
449
+ attribute def VolumeFractionUnit :> DimensionOneUnit {
450
+ }
451
+
452
+ /* ISO-80000-9 item 9-15 molality */
453
+ attribute def MolalityValue :> ScalarQuantityValue {
454
+ doc
455
+ /*
456
+ * source: item 9-15 molality
457
+ * symbol(s): `b_B`, `m_B`
458
+ * application domain: generic
459
+ * name: Molality
460
+ * quantity dimension: M^-1*N^1
461
+ * measurement unit(s): mol/kg
462
+ * tensor order: 0
463
+ * definition: quotient of amount of substance (item 9-2) of solute `B` and mass `m_A` (ISO 80000-4) of the solvent substance `A`: `b_B = n_B/m_A`
464
+ * remarks: The alternative symbol `m_B` should be avoided in situations where it might be mistaken for the mass of substance B. However, the symbol `m_B` is much more commonly used than the symbol `b_B` for molality, despite the possible confusion with mass.
465
+ */
466
+ attribute :>> num: Real;
467
+ attribute :>> mRef: MolalityUnit[1];
468
+ }
469
+
470
+ attribute molality: MolalityValue[*] nonunique :> scalarQuantities;
471
+
472
+ attribute def MolalityUnit :> DerivedUnit {
473
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; }
474
+ private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = 1; }
475
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, amountOfSubstancePF); }
476
+ }
477
+
478
+ /* ISO-80000-9 item 9-16 latent heat of phase transition, enthalpy of phase transition */
479
+ attribute latentHeatOfPhaseTransition: EnergyValue :> scalarQuantities {
480
+ doc
481
+ /*
482
+ * source: item 9-16 latent heat of phase transition, enthalpy of phase transition
483
+ * symbol(s): `C_"pt"`
484
+ * application domain: generic
485
+ * name: LatentHeatOfPhaseTransition (specializes Energy)
486
+ * quantity dimension: L^2*M^1*T^-2
487
+ * measurement unit(s): J, kg*m^2*s^-2
488
+ * tensor order: 0
489
+ * definition: energy (ISO 80000-5) necessary to be added or subtracted isothermally and isobarically to a system to completely undergo the phase transition
490
+ * remarks: Mostly, molar or specific quantity is used and phase transition is expressed explicitly, e.g. molar latent heat of evaporation. The subscript "pt" is the qualifier for the phase transition, which may be changed to e.g. "l-g". The term "enthalpy of phase transition" is mainly used in theory.
491
+ */
492
+ }
493
+
494
+ alias enthalpyOfPhaseTransition for latentHeatOfPhaseTransition;
495
+
496
+ /* ISO-80000-9 item 9-17 chemical potential */
497
+ attribute def ChemicalPotentialValue :> ScalarQuantityValue {
498
+ doc
499
+ /*
500
+ * source: item 9-17 chemical potential
501
+ * symbol(s): `μ_X`
502
+ * application domain: chemistry
503
+ * name: ChemicalPotential
504
+ * quantity dimension: L^2*M^1*T^-2*N^-1
505
+ * measurement unit(s): J/mol, kg*m^2*s^-2*mol^-1
506
+ * tensor order: 0
507
+ * definition: partial derivative of the Gibbs energy (ISO 80000-5) with respect to amount `n_X` of substance `X` (item 9-2) at constant temperature `T` (ISO 80000-5) and pressure `p `(ISO 80000-4): `μ_X = ((del G)/(del n_X))_(T,p)`
508
+ * remarks: For a pure substance, where `G_m` is the molar Gibbs energy. In a mixture, `μ_B` is the partial molar Gibbs energy. In condensed matter physics, the chemical potential of electrons is energy.
509
+ */
510
+ attribute :>> num: Real;
511
+ attribute :>> mRef: ChemicalPotentialUnit[1];
512
+ }
513
+
514
+ attribute chemicalPotential: ChemicalPotentialValue[*] nonunique :> scalarQuantities;
515
+
516
+ attribute def ChemicalPotentialUnit :> DerivedUnit {
517
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
518
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
519
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
520
+ private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; }
521
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, amountOfSubstancePF); }
522
+ }
523
+
524
+ /* ISO-80000-9 item 9-18 absolute activity */
525
+ attribute def AbsoluteActivityValue :> DimensionOneValue {
526
+ doc
527
+ /*
528
+ * source: item 9-18 absolute activity
529
+ * symbol(s): `λ_X`
530
+ * application domain: generic
531
+ * name: AbsoluteActivity (specializes DimensionOneQuantity)
532
+ * quantity dimension: 1
533
+ * measurement unit(s): 1
534
+ * tensor order: 0
535
+ * definition: for substance `X`, exponential of quotient of chemical potential `μ_X` of substance `B` (item 9-17), and product of molar gas constant `R` (item 9-37.1) and thermodynamic temperature `T` (ISO 80000-5): `λ_X = exp(μ_X/(RT))`
536
+ * remarks: None.
537
+ */
538
+ }
539
+ attribute absoluteActivity: AbsoluteActivityValue :> scalarQuantities;
540
+
541
+ /* ISO-80000-9 item 9-19 partial pressure */
542
+ attribute def PartialPressureValue :> ScalarQuantityValue {
543
+ doc
544
+ /*
545
+ * source: item 9-19 partial pressure
546
+ * symbol(s): `p_X`
547
+ * application domain: generic
548
+ * name: PartialPressure
549
+ * quantity dimension: L^-1*M^1*T^-2
550
+ * measurement unit(s): Pa, kg*m^-1*s^-2
551
+ * tensor order: 0
552
+ * definition: for substance `X` in a gaseous mixture, product of amount-of-substance fraction `y_X` of substance X (item 9-13) and total pressure `p` (ISO 80000-4): `p_X = y_X p`
553
+ * remarks: None.
554
+ */
555
+ attribute :>> num: Real;
556
+ attribute :>> mRef: PartialPressureUnit[1];
557
+ }
558
+
559
+ attribute partialPressure: PartialPressureValue[*] nonunique :> scalarQuantities;
560
+
561
+ attribute def PartialPressureUnit :> DerivedUnit {
562
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; }
563
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
564
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
565
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
566
+ }
567
+
568
+ /* ISO-80000-9 item 9-20 fugacity */
569
+ attribute def FugacityValue :> ScalarQuantityValue {
570
+ doc
571
+ /*
572
+ * source: item 9-20 fugacity
573
+ * symbol(s): `tilde(p)_X`
574
+ * application domain: generic
575
+ * name: Fugacity
576
+ * quantity dimension: L^-1*M^1*T^-2
577
+ * measurement unit(s): Pa, kg*m^-1*s^-2
578
+ * tensor order: 0
579
+ * definition: for substance `X`, quantity proportional to the absolute activity, `λ_X` (item 9-18), the proportionality factor, which is a function of temperature (ISO 80000-5) only, being determined by the condition that, at constant temperature and composition, `p_X/tilde(p)_X` tends to 1 for an indefinitely dilute gas
580
+ * remarks: `tilde(p)_X = λ_X * lim_(p->0) (p_X/λ_X)` where `p` is total pressure (ISO 80000-4). The IUPAC preferred symbol for fugacity is `f`.
581
+ */
582
+ attribute :>> num: Real;
583
+ attribute :>> mRef: FugacityUnit[1];
584
+ }
585
+
586
+ attribute fugacity: FugacityValue[*] nonunique :> scalarQuantities;
587
+
588
+ attribute def FugacityUnit :> DerivedUnit {
589
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; }
590
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
591
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
592
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
593
+ }
594
+
595
+ /* ISO-80000-9 item 9-21 standard chemical potential */
596
+ attribute def StandardChemicalPotentialValue :> ScalarQuantityValue {
597
+ doc
598
+ /*
599
+ * source: item 9-21 standard chemical potential
600
+ * symbol(s): `μ_B^!`, `μ^!`
601
+ * application domain: generic
602
+ * name: StandardChemicalPotential
603
+ * quantity dimension: L^2*M^1*T^-2*N^-1
604
+ * measurement unit(s): J/mol, kg*m^2*s^-2*mol^-1
605
+ * tensor order: 0
606
+ * definition: for substance `B`, value of the chemical potential (item 9-17) at specified standard conditions
607
+ * remarks: `μ_B^! = RT ln(λ^!)` where `μ_B^!` is a function of temperature `T` at the standard pressure `p = p^!` The standard chemical potential depends on the choice of standard state, which must be specified. In a liquid or solid solution, the standard state is referenced to the ideal dilute behaviour of the solute (substance `B`).
608
+ */
609
+ attribute :>> num: Real;
610
+ attribute :>> mRef: StandardChemicalPotentialUnit[1];
611
+ }
612
+
613
+ attribute standardChemicalPotential: StandardChemicalPotentialValue[*] nonunique :> scalarQuantities;
614
+
615
+ attribute def StandardChemicalPotentialUnit :> DerivedUnit {
616
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
617
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
618
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
619
+ private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; }
620
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, amountOfSubstancePF); }
621
+ }
622
+
623
+ /* ISO-80000-9 item 9-22 activity factor */
624
+ attribute def ActivityFactorValue :> DimensionOneValue {
625
+ doc
626
+ /*
627
+ * source: item 9-22 activity factor
628
+ * symbol(s): `f_X`
629
+ * application domain: generic
630
+ * name: ActivityFactor (specializes DimensionOneQuantity)
631
+ * quantity dimension: 1
632
+ * measurement unit(s): 1
633
+ * tensor order: 0
634
+ * definition: for substance `X` in a liquid or a solid mixture, quotient of absolute activity `λ_X` (item 9-18) of substance `X` and the product of absolute activity `λ_X^"*"` of the pure substance `X` at the same temperature (ISO 80000-5) and pressure (ISO 80000-4) and amount-of-substance fraction `x_X` of substance `X` (item 9-13): `f_X = λ_X/(λ_X^"*" x_X)`
635
+ * remarks: The systematic name is "activity factor", but the name "activity coefficient" is also commonly used (see item 9-25). Activity factors can also be obtained applying Raoult’s law or Henry’s law.
636
+ */
637
+ }
638
+ attribute activityFactor: ActivityFactorValue :> scalarQuantities;
639
+
640
+ /* ISO-80000-9 item 9-23 standard absolute activity in mixture */
641
+ attribute def StandardAbsoluteActivityInMixtureValue :> DimensionOneValue {
642
+ doc
643
+ /*
644
+ * source: item 9-23 standard absolute activity in mixture
645
+ * symbol(s): `λ_X^!`
646
+ * application domain: in a mixture
647
+ * name: StandardAbsoluteActivityInMixture (specializes DimensionOneQuantity)
648
+ * quantity dimension: 1
649
+ * measurement unit(s): 1
650
+ * tensor order: 0
651
+ * definition: for substance `X` in a liquid or a solid mixture, absolute activity `λ_X^"*"` (item 9-18) of the pure substance `X` at the same temperature (ISO 80000-5) but at standard pressure (ISO 80000-4) `10^5 ["Pa"]`: `λ_X^! = λ_X"*" (p^!)`
652
+ * remarks: This quantity is a function of temperature only.
653
+ */
654
+ }
655
+ attribute standardAbsoluteActivityInMixture: StandardAbsoluteActivityInMixtureValue :> scalarQuantities;
656
+
657
+ /* ISO-80000-9 item 9-24 activity of solute, relative activity of solute */
658
+ attribute def ActivityOfSoluteValue :> DimensionOneValue {
659
+ doc
660
+ /*
661
+ * source: item 9-24 activity of solute, relative activity of solute
662
+ * symbol(s): `a_X`, `a_(m,X)`
663
+ * application domain: generic
664
+ * name: ActivityOfSolute (specializes DimensionOneQuantity)
665
+ * quantity dimension: 1
666
+ * measurement unit(s): 1
667
+ * tensor order: 0
668
+ * definition: for a solute `X` in a solution, quantity proportional to the absolute activity, `λ_X` (item 9-18), the proportionality factor, which is a function of temperature (ISO 80000-5) and pressure (ISO 80000-4) only, being determined by the condition that, at constant temperature and pressure, `a_X` divided by the molality (item 9-15) ratio, `b_X/b^!` tends to 1 at infinite dilution; `b_X` is the molality of solute `X` (item 9-15), and `b^!` is standard molality: `a_X = λ_X * lim_(sum b_X -> 0) (b_X//b^!)/λ_X`
669
+ * remarks: The quantity `a_(c,X)` , similarly defined in terms of the concentration ratio `c_X/c^!` , is also called the activity or relative activity of solute `X`; `c^!` is a standard amount-of-substance concentration (item 9-12.2): `a_(c,X) = λ_X * lim_(sum c_X -> 0) (c_X//c^!)/λ_X`, where `sum` denotes summation over all the solute substances. This especially applies to a dilute liquid solution.
670
+ */
671
+ }
672
+ attribute activityOfSolute: ActivityOfSoluteValue :> scalarQuantities;
673
+
674
+ alias relativeActivityOfSolute for activityOfSolute;
675
+
676
+ /* ISO-80000-9 item 9-25 activity coefficient */
677
+ attribute def ActivityCoefficientValue :> DimensionOneValue {
678
+ doc
679
+ /*
680
+ * source: item 9-25 activity coefficient
681
+ * symbol(s): `γ_B`
682
+ * application domain: generic
683
+ * name: ActivityCoefficient (specializes DimensionOneQuantity)
684
+ * quantity dimension: 1
685
+ * measurement unit(s): 1
686
+ * tensor order: 0
687
+ * definition: for a solute `B` in a solution, quotient of activity `a_B` of solute `B` (item 9-24), and quotient of the molality (item 9-15) `b_B` of substance `B` and standard molality `b^!`: `γ_B = a_B/(b_B//b^!)`
688
+ * remarks: The name "activity coefficient of solute B" is also used for the quantity `γ_B` defined as: `γ_B = a_(c,B)/(c_B//c^!)` See item 9-22.
689
+ */
690
+ }
691
+ attribute activityCoefficient: ActivityCoefficientValue :> scalarQuantities;
692
+
693
+ /* ISO-80000-9 item 9-26 standard absolute activity in solution */
694
+ attribute def StandardAbsoluteActivityInSolutionValue :> DimensionOneValue {
695
+ doc
696
+ /*
697
+ * source: item 9-26 standard absolute activity in solution
698
+ * symbol(s): `λ_B^!`
699
+ * application domain: in a solution
700
+ * name: StandardAbsoluteActivityInSolution (specializes DimensionOneQuantity)
701
+ * quantity dimension: 1
702
+ * measurement unit(s): 1
703
+ * tensor order: 0
704
+ * definition: for a solute `B` in a solution: `λ_B^! = lim_(sum b_B -> 0) [λ_B ((p^!)b^!)/b_B]` where ∑ denotes summation over all solutes, `p^!` is a standard pressure (ISO 80000-4), `b^!` is standard molality, and `b_B` is the molality of substance `B` (item 9-15)
705
+ * remarks: This quantity is a function of temperature only. It especially applies to a dilute liquid solution. The standard pressure is `10^5 ["Pa"]`.
706
+ */
707
+ }
708
+ attribute standardAbsoluteActivityInSolution: StandardAbsoluteActivityInSolutionValue :> scalarQuantities;
709
+
710
+ /* ISO-80000-9 item 9-27.1 activity of solvent, relative activity of solvent */
711
+ attribute def ActivityOfSolventValue :> DimensionOneValue {
712
+ doc
713
+ /*
714
+ * source: item 9-27.1 activity of solvent, relative activity of solvent
715
+ * symbol(s): `a_A`
716
+ * application domain: generic
717
+ * name: ActivityOfSolvent (specializes DimensionOneQuantity)
718
+ * quantity dimension: 1
719
+ * measurement unit(s): 1
720
+ * tensor order: 0
721
+ * definition: for the solvent `A` in a solution, quotient of the absolute activity of substance `A`, `λ_A` (item 9-18), and that, `λ_A^"*"` , of the pure solvent at the same temperature (ISO 80000-5) and pressure (ISO 80000-4): `a_A = λ_A/λ_A^"*"`
722
+ * remarks: None.
723
+ */
724
+ }
725
+ attribute activityOfSolvent: ActivityOfSolventValue :> scalarQuantities;
726
+
727
+ alias relativeActivityOfSolvent for activityOfSolvent;
728
+
729
+ /* ISO-80000-9 item 9-27.2 osmotic factor of solvent, osmotic coefficient of solvent A */
730
+ attribute def OsmoticFactorOfSolventValue :> DimensionOneValue {
731
+ doc
732
+ /*
733
+ * source: item 9-27.2 osmotic factor of solvent, osmotic coefficient of solvent A
734
+ * symbol(s): `φ`
735
+ * application domain: generic
736
+ * name: OsmoticFactorOfSolvent (specializes DimensionOneQuantity)
737
+ * quantity dimension: 1
738
+ * measurement unit(s): 1
739
+ * tensor order: 0
740
+ * definition: quantity given by: `φ = -(M_A sum b_B)^-1 ln(a_A)` where `M_A` is the molar mass (item 9-4) of the solvent A, ∑ denotes summation over all the solutes, `b_B` is the molality of solute B (item 9-15), and `a_A` is the activity of solvent A (item 9-27.1)
741
+ * remarks: The name "osmotic coefficient" is generally used, although the name "osmotic factor" is more systematic. This concept especially applies to a dilute liquid solution.
742
+ */
743
+ }
744
+ attribute osmoticFactorOfSolvent: OsmoticFactorOfSolventValue :> scalarQuantities;
745
+
746
+ alias osmoticCoefficientOfSolventA for osmoticFactorOfSolvent;
747
+
748
+ /* ISO-80000-9 item 9-27.3 standard absolute activity of solvent */
749
+ attribute def StandardAbsoluteActivityOfSolventValue :> DimensionOneValue {
750
+ doc
751
+ /*
752
+ * source: item 9-27.3 standard absolute activity of solvent
753
+ * symbol(s): `λ_A^!`
754
+ * application domain: in a dilute solution
755
+ * name: StandardAbsoluteActivityOfSolvent (specializes DimensionOneQuantity)
756
+ * quantity dimension: 1
757
+ * measurement unit(s): 1
758
+ * tensor order: 0
759
+ * definition: for solvent `A`, standard absolute activity (item 9-23) of the pure substance `A` at the same temperature (ISO 80000-5) and at a standard pressure `p^!` (ISO 80000-4): `λ_A^! = λ_A^"*" p^!`
760
+ * remarks: None.
761
+ */
762
+ }
763
+ attribute standardAbsoluteActivityOfSolvent: StandardAbsoluteActivityOfSolventValue :> scalarQuantities;
764
+
765
+ /* ISO-80000-9 item 9-28 osmotic pressure */
766
+ attribute def OsmoticPressureValue :> ScalarQuantityValue {
767
+ doc
768
+ /*
769
+ * source: item 9-28 osmotic pressure
770
+ * symbol(s): `Π`
771
+ * application domain: generic
772
+ * name: OsmoticPressure
773
+ * quantity dimension: L^-1*M^1*T^-2
774
+ * measurement unit(s): Pa, kg*m^-1*s^-2
775
+ * tensor order: 0
776
+ * definition: excess pressure (ISO 80000-4) required to maintain osmotic equilibrium between a solution and the pure solvent separated by a membrane permeable to the solvent only
777
+ * remarks: None.
778
+ */
779
+ attribute :>> num: Real;
780
+ attribute :>> mRef: OsmoticPressureUnit[1];
781
+ }
782
+
783
+ attribute osmoticPressure: OsmoticPressureValue[*] nonunique :> scalarQuantities;
784
+
785
+ attribute def OsmoticPressureUnit :> DerivedUnit {
786
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; }
787
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
788
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
789
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
790
+ }
791
+
792
+ /* ISO-80000-9 item 9-29 stoichiometric number of substance */
793
+ attribute def StoichiometricNumberOfSubstanceValue :> DimensionOneValue {
794
+ doc
795
+ /*
796
+ * source: item 9-29 stoichiometric number of substance
797
+ * symbol(s): `ν_B`
798
+ * application domain: generic
799
+ * name: StoichiometricNumberOfSubstance (specializes DimensionOneQuantity)
800
+ * quantity dimension: 1
801
+ * measurement unit(s): 1
802
+ * tensor order: 0
803
+ * definition: for substance `B`, an integer number or a simple fraction, being negative for a reactant and positive for a product, occurring in the expression for a chemical reaction: `0 = sum ν_B` where the symbol `B` denotes the reactants and products involved in the reaction
804
+ * remarks: EXAMPLE `(1/2)"N"_2 + (3/2)"H"_2 = "N""H"_3` ; `ν("N"_2) = -1/2`, `ν("H"_2) = -3/2`, `ν("N""H"_3) = +1`.
805
+ */
806
+ }
807
+ attribute stoichiometricNumberOfSubstance: StoichiometricNumberOfSubstanceValue :> scalarQuantities;
808
+
809
+ /* ISO-80000-9 item 9-30 affinity of a chemical reaction */
810
+ attribute def AffinityOfAChemicalReactionValue :> ScalarQuantityValue {
811
+ doc
812
+ /*
813
+ * source: item 9-30 affinity of a chemical reaction
814
+ * symbol(s): `A`
815
+ * application domain: generic
816
+ * name: AffinityOfAChemicalReaction
817
+ * quantity dimension: L^2*M^1*T^-2*N^-1
818
+ * measurement unit(s): J/mol, kg*m^2*s^-2*mol^-1
819
+ * tensor order: 0
820
+ * definition: negative of the sum over all substances `B` of products of stoichiometric number `ν_B` of substance `B` (item 9-29) and chemical potential `μ_B` of substance `B` (item 9-17): `A = -sum ν_B μ_B`
821
+ * remarks: The affinity of a reaction is a measure of the "driving force" of the reaction. When it is positive, the reaction goes spontaneously from reactants to products, and when it is negative, the reaction goes in the opposite direction. Another way to write the definition is: `A = ((del G)/(del ξ))_(p,T)` where `G` is Gibbs energy (ISO 80000-5) and `ξ` is the extent of the reaction (item 9-31). Note that `ν_B` is negative for reactants and positive for products.
822
+ */
823
+ attribute :>> num: Real;
824
+ attribute :>> mRef: AffinityOfAChemicalReactionUnit[1];
825
+ }
826
+
827
+ attribute affinityOfAChemicalReaction: AffinityOfAChemicalReactionValue[*] nonunique :> scalarQuantities;
828
+
829
+ attribute def AffinityOfAChemicalReactionUnit :> DerivedUnit {
830
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
831
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
832
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
833
+ private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; }
834
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, amountOfSubstancePF); }
835
+ }
836
+
837
+ /* ISO-80000-9 item 9-31 extent of reaction */
838
+ attribute extentOfReaction: AmountOfSubstanceValue :> scalarQuantities {
839
+ doc
840
+ /*
841
+ * source: item 9-31 extent of reaction
842
+ * symbol(s): `ξ`
843
+ * application domain: generic
844
+ * name: ExtentOfReaction (specializes AmountOfSubstance)
845
+ * quantity dimension: N^1
846
+ * measurement unit(s): mol
847
+ * tensor order: 0
848
+ * definition: difference of initial amount `n_(B "in")` of substance `B` (item 9-2) and equilibrium amount `n_(B "eq")` of substance `B` (item 9-2) divided by stoichiometric number `ν_B` of substance `B` (item 9-29): `ξ = (n_(B "eq") - n_(B "in"))/ν_B`
849
+ * remarks: See remark to item 9-30.
850
+ */
851
+ }
852
+
853
+ /* ISO-80000-9 item 9-32 standard equilibrium constant, thermodynamic equilibrium constant */
854
+ attribute def StandardEquilibriumConstantValue :> DimensionOneValue {
855
+ doc
856
+ /*
857
+ * source: item 9-32 standard equilibrium constant, thermodynamic equilibrium constant
858
+ * symbol(s): `K^!`
859
+ * application domain: generic
860
+ * name: StandardEquilibriumConstant (specializes DimensionOneQuantity)
861
+ * quantity dimension: 1
862
+ * measurement unit(s): 1
863
+ * tensor order: 0
864
+ * definition: for a chemical reaction, product for all substances `B` of standard absolute activity `λ_B^!` of substance `B` (item 9-26) in power of minus stoichiometric number `ν_B` of substance `B` (item 9-29): `K^! = prod_B (tilde(a) λ_B^!)^(-ν_B)`
865
+ * remarks: This quantity is a function of temperature only. Others depend on temperature, pressure, and composition. One can define in an analogous way an equilibrium constant in terms of fugacity, `K_f`, molality, `K_m`, etc.
866
+ */
867
+ }
868
+ attribute standardEquilibriumConstant: StandardEquilibriumConstantValue :> scalarQuantities;
869
+
870
+ alias thermodynamicEquilibriumConstant for standardEquilibriumConstant;
871
+
872
+ /* ISO-80000-9 item 9-33 equilibrium constant on pressure basis */
873
+ attribute def EquilibriumConstantOnPressureBasisValue :> ScalarQuantityValue {
874
+ doc
875
+ /*
876
+ * source: item 9-33 equilibrium constant on pressure basis
877
+ * symbol(s): `K_p`
878
+ * application domain: pressure basis
879
+ * name: EquilibriumConstantOnPressureBasis
880
+ * quantity dimension: L^-1*M^1*T^-2
881
+ * measurement unit(s): Pa, kg*m^-1*s^-2
882
+ * tensor order: 0
883
+ * definition: for gases, product for all substances `B` of partial pressure `p_B` of substance `B` (item 9-19) in power of its stoichiometric number `ν_B` (item 9-29): `K_p = prod_B (p_B)^(ν_B)`
884
+ * remarks: None.
885
+ */
886
+ attribute :>> num: Real;
887
+ attribute :>> mRef: EquilibriumConstantOnPressureBasisUnit[1];
888
+ }
889
+
890
+ attribute equilibriumConstantOnPressureBasis: EquilibriumConstantOnPressureBasisValue[*] nonunique :> scalarQuantities;
891
+
892
+ attribute def EquilibriumConstantOnPressureBasisUnit :> DerivedUnit {
893
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; }
894
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
895
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
896
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
897
+ }
898
+
899
+ /* ISO-80000-9 item 9-34 equilibrium constant on concentration basis */
900
+ attribute def EquilibriumConstantOnConcentrationBasisValue :> ScalarQuantityValue {
901
+ doc
902
+ /*
903
+ * source: item 9-34 equilibrium constant on concentration basis
904
+ * symbol(s): `K_c`
905
+ * application domain: concentration basis
906
+ * name: EquilibriumConstantOnConcentrationBasis
907
+ * quantity dimension: L^-3*N^1
908
+ * measurement unit(s): mol/m^3
909
+ * tensor order: 0
910
+ * definition: for solutions, product for all substances `B` of concentration `c_B` of substance `B` (item 9-9.1) in power of its stoichiometric number `ν_B` (item 9-29): `K_c = prod_B (c_B)^(ν_B)`
911
+ * remarks: None.
912
+ */
913
+ attribute :>> num: Real;
914
+ attribute :>> mRef: EquilibriumConstantOnConcentrationBasisUnit[1];
915
+ }
916
+
917
+ attribute equilibriumConstantOnConcentrationBasis: EquilibriumConstantOnConcentrationBasisValue[*] nonunique :> scalarQuantities;
918
+
919
+ attribute def EquilibriumConstantOnConcentrationBasisUnit :> DerivedUnit {
920
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; }
921
+ private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = 1; }
922
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, amountOfSubstancePF); }
923
+ }
924
+
925
+ /* ISO-80000-9 item 9-35.1 microcanonical partition function */
926
+ attribute microcanonicalPartitionFunction: CountValue :> scalarQuantities {
927
+ doc
928
+ /*
929
+ * source: item 9-35.1 microcanonical partition function
930
+ * symbol(s): `Ω`
931
+ * application domain: generic
932
+ * name: MicrocanonicalPartitionFunction (specializes Count)
933
+ * quantity dimension: 1
934
+ * measurement unit(s): 1
935
+ * tensor order: 0
936
+ * definition: number of all quantum states `r` consistent with given energy `E` (ISO 80000-4), volume (ISO 80000-3), and external fields: `Ω = sum_r 1`
937
+ * remarks: `S = k ln(Ω)` where `S` is entropy (ISO 80000-5) and `k` is the Boltzmann constant (ISO 80000-1).
938
+ */
939
+ }
940
+
941
+ /* ISO-80000-9 item 9-35.2 canonical partition function */
942
+ attribute def CanonicalPartitionFunctionValue :> DimensionOneValue {
943
+ doc
944
+ /*
945
+ * source: item 9-35.2 canonical partition function
946
+ * symbol(s): `Z`
947
+ * application domain: generic
948
+ * name: CanonicalPartitionFunction (specializes DimensionOneQuantity)
949
+ * quantity dimension: 1
950
+ * measurement unit(s): 1
951
+ * tensor order: 0
952
+ * definition: sum over quantum states of energy `E_r` (ISO 80000-4), expressed by: `Z = sum_r exp(-E_r/(kT))` where `k` is the Boltzmann constant (ISO 80000-1), and `T` is thermodynamic temperature (ISO 80000-5)
953
+ * remarks: `A = -kT ln(Z)` where `A` is Helmholtz energy (ISO 80000-5).
954
+ */
955
+ }
956
+ attribute canonicalPartitionFunction: CanonicalPartitionFunctionValue :> scalarQuantities;
957
+
958
+ /* ISO-80000-9 item 9-35.3 grand-canonical partition function, grand partition function */
959
+ attribute def GrandCanonicalPartitionFunctionValue :> DimensionOneValue {
960
+ doc
961
+ /*
962
+ * source: item 9-35.3 grand-canonical partition function, grand partition function
963
+ * symbol(s): `Ξ`
964
+ * application domain: generic
965
+ * name: GrandCanonicalPartitionFunction (specializes DimensionOneQuantity)
966
+ * quantity dimension: 1
967
+ * measurement unit(s): 1
968
+ * tensor order: 0
969
+ * definition: sum of canonical partition function `Z(N_A,N_B,…)` for the given number of particles `A,B` multiplied by absolute activities (item 9-18) `λ_A, λ_B, ...` of particles `A, B`: `Ξ = sum_(N_A, N_B, ...) Z(N_A, N_B, …) * λ_A^(N_A) * λ_B^(N_B) * ...`
970
+ * remarks: `A - sum μ_B n_B = -kT ln(Ξ)` where `A` is Helmholtz energy (ISO 80000-5), `μ_B` is the chemical potential of substance `B`, and `n_B` is the amount of substance `B`.
971
+ */
972
+ }
973
+ attribute grandCanonicalPartitionFunction: GrandCanonicalPartitionFunctionValue :> scalarQuantities;
974
+
975
+ alias grandPartitionFunction for grandCanonicalPartitionFunction;
976
+
977
+ /* ISO-80000-9 item 9-35.4 molecular partition function, partition function of a molecule */
978
+ attribute def MolecularPartitionFunctionValue :> DimensionOneValue {
979
+ doc
980
+ /*
981
+ * source: item 9-35.4 molecular partition function, partition function of a molecule
982
+ * symbol(s): `q`
983
+ * application domain: generic
984
+ * name: MolecularPartitionFunction (specializes DimensionOneQuantity)
985
+ * quantity dimension: 1
986
+ * measurement unit(s): 1
987
+ * tensor order: 0
988
+ * definition: quantity given by: `q = sum_r exp(-ε_r/(kT))` where `ε_r` is the energy (ISO 80000-5) of the `r`-th level of the molecule consistent with given volume (ISO 80000-3) and external fields, `k` is the Boltzmann constant (ISO 80000-1), and `T` is thermodynamic temperature (ISO 80000-5)
989
+ * remarks: None.
990
+ */
991
+ }
992
+ attribute molecularPartitionFunction: MolecularPartitionFunctionValue :> scalarQuantities;
993
+
994
+ alias partitionFunctionOfAMolecule for molecularPartitionFunction;
995
+
996
+ /* ISO-80000-9 item 9-36.1 statistical weight of subsystem */
997
+ attribute statisticalWeightOfSubsystem: CountValue :> scalarQuantities {
998
+ doc
999
+ /*
1000
+ * source: item 9-36.1 statistical weight of subsystem
1001
+ * symbol(s): `g`
1002
+ * application domain: generic
1003
+ * name: StatisticalWeightOfSubsystem (specializes Count)
1004
+ * quantity dimension: 1
1005
+ * measurement unit(s): 1
1006
+ * tensor order: 0
1007
+ * definition: number of different microstates in a subsystem
1008
+ * remarks: None.
1009
+ */
1010
+ }
1011
+
1012
+ /* ISO-80000-9 item 9-36.2 degeneracy, multiplicity */
1013
+ attribute def DegeneracyValue :> DimensionOneValue {
1014
+ doc
1015
+ /*
1016
+ * source: item 9-36.2 degeneracy, multiplicity
1017
+ * symbol(s): `g`
1018
+ * application domain: generic
1019
+ * name: Degeneracy (specializes DimensionOneQuantity)
1020
+ * quantity dimension: 1
1021
+ * measurement unit(s): 1
1022
+ * tensor order: 0
1023
+ * definition: for quantum level, statistical weight of that level
1024
+ * remarks: If `g = 1`, the level is called non-degenerate.
1025
+ */
1026
+ }
1027
+ attribute degeneracy: DegeneracyValue :> scalarQuantities;
1028
+
1029
+ alias multiplicity for degeneracy;
1030
+
1031
+ /* ISO-80000-9 item 9-37.1 molar gas constant */
1032
+ attribute def MolarGasConstantValue :> ScalarQuantityValue {
1033
+ doc
1034
+ /*
1035
+ * source: item 9-37.1 molar gas constant
1036
+ * symbol(s): `R`
1037
+ * application domain: generic
1038
+ * name: MolarGasConstant
1039
+ * quantity dimension: L^2*M^1*T^-2*Θ^-1*N^-1
1040
+ * measurement unit(s): J/(mol*K), kg*m^2*s^-2*K^-1*mol^-1
1041
+ * tensor order: 0
1042
+ * definition: product of the Boltzmann constant (ISO 80000-1) and the Avogadro constant (ISO 80000-1)
1043
+ * remarks: For an ideal gas, `pV_m = RT`
1044
+ */
1045
+ attribute :>> num: Real;
1046
+ attribute :>> mRef: MolarGasConstantUnit[1];
1047
+ }
1048
+
1049
+ attribute molarGasConstant: MolarGasConstantValue[*] nonunique :> scalarQuantities;
1050
+
1051
+ attribute def MolarGasConstantUnit :> DerivedUnit {
1052
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
1053
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
1054
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
1055
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; }
1056
+ private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; }
1057
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, thermodynamicTemperaturePF, amountOfSubstancePF); }
1058
+ }
1059
+
1060
+ /* ISO-80000-9 item 9-37.2 specific gas constant */
1061
+ /* Refer to declaration for SpecificGasConstant in ISQThermodynamics item 5-26 specific gas constant */
1062
+
1063
+ /* ISO-80000-9 item 9-38 mean free path */
1064
+ attribute meanFreePath: LengthValue :> scalarQuantities {
1065
+ doc
1066
+ /*
1067
+ * source: item 9-38 mean free path
1068
+ * symbol(s): `l`, `λ`
1069
+ * application domain: chemistry
1070
+ * name: MeanFreePath (specializes Length)
1071
+ * quantity dimension: L^1
1072
+ * measurement unit(s): m
1073
+ * tensor order: 0
1074
+ * definition: for a particle, the average distance `d` (ISO 80000-3) between two successive collisions with other particles
1075
+ * remarks: None.
1076
+ */
1077
+ }
1078
+
1079
+ /* ISO-80000-9 item 9-39 diffusion coefficient */
1080
+ attribute def DiffusionCoefficientValue :> ScalarQuantityValue {
1081
+ doc
1082
+ /*
1083
+ * source: item 9-39 diffusion coefficient
1084
+ * symbol(s): `D`
1085
+ * application domain: chemistry
1086
+ * name: DiffusionCoefficient
1087
+ * quantity dimension: L^2*T^-1
1088
+ * measurement unit(s): m^2*s^-1
1089
+ * tensor order: 0
1090
+ * definition: proportionality coefficient of local molecular concentration `C_B` (item 9-9.2) of substance `B` in the mixture multiplied by the local average velocity (ISO 80000-3) `v_B` of the molecules of `B`, and minus the gradient of the local molecular concentration `C_B` (item 9-9.2) of substance `B` in the mixture, expressed by: `C_B(v_B) = -D grad C_B`
1091
+ * remarks: None.
1092
+ */
1093
+ attribute :>> num: Real;
1094
+ attribute :>> mRef: DiffusionCoefficientUnit[1];
1095
+ }
1096
+
1097
+ attribute diffusionCoefficient: DiffusionCoefficientValue[*] nonunique :> scalarQuantities;
1098
+
1099
+ attribute def DiffusionCoefficientUnit :> DerivedUnit {
1100
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
1101
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
1102
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); }
1103
+ }
1104
+
1105
+ /* ISO-80000-9 item 9-40.1 thermal diffusion ratio */
1106
+ attribute def ThermalDiffusionRatioValue :> DimensionOneValue {
1107
+ doc
1108
+ /*
1109
+ * source: item 9-40.1 thermal diffusion ratio
1110
+ * symbol(s): `k_T`
1111
+ * application domain: generic
1112
+ * name: ThermalDiffusionRatio (specializes DimensionOneQuantity)
1113
+ * quantity dimension: 1
1114
+ * measurement unit(s): 1
1115
+ * tensor order: 0
1116
+ * definition: in a steady-state of a binary mixture in which thermal diffusion occurs, proportionality factor between gradient of the amount-of-subsstance fraction `x_B` (item 9-13) of the heavier substance `B`, and negative gradient of the local thermodynamic temperature `T` (ISO 80000-5) divided by that temperature (ISO 80000-5): `grad x_B = -(k_T/T) grad T`
1117
+ * remarks: None.
1118
+ */
1119
+ }
1120
+ attribute thermalDiffusionRatio: ThermalDiffusionRatioValue :> scalarQuantities;
1121
+
1122
+ /* ISO-80000-9 item 9-40.2 thermal diffusion factor */
1123
+ attribute def ThermalDiffusionFactorValue :> DimensionOneValue {
1124
+ doc
1125
+ /*
1126
+ * source: item 9-40.2 thermal diffusion factor
1127
+ * symbol(s): `α_T`
1128
+ * application domain: generic
1129
+ * name: ThermalDiffusionFactor (specializes DimensionOneQuantity)
1130
+ * quantity dimension: 1
1131
+ * measurement unit(s): 1
1132
+ * tensor order: 0
1133
+ * definition: quotient of the thermal diffusion ratio `k_T` (item 9-40.1), and the product of the local amount-of-substance fractions `x_A`, `x_B` (item 9-13) of two substances `A` and `B`: `α_T = k_T//(x_A x_B)`
1134
+ * remarks: None.
1135
+ */
1136
+ }
1137
+ attribute thermalDiffusionFactor: ThermalDiffusionFactorValue :> scalarQuantities;
1138
+
1139
+ /* ISO-80000-9 item 9-41 thermal diffusion coefficient */
1140
+ attribute def ThermalDiffusionCoefficientValue :> ScalarQuantityValue {
1141
+ doc
1142
+ /*
1143
+ * source: item 9-41 thermal diffusion coefficient
1144
+ * symbol(s): `D_T`
1145
+ * application domain: generic
1146
+ * name: ThermalDiffusionCoefficient
1147
+ * quantity dimension: L^2*T^-1
1148
+ * measurement unit(s): m^2*s^-1
1149
+ * tensor order: 0
1150
+ * definition: product of the thermal diffusion ratio `k_T` (item 9-40.1) and the diffusion coefficient `D` (item 9-39): `D_T = k_T*D`
1151
+ * remarks: None.
1152
+ */
1153
+ attribute :>> num: Real;
1154
+ attribute :>> mRef: ThermalDiffusionCoefficientUnit[1];
1155
+ }
1156
+
1157
+ attribute thermalDiffusionCoefficient: ThermalDiffusionCoefficientValue[*] nonunique :> scalarQuantities;
1158
+
1159
+ attribute def ThermalDiffusionCoefficientUnit :> DerivedUnit {
1160
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
1161
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
1162
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); }
1163
+ }
1164
+
1165
+ /* ISO-80000-9 item 9-42 ionic strength */
1166
+ attribute def IonicStrengthValue :> ScalarQuantityValue {
1167
+ doc
1168
+ /*
1169
+ * source: item 9-42 ionic strength
1170
+ * symbol(s): `I`
1171
+ * application domain: generic
1172
+ * name: IonicStrength
1173
+ * quantity dimension: M^-1*N^1
1174
+ * measurement unit(s): mol*kg^-1
1175
+ * tensor order: 0
1176
+ * definition: in a sample, one half of the sum of square of the charge number `z_i` (ISO 80000-10) of `i`-th ion multiplied by its molality `b_i` (item 9-15) over any involved ion: `I = 1/2 sum z_i^2 b_i`
1177
+ * remarks: None.
1178
+ */
1179
+ attribute :>> num: Real;
1180
+ attribute :>> mRef: IonicStrengthUnit[1];
1181
+ }
1182
+
1183
+ attribute ionicStrength: IonicStrengthValue[*] nonunique :> scalarQuantities;
1184
+
1185
+ attribute def IonicStrengthUnit :> DerivedUnit {
1186
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; }
1187
+ private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = 1; }
1188
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, amountOfSubstancePF); }
1189
+ }
1190
+
1191
+ /* ISO-80000-9 item 9-43 degree of dissociation, dissociation fraction */
1192
+ attribute def DegreeOfDissociationValue :> DimensionOneValue {
1193
+ doc
1194
+ /*
1195
+ * source: item 9-43 degree of dissociation, dissociation fraction
1196
+ * symbol(s): `α`
1197
+ * application domain: generic
1198
+ * name: DegreeOfDissociation (specializes DimensionOneQuantity)
1199
+ * quantity dimension: 1
1200
+ * measurement unit(s): 1
1201
+ * tensor order: 0
1202
+ * definition: in a sample, quotient of the number `n_d` of dissociated molecules and the total number `n` of molecules: `α = n_D / n`
1203
+ * remarks: None.
1204
+ */
1205
+ }
1206
+ attribute degreeOfDissociation: DegreeOfDissociationValue :> scalarQuantities;
1207
+
1208
+ alias dissociationFraction for degreeOfDissociation;
1209
+
1210
+ /* ISO-80000-9 item 9-44 electrolytic conductivity */
1211
+ attribute def ElectrolyticConductivityValue :> ScalarQuantityValue {
1212
+ doc
1213
+ /*
1214
+ * source: item 9-44 electrolytic conductivity
1215
+ * symbol(s): `κ`
1216
+ * application domain: generic
1217
+ * name: ElectrolyticConductivity
1218
+ * quantity dimension: L^-3*M^-1*T^3*I^2
1219
+ * measurement unit(s): S/m, kg^-1*m^-3*s^3*A^2
1220
+ * tensor order: 0
1221
+ * definition: quotient of the magnitude of electric current density `J` (IEC 80000-6) and the magnitude electric field strength `E` (IEC 80000-6) in an electrolyte: `κ = J/E`
1222
+ * remarks: For anisotropic media, `κ` is a tensor. In IEC 80000-6 the symbols `σ`, `γ` are used.
1223
+ */
1224
+ attribute :>> num: Real;
1225
+ attribute :>> mRef: ElectrolyticConductivityUnit[1];
1226
+ }
1227
+
1228
+ attribute electrolyticConductivity: ElectrolyticConductivityValue[*] nonunique :> scalarQuantities;
1229
+
1230
+ attribute def ElectrolyticConductivityUnit :> DerivedUnit {
1231
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; }
1232
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; }
1233
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 3; }
1234
+ private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 2; }
1235
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF); }
1236
+ }
1237
+
1238
+ /* ISO-80000-9 item 9-45 molar conductivity */
1239
+ attribute def MolarConductivityValue :> ScalarQuantityValue {
1240
+ doc
1241
+ /*
1242
+ * source: item 9-45 molar conductivity
1243
+ * symbol(s): `Λ_m`
1244
+ * application domain: generic
1245
+ * name: MolarConductivity
1246
+ * quantity dimension: M^-1*T^3*I^2*N^-1
1247
+ * measurement unit(s): S*m^2/mol, kg^-1*s^3*A^2*mol^-1
1248
+ * tensor order: 0
1249
+ * definition: in an electrolyte, quotient of electrolytic conductivity `κ` (item 9-44) and amount-of-substance concentration `c_B` (item 9-12.1): `Λ_m = κ/c_B`
1250
+ * remarks: None.
1251
+ */
1252
+ attribute :>> num: Real;
1253
+ attribute :>> mRef: MolarConductivityUnit[1];
1254
+ }
1255
+
1256
+ attribute molarConductivity: MolarConductivityValue[*] nonunique :> scalarQuantities;
1257
+
1258
+ attribute def MolarConductivityUnit :> DerivedUnit {
1259
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; }
1260
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 3; }
1261
+ private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 2; }
1262
+ private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; }
1263
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF, electricCurrentPF, amountOfSubstancePF); }
1264
+ }
1265
+
1266
+ /* ISO-80000-9 item 9-46 transport number of the ion B, current fraction of the ion B */
1267
+ attribute def TransportNumberOfTheIonBValue :> DimensionOneValue {
1268
+ doc
1269
+ /*
1270
+ * source: item 9-46 transport number of the ion B, current fraction of the ion B
1271
+ * symbol(s): `t_B`
1272
+ * application domain: generic
1273
+ * name: TransportNumberOfTheIonB (specializes DimensionOneQuantity)
1274
+ * quantity dimension: 1
1275
+ * measurement unit(s): 1
1276
+ * tensor order: 0
1277
+ * definition: for the ion `B`, quotient of electric current `i_B` (IEC 80000-6) carried by the ion `B` and total electric current `i` (IEC 80000-6) in an electrolyte: `t_B = i_B/i`
1278
+ * remarks: None.
1279
+ */
1280
+ }
1281
+ attribute transportNumberOfTheIonB: TransportNumberOfTheIonBValue :> scalarQuantities;
1282
+
1283
+ alias currentFractionOfTheIonB for transportNumberOfTheIonB;
1284
+
1285
+ /* ISO-80000-9 item 9-47 angle of optical rotation */
1286
+ attribute angleOfOpticalRotation: AngularMeasureValue :> scalarQuantities {
1287
+ doc
1288
+ /*
1289
+ * source: item 9-47 angle of optical rotation
1290
+ * symbol(s): `α`
1291
+ * application domain: generic
1292
+ * name: AngleOfOpticalRotation (specializes AngularMeasure)
1293
+ * quantity dimension: 1
1294
+ * measurement unit(s): rad
1295
+ * tensor order: 0
1296
+ * definition: angle through which plane-polarized light is rotated clockwise, as seen when facing the light source, in passing through an optically active medium
1297
+ * remarks: None.
1298
+ */
1299
+ }
1300
+
1301
+ /* ISO-80000-9 item 9-48 molar optical rotatory power */
1302
+ attribute def MolarOpticalRotatoryPowerValue :> ScalarQuantityValue {
1303
+ doc
1304
+ /*
1305
+ * source: item 9-48 molar optical rotatory power
1306
+ * symbol(s): `α_n`
1307
+ * application domain: generic
1308
+ * name: MolarOpticalRotatoryPower
1309
+ * quantity dimension: L^2*N^-1
1310
+ * measurement unit(s): rad*m^2/mol, m^2*mol^-1
1311
+ * tensor order: 0
1312
+ * definition: angle `α` of optical rotation (item 9-47), multiplied by the quotient of cross-sectional area `A` (ISO 80000-3) of a linearly polarized light beam and the amount of substance `n` (item 9-2) of the optically active component in the path of the beam: `α_n = (α A)/n`
1313
+ * remarks: None.
1314
+ */
1315
+ attribute :>> num: Real;
1316
+ attribute :>> mRef: MolarOpticalRotatoryPowerUnit[1];
1317
+ }
1318
+
1319
+ attribute molarOpticalRotatoryPower: MolarOpticalRotatoryPowerValue[*] nonunique :> scalarQuantities;
1320
+
1321
+ attribute def MolarOpticalRotatoryPowerUnit :> DerivedUnit {
1322
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
1323
+ private attribute amountOfSubstancePF: QuantityPowerFactor[1] { :>> quantity = isq.N; :>> exponent = -1; }
1324
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, amountOfSubstancePF); }
1325
+ }
1326
+
1327
+ /* ISO-80000-9 item 9-49 specific optical rotatory power */
1328
+ attribute def SpecificOpticalRotatoryPowerValue :> ScalarQuantityValue {
1329
+ doc
1330
+ /*
1331
+ * source: item 9-49 specific optical rotatory power
1332
+ * symbol(s): `α_m`
1333
+ * application domain: generic
1334
+ * name: SpecificOpticalRotatoryPower
1335
+ * quantity dimension: L^2*M^-1
1336
+ * measurement unit(s): rad*m^2/kg^1, kg^-1*m^2
1337
+ * tensor order: 0
1338
+ * definition: angle `α` of optical rotation (item 9-47), multiplied by the quotient of cross-sectional area `A` (ISO 80000-3) of a linearly polarized light beam and the mass `m` (ISO 80000-4) of the optically active component in the path of the beam: `α_m = (α A)/m`
1339
+ * remarks: None.
1340
+ */
1341
+ attribute :>> num: Real;
1342
+ attribute :>> mRef: SpecificOpticalRotatoryPowerUnit[1];
1343
+ }
1344
+
1345
+ attribute specificOpticalRotatoryPower: SpecificOpticalRotatoryPowerValue[*] nonunique :> scalarQuantities;
1346
+
1347
+ attribute def SpecificOpticalRotatoryPowerUnit :> DerivedUnit {
1348
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
1349
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; }
1350
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF); }
1351
+ }
1352
+
1353
+ }
src/sysml.library/Domain Libraries/Quantities and Units/ISQCondensedMatter.sysml ADDED
@@ -0,0 +1,1229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package ISQCondensedMatter {
2
+ doc
3
+ /*
4
+ * International System of Quantities and Units
5
+ * Generated on 2022-08-07T14:44:27Z from standard ISO-80000-12:2019 "Condensed matter physics"
6
+ * see also https://www.iso.org/obp/ui/#iso:std:iso:80000:-12:ed-2:v1:en
7
+ *
8
+ * Note 1: In documentation comments, AsciiMath notation (see http://asciimath.org/) is used for mathematical concepts,
9
+ * with Greek letters in Unicode encoding. In running text, AsciiMath is placed between backticks.
10
+ * Note 2: For vector and tensor quantities currently the unit and quantity value type for their (scalar) magnitude is
11
+ * defined, as well as their typical Cartesian 3d VectorMeasurementReference (i.e. coordinate system)
12
+ * or TensorMeasurementReference.
13
+ */
14
+
15
+ private import ScalarValues::Real;
16
+ private import Quantities::*;
17
+ private import MeasurementReferences::*;
18
+ private import ISQBase::*;
19
+
20
+ /* Quantity definitions referenced from other ISQ packages */
21
+ private import ISQElectromagnetism::ElectricPotentialDifferenceValue;
22
+ private import ISQElectromagnetism::MagneticFluxDensityValue;
23
+ private import ISQElectromagnetism::ResistivityValue;
24
+ private import ISQSpaceTime::CartesianSpatial3dCoordinateFrame;
25
+ private import ISQSpaceTime::AngularFrequencyValue;
26
+ private import ISQSpaceTime::AngularMeasureValue;
27
+ private import ISQSpaceTime::RepetencyValue;
28
+ private import ISQThermodynamics::EnergyValue;
29
+
30
+ /* ISO-80000-12 item 12-1.1 lattice vector */
31
+ attribute def Cartesian3dLatticeVector :> VectorQuantityValue {
32
+ doc
33
+ /*
34
+ * source: item 12-1.1 lattice vector
35
+ * symbol(s): `vec(R)`
36
+ * application domain: generic
37
+ * name: LatticeVector (specializes Displacement)
38
+ * quantity dimension: L^1
39
+ * measurement unit(s): m
40
+ * tensor order: 1
41
+ * definition: translation vector that maps the crystal lattice on itself
42
+ * remarks: The non-SI unit ångström (Å) is widely used by x-ray crystallographers and structural chemists.
43
+ */
44
+ attribute :>> isBound = false;
45
+ attribute :>> num: Real[3];
46
+ attribute :>> mRef: CartesianSpatial3dCoordinateFrame[1];
47
+ }
48
+
49
+ attribute latticeVector: Cartesian3dLatticeVector :> vectorQuantities;
50
+
51
+ /* ISO-80000-12 item 12-1.2 fundamental lattice vector */
52
+ attribute def Cartesian3dFundamentalLatticeVector :> VectorQuantityValue {
53
+ doc
54
+ /*
55
+ * source: item 12-1.2 fundamental lattice vector
56
+ * symbol(s): `vec(a_1),vec(a_2),vec(a_3)`, `vec(a),vec(b),vec(c)`
57
+ * application domain: generic
58
+ * name: FundamentalLatticeVector (specializes Displacement)
59
+ * quantity dimension: L^1
60
+ * measurement unit(s): m
61
+ * tensor order: 1
62
+ * definition: fundamental translation vectors for the crystal lattice
63
+ * remarks: The lattice vector (item 12-1.1) can be given as `vec(R) = n_1 vec(a_1) + n_2 vec(a_2) + n_3 vec(a_3)` where `n_1`, `n_2` and `n_3` are integers.
64
+ */
65
+ attribute :>> isBound = false;
66
+ attribute :>> num: Real[3];
67
+ attribute :>> mRef: CartesianSpatial3dCoordinateFrame[1];
68
+ }
69
+
70
+ attribute fundamentalLatticeVector: Cartesian3dFundamentalLatticeVector :> vectorQuantities;
71
+
72
+ /* ISO-80000-12 item 12-2.1 angular reciprocal lattice vector */
73
+ attribute def AngularReciprocalLatticeVectorMagnitudeValue :> ScalarQuantityValue {
74
+ doc
75
+ /*
76
+ * source: item 12-2.1 angular reciprocal lattice vector (magnitude)
77
+ * symbol(s): `G`
78
+ * application domain: generic
79
+ * name: AngularReciprocalLatticeVectorMagnitude
80
+ * quantity dimension: L^-1
81
+ * measurement unit(s): m^-1
82
+ * tensor order: 0
83
+ * definition: vector whose scalar products with all fundamental lattice vectors are integral multiples of `2π`
84
+ * remarks: In crystallography, however, the quantity `G/(2π)` is sometimes used.
85
+ */
86
+ attribute :>> num: Real;
87
+ attribute :>> mRef: AngularReciprocalLatticeVectorMagnitudeUnit[1];
88
+ }
89
+
90
+ attribute angularReciprocalLatticeVectorMagnitude: AngularReciprocalLatticeVectorMagnitudeValue[*] nonunique :> scalarQuantities;
91
+
92
+ attribute def AngularReciprocalLatticeVectorMagnitudeUnit :> DerivedUnit {
93
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; }
94
+ attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; }
95
+ }
96
+
97
+ attribute def Cartesian3dAngularReciprocalLatticeVector :> VectorQuantityValue {
98
+ doc
99
+ /*
100
+ * source: item 12-2.1 angular reciprocal lattice vector
101
+ * symbol(s): `vec(G)`
102
+ * application domain: generic
103
+ * name: AngularReciprocalLatticeVector
104
+ * quantity dimension: L^-1
105
+ * measurement unit(s): m^-1
106
+ * tensor order: 1
107
+ * definition: vector whose scalar products with all fundamental lattice vectors are integral multiples of `2π`
108
+ * remarks: In crystallography, however, the quantity `G/(2π)` is sometimes used.
109
+ */
110
+ attribute :>> isBound = false;
111
+ attribute :>> num: Real[3];
112
+ attribute :>> mRef: Cartesian3dAngularReciprocalLatticeCoordinateFrame[1];
113
+ }
114
+
115
+ attribute angularReciprocalLatticeVector: Cartesian3dAngularReciprocalLatticeVector :> vectorQuantities;
116
+
117
+ attribute def Cartesian3dAngularReciprocalLatticeCoordinateFrame :> VectorMeasurementReference {
118
+ attribute :>> dimensions = 3;
119
+ attribute :>> isBound = false;
120
+ attribute :>> isOrthogonal = true;
121
+ attribute :>> mRefs: AngularReciprocalLatticeVectorMagnitudeUnit[3];
122
+ }
123
+
124
+ /* ISO-80000-12 item 12-2.2 fundamental reciprocal lattice vector */
125
+ attribute def FundamentalReciprocalLatticeVectorMagnitudeValue :> ScalarQuantityValue {
126
+ doc
127
+ /*
128
+ * source: item 12-2.2 fundamental reciprocal lattice vector (magnitude)
129
+ * symbol(s): `b_1,b_2,b_3`
130
+ * application domain: generic
131
+ * name: FundamentalReciprocalLatticeVectorMagnitude
132
+ * quantity dimension: L^-1
133
+ * measurement unit(s): m^-1
134
+ * tensor order: 0
135
+ * definition: fundamental translation vectors for the reciprocal lattice
136
+ * remarks: `vec(a_i) * vec(b_i) = 2π δ_(ij)`. In crystallography, however, the quantities `vec(b_j)/(2π)` are also often used.
137
+ */
138
+ attribute :>> num: Real;
139
+ attribute :>> mRef: FundamentalReciprocalLatticeVectorMagnitudeUnit[1];
140
+ }
141
+
142
+ attribute fundamentalReciprocalLatticeVectorMagnitude: FundamentalReciprocalLatticeVectorMagnitudeValue[*] nonunique :> scalarQuantities;
143
+
144
+ attribute def FundamentalReciprocalLatticeVectorMagnitudeUnit :> DerivedUnit {
145
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; }
146
+ attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; }
147
+ }
148
+
149
+ attribute def Cartesian3dFundamentalReciprocalLatticeVector :> VectorQuantityValue {
150
+ doc
151
+ /*
152
+ * source: item 12-2.2 fundamental reciprocal lattice vector
153
+ * symbol(s): `vec(b_1),vec(b_2),vec(b_3)`
154
+ * application domain: generic
155
+ * name: FundamentalReciprocalLatticeVector
156
+ * quantity dimension: L^-1
157
+ * measurement unit(s): m^-1
158
+ * tensor order: 1
159
+ * definition: fundamental translation vectors for the reciprocal lattice
160
+ * remarks: `vec(a_i) * vec(b_i) = 2π δ_(ij)`. In crystallography, however, the quantities `vec(b_j)/(2π)` are also often used.
161
+ */
162
+ attribute :>> isBound = false;
163
+ attribute :>> num: Real[3];
164
+ attribute :>> mRef: Cartesian3dFundamentalReciprocalLatticeCoordinateFrame[1];
165
+ }
166
+
167
+ attribute fundamentalReciprocalLatticeVector: Cartesian3dFundamentalReciprocalLatticeVector :> vectorQuantities;
168
+
169
+ attribute def Cartesian3dFundamentalReciprocalLatticeCoordinateFrame :> VectorMeasurementReference {
170
+ attribute :>> dimensions = 3;
171
+ attribute :>> isBound = false;
172
+ attribute :>> isOrthogonal = true;
173
+ attribute :>> mRefs: FundamentalReciprocalLatticeVectorMagnitudeUnit[3];
174
+ }
175
+
176
+ /* ISO-80000-12 item 12-3 lattice plane spacing */
177
+ attribute latticePlaneSpacing: LengthValue :> scalarQuantities {
178
+ doc
179
+ /*
180
+ * source: item 12-3 lattice plane spacing
181
+ * symbol(s): `d`
182
+ * application domain: generic
183
+ * name: LatticePlaneSpacing (specializes Length)
184
+ * quantity dimension: L^1
185
+ * measurement unit(s): m
186
+ * tensor order: 0
187
+ * definition: distance (ISO 80000-3) between successive lattice planes
188
+ * remarks: The non-SI unit ångström (Å) is widely used by x-ray crystallographers and structural chemists.
189
+ */
190
+ }
191
+
192
+ /* ISO-80000-12 item 12-4 Bragg angle */
193
+ attribute braggAngle: AngularMeasureValue :> scalarQuantities {
194
+ doc
195
+ /*
196
+ * source: item 12-4 Bragg angle
197
+ * symbol(s): `ϑ`
198
+ * application domain: generic
199
+ * name: BraggAngle (specializes AngularMeasure)
200
+ * quantity dimension: 1
201
+ * measurement unit(s): °, 1
202
+ * tensor order: 0
203
+ * definition: angle between the scattered ray and the lattice plane
204
+ * remarks: Bragg angle `ϑ` is given by `2d sin ϑ = nλ`, where `d` is the lattice plane spacing (item 12-3), `λ` is the wavelength (ISO 80000-7) of the radiation, and `n` is the order of reflexion which is an integer.
205
+ */
206
+ }
207
+
208
+ /* ISO-80000-12 item 12-5.1 short-range order parameter */
209
+ attribute def ShortRangeOrderParameterValue :> DimensionOneValue {
210
+ doc
211
+ /*
212
+ * source: item 12-5.1 short-range order parameter
213
+ * symbol(s): `r`, `σ`
214
+ * application domain: generic
215
+ * name: ShortRangeOrderParameter (specializes DimensionOneQuantity)
216
+ * quantity dimension: 1
217
+ * measurement unit(s): 1
218
+ * tensor order: 0
219
+ * definition: fraction of nearest-neighbour atom pairs in an Ising ferromagnet having magnetic moments in one direction, minus the fraction having magnetic moments in the opposite direction
220
+ * remarks: Similar definitions apply to other order-disorder phenomena. Other symbols are frequently used.
221
+ */
222
+ }
223
+ attribute shortRangeOrderParameter: ShortRangeOrderParameterValue :> scalarQuantities;
224
+
225
+ /* ISO-80000-12 item 12-5.2 long-range order parameter */
226
+ attribute def LongRangeOrderParameterValue :> DimensionOneValue {
227
+ doc
228
+ /*
229
+ * source: item 12-5.2 long-range order parameter
230
+ * symbol(s): `R`, `s`
231
+ * application domain: generic
232
+ * name: LongRangeOrderParameter (specializes DimensionOneQuantity)
233
+ * quantity dimension: 1
234
+ * measurement unit(s): 1
235
+ * tensor order: 0
236
+ * definition: fraction of atoms in an Ising ferromagnet having magnetic moments in one direction, minus the fraction having magnetic moments in the opposite direction
237
+ * remarks: Similar definitions apply to other order-disorder phenomena. Other symbols are frequently used.
238
+ */
239
+ }
240
+ attribute longRangeOrderParameter: LongRangeOrderParameterValue :> scalarQuantities;
241
+
242
+ /* ISO-80000-12 item 12-5.3 atomic scattering factor */
243
+ attribute def AtomicScatteringFactorValue :> DimensionOneValue {
244
+ doc
245
+ /*
246
+ * source: item 12-5.3 atomic scattering factor
247
+ * symbol(s): `f`
248
+ * application domain: generic
249
+ * name: AtomicScatteringFactor (specializes DimensionOneQuantity)
250
+ * quantity dimension: 1
251
+ * measurement unit(s): 1
252
+ * tensor order: 0
253
+ * definition: quotient of radiation amplitude scattered by the atom and radiation amplitude scattered by a single electron
254
+ * remarks: The atomic scattering factor can be expressed by: `f = E_a/(E_e`, where `E_a` is the radiation amplitude scattered by the atom and `E_e` is the radiation amplitude scattered by a single electron.
255
+ */
256
+ }
257
+ attribute atomicScatteringFactor: AtomicScatteringFactorValue :> scalarQuantities;
258
+
259
+ /* ISO-80000-12 item 12-5.4 structure factor */
260
+ attribute def StructureFactorValue :> DimensionOneValue {
261
+ doc
262
+ /*
263
+ * source: item 12-5.4 structure factor
264
+ * symbol(s): `F(h,k,l)`
265
+ * application domain: generic
266
+ * name: StructureFactor (specializes DimensionOneQuantity)
267
+ * quantity dimension: 1
268
+ * measurement unit(s): 1
269
+ * tensor order: 0
270
+ * definition: quantity given by: `F(h,k,l) = sum_(n=1)^N f_n exp[2π i (h x_n + k y_n + l z_n)]`, where `f_n` is the atomic scattering factor (item 12-5.3) for atom `n`, `x_n`, `y_n`, `z_n` are fractional coordinates of its position, `N` is the total number of atoms in the unit cell and `h`, `k`, `l` are the Miller indices
271
+ * remarks: For the Miller indices `h`, `k`, `l`, see Annex A.
272
+ */
273
+ }
274
+ attribute structureFactor: StructureFactorValue :> scalarQuantities;
275
+
276
+ /* ISO-80000-12 item 12-6 Burgers vector */
277
+ attribute def Cartesian3dBurgersVector :> VectorQuantityValue {
278
+ doc
279
+ /*
280
+ * source: item 12-6 Burgers vector
281
+ * symbol(s): `vec(b)`
282
+ * application domain: generic
283
+ * name: BurgersVector (specializes Displacement)
284
+ * quantity dimension: L^1
285
+ * measurement unit(s): m
286
+ * tensor order: 1
287
+ * definition: closing vector in a sequence of vectors encircling a dislocation
288
+ * remarks: None.
289
+ */
290
+ attribute :>> isBound = false;
291
+ attribute :>> num: Real[3];
292
+ attribute :>> mRef: CartesianSpatial3dCoordinateFrame[1];
293
+ }
294
+
295
+ attribute burgersVector: Cartesian3dBurgersVector :> vectorQuantities;
296
+
297
+ /* ISO-80000-12 item 12-7.1 particle position vector */
298
+ attribute def Cartesian3dParticlePositionVector :> VectorQuantityValue {
299
+ doc
300
+ /*
301
+ * source: item 12-7.1 particle position vector
302
+ * symbol(s): `vec(r)`, `vec(R)`
303
+ * application domain: generic
304
+ * name: ParticlePositionVector (specializes PositionVector)
305
+ * quantity dimension: L^1
306
+ * measurement unit(s): m
307
+ * tensor order: 1
308
+ * definition: position vector (ISO 80000-3) of a particle
309
+ * remarks: Often, `r` is used for electrons and `R` is used for atoms and other heavier particles.
310
+ */
311
+ attribute :>> isBound = true;
312
+ attribute :>> num: Real[3];
313
+ attribute :>> mRef: CartesianSpatial3dCoordinateFrame[1];
314
+ }
315
+
316
+ attribute particlePositionVector: Cartesian3dParticlePositionVector :> vectorQuantities;
317
+
318
+ /* ISO-80000-12 item 12-7.2 equilibrium position vector */
319
+ attribute def Cartesian3dEquilibriumPositionVector :> VectorQuantityValue {
320
+ doc
321
+ /*
322
+ * source: item 12-7.2 equilibrium position vector
323
+ * symbol(s): `vec(R_0)`
324
+ * application domain: condensed matter physics
325
+ * name: EquilibriumPositionVector (specializes PositionVector)
326
+ * quantity dimension: L^1
327
+ * measurement unit(s): m
328
+ * tensor order: 1
329
+ * definition: position vector (ISO 80000-3) of an ion or atom in equilibrium
330
+ * remarks: None.
331
+ */
332
+ attribute :>> isBound = true;
333
+ attribute :>> num: Real[3];
334
+ attribute :>> mRef: CartesianSpatial3dCoordinateFrame[1];
335
+ }
336
+
337
+ attribute equilibriumPositionVector: Cartesian3dEquilibriumPositionVector :> vectorQuantities;
338
+
339
+ /* ISO-80000-12 item 12-7.3 displacement vector */
340
+ attribute def Cartesian3dDisplacementVector :> VectorQuantityValue {
341
+ doc
342
+ /*
343
+ * source: item 12-7.3 displacement vector
344
+ * symbol(s): `vec(u)`
345
+ * application domain: condensed matter physics
346
+ * name: DisplacementVector (specializes Displacement)
347
+ * quantity dimension: L^1
348
+ * measurement unit(s): m
349
+ * tensor order: 1
350
+ * definition: difference between the position vector (ISO 80000-3) of an ion or atom and its position vector in equilibrium
351
+ * remarks: The displacement vector can be expressed by: `vec(u) = vec(R) − vec(R_0)`, where `vec(R)` is particle position vector (item 12-7.1) and `vec(R_0)` is position vector of an ion or atom in equilibrium (item 12-7.2).
352
+ */
353
+ attribute :>> isBound = false;
354
+ attribute :>> num: Real[3];
355
+ attribute :>> mRef: CartesianSpatial3dCoordinateFrame[1];
356
+ }
357
+
358
+ attribute displacementVector: Cartesian3dDisplacementVector :> vectorQuantities;
359
+
360
+ /* ISO-80000-12 item 12-8 Debye-Waller factor */
361
+ attribute def DebyeWallerFactorValue :> DimensionOneValue {
362
+ doc
363
+ /*
364
+ * source: item 12-8 Debye-Waller factor
365
+ * symbol(s): `D`, `B`
366
+ * application domain: generic
367
+ * name: DebyeWallerFactor (specializes DimensionOneQuantity)
368
+ * quantity dimension: 1
369
+ * measurement unit(s): 1
370
+ * tensor order: 0
371
+ * definition: factor by which the intensity of a diffraction line is reduced because of the lattice vibrations
372
+ * remarks: `D` is sometimes expressed as `D = exp(−2W)`; in Mössbauer spectroscopy, it is also called the `f` factor and denoted by `f`.
373
+ */
374
+ }
375
+ attribute debyeWallerFactor: DebyeWallerFactorValue :> scalarQuantities;
376
+
377
+ /* ISO-80000-12 item 12-9.1 angular wavenumber, angular repetency */
378
+ attribute angularWavenumber: RepetencyValue :> scalarQuantities {
379
+ doc
380
+ /*
381
+ * source: item 12-9.1 angular wavenumber, angular repetency
382
+ * symbol(s): `k`, `q`
383
+ * application domain: condensed matter physics
384
+ * name: AngularWavenumber (specializes Repetency)
385
+ * quantity dimension: L^-1
386
+ * measurement unit(s): m^-1
387
+ * tensor order: 0
388
+ * definition: quotient of momentum (ISO 80000-4) and the reduced Planck constant (ISO 80000-1)
389
+ * remarks: The corresponding vector (ISO 80000-2) quantity is called wave vector (ISO 80000-3), expressed by: `vec(k) = vec(p)/ħ`, where `vec(p)` is the momentum (ISO 80000-4) of quasi free electrons in an electron gas, and `ħ` is the reduced Planck constant (ISO 80000-1); for phonons, its magnitude is `k = 2π/λ`, where `λ` is the wavelength (ISO 80000-3) of the lattice vibrations. When a distinction is needed between `k` and the symbol for the Boltzmann constant (ISO 80000-1), `k_B` can be used for the latter. When a distinction is needed, `q` should be used for phonons, and `k` for particles such as electrons and neutrons. The method of cut-off must be specified. In condensed matter physics, angular wavenumber is often called wavenumber.
390
+ */
391
+ }
392
+
393
+ alias angularRepetency for angularWavenumber;
394
+
395
+ /* ISO-80000-12 item 12-9.2 Fermi angular wavenumber, Fermi angular repetency */
396
+ attribute fermiAngularWavenumber: RepetencyValue :> scalarQuantities {
397
+ doc
398
+ /*
399
+ * source: item 12-9.2 Fermi angular wavenumber, Fermi angular repetency
400
+ * symbol(s): `k_F`
401
+ * application domain: generic
402
+ * name: FermiAngularWavenumber (specializes Repetency)
403
+ * quantity dimension: L^-1
404
+ * measurement unit(s): m^-1
405
+ * tensor order: 0
406
+ * definition: angular wavenumber (item 12-9.1) of electrons in states on the Fermi sphere
407
+ * remarks: In condensed matter physics, angular wavenumber is often called wavenumber.
408
+ */
409
+ }
410
+
411
+ alias fermiAngularRepetency for fermiAngularWavenumber;
412
+
413
+ /* ISO-80000-12 item 12-9.3 Debye angular wavenumber, Debye angular repetency */
414
+ attribute debyeAngularWavenumber: RepetencyValue :> scalarQuantities {
415
+ doc
416
+ /*
417
+ * source: item 12-9.3 Debye angular wavenumber, Debye angular repetency
418
+ * symbol(s): `q_D`
419
+ * application domain: generic
420
+ * name: DebyeAngularWavenumber (specializes Repetency)
421
+ * quantity dimension: L^-1
422
+ * measurement unit(s): m^-1
423
+ * tensor order: 0
424
+ * definition: cut-off angular wavenumber (item 12-9.1) in the Debye model of the vibrational spectrum of a solid
425
+ * remarks: The method of cut-off must be specified. In condensed matter physics, angular wavenumber is often called wavenumber.
426
+ */
427
+ }
428
+
429
+ alias debyeAngularRepetency for debyeAngularWavenumber;
430
+
431
+ /* ISO-80000-12 item 12-10 Debye angular frequency */
432
+ attribute debyeAngularFrequency: AngularFrequencyValue :> scalarQuantities {
433
+ doc
434
+ /*
435
+ * source: item 12-10 Debye angular frequency
436
+ * symbol(s): `ω_D`
437
+ * application domain: generic
438
+ * name: DebyeAngularFrequency (specializes AngularFrequency)
439
+ * quantity dimension: T^-1
440
+ * measurement unit(s): s^-1
441
+ * tensor order: 0
442
+ * definition: cut-off angular frequency (ISO 80000-3) in the Debye model of the vibrational spectrum of a solid
443
+ * remarks: The method of cut-off must be specified.
444
+ */
445
+ }
446
+
447
+ /* ISO-80000-12 item 12-11 Debye temperature */
448
+ attribute debyeTemperature: ThermodynamicTemperatureValue :> scalarQuantities {
449
+ doc
450
+ /*
451
+ * source: item 12-11 Debye temperature
452
+ * symbol(s): `Θ_D`
453
+ * application domain: generic
454
+ * name: DebyeTemperature (specializes ThermodynamicTemperature)
455
+ * quantity dimension: Θ^1
456
+ * measurement unit(s): K
457
+ * tensor order: 0
458
+ * definition: in the Debye model, quantity given by: `Θ_D = ħ*ω_D/k`, where `k` is the Boltzmann constant, (ISO 80000-1), `ħ` is the reduced Planck constant (ISO 80000-1), and `ω_D` is Debye angular frequency (item 12-10)
459
+ * remarks: A Debye temperature can also be defined by fitting a Debye model result to a certain quantity, for instance, the heat capacity at a certain temperature.
460
+ */
461
+ }
462
+
463
+ /* ISO-80000-12 item 12-12 density of vibrational states */
464
+ attribute def DensityOfVibrationalStatesValue :> ScalarQuantityValue {
465
+ doc
466
+ /*
467
+ * source: item 12-12 density of vibrational states
468
+ * symbol(s): `g`
469
+ * application domain: angular frequency
470
+ * name: DensityOfVibrationalStates
471
+ * quantity dimension: L^-3*T^1
472
+ * measurement unit(s): m^-3*s
473
+ * tensor order: 0
474
+ * definition: quotient of the number of vibrational modes in an infinitesimal interval of angular frequency (ISO 80000-3), and the product of the width of that interval and volume (ISO 80000-3)
475
+ * remarks: `g(ω) = n_ω = (dn(ω))/(dω)`, where `n(ω)` is the total number of vibrational modes per volume with angular frequency less than `ω`. The density of states may also be normalized in other ways instead of with respect to volume. See also item 12-16.
476
+ */
477
+ attribute :>> num: Real;
478
+ attribute :>> mRef: DensityOfVibrationalStatesUnit[1];
479
+ }
480
+
481
+ attribute densityOfVibrationalStates: DensityOfVibrationalStatesValue[*] nonunique :> scalarQuantities;
482
+
483
+ attribute def DensityOfVibrationalStatesUnit :> DerivedUnit {
484
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; }
485
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 1; }
486
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); }
487
+ }
488
+
489
+ /* ISO-80000-12 item 12-13 thermodynamic Grüneisen parameter */
490
+ attribute def 'ThermodynamicGrüneisenParameterValue' :> DimensionOneValue {
491
+ doc
492
+ /*
493
+ * source: item 12-13 thermodynamic Grüneisen parameter
494
+ * symbol(s): `γ_G`, `Γ_G`
495
+ * application domain: generic
496
+ * name: ThermodynamicGrüneisenParameter (specializes DimensionOneQuantity)
497
+ * quantity dimension: 1
498
+ * measurement unit(s): 1
499
+ * tensor order: 0
500
+ * definition: quantity given by: `γ_G = (α_V)/(κ_T c_V ρ)`, where `α_V` is cubic expansion coefficient (ISO 80000-5), `κ_T` is isothermal compressibility (ISO 80000-5), `c_V` is specific heat capacity at constant volume (ISO 80000-5), and `ρ` is mass density (ISO 80000-4)
501
+ * remarks: None.
502
+ */
503
+ }
504
+ attribute 'thermodynamicGrüneisenParameter': 'ThermodynamicGrüneisenParameterValue' :> scalarQuantities;
505
+
506
+ /* ISO-80000-12 item 12-14 Grüneisen parameter */
507
+ attribute def 'GrüneisenParameterValue' :> DimensionOneValue {
508
+ doc
509
+ /*
510
+ * source: item 12-14 Grüneisen parameter
511
+ * symbol(s): `γ`
512
+ * application domain: generic
513
+ * name: GrüneisenParameter (specializes DimensionOneQuantity)
514
+ * quantity dimension: 1
515
+ * measurement unit(s): 1
516
+ * tensor order: 0
517
+ * definition: quantity given by minus the partial differential quotient: `γ = -(del ln ω)/(del ln V)`, where `ω` is a lattice vibration frequency (ISO 80000-3), and `V` is volume (ISO 80000-3)
518
+ * remarks: `ω` can also refer to an average of the vibrational spectrum, for instance as represented by a Debye angular frequency (item 12-10).
519
+ */
520
+ }
521
+ attribute 'grüneisenParameter': 'GrüneisenParameterValue' :> scalarQuantities;
522
+
523
+ /* ISO-80000-12 item 12-15.1 mean free path of phonons */
524
+ attribute meanFreePathOfPhonons: LengthValue :> scalarQuantities {
525
+ doc
526
+ /*
527
+ * source: item 12-15.1 mean free path of phonons
528
+ * symbol(s): `l_p`
529
+ * application domain: generic
530
+ * name: MeanFreePathOfPhonons (specializes Length)
531
+ * quantity dimension: L^1
532
+ * measurement unit(s): m
533
+ * tensor order: 0
534
+ * definition: average distance (ISO 80000-3) that phonons travel between two successive interactions
535
+ * remarks: None.
536
+ */
537
+ }
538
+
539
+ /* ISO-80000-12 item 12-15.2 mean free path of electrons */
540
+ attribute meanFreePathOfElectrons: LengthValue :> scalarQuantities {
541
+ doc
542
+ /*
543
+ * source: item 12-15.2 mean free path of electrons
544
+ * symbol(s): `l_e`
545
+ * application domain: generic
546
+ * name: MeanFreePathOfElectrons (specializes Length)
547
+ * quantity dimension: L^1
548
+ * measurement unit(s): m
549
+ * tensor order: 0
550
+ * definition: average distance (ISO 80000-3) that electrons travel between two successive interactions
551
+ * remarks: None.
552
+ */
553
+ }
554
+
555
+ /* ISO-80000-12 item 12-16 energy density of states */
556
+ attribute def EnergyDensityOfStatesValue :> ScalarQuantityValue {
557
+ doc
558
+ /*
559
+ * source: item 12-16 energy density of states
560
+ * symbol(s): `n_E(E)`, `ρ(E)`
561
+ * application domain: generic
562
+ * name: EnergyDensityOfStates
563
+ * quantity dimension: L^-5*M^-1*T^2
564
+ * measurement unit(s): J^-1*m^-3*eV^-1*m^-3, kg^-1*m^-5*s^2
565
+ * tensor order: 0
566
+ * definition: quantity given by the differential quotient with respect to energy: `n_E(E) = (dn(E))/(dE)`, where `n_E(E)` is the total number of one-electron states per volume (ISO 80000-3) with energy less than `E` (ISO 80000-5)
567
+ * remarks: Density of states refers to electrons or other entities, e.g. phonons. It may be normalized in other ways instead of with respect to volume, e.g. with respect to amount of substance. See also item 12-12.
568
+ */
569
+ attribute :>> num: Real;
570
+ attribute :>> mRef: EnergyDensityOfStatesUnit[1];
571
+ }
572
+
573
+ attribute energyDensityOfStates: EnergyDensityOfStatesValue[*] nonunique :> scalarQuantities;
574
+
575
+ attribute def EnergyDensityOfStatesUnit :> DerivedUnit {
576
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -5; }
577
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; }
578
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 2; }
579
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
580
+ }
581
+
582
+ /* ISO-80000-12 item 12-17 residual resistivity */
583
+ attribute residualResistivity: ResistivityValue :> scalarQuantities {
584
+ doc
585
+ /*
586
+ * source: item 12-17 residual resistivity
587
+ * symbol(s): `ρ_0`
588
+ * application domain: generic
589
+ * name: ResidualResistivity (specializes Resistivity)
590
+ * quantity dimension: L^3*M^1*T^-3*I^-2
591
+ * measurement unit(s): Ω*m, kg*m^3*s^-3*A^-2
592
+ * tensor order: 0
593
+ * definition: for metals, the resistivity (IEC 80000-6) extrapolated to zero thermodynamic temperature (ISO 80000-5)
594
+ * remarks: None.
595
+ */
596
+ }
597
+
598
+ /* ISO-80000-12 item 12-18 Lorenz coefficient */
599
+ attribute def LorenzCoefficientValue :> ScalarQuantityValue {
600
+ doc
601
+ /*
602
+ * source: item 12-18 Lorenz coefficient
603
+ * symbol(s): `L`
604
+ * application domain: generic
605
+ * name: LorenzCoefficient
606
+ * quantity dimension: L^4*M^2*T^-6*I^-2*Θ^-2
607
+ * measurement unit(s): V^2/K^2, kg^2*m^4*s^-6*A^-2*K^-2
608
+ * tensor order: 0
609
+ * definition: quotient of thermal conductivity (ISO 80000-5), and the product of electric conductivity (IEC 80000-6) and thermodynamic temperature (ISO 80000-3)
610
+ * remarks: The Lorenz coefficient can be expressed by `L = λ/(σT)`, where `λ` is thermal conductivity (ISO 80000-5), `σ` is electric conductivity (IEC 80000-6), and `T` is thermodynamic temperature (ISO 80000-5).
611
+ */
612
+ attribute :>> num: Real;
613
+ attribute :>> mRef: LorenzCoefficientUnit[1];
614
+ }
615
+
616
+ attribute lorenzCoefficient: LorenzCoefficientValue[*] nonunique :> scalarQuantities;
617
+
618
+ attribute def LorenzCoefficientUnit :> DerivedUnit {
619
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 4; }
620
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 2; }
621
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -6; }
622
+ private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -2; }
623
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -2; }
624
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF, thermodynamicTemperaturePF); }
625
+ }
626
+
627
+ /* ISO-80000-12 item 12-19 Hall coefficient */
628
+ attribute def HallCoefficientValue :> ScalarQuantityValue {
629
+ doc
630
+ /*
631
+ * source: item 12-19 Hall coefficient
632
+ * symbol(s): `R_H`, `A_H`
633
+ * application domain: generic
634
+ * name: HallCoefficient
635
+ * quantity dimension: 1
636
+ * measurement unit(s): m^3/C*m^3*s^-1*A^-1
637
+ * tensor order: 0
638
+ * definition: in an isotropic conductor, relation between electric field strength, `vec(E)`, (IEC 80000-6) and electric current density, `vec(J)`, (IEC 80000-6) expressed as: `vec(E) = ρ vec(J) + R_H (vec(B) xx vec(J))`, where `ρ` is resistivity (IEC 80000-6), and `vec(B)` is magnetic flux density (IEC 80000-6)
639
+ * remarks: None.
640
+ */
641
+ attribute :>> num: Real;
642
+ attribute :>> mRef: HallCoefficientUnit[1];
643
+ }
644
+
645
+ attribute hallCoefficient: HallCoefficientValue[*] nonunique :> scalarQuantities;
646
+
647
+ attribute def HallCoefficientUnit :> DimensionOneUnit {
648
+ }
649
+
650
+ /* ISO-80000-12 item 12-20 thermoelectric voltage (between substances a and b) */
651
+ attribute thermoelectricVoltageBetweenSubstancesAAndB: ElectricPotentialDifferenceValue :> scalarQuantities {
652
+ doc
653
+ /*
654
+ * source: item 12-20 thermoelectric voltage (between substances a and b)
655
+ * symbol(s): `E_(ab)`
656
+ * application domain: generic
657
+ * name: ThermoelectricVoltageBetweenSubstancesAAndB (specializes ElectricPotentialDifference)
658
+ * quantity dimension: L^2*M^1*T^-3*I^-1
659
+ * measurement unit(s): V, kg*m^2*s^-3*A^-1
660
+ * tensor order: 0
661
+ * definition: voltage (IEC 80000-6) between substances `a` and `b` caused by the thermoelectric effect
662
+ * remarks: None.
663
+ */
664
+ }
665
+
666
+ /* ISO-80000-12 item 12-21 Seebeck coefficient (for substances a and b) */
667
+ attribute def SeebeckCoefficientForSubstancesAAndBValue :> ScalarQuantityValue {
668
+ doc
669
+ /*
670
+ * source: item 12-21 Seebeck coefficient (for substances a and b)
671
+ * symbol(s): `S_(ab)`
672
+ * application domain: generic
673
+ * name: SeebeckCoefficientForSubstancesAAndB
674
+ * quantity dimension: L^2*M^1*T^-3*I^-1*Θ^-1
675
+ * measurement unit(s): V/K, kg*m^2*s^-3*A^-1*K^-1
676
+ * tensor order: 0
677
+ * definition: differential quotient of thermoelectric voltage with respect to thermodynamic temperature: `S_(ab) = (dE_(ab))/(dT)`, where `E_(ab)` is the thermoelectric voltage between substances `a` and `b` (item 12-20) and `T` is thermodynamic temperature (ISO 80000-5)
678
+ * remarks: This term is also called "thermoelectric power".
679
+ */
680
+ attribute :>> num: Real;
681
+ attribute :>> mRef: SeebeckCoefficientForSubstancesAAndBUnit[1];
682
+ }
683
+
684
+ attribute seebeckCoefficientForSubstancesAAndB: SeebeckCoefficientForSubstancesAAndBValue[*] nonunique :> scalarQuantities;
685
+
686
+ attribute def SeebeckCoefficientForSubstancesAAndBUnit :> DerivedUnit {
687
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
688
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
689
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; }
690
+ private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -1; }
691
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; }
692
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF, thermodynamicTemperaturePF); }
693
+ }
694
+
695
+ /* ISO-80000-12 item 12-22 Peltier coefficient (for substances a and b) */
696
+ attribute peltierCoefficientForSubstancesAAndB: ElectricPotentialDifferenceValue :> scalarQuantities {
697
+ doc
698
+ /*
699
+ * source: item 12-22 Peltier coefficient (for substances a and b)
700
+ * symbol(s): `Π_(ab)`
701
+ * application domain: generic
702
+ * name: PeltierCoefficientForSubstancesAAndB (specializes ElectricPotentialDifference)
703
+ * quantity dimension: L^2*M^1*T^-3*I^-1
704
+ * measurement unit(s): V, kg*m^2*s^-3*A^-1
705
+ * tensor order: 0
706
+ * definition: quotient of Peltier heat power (ISO 80000-5) developed at a junction, and the electric current (IEC 80000-6) flowing from substance `a` to substance `b`
707
+ * remarks: `Π_(ab) = Π_a - Π_b`, where `Π_a` and `Π_b` are the Peltier coefficients of substances `a` and `b`, respectively.
708
+ */
709
+ }
710
+
711
+ /* ISO-80000-12 item 12-23 Thomson coefficient */
712
+ attribute def ThomsonCoefficientValue :> ScalarQuantityValue {
713
+ doc
714
+ /*
715
+ * source: item 12-23 Thomson coefficient
716
+ * symbol(s): `μ`
717
+ * application domain: generic
718
+ * name: ThomsonCoefficient
719
+ * quantity dimension: L^2*M^1*T^-3*I^-1*Θ^-1
720
+ * measurement unit(s): V/K, kg*m^2*s^-3*A^-1*K^-1
721
+ * tensor order: 0
722
+ * definition: quotient of Thomson heat power (ISO 80000-5) developed, and the electric current (IEC 80000-6) and temperature (ISO 80000-5) difference
723
+ * remarks: `μ` is positive if heat is developed when the temperature decreases in the direction of the electric current.
724
+ */
725
+ attribute :>> num: Real;
726
+ attribute :>> mRef: ThomsonCoefficientUnit[1];
727
+ }
728
+
729
+ attribute thomsonCoefficient: ThomsonCoefficientValue[*] nonunique :> scalarQuantities;
730
+
731
+ attribute def ThomsonCoefficientUnit :> DerivedUnit {
732
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
733
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
734
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; }
735
+ private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = -1; }
736
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; }
737
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, electricCurrentPF, thermodynamicTemperaturePF); }
738
+ }
739
+
740
+ /* ISO-80000-12 item 12-24.1 work function */
741
+ attribute workFunction: EnergyValue :> scalarQuantities {
742
+ doc
743
+ /*
744
+ * source: item 12-24.1 work function
745
+ * symbol(s): `ϕ`
746
+ * application domain: generic
747
+ * name: WorkFunction (specializes Energy)
748
+ * quantity dimension: L^2*M^1*T^-2
749
+ * measurement unit(s): J, eV, kg*m^2*s^-2
750
+ * tensor order: 0
751
+ * definition: difference between energy (ISO 80000-5) of an electron at rest at infinity and the Fermi energy (item 12-27.1)
752
+ * remarks: The term "energy level" is often used for the state of the electron, not only for its energy. The contact potential difference between substances `a` and `b` is given by `V_a - V_b = (ϕ_a - ϕ_b)/e`, where `e` is the elementary charge (ISO 80000-1). A set of energy levels, the energies of which occupy an interval practically continuously, is called an energy band. In semi-conductors `E_d` and `E_a` are used for donors and acceptors, respectively.
753
+ */
754
+ }
755
+
756
+ /* ISO-80000-12 item 12-24.2 ionization energy */
757
+ attribute ionizationEnergy: EnergyValue :> scalarQuantities {
758
+ doc
759
+ /*
760
+ * source: item 12-24.2 ionization energy
761
+ * symbol(s): `E_i`
762
+ * application domain: generic
763
+ * name: IonizationEnergy (specializes Energy)
764
+ * quantity dimension: L^2*M^1*T^-2
765
+ * measurement unit(s): J, eV, kg*m^2*s^-2
766
+ * tensor order: 0
767
+ * definition: difference between energy (ISO 80000-5) of an electron at rest at infinity and a certain energy level which is the energy of an electron in the interior of a substance
768
+ * remarks: None.
769
+ */
770
+ }
771
+
772
+ /* ISO-80000-12 item 12-25 electron affinity */
773
+ attribute electronAffinity: EnergyValue :> scalarQuantities {
774
+ doc
775
+ /*
776
+ * source: item 12-25 electron affinity
777
+ * symbol(s): `χ`
778
+ * application domain: condensed matter physics
779
+ * name: ElectronAffinity (specializes Energy)
780
+ * quantity dimension: L^2*M^1*T^-2
781
+ * measurement unit(s): J, eV, kg*m^2*s^-2
782
+ * tensor order: 0
783
+ * definition: energy (ISO 80000-5) difference between an electron at rest at infinity and an electron at the lowest level of the conduction band in an insulator or semiconductor
784
+ * remarks: None.
785
+ */
786
+ }
787
+
788
+ /* ISO-80000-12 item 12-26 Richardson constant */
789
+ attribute def RichardsonConstantValue :> ScalarQuantityValue {
790
+ doc
791
+ /*
792
+ * source: item 12-26 Richardson constant
793
+ * symbol(s): `A`
794
+ * application domain: generic
795
+ * name: RichardsonConstant
796
+ * quantity dimension: L^-2*I^1*Θ^-2
797
+ * measurement unit(s): A*m^-2*K^-2
798
+ * tensor order: 0
799
+ * definition: parameter in the expression for the thermionic emission current density `J` (IEC 80000-6) for a metal in terms of the thermodynamic temperature `T` (ISO 80000-5) and work function `ϕ`, (item 12-24.1): `J = AT^2 exp(ϕ/(kT))`, where `k` is the Boltzmann constant (ISO 80000-1)
800
+ * remarks: None.
801
+ */
802
+ attribute :>> num: Real;
803
+ attribute :>> mRef: RichardsonConstantUnit[1];
804
+ }
805
+
806
+ attribute richardsonConstant: RichardsonConstantValue[*] nonunique :> scalarQuantities;
807
+
808
+ attribute def RichardsonConstantUnit :> DerivedUnit {
809
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; }
810
+ private attribute electricCurrentPF: QuantityPowerFactor[1] { :>> quantity = isq.I; :>> exponent = 1; }
811
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -2; }
812
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, electricCurrentPF, thermodynamicTemperaturePF); }
813
+ }
814
+
815
+ /* ISO-80000-12 item 12-27.1 Fermi energy */
816
+ attribute fermiEnergy: EnergyValue :> scalarQuantities {
817
+ doc
818
+ /*
819
+ * source: item 12-27.1 Fermi energy
820
+ * symbol(s): `E_F`
821
+ * application domain: generic
822
+ * name: FermiEnergy (specializes Energy)
823
+ * quantity dimension: L^2*M^1*T^-2
824
+ * measurement unit(s): J, eV, kg*m^2*s^-2
825
+ * tensor order: 0
826
+ * definition: in a metal, highest occupied energy level at zero thermodynamic temperature (ISO 80000-5), where energy level means the energy (ISO 80000-5) of an electron in the interior of a substance
827
+ * remarks: The term "energy level" is often used for the state of the electron, not only for its energy. At `T = 0 [K]`, `E_F` is equal to the chemical potential per electron. In condensed matter physics, the reference level for the energy is sometimes chosen so that, for instance, `E_F = 0`.
828
+ */
829
+ }
830
+
831
+ /* ISO-80000-12 item 12-27.2 gap energy */
832
+ attribute gapEnergy: EnergyValue :> scalarQuantities {
833
+ doc
834
+ /*
835
+ * source: item 12-27.2 gap energy
836
+ * symbol(s): `E_g`
837
+ * application domain: generic
838
+ * name: GapEnergy (specializes Energy)
839
+ * quantity dimension: L^2*M^1*T^-2
840
+ * measurement unit(s): J, eV, kg*m^2*s^-2
841
+ * tensor order: 0
842
+ * definition: difference in energy (ISO 80000-5) between the lowest level of conduction band and the highest level of valence band at zero thermodynamic temperature (ISO 80000-5)
843
+ * remarks: None.
844
+ */
845
+ }
846
+
847
+ /* ISO-80000-12 item 12-28 Fermi temperature */
848
+ attribute fermiTemperature: ThermodynamicTemperatureValue :> scalarQuantities {
849
+ doc
850
+ /*
851
+ * source: item 12-28 Fermi temperature
852
+ * symbol(s): `T_F`
853
+ * application domain: generic
854
+ * name: FermiTemperature (specializes ThermodynamicTemperature)
855
+ * quantity dimension: Θ^1
856
+ * measurement unit(s): K
857
+ * tensor order: 0
858
+ * definition: in the free electron model, the Fermi energy (item 12-27.1) divided by the Boltzmann constant (ISO 80000-1)
859
+ * remarks: The Fermi temperature is expressed by: `T_F = E_F/k`, where `E_F` is Fermi energy (item 12-27.1) and `k` is the Boltzmann constant (ISO 80000-1). `E_F` is relative to the lowest occupied state.
860
+ */
861
+ }
862
+
863
+ /* ISO-80000-12 item 12-29.1 electron density */
864
+ attribute def ElectronDensityValue :> ScalarQuantityValue {
865
+ doc
866
+ /*
867
+ * source: item 12-29.1 electron density
868
+ * symbol(s): `n`
869
+ * application domain: generic
870
+ * name: ElectronDensity
871
+ * quantity dimension: L^-3
872
+ * measurement unit(s): m^-3
873
+ * tensor order: 0
874
+ * definition: quotient of number of electrons in conduction band and volume (ISO 80000-3)
875
+ * remarks: Subscripts `n` and `p` or `-` and `+` are often used to denote electrons and holes, respectively. `n_n` and `n_p` are also used for electron densities, and `p_n` and `p_p` for hole densities, in `n`-type and `p`-type regions, respectively, of a `n`-`p` junction.
876
+ */
877
+ attribute :>> num: Real;
878
+ attribute :>> mRef: ElectronDensityUnit[1];
879
+ }
880
+
881
+ attribute electronDensity: ElectronDensityValue[*] nonunique :> scalarQuantities;
882
+
883
+ attribute def ElectronDensityUnit :> DerivedUnit {
884
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; }
885
+ attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; }
886
+ }
887
+
888
+ /* ISO-80000-12 item 12-29.2 hole density */
889
+ attribute def HoleDensityValue :> ScalarQuantityValue {
890
+ doc
891
+ /*
892
+ * source: item 12-29.2 hole density
893
+ * symbol(s): `p`
894
+ * application domain: generic
895
+ * name: HoleDensity
896
+ * quantity dimension: L^-3
897
+ * measurement unit(s): m^-3
898
+ * tensor order: 0
899
+ * definition: quotient of number of holes in valence band and volume (ISO 80000-3)
900
+ * remarks: Subscripts `n` and `p` or `-` and `+` are often used to denote electrons and holes, respectively. `n_n` and `n_p` are also used for electron densities, and `p_n` and `p_p` for hole densities, in `n`-type and `p`-type regions, respectively, of a `n`-`p` junction.
901
+ */
902
+ attribute :>> num: Real;
903
+ attribute :>> mRef: HoleDensityUnit[1];
904
+ }
905
+
906
+ attribute holeDensity: HoleDensityValue[*] nonunique :> scalarQuantities;
907
+
908
+ attribute def HoleDensityUnit :> DerivedUnit {
909
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; }
910
+ attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; }
911
+ }
912
+
913
+ /* ISO-80000-12 item 12-29.3 intrinsic carrier density */
914
+ attribute def IntrinsicCarrierDensityValue :> ScalarQuantityValue {
915
+ doc
916
+ /*
917
+ * source: item 12-29.3 intrinsic carrier density
918
+ * symbol(s): `n_i`
919
+ * application domain: generic
920
+ * name: IntrinsicCarrierDensity
921
+ * quantity dimension: L^-3
922
+ * measurement unit(s): m^-3
923
+ * tensor order: 0
924
+ * definition: quantity given by: `n_i = sqrt(n p)`, where `n` is electron density (item 12-29.1), and `p` is hole
925
+ * remarks: Subscripts `n` and `p` or `-` and `+` are often used to denote electrons and holes, respectively. `n_n` and `n_p` are also used for electron densities, and `p_n` and `p_p` for hole densities, in `n`-type and `p`-type regions, respectively, of a `n`-`p` junction.
926
+ */
927
+ attribute :>> num: Real;
928
+ attribute :>> mRef: IntrinsicCarrierDensityUnit[1];
929
+ }
930
+
931
+ attribute intrinsicCarrierDensity: IntrinsicCarrierDensityValue[*] nonunique :> scalarQuantities;
932
+
933
+ attribute def IntrinsicCarrierDensityUnit :> DerivedUnit {
934
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; }
935
+ attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; }
936
+ }
937
+
938
+ /* ISO-80000-12 item 12-29.4 donor density */
939
+ attribute def DonorDensityValue :> ScalarQuantityValue {
940
+ doc
941
+ /*
942
+ * source: item 12-29.4 donor density
943
+ * symbol(s): `n_d`
944
+ * application domain: generic
945
+ * name: DonorDensity
946
+ * quantity dimension: L^-3
947
+ * measurement unit(s): m^-3
948
+ * tensor order: 0
949
+ * definition: quotient of number of donor levels and volume (ISO 80000-3)
950
+ * remarks: None.
951
+ */
952
+ attribute :>> num: Real;
953
+ attribute :>> mRef: DonorDensityUnit[1];
954
+ }
955
+
956
+ attribute donorDensity: DonorDensityValue[*] nonunique :> scalarQuantities;
957
+
958
+ attribute def DonorDensityUnit :> DerivedUnit {
959
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; }
960
+ attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; }
961
+ }
962
+
963
+ /* ISO-80000-12 item 12-29.5 acceptor density */
964
+ attribute def AcceptorDensityValue :> ScalarQuantityValue {
965
+ doc
966
+ /*
967
+ * source: item 12-29.5 acceptor density
968
+ * symbol(s): `n_a`
969
+ * application domain: generic
970
+ * name: AcceptorDensity
971
+ * quantity dimension: L^-3
972
+ * measurement unit(s): m^-3
973
+ * tensor order: 0
974
+ * definition: quotient of number of acceptor levels and volume (ISO 80000-3)
975
+ * remarks: None.
976
+ */
977
+ attribute :>> num: Real;
978
+ attribute :>> mRef: AcceptorDensityUnit[1];
979
+ }
980
+
981
+ attribute acceptorDensity: AcceptorDensityValue[*] nonunique :> scalarQuantities;
982
+
983
+ attribute def AcceptorDensityUnit :> DerivedUnit {
984
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; }
985
+ attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; }
986
+ }
987
+
988
+ /* ISO-80000-12 item 12-30 effective mass */
989
+ attribute effectiveMass: MassValue :> scalarQuantities {
990
+ doc
991
+ /*
992
+ * source: item 12-30 effective mass
993
+ * symbol(s): `m"*"`
994
+ * application domain: generic
995
+ * name: EffectiveMass (specializes Mass)
996
+ * quantity dimension: M^1
997
+ * measurement unit(s): kg
998
+ * tensor order: 0
999
+ * definition: quantity given by: `m^"*" = (ħ^2 k) / ((dε)/(dk))`, where `k` is wavenumber (ISO 80000-3), `ε` is the energy (ISO 80000-5) of an electron in the interior of a substance, and `ħ` is the reduced Planck constant (ISO 80000-1)
1000
+ * remarks: When `k` refers to a state where `ε` has an extremum, `m"*" = (ħ^2 k) / ((d^2ε)/(dk^2))`. The effective mass can be generalized to refer to an anisotropic system with `ε = ε(k)`.
1001
+ */
1002
+ }
1003
+
1004
+ /* ISO-80000-12 item 12-31 mobility ratio */
1005
+ attribute def MobilityRatioValue :> DimensionOneValue {
1006
+ doc
1007
+ /*
1008
+ * source: item 12-31 mobility ratio
1009
+ * symbol(s): `b`
1010
+ * application domain: generic
1011
+ * name: MobilityRatio (specializes DimensionOneQuantity)
1012
+ * quantity dimension: 1
1013
+ * measurement unit(s): 1
1014
+ * tensor order: 0
1015
+ * definition: quotient of mobilities (ISO 80000-10) of electrons and holes, respectively
1016
+ * remarks: The mobility ratio can be expressed by: `b = μ_n/μ_p`, where `μ_n` and `μ_p` are mobilities (ISO 80000-10) for electrons and holes, respectively.
1017
+ */
1018
+ }
1019
+ attribute mobilityRatio: MobilityRatioValue :> scalarQuantities;
1020
+
1021
+ /* ISO-80000-12 item 12-32.1 relaxation time */
1022
+ attribute relaxationTime: DurationValue :> scalarQuantities {
1023
+ doc
1024
+ /*
1025
+ * source: item 12-32.1 relaxation time
1026
+ * symbol(s): `τ`
1027
+ * application domain: condensed matter physics
1028
+ * name: RelaxationTime (specializes Duration)
1029
+ * quantity dimension: T^1
1030
+ * measurement unit(s): s
1031
+ * tensor order: 0
1032
+ * definition: time constant (ISO 80000-3) for scattering, trapping or annihilation of charge carriers, phonons or other quasiparticles
1033
+ * remarks: For electrons in metals, `τ = l/v_F`, where `l` is mean free path (item 12-15.2) and `v_F` is speed (ISO 80000-3) of electrons on the Fermi surface.
1034
+ */
1035
+ }
1036
+
1037
+ /* ISO-80000-12 item 12-32.2 carrier lifetime */
1038
+ attribute carrierLifetime: DurationValue :> scalarQuantities {
1039
+ doc
1040
+ /*
1041
+ * source: item 12-32.2 carrier lifetime
1042
+ * symbol(s): `τ`, `τ_n`, `τ_p`
1043
+ * application domain: semiconductors
1044
+ * name: CarrierLifetime (specializes Duration)
1045
+ * quantity dimension: T^1
1046
+ * measurement unit(s): s
1047
+ * tensor order: 0
1048
+ * definition: time constant (ISO 80000-3) for recombination or trapping of minority charge carriers in semiconductors
1049
+ * remarks: Indices "n" and "p" denote negative and positive charge carriers, respectively. Positive charge carriers can also be holes.
1050
+ */
1051
+ }
1052
+
1053
+ /* ISO-80000-12 item 12-33 diffusion length */
1054
+ attribute diffusionLengthForCondensedMatterPhysics: LengthValue :> scalarQuantities {
1055
+ doc
1056
+ /*
1057
+ * source: item 12-33 diffusion length
1058
+ * symbol(s): `L`, `L_n`, `L_p`
1059
+ * application domain: condensed matter physics
1060
+ * name: DiffusionLength (specializes Length)
1061
+ * quantity dimension: L^1
1062
+ * measurement unit(s): m
1063
+ * tensor order: 0
1064
+ * definition: square root of the product of diffusion coefficient (ISO 80000-10) and lifetime (ISO 80000-10)
1065
+ * remarks: The diffusion length can be expressed by: `L = sqrt(Dτ)`, where `D` is the diffusion coefficient (ISO 80000-9) and `τ` is lifetime (ISO 80000-3).
1066
+ */
1067
+ }
1068
+
1069
+ /* ISO-80000-12 item 12-34 exchange integral */
1070
+ attribute exchangeIntegral: EnergyValue :> scalarQuantities {
1071
+ doc
1072
+ /*
1073
+ * source: item 12-34 exchange integral
1074
+ * symbol(s): `K`, `J`
1075
+ * application domain: generic
1076
+ * name: ExchangeIntegral (specializes Energy)
1077
+ * quantity dimension: L^2*M^1*T^-2
1078
+ * measurement unit(s): J, eV, kg*m^2*s^-2
1079
+ * tensor order: 0
1080
+ * definition: constituent of the interaction energy (ISO 80000-5) between the spins of adjacent electrons in matter arising from the overlap of electron state functions
1081
+ * remarks: None.
1082
+ */
1083
+ }
1084
+
1085
+ /* ISO-80000-12 item 12-35.1 Curie temperature */
1086
+ attribute curieTemperature: ThermodynamicTemperatureValue :> scalarQuantities {
1087
+ doc
1088
+ /*
1089
+ * source: item 12-35.1 Curie temperature
1090
+ * symbol(s): `T_C`
1091
+ * application domain: generic
1092
+ * name: CurieTemperature (specializes ThermodynamicTemperature)
1093
+ * quantity dimension: Θ^1
1094
+ * measurement unit(s): K
1095
+ * tensor order: 0
1096
+ * definition: critical thermodynamic temperature (ISO 80000-5) of a ferromagnet
1097
+ * remarks: `T_(cr)` is used for critical thermodynamic temperature in general.
1098
+ */
1099
+ }
1100
+
1101
+ /* ISO-80000-12 item 12-35.2 Néel temperature */
1102
+ attribute 'néelTemperature': ThermodynamicTemperatureValue :> scalarQuantities {
1103
+ doc
1104
+ /*
1105
+ * source: item 12-35.2 Néel temperature
1106
+ * symbol(s): `T_N`
1107
+ * application domain: generic
1108
+ * name: NéelTemperature (specializes ThermodynamicTemperature)
1109
+ * quantity dimension: Θ^1
1110
+ * measurement unit(s): K
1111
+ * tensor order: 0
1112
+ * definition: critical thermodynamic temperature (ISO 80000-5) of an antiferromagnet
1113
+ * remarks: None.
1114
+ */
1115
+ }
1116
+
1117
+ /* ISO-80000-12 item 12-35.3 superconduction transition temperature */
1118
+ attribute superconductionTransitionTemperature: ThermodynamicTemperatureValue :> scalarQuantities {
1119
+ doc
1120
+ /*
1121
+ * source: item 12-35.3 superconduction transition temperature
1122
+ * symbol(s): `T_c`
1123
+ * application domain: generic
1124
+ * name: SuperconductionTransitionTemperature (specializes ThermodynamicTemperature)
1125
+ * quantity dimension: Θ^1
1126
+ * measurement unit(s): K
1127
+ * tensor order: 0
1128
+ * definition: critical thermodynamic temperature (ISO 80000-5) of a superconductor
1129
+ * remarks: None.
1130
+ */
1131
+ }
1132
+
1133
+ /* ISO-80000-12 item 12-36.1 thermodynamic critical magnetic flux density */
1134
+ attribute thermodynamicCriticalMagneticFluxDensity: MagneticFluxDensityValue :> scalarQuantities {
1135
+ doc
1136
+ /*
1137
+ * source: item 12-36.1 thermodynamic critical magnetic flux density
1138
+ * symbol(s): `B_c`
1139
+ * application domain: generic
1140
+ * name: ThermodynamicCriticalMagneticFluxDensity (specializes MagneticFluxDensity)
1141
+ * quantity dimension: M^1*T^-2*I^-1
1142
+ * measurement unit(s): T, kg*s^-2*A^-1
1143
+ * tensor order: 0
1144
+ * definition: quantity given by: `B_c = sqrt((2μ_0 (G_n - G_s))/V)`, where `G_n` and `G_s` are the Gibbs energies (ISO 80000-5) at zero magnetic flux density (IEC 80000-6) in a normal conductor and superconductor, respectively, `μ_0` is the magnetic constant (IEC 80000-6), and `V` is volume (ISO 80000-3)
1145
+ * remarks: In type I superconductors, `B_c` is the critical magnetic flux density for disappearance of superconductivity. The symbol `B_(c3)` is used for the critical magnetic flux density for disappearance of surface superconductivity.
1146
+ */
1147
+ }
1148
+
1149
+ /* ISO-80000-12 item 12-36.2 lower critical magnetic flux density */
1150
+ attribute lowerCriticalMagneticFluxDensity: MagneticFluxDensityValue :> scalarQuantities {
1151
+ doc
1152
+ /*
1153
+ * source: item 12-36.2 lower critical magnetic flux density
1154
+ * symbol(s): `B_(c1)`
1155
+ * application domain: generic
1156
+ * name: LowerCriticalMagneticFluxDensity (specializes MagneticFluxDensity)
1157
+ * quantity dimension: M^1*T^-2*I^-1
1158
+ * measurement unit(s): T, kg*s^-2*A^-1
1159
+ * tensor order: 0
1160
+ * definition: for type II superconductors, the threshold magnetic flux density (IEC 80000-6) for magnetic flux (IEC 80000-6) entering the superconductor
1161
+ * remarks: None.
1162
+ */
1163
+ }
1164
+
1165
+ /* ISO-80000-12 item 12-36.3 upper critical magnetic flux density */
1166
+ attribute upperCriticalMagneticFluxDensity: MagneticFluxDensityValue :> scalarQuantities {
1167
+ doc
1168
+ /*
1169
+ * source: item 12-36.3 upper critical magnetic flux density
1170
+ * symbol(s): `B_(c2)`
1171
+ * application domain: generic
1172
+ * name: UpperCriticalMagneticFluxDensity (specializes MagneticFluxDensity)
1173
+ * quantity dimension: M^1*T^-2*I^-1
1174
+ * measurement unit(s): T, kg*s^-2*A^-1
1175
+ * tensor order: 0
1176
+ * definition: for type II superconductors, the threshold magnetic flux density (IEC 80000-6) for disappearance of bulk superconductivity
1177
+ * remarks: None.
1178
+ */
1179
+ }
1180
+
1181
+ /* ISO-80000-12 item 12-37 superconductor energy gap */
1182
+ attribute superconductorEnergyGap: EnergyValue :> scalarQuantities {
1183
+ doc
1184
+ /*
1185
+ * source: item 12-37 superconductor energy gap
1186
+ * symbol(s): `Δ`
1187
+ * application domain: generic
1188
+ * name: SuperconductorEnergyGap (specializes Energy)
1189
+ * quantity dimension: L^2*M^1*T^-2
1190
+ * measurement unit(s): J, eV, kg*m^2*s^-2
1191
+ * tensor order: 0
1192
+ * definition: width of the forbidden energy band (item 12-24.2) in a superconductor
1193
+ * remarks: None.
1194
+ */
1195
+ }
1196
+
1197
+ /* ISO-80000-12 item 12-38.1 London penetration depth */
1198
+ attribute londonPenetrationDepth: LengthValue :> scalarQuantities {
1199
+ doc
1200
+ /*
1201
+ * source: item 12-38.1 London penetration depth
1202
+ * symbol(s): `λ_L`
1203
+ * application domain: generic
1204
+ * name: LondonPenetrationDepth (specializes Length)
1205
+ * quantity dimension: L^1
1206
+ * measurement unit(s): m
1207
+ * tensor order: 0
1208
+ * definition: distance (ISO 80000-3) a magnetic field penetrates the plane surface of a semi-finite superconductor according to the expression: `B(x) = B(0) exp(-x/λ_L)`, where `B` is magnetic flux density (IEC 80000-6) and `x` is distance (ISO 80000-3) from the surface
1209
+ * remarks: None.
1210
+ */
1211
+ }
1212
+
1213
+ /* ISO-80000-12 item 12-38.2 coherence length */
1214
+ attribute coherenceLength: LengthValue :> scalarQuantities {
1215
+ doc
1216
+ /*
1217
+ * source: item 12-38.2 coherence length
1218
+ * symbol(s): `ξ`
1219
+ * application domain: generic
1220
+ * name: CoherenceLength (specializes Length)
1221
+ * quantity dimension: L^1
1222
+ * measurement unit(s): m
1223
+ * tensor order: 0
1224
+ * definition: distance (ISO 80000-3) in a superconductor over which the effect of a perturbation is appreciable at zero thermodynamic temperature (ISO 80000-5)
1225
+ * remarks: None.
1226
+ */
1227
+ }
1228
+
1229
+ }
src/sysml.library/Domain Libraries/Quantities and Units/ISQElectromagnetism.sysml ADDED
The diff for this file is too large to render. See raw diff
 
src/sysml.library/Domain Libraries/Quantities and Units/ISQInformation.sysml ADDED
@@ -0,0 +1,958 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package ISQInformation {
2
+ doc
3
+ /*
4
+ * International System of Quantities and Units
5
+ * Generated on 2022-08-07T14:44:27Z from standard IEC-80000-13:2008 "Information science and technology"
6
+ * see also https://www.iso.org/obp/ui/#iso:std:iec:80000:-13:ed-1:v1:en
7
+ *
8
+ * Note 1: In documentation comments, AsciiMath notation (see http://asciimath.org/) is used for mathematical concepts,
9
+ * with Greek letters in Unicode encoding. In running text, AsciiMath is placed between backticks.
10
+ * Note 2: For vector and tensor quantities currently the unit and quantity value type for their (scalar) magnitude is
11
+ * defined, as well as their typical Cartesian 3d VectorMeasurementReference (i.e. coordinate system)
12
+ * or TensorMeasurementReference.
13
+ */
14
+
15
+ private import ScalarValues::Real;
16
+ private import Quantities::*;
17
+ private import MeasurementReferences::*;
18
+ private import ISQBase::*;
19
+
20
+ /* Quantity definitions referenced from other ISQ packages */
21
+ private import ISQMechanics::PowerValue;
22
+ private import ISQSpaceTime::FrequencyValue;
23
+ private import ISQThermodynamics::EnergyValue;
24
+
25
+ /* IEC-80000-13 item 13-1 traffic intensity */
26
+ attribute def TrafficIntensityValue :> ScalarQuantityValue {
27
+ doc
28
+ /*
29
+ * source: item 13-1 traffic intensity
30
+ * symbol(s): `A`
31
+ * application domain: generic
32
+ * name: TrafficIntensity
33
+ * quantity dimension: 1
34
+ * measurement unit(s): E
35
+ * tensor order: 0
36
+ * definition: number of simultaneously busy resources in a particular pool of resources
37
+ * remarks: See IEC 60050-715, item 715-05-02. The name "erlang" was given to the traffic intensity unit in 1946 by the CCIF, in honour of the Danish mathematician, A. K. Erlang (1878-1929), who was the founder of traffic theory in telephony.
38
+ */
39
+ attribute :>> num: Real;
40
+ attribute :>> mRef: TrafficIntensityUnit[1];
41
+ }
42
+
43
+ attribute trafficIntensity: TrafficIntensityValue[*] nonunique :> scalarQuantities;
44
+
45
+ attribute def TrafficIntensityUnit :> DimensionOneUnit {
46
+ }
47
+
48
+ /* IEC-80000-13 item 13-2 traffic offered intensity */
49
+ attribute def TrafficOfferedIntensityValue :> ScalarQuantityValue {
50
+ doc
51
+ /*
52
+ * source: item 13-2 traffic offered intensity
53
+ * symbol(s): `A_o`
54
+ * application domain: generic
55
+ * name: TrafficOfferedIntensity
56
+ * quantity dimension: 1
57
+ * measurement unit(s): E
58
+ * tensor order: 0
59
+ * definition: traffic intensity (item 13-1) of the traffic that would have been generated by the users of a pool of resources if their use had not been limited by the size of the pool
60
+ * remarks: See IEC 60050-715, item 715-05-05. See 13-1 for unit E.
61
+ */
62
+ attribute :>> num: Real;
63
+ attribute :>> mRef: TrafficOfferedIntensityUnit[1];
64
+ }
65
+
66
+ attribute trafficOfferedIntensity: TrafficOfferedIntensityValue[*] nonunique :> scalarQuantities;
67
+
68
+ attribute def TrafficOfferedIntensityUnit :> DimensionOneUnit {
69
+ }
70
+
71
+ /* IEC-80000-13 item 13-3 traffic carried intensity, traffic load */
72
+ attribute def TrafficCarriedIntensityValue :> ScalarQuantityValue {
73
+ doc
74
+ /*
75
+ * source: item 13-3 traffic carried intensity, traffic load
76
+ * symbol(s): `Y`
77
+ * application domain: generic
78
+ * name: TrafficCarriedIntensity
79
+ * quantity dimension: 1
80
+ * measurement unit(s): E
81
+ * tensor order: 0
82
+ * definition: traffic intensity (item 13-1) of the traffic served by a particular pool of resources
83
+ * remarks: General practice is to estimate the traffic intensity as an average over a specified time interval, e.g. the busy hour. See IEC 60050-715, item 715-05-04. See 13-1 for unit E.
84
+ */
85
+ attribute :>> num: Real;
86
+ attribute :>> mRef: TrafficCarriedIntensityUnit[1];
87
+ }
88
+
89
+ attribute trafficCarriedIntensity: TrafficCarriedIntensityValue[*] nonunique :> scalarQuantities;
90
+
91
+ attribute def TrafficCarriedIntensityUnit :> DimensionOneUnit {
92
+ }
93
+
94
+ alias TrafficLoadUnit for TrafficCarriedIntensityUnit;
95
+ alias TrafficLoadValue for TrafficCarriedIntensityValue;
96
+ alias trafficLoad for trafficCarriedIntensity;
97
+
98
+ /* IEC-80000-13 item 13-4 mean queue length */
99
+ attribute def MeanQueueLengthValue :> DimensionOneValue {
100
+ doc
101
+ /*
102
+ * source: item 13-4 mean queue length
103
+ * symbol(s): `L`, `(Ω)`
104
+ * application domain: generic
105
+ * name: MeanQueueLength (specializes DimensionOneQuantity)
106
+ * quantity dimension: 1
107
+ * measurement unit(s): 1
108
+ * tensor order: 0
109
+ * definition: time average of queue length
110
+ * remarks: None.
111
+ */
112
+ }
113
+ attribute meanQueueLength: MeanQueueLengthValue :> scalarQuantities;
114
+
115
+ /* IEC-80000-13 item 13-5 loss probability */
116
+ attribute def LossProbabilityValue :> DimensionOneValue {
117
+ doc
118
+ /*
119
+ * source: item 13-5 loss probability
120
+ * symbol(s): `B`
121
+ * application domain: generic
122
+ * name: LossProbability (specializes DimensionOneQuantity)
123
+ * quantity dimension: 1
124
+ * measurement unit(s): 1
125
+ * tensor order: 0
126
+ * definition: probability for losing a call attempt
127
+ * remarks: None.
128
+ */
129
+ }
130
+ attribute lossProbability: LossProbabilityValue :> scalarQuantities;
131
+
132
+ /* IEC-80000-13 item 13-6 waiting probability */
133
+ attribute def WaitingProbabilityValue :> DimensionOneValue {
134
+ doc
135
+ /*
136
+ * source: item 13-6 waiting probability
137
+ * symbol(s): `W`
138
+ * application domain: generic
139
+ * name: WaitingProbability (specializes DimensionOneQuantity)
140
+ * quantity dimension: 1
141
+ * measurement unit(s): 1
142
+ * tensor order: 0
143
+ * definition: probability for waiting for a resource
144
+ * remarks: None.
145
+ */
146
+ }
147
+ attribute waitingProbability: WaitingProbabilityValue :> scalarQuantities;
148
+
149
+ /* IEC-80000-13 item 13-7 call intensity, calling rate */
150
+ attribute def CallIntensityValue :> ScalarQuantityValue {
151
+ doc
152
+ /*
153
+ * source: item 13-7 call intensity, calling rate
154
+ * symbol(s): `λ`
155
+ * application domain: generic
156
+ * name: CallIntensity
157
+ * quantity dimension: T^-1
158
+ * measurement unit(s): s^-1
159
+ * tensor order: 0
160
+ * definition: number of call attempts over a specified time interval divided by the duration (ISO 80000-3, item 3-7) of this interval
161
+ * remarks: See IEC 60050-715, item 715-03-13.
162
+ */
163
+ attribute :>> num: Real;
164
+ attribute :>> mRef: CallIntensityUnit[1];
165
+ }
166
+
167
+ attribute callIntensity: CallIntensityValue[*] nonunique :> scalarQuantities;
168
+
169
+ attribute def CallIntensityUnit :> DerivedUnit {
170
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
171
+ attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; }
172
+ }
173
+
174
+ alias CallingRateUnit for CallIntensityUnit;
175
+ alias CallingRateValue for CallIntensityValue;
176
+ alias callingRate for callIntensity;
177
+
178
+ /* IEC-80000-13 item 13-8 completed call intensity */
179
+ attribute def CompletedCallIntensityValue :> ScalarQuantityValue {
180
+ doc
181
+ /*
182
+ * source: item 13-8 completed call intensity
183
+ * symbol(s): `μ`
184
+ * application domain: generic
185
+ * name: CompletedCallIntensity
186
+ * quantity dimension: T^-1
187
+ * measurement unit(s): s^-1
188
+ * tensor order: 0
189
+ * definition: call intensity (item 13-7) for the call attempts that result in the transmission of an answer signal
190
+ * remarks: For a definition of the complete call attempt, see IEC 60050-715, item 715-03-11.
191
+ */
192
+ attribute :>> num: Real;
193
+ attribute :>> mRef: CompletedCallIntensityUnit[1];
194
+ }
195
+
196
+ attribute completedCallIntensity: CompletedCallIntensityValue[*] nonunique :> scalarQuantities;
197
+
198
+ attribute def CompletedCallIntensityUnit :> DerivedUnit {
199
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
200
+ attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; }
201
+ }
202
+
203
+ /* IEC-80000-13 item 13-9 storage capacity, storage size */
204
+ attribute def StorageCapacityValue :> ScalarQuantityValue {
205
+ doc
206
+ /*
207
+ * source: item 13-9 storage capacity, storage size
208
+ * symbol(s): `M`
209
+ * application domain: generic
210
+ * name: StorageCapacity
211
+ * quantity dimension: 1
212
+ * measurement unit(s): bit, o, B, 1
213
+ * tensor order: 0
214
+ * definition: amount of data that can be contained in a storage device, expressed as a number of specified data elements
215
+ * remarks: None.
216
+ */
217
+ attribute :>> num: Real;
218
+ attribute :>> mRef: StorageCapacityUnit[1];
219
+ }
220
+
221
+ attribute storageCapacity: StorageCapacityValue[*] nonunique :> scalarQuantities;
222
+
223
+ attribute def StorageCapacityUnit :> DimensionOneUnit {
224
+ }
225
+
226
+ alias StorageSizeUnit for StorageCapacityUnit;
227
+ alias StorageSizeValue for StorageCapacityValue;
228
+ alias storageSize for storageCapacity;
229
+
230
+ /* IEC-80000-13 item 13-10 equivalent binary storage capacity */
231
+ attribute def EquivalentBinaryStorageCapacityValue :> ScalarQuantityValue {
232
+ doc
233
+ /*
234
+ * source: item 13-10 equivalent binary storage capacity
235
+ * symbol(s): `M_e`
236
+ * application domain: generic
237
+ * name: EquivalentBinaryStorageCapacity
238
+ * quantity dimension: 1
239
+ * measurement unit(s): bit, 1
240
+ * tensor order: 0
241
+ * definition: `M_e = log_2 n` where `n` is the number of possible states of the given device
242
+ * remarks: The minimum storage capacity of a bit-organized storage device which would contain the amount of data in the given storage device is equal to the smallest integer greater than or equal to the equivalent binary storage capacity.
243
+ */
244
+ attribute :>> num: Real;
245
+ attribute :>> mRef: EquivalentBinaryStorageCapacityUnit[1];
246
+ }
247
+
248
+ attribute equivalentBinaryStorageCapacity: EquivalentBinaryStorageCapacityValue[*] nonunique :> scalarQuantities;
249
+
250
+ attribute def EquivalentBinaryStorageCapacityUnit :> DimensionOneUnit {
251
+ }
252
+
253
+ /* IEC-80000-13 item 13-11 transfer rate */
254
+ attribute def TransferRateValue :> ScalarQuantityValue {
255
+ doc
256
+ /*
257
+ * source: item 13-11 transfer rate
258
+ * symbol(s): `r`, `(ν)`
259
+ * application domain: generic
260
+ * name: TransferRate
261
+ * quantity dimension: T^-1
262
+ * measurement unit(s): o/s, B/s, s^-1
263
+ * tensor order: 0
264
+ * definition: quotient of the number of specified data elements transferred in a time interval by the duration of this interval
265
+ * remarks: The symbol `ν` is the Greek letter nu. A subscript referring to a specified data element can be added to the symbol. EXAMPLES: digit rate, `r_d` or `ν_d` (see IEC 60050-702 and 60050-704, items 702-05-23 and 704-16-06); transfer rate for octets (or bytes), `r_o`, `r_B`, `ν_o`, or `ν_B`; binary digit rate or bit rate (item 13-13).
266
+ */
267
+ attribute :>> num: Real;
268
+ attribute :>> mRef: TransferRateUnit[1];
269
+ }
270
+
271
+ attribute transferRate: TransferRateValue[*] nonunique :> scalarQuantities;
272
+
273
+ attribute def TransferRateUnit :> DerivedUnit {
274
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
275
+ attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; }
276
+ }
277
+
278
+ /* IEC-80000-13 item 13-12 period of data elements */
279
+ attribute periodOfDataElements: DurationValue :> scalarQuantities {
280
+ doc
281
+ /*
282
+ * source: item 13-12 period of data elements
283
+ * symbol(s): `T`
284
+ * application domain: generic
285
+ * name: PeriodOfDataElements (specializes Duration)
286
+ * quantity dimension: T^1
287
+ * measurement unit(s): s
288
+ * tensor order: 0
289
+ * definition: `T = 1/r`, where `r` is transfer rate (item 13-11) when the data elements are transmitted in series
290
+ * remarks: A subscript referring to a specified data element can be added to the symbol. EXAMPLES: period of digits, `T_d`; period of octets (or bytes), `T_o` or `T_B`.
291
+ */
292
+ }
293
+
294
+ /* IEC-80000-13 item 13-13 binary digit rate, bit rate */
295
+ attribute def BinaryDigitRateValue :> ScalarQuantityValue {
296
+ doc
297
+ /*
298
+ * source: item 13-13 binary digit rate, bit rate
299
+ * symbol(s): `r_b`, `r_"bit"`, `(ν_b)`, `(ν_"bit")`
300
+ * application domain: generic
301
+ * name: BinaryDigitRate
302
+ * quantity dimension: T^-1
303
+ * measurement unit(s): bit/s, s^-1
304
+ * tensor order: 0
305
+ * definition: transfer rate (item 13-11) where the data elements are binary digits
306
+ * remarks: In English, the systematic name would be "transfer rate for binary digits". See IEC 60050-704, item 704-16-07. The bit per second may be combined with prefixes, for example megabit per second, symbol Mbit/s.
307
+ */
308
+ attribute :>> num: Real;
309
+ attribute :>> mRef: BinaryDigitRateUnit[1];
310
+ }
311
+
312
+ attribute binaryDigitRate: BinaryDigitRateValue[*] nonunique :> scalarQuantities;
313
+
314
+ attribute def BinaryDigitRateUnit :> DerivedUnit {
315
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
316
+ attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; }
317
+ }
318
+
319
+ alias BitRateUnit for BinaryDigitRateUnit;
320
+ alias BitRateValue for BinaryDigitRateValue;
321
+ alias bitRate for binaryDigitRate;
322
+
323
+ /* IEC-80000-13 item 13-14 period of binary digits, bit period */
324
+ attribute periodOfBinaryDigits: DurationValue :> scalarQuantities {
325
+ doc
326
+ /*
327
+ * source: item 13-14 period of binary digits, bit period
328
+ * symbol(s): `T_b`, `T_"bit"`
329
+ * application domain: generic
330
+ * name: PeriodOfBinaryDigits (specializes Duration)
331
+ * quantity dimension: T^1
332
+ * measurement unit(s): s
333
+ * tensor order: 0
334
+ * definition: `T_b = 1/r_b`, where `r_b` is the binary digit rate (item 13-13) when the binary digits are transmitted in series
335
+ * remarks: None.
336
+ */
337
+ }
338
+
339
+ alias bitPeriod for periodOfBinaryDigits;
340
+
341
+ /* IEC-80000-13 item 13-15 equivalent binary digit rate, equivalent bit rate */
342
+ attribute def EquivalentBinaryDigitRateValue :> ScalarQuantityValue {
343
+ doc
344
+ /*
345
+ * source: item 13-15 equivalent binary digit rate, equivalent bit rate
346
+ * symbol(s): `r_e`, `(ν_e)`
347
+ * application domain: generic
348
+ * name: EquivalentBinaryDigitRate
349
+ * quantity dimension: T^-1
350
+ * measurement unit(s): bit/s, s^-1
351
+ * tensor order: 0
352
+ * definition: binary digit rate (item 13-13) equivalent to a transfer rate (item 13-11) for specified data elements
353
+ * remarks: In English, the systematic name would be "equivalent binary transfer rate". See IEC 60050-704, item 704-17-05.
354
+ */
355
+ attribute :>> num: Real;
356
+ attribute :>> mRef: EquivalentBinaryDigitRateUnit[1];
357
+ }
358
+
359
+ attribute equivalentBinaryDigitRate: EquivalentBinaryDigitRateValue[*] nonunique :> scalarQuantities;
360
+
361
+ attribute def EquivalentBinaryDigitRateUnit :> DerivedUnit {
362
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
363
+ attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; }
364
+ }
365
+
366
+ alias EquivalentBitRateUnit for EquivalentBinaryDigitRateUnit;
367
+ alias EquivalentBitRateValue for EquivalentBinaryDigitRateValue;
368
+ alias equivalentBitRate for equivalentBinaryDigitRate;
369
+
370
+ /* IEC-80000-13 item 13-16 modulation rate, line digit rate */
371
+ attribute def ModulationRateValue :> ScalarQuantityValue {
372
+ doc
373
+ /*
374
+ * source: item 13-16 modulation rate, line digit rate
375
+ * symbol(s): `r_m`, `u`
376
+ * application domain: generic
377
+ * name: ModulationRate
378
+ * quantity dimension: T^-1
379
+ * measurement unit(s): Bd, s^-1
380
+ * tensor order: 0
381
+ * definition: inverse of the shortest duration of a signal element
382
+ * remarks: The term “modulation rate” is used in conventional telegraphy and data transmission. In isochronous digital transmission, the term "line digit rate" is generally used. See IEC 60050-704, item 704-17-03. Baud is a special name for the second to the power minus one for this quantity. The baud may be combined with prefixes, for example kilobaud, symbol kBd, megabaud, symbol MBd.
383
+ */
384
+ attribute :>> num: Real;
385
+ attribute :>> mRef: ModulationRateUnit[1];
386
+ }
387
+
388
+ attribute modulationRate: ModulationRateValue[*] nonunique :> scalarQuantities;
389
+
390
+ attribute def ModulationRateUnit :> DerivedUnit {
391
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
392
+ attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; }
393
+ }
394
+
395
+ alias LineDigitRateUnit for ModulationRateUnit;
396
+ alias LineDigitRateValue for ModulationRateValue;
397
+ alias lineDigitRate for modulationRate;
398
+
399
+ /* IEC-80000-13 item 13-17 quantizing distortion rate */
400
+ attribute quantizingDistortionRate: PowerValue :> scalarQuantities {
401
+ doc
402
+ /*
403
+ * source: item 13-17 quantizing distortion rate
404
+ * symbol(s): `T_Q`
405
+ * application domain: generic
406
+ * name: QuantizingDistortionRate (specializes Power)
407
+ * quantity dimension: L^2*M^1*T^-3
408
+ * measurement unit(s): W
409
+ * tensor order: 0
410
+ * definition: distortion of a signal resulting from the process of quantizing an original signal when the values to be quantized are within the working range of the quantizer
411
+ * remarks: See IEC 60050-704, item 704-24-13.
412
+ */
413
+ }
414
+
415
+ /* IEC-80000-13 item 13-18 carrier power */
416
+ attribute carrierPower: PowerValue :> scalarQuantities {
417
+ doc
418
+ /*
419
+ * source: item 13-18 carrier power
420
+ * symbol(s): `P_c`, `C`
421
+ * application domain: generic
422
+ * name: CarrierPower (specializes Power)
423
+ * quantity dimension: L^2*M^1*T^-3
424
+ * measurement unit(s): W
425
+ * tensor order: 0
426
+ * definition: power supplied to the antenna feed line by a radio transmitter taken under the condition of no modulation
427
+ * remarks: See IEC 60050-713, item 713-09-20.
428
+ */
429
+ }
430
+
431
+ /* IEC-80000-13 item 13-19 signal energy per binary digit */
432
+ attribute signalEnergyPerBinaryDigit: EnergyValue :> scalarQuantities {
433
+ doc
434
+ /*
435
+ * source: item 13-19 signal energy per binary digit
436
+ * symbol(s): `E_b`, `E_"bit"`
437
+ * application domain: generic
438
+ * name: SignalEnergyPerBinaryDigit (specializes Energy)
439
+ * quantity dimension: L^2*M^1*T^-2
440
+ * measurement unit(s): J
441
+ * tensor order: 0
442
+ * definition: `E_b = P_c*T_b`, where `P_c` is carrier power (item 13-18) and `T_b` is period of binary digits (item 13-14)
443
+ * remarks: None.
444
+ */
445
+ }
446
+
447
+ /* IEC-80000-13 item 13-20 error probability */
448
+ attribute def ErrorProbabilityValue :> DimensionOneValue {
449
+ doc
450
+ /*
451
+ * source: item 13-20 error probability
452
+ * symbol(s): `P`
453
+ * application domain: generic
454
+ * name: ErrorProbability (specializes DimensionOneQuantity)
455
+ * quantity dimension: 1
456
+ * measurement unit(s): 1
457
+ * tensor order: 0
458
+ * definition: probability that a data element be incorrectly received
459
+ * remarks: A subscript referring to a specified data element can be added to the symbol. EXAMPLES: error probability for binary digits or bit error probability, `P_b` or `P_bit`; block error probability, `P_bl`. The measured value is designated as "error ratio", whereas "error rate" is deprecated, for example, bit error ratio (BER), block error ratio. See IEC 60050-704 and IEC 60050-721.
460
+ */
461
+ }
462
+ attribute errorProbability: ErrorProbabilityValue :> scalarQuantities;
463
+
464
+ /* IEC-80000-13 item 13-21 Hamming distance */
465
+ attribute hammingDistance: CountValue :> scalarQuantities {
466
+ doc
467
+ /*
468
+ * source: item 13-21 Hamming distance
469
+ * symbol(s): `d_n`
470
+ * application domain: generic
471
+ * name: HammingDistance (specializes Count)
472
+ * quantity dimension: 1
473
+ * measurement unit(s): 1
474
+ * tensor order: 0
475
+ * definition: number of digit positions in which the corresponding digits of two words of the same length are different
476
+ * remarks: See IEC 60050-721, item 721-08-25.
477
+ */
478
+ }
479
+
480
+ /* IEC-80000-13 item 13-22 clock frequency, clock rate */
481
+ attribute clockFrequency: FrequencyValue :> scalarQuantities {
482
+ doc
483
+ /*
484
+ * source: item 13-22 clock frequency, clock rate
485
+ * symbol(s): `f_"cl"`
486
+ * application domain: generic
487
+ * name: ClockFrequency (specializes Frequency)
488
+ * quantity dimension: T^-1
489
+ * measurement unit(s): Hz
490
+ * tensor order: 0
491
+ * definition: frequency at which a clock oscillates
492
+ * remarks: None.
493
+ */
494
+ }
495
+
496
+ alias clockRate for clockFrequency;
497
+
498
+ /* IEC-80000-13 item 13-23 decision content */
499
+ attribute def DecisionContentValue :> DimensionOneValue {
500
+ doc
501
+ /*
502
+ * source: item 13-23 decision content
503
+ * symbol(s): `D_a`
504
+ * application domain: generic
505
+ * name: DecisionContent (specializes DimensionOneQuantity)
506
+ * quantity dimension: 1
507
+ * measurement unit(s): 1
508
+ * tensor order: 0
509
+ * definition: `D_a` = `log_a n`, where `a` is the number of possibilities at each decision and `n` the number of events
510
+ * remarks: See ISO/IEC 2382-16, item 16.03.01. See also IEC 60027-3. When the same base is used for the same number of events then `D_a = H_0` , where `H_0` is maximum entropy (item 13-28).
511
+ */
512
+ }
513
+ attribute decisionContent: DecisionContentValue :> scalarQuantities;
514
+
515
+ /* IEC-80000-13 item 13-24 information content */
516
+ attribute def InformationContentValue :> ScalarQuantityValue {
517
+ doc
518
+ /*
519
+ * source: item 13-24 information content
520
+ * symbol(s): `I(x)`
521
+ * application domain: generic
522
+ * name: InformationContent
523
+ * quantity dimension: 1
524
+ * measurement unit(s): Sh, Hart, nat
525
+ * tensor order: 0
526
+ * definition: `I(x) = log_2(1/(p(x)))` Sh `= log(1/(p(x)))` Hart `= ln(1/(p(x)))` nat, where `p(x)` is the probability of event `x`
527
+ * remarks: See ISO/IEC 2382-16, item 16.03.02. See also IEC 60027-3.
528
+ */
529
+ attribute :>> num: Real;
530
+ attribute :>> mRef: InformationContentUnit[1];
531
+ }
532
+
533
+ attribute informationContent: InformationContentValue[*] nonunique :> scalarQuantities;
534
+
535
+ attribute def InformationContentUnit :> DimensionOneUnit {
536
+ }
537
+
538
+ /* IEC-80000-13 item 13-25 entropy */
539
+ attribute def EntropyForInformationScienceValue :> ScalarQuantityValue {
540
+ doc
541
+ /*
542
+ * source: item 13-25 entropy
543
+ * symbol(s): `H`
544
+ * application domain: information science
545
+ * name: Entropy
546
+ * quantity dimension: 1
547
+ * measurement unit(s): Sh, Hart, nat
548
+ * tensor order: 0
549
+ * definition: `H(X) = sum_(i=1)^n p(x_i) I(x_i)` for the set `X = {x_1, ..., x_n}`, where `p(x_i)` is the probability and `I(x_i)` is the information content of event `x_i`
550
+ * remarks: See ISO/IEC 2382-16, item 16.03.02. See also IEC 60027-3.
551
+ */
552
+ attribute :>> num: Real;
553
+ attribute :>> mRef: EntropyForInformationScienceUnit[1];
554
+ }
555
+
556
+ attribute entropyForInformationScience: EntropyForInformationScienceValue[*] nonunique :> scalarQuantities;
557
+
558
+ attribute def EntropyForInformationScienceUnit :> DimensionOneUnit {
559
+ }
560
+
561
+ /* IEC-80000-13 item 13-26 maximum entropy */
562
+ attribute def MaximumEntropyValue :> ScalarQuantityValue {
563
+ doc
564
+ /*
565
+ * source: item 13-26 maximum entropy
566
+ * symbol(s): `H_0`, `H_"max"`
567
+ * application domain: information science
568
+ * name: MaximumEntropy
569
+ * quantity dimension: 1
570
+ * measurement unit(s): Sh, Hart, nat
571
+ * tensor order: 0
572
+ * definition: maximum entropy occurs when `p(x_i) = 1/n` for `i = 1, ..., n`
573
+ * remarks: The maximum entropy is sometimes called "decision content" because the value is the same when the base is an integer, for the same number of events. See item 13-23.
574
+ */
575
+ attribute :>> num: Real;
576
+ attribute :>> mRef: MaximumEntropyUnit[1];
577
+ }
578
+
579
+ attribute maximumEntropy: MaximumEntropyValue[*] nonunique :> scalarQuantities;
580
+
581
+ attribute def MaximumEntropyUnit :> DimensionOneUnit {
582
+ }
583
+
584
+ /* IEC-80000-13 item 13-27 relative entropy */
585
+ attribute def RelativeEntropyValue :> DimensionOneValue {
586
+ doc
587
+ /*
588
+ * source: item 13-27 relative entropy
589
+ * symbol(s): `H_r`
590
+ * application domain: information science
591
+ * name: RelativeEntropy (specializes DimensionOneQuantity)
592
+ * quantity dimension: 1
593
+ * measurement unit(s): 1
594
+ * tensor order: 0
595
+ * definition: `H_r = H / H_0`, where `H` is entropy (item 13-25) and `H_0` is maximum entropy (item 13-26)
596
+ * remarks: See ISO/IEC 2382-16, item 16.03.04.
597
+ */
598
+ }
599
+ attribute relativeEntropy: RelativeEntropyValue :> scalarQuantities;
600
+
601
+ /* IEC-80000-13 item 13-28 redundancy */
602
+ attribute def RedundancyValue :> ScalarQuantityValue {
603
+ doc
604
+ /*
605
+ * source: item 13-28 redundancy
606
+ * symbol(s): `R`
607
+ * application domain: information science
608
+ * name: Redundancy
609
+ * quantity dimension: 1
610
+ * measurement unit(s): Sh, Hart, nat
611
+ * tensor order: 0
612
+ * definition: `R = H_0 − H`, where `H` is entropy (item 13-25) and `H_0` is maximum entropy (item 13-26)
613
+ * remarks: See ISO/IEC 2382-16, item 16.03.05.
614
+ */
615
+ attribute :>> num: Real;
616
+ attribute :>> mRef: RedundancyUnit[1];
617
+ }
618
+
619
+ attribute redundancy: RedundancyValue[*] nonunique :> scalarQuantities;
620
+
621
+ attribute def RedundancyUnit :> DimensionOneUnit {
622
+ }
623
+
624
+ /* IEC-80000-13 item 13-29 relative redundancy */
625
+ attribute def RelativeRedundancyValue :> DimensionOneValue {
626
+ doc
627
+ /*
628
+ * source: item 13-29 relative redundancy
629
+ * symbol(s): `r`
630
+ * application domain: information science
631
+ * name: RelativeRedundancy (specializes DimensionOneQuantity)
632
+ * quantity dimension: 1
633
+ * measurement unit(s): 1
634
+ * tensor order: 0
635
+ * definition: `r = R / H_0`, where `R` is redundancy (item 13-28) and `H_0` is maximum entropy (item 13-26)
636
+ * remarks: See ISO/IEC 2382-16, item 16.04.01.
637
+ */
638
+ }
639
+ attribute relativeRedundancy: RelativeRedundancyValue :> scalarQuantities;
640
+
641
+ /* IEC-80000-13 item 13-30 joint information content */
642
+ attribute def JointInformationContentValue :> ScalarQuantityValue {
643
+ doc
644
+ /*
645
+ * source: item 13-30 joint information content
646
+ * symbol(s): `I(x,y)`
647
+ * application domain: generic
648
+ * name: JointInformationContent
649
+ * quantity dimension: 1
650
+ * measurement unit(s): Sh, Hart, nat
651
+ * tensor order: 0
652
+ * definition: `I(x,y) = log_2(1/(p(x,y)))` Sh `= log(1/(p(x,y)))` Hart `= ln(1/(p(x,y)))` nat, where `p(x,y)` is the joint probability of events `x` and `y`
653
+ * remarks: None.
654
+ */
655
+ attribute :>> num: Real;
656
+ attribute :>> mRef: JointInformationContentUnit[1];
657
+ }
658
+
659
+ attribute jointInformationContent: JointInformationContentValue[*] nonunique :> scalarQuantities;
660
+
661
+ attribute def JointInformationContentUnit :> DimensionOneUnit {
662
+ }
663
+
664
+ /* IEC-80000-13 item 13-31 conditional information content */
665
+ attribute def ConditionalInformationContentValue :> ScalarQuantityValue {
666
+ doc
667
+ /*
668
+ * source: item 13-31 conditional information content
669
+ * symbol(s): `I(x|y)`
670
+ * application domain: generic
671
+ * name: ConditionalInformationContent
672
+ * quantity dimension: 1
673
+ * measurement unit(s): Sh, Hart, nat
674
+ * tensor order: 0
675
+ * definition: information content (item 13-2) of event `x` under the condition that `y` has occurred: `I(x|y) = I(x,y) − I( y)`
676
+ * remarks: See ISO/IEC 2382-16, item 16.04.02.
677
+ */
678
+ attribute :>> num: Real;
679
+ attribute :>> mRef: ConditionalInformationContentUnit[1];
680
+ }
681
+
682
+ attribute conditionalInformationContent: ConditionalInformationContentValue[*] nonunique :> scalarQuantities;
683
+
684
+ attribute def ConditionalInformationContentUnit :> DimensionOneUnit {
685
+ }
686
+
687
+ /* IEC-80000-13 item 13-32 conditional entropy, mean conditional information content, average conditional information content */
688
+ attribute def ConditionalEntropyValue :> ScalarQuantityValue {
689
+ doc
690
+ /*
691
+ * source: item 13-32 conditional entropy, mean conditional information content, average conditional information content
692
+ * symbol(s): `H(X|Y)`
693
+ * application domain: generic
694
+ * name: ConditionalEntropy
695
+ * quantity dimension: 1
696
+ * measurement unit(s): Sh, Hart, nat
697
+ * tensor order: 0
698
+ * definition: `H(X|Y) = sum_(i=1)^n sum_(j=1)^m p(x_i,y_j) I(x_i,y_j)` where `p(x_i,y_j)` is the joint probability of events `x_i` and `y_j`, and `I(x_i,y_j)` is conditional information content (item 13-31)
699
+ * remarks: See ISO/IEC 2382-16, item 16.04.04.
700
+ */
701
+ attribute :>> num: Real;
702
+ attribute :>> mRef: ConditionalEntropyUnit[1];
703
+ }
704
+
705
+ attribute conditionalEntropy: ConditionalEntropyValue[*] nonunique :> scalarQuantities;
706
+
707
+ attribute def ConditionalEntropyUnit :> DimensionOneUnit {
708
+ }
709
+
710
+ alias MeanConditionalInformationContentUnit for ConditionalEntropyUnit;
711
+ alias MeanConditionalInformationContentValue for ConditionalEntropyValue;
712
+ alias meanConditionalInformationContent for conditionalEntropy;
713
+
714
+ alias AverageConditionalInformationContentUnit for ConditionalEntropyUnit;
715
+ alias AverageConditionalInformationContentValue for ConditionalEntropyValue;
716
+ alias averageConditionalInformationContent for conditionalEntropy;
717
+
718
+ /* IEC-80000-13 item 13-33 equivocation */
719
+ attribute def EquivocationValue :> ScalarQuantityValue {
720
+ doc
721
+ /*
722
+ * source: item 13-33 equivocation
723
+ * symbol(s): `H(X|Y)`
724
+ * application domain: generic
725
+ * name: Equivocation
726
+ * quantity dimension: 1
727
+ * measurement unit(s): Sh, Hart, nat
728
+ * tensor order: 0
729
+ * definition: conditional entropy (item 13-32) of a set X of emitted characters given the set Y of received characters
730
+ * remarks: Equivocation is a quantitative measure of the loss of information due to noise. See ISO/IEC 2382-16, item 16.04.05.
731
+ */
732
+ attribute :>> num: Real;
733
+ attribute :>> mRef: EquivocationUnit[1];
734
+ }
735
+
736
+ attribute equivocation: EquivocationValue[*] nonunique :> scalarQuantities;
737
+
738
+ attribute def EquivocationUnit :> DimensionOneUnit {
739
+ }
740
+
741
+ /* IEC-80000-13 item 13-34 irrelevance */
742
+ attribute def IrrelevanceValue :> ScalarQuantityValue {
743
+ doc
744
+ /*
745
+ * source: item 13-34 irrelevance
746
+ * symbol(s): `H(Y|X)`
747
+ * application domain: generic
748
+ * name: Irrelevance
749
+ * quantity dimension: 1
750
+ * measurement unit(s): Sh, Hart, nat
751
+ * tensor order: 0
752
+ * definition: conditional entropy (item 13-32) of a set `Y` of received characters given the set `X` of emitted characters: `H(Y|X) = H(X|Y) + H(Y) − H(X)`, where `H(X|Y)` is equivocation (item 13-33) and `H` is entropy (item 13-25)
753
+ * remarks: Irrelevance is a quantitative measure of the information added to the emitted information due to distortion. See ISO/IEC 2382 16, item 16.04.06.
754
+ */
755
+ attribute :>> num: Real;
756
+ attribute :>> mRef: IrrelevanceUnit[1];
757
+ }
758
+
759
+ attribute irrelevance: IrrelevanceValue[*] nonunique :> scalarQuantities;
760
+
761
+ attribute def IrrelevanceUnit :> DimensionOneUnit {
762
+ }
763
+
764
+ /* IEC-80000-13 item 13-35 transinformation content */
765
+ attribute def TransinformationContentValue :> ScalarQuantityValue {
766
+ doc
767
+ /*
768
+ * source: item 13-35 transinformation content
769
+ * symbol(s): `T(x,y)`
770
+ * application domain: generic
771
+ * name: TransinformationContent
772
+ * quantity dimension: 1
773
+ * measurement unit(s): Sh, Hart, nat
774
+ * tensor order: 0
775
+ * definition: `T(x,y) = I(x) + I(y) − I(x,y)`, where `I(x)` and `I(y)` are the information contents (13-24) of events `x` and `y`, respectively, and `I(x,y)` is their joint information content (13-30)
776
+ * remarks: See ISO/IEC 2382-16, item 16.04.07.
777
+ */
778
+ attribute :>> num: Real;
779
+ attribute :>> mRef: TransinformationContentUnit[1];
780
+ }
781
+
782
+ attribute transinformationContent: TransinformationContentValue[*] nonunique :> scalarQuantities;
783
+
784
+ attribute def TransinformationContentUnit :> DimensionOneUnit {
785
+ }
786
+
787
+ /* IEC-80000-13 item 13-36 mean transinformation content */
788
+ attribute def MeanTransinformationContentValue :> ScalarQuantityValue {
789
+ doc
790
+ /*
791
+ * source: item 13-36 mean transinformation content
792
+ * symbol(s): `T`
793
+ * application domain: generic
794
+ * name: MeanTransinformationContent
795
+ * quantity dimension: 1
796
+ * measurement unit(s): Sh, Hart, nat
797
+ * tensor order: 0
798
+ * definition: `T(X,Y) = sum_(i=1)^n sum_(j=1)^m p(x_i,y_j) T(x_i,y_j)` for the sets `X = {x_1, ..., x_n}`, `Y = {y_1, ..., y_m}`, where `p(x_i,y_j)` is the joint probability of events `x_i` and `y_j`, and `T(x_i,y_j)` is their transinformation content (item 13-35)
799
+ * remarks: See ISO/IEC 2382-16, item 16.04.08. In practice, the unit "shannon per character" is generally used, and sometimes the units "hartley per character" and "natural unit per character".
800
+ */
801
+ attribute :>> num: Real;
802
+ attribute :>> mRef: MeanTransinformationContentUnit[1];
803
+ }
804
+
805
+ attribute meanTransinformationContent: MeanTransinformationContentValue[*] nonunique :> scalarQuantities;
806
+
807
+ attribute def MeanTransinformationContentUnit :> DimensionOneUnit {
808
+ }
809
+
810
+ /* IEC-80000-13 item 13-37 character mean entropy */
811
+ attribute def CharacterMeanEntropyValue :> ScalarQuantityValue {
812
+ doc
813
+ /*
814
+ * source: item 13-37 character mean entropy
815
+ * symbol(s): `H'`
816
+ * application domain: generic
817
+ * name: CharacterMeanEntropy
818
+ * quantity dimension: 1
819
+ * measurement unit(s): Sh, Hart, nat
820
+ * tensor order: 0
821
+ * definition: `H' = lim_(m->∞) H_m/m` where `H_m` is the entropy (item 13-3) of the set of all sequences of `m` characters
822
+ * remarks: See ISO/IEC 2382-16, item 16.04.09.
823
+ */
824
+ attribute :>> num: Real;
825
+ attribute :>> mRef: CharacterMeanEntropyUnit[1];
826
+ }
827
+
828
+ attribute characterMeanEntropy: CharacterMeanEntropyValue[*] nonunique :> scalarQuantities;
829
+
830
+ attribute def CharacterMeanEntropyUnit :> DimensionOneUnit {
831
+ }
832
+
833
+ /* IEC-80000-13 item 13-38 average information rate */
834
+ attribute def AverageInformationRateValue :> ScalarQuantityValue {
835
+ doc
836
+ /*
837
+ * source: item 13-38 average information rate
838
+ * symbol(s): `H^"*"`
839
+ * application domain: generic
840
+ * name: AverageInformationRate
841
+ * quantity dimension: T^-1
842
+ * measurement unit(s): Sh/s, Hart/s, nat/s
843
+ * tensor order: 0
844
+ * definition: `H^"*" = (H')/(t(X))`, where `H'` is character mean entropy (item 13-37) and `t(X)` is the mean value of the duration of a character in the set `X`
845
+ * remarks: See ISO/IEC 2382-16, item 16.04.10.
846
+ */
847
+ attribute :>> num: Real;
848
+ attribute :>> mRef: AverageInformationRateUnit[1];
849
+ }
850
+
851
+ attribute averageInformationRate: AverageInformationRateValue[*] nonunique :> scalarQuantities;
852
+
853
+ attribute def AverageInformationRateUnit :> DerivedUnit {
854
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
855
+ attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; }
856
+ }
857
+
858
+ /* IEC-80000-13 item 13-39 character mean transinformation content */
859
+ attribute def CharacterMeanTransinformationContentValue :> ScalarQuantityValue {
860
+ doc
861
+ /*
862
+ * source: item 13-39 character mean transinformation content
863
+ * symbol(s): `T'`
864
+ * application domain: generic
865
+ * name: CharacterMeanTransinformationContent
866
+ * quantity dimension: 1
867
+ * measurement unit(s): Sh, Hart, nat
868
+ * tensor order: 0
869
+ * definition: `T' = lim_(m->∞) T_m/m` where `T_m` is the mean transinformation content (item 13-36) for all pairs of input and output sequences of `m` characters
870
+ * remarks: See ISO/IEC 2382-16, item 16.04.11. In practice, the unit "shannon per character" is generally used, and sometimes the units "hartley per character" and "natural unit per character".
871
+ */
872
+ attribute :>> num: Real;
873
+ attribute :>> mRef: CharacterMeanTransinformationContentUnit[1];
874
+ }
875
+
876
+ attribute characterMeanTransinformationContent: CharacterMeanTransinformationContentValue[*] nonunique :> scalarQuantities;
877
+
878
+ attribute def CharacterMeanTransinformationContentUnit :> DimensionOneUnit {
879
+ }
880
+
881
+ /* IEC-80000-13 item 13-40 average transinformation rate */
882
+ attribute def AverageTransinformationRateValue :> ScalarQuantityValue {
883
+ doc
884
+ /*
885
+ * source: item 13-40 average transinformation rate
886
+ * symbol(s): `T^"*"`
887
+ * application domain: generic
888
+ * name: AverageTransinformationRate
889
+ * quantity dimension: T^-1
890
+ * measurement unit(s): Sh/s, Hart/s, nat/s
891
+ * tensor order: 0
892
+ * definition: `T^"*" = (T')/(sum_(i=1)^n sum_(j=1)^m p(x_i,y_j) t(x_i,y_j) )`, where `T'` is character mean transinformation content (item 13-39) and `t(x_i,y_j)` is the mean duration of the pair of characters `(x_i,y_j)` with joint probability `p(x_i,y_j)`
893
+ * remarks: See ISO/IEC 2382-16, item 16.04.12.
894
+ */
895
+ attribute :>> num: Real;
896
+ attribute :>> mRef: AverageTransinformationRateUnit[1];
897
+ }
898
+
899
+ attribute averageTransinformationRate: AverageTransinformationRateValue[*] nonunique :> scalarQuantities;
900
+
901
+ attribute def AverageTransinformationRateUnit :> DerivedUnit {
902
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
903
+ attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; }
904
+ }
905
+
906
+ /* IEC-80000-13 item 13-41 channel capacity per character, channel capacity */
907
+ attribute def ChannelCapacityPerCharacterValue :> ScalarQuantityValue {
908
+ doc
909
+ /*
910
+ * source: item 13-41 channel capacity per character, channel capacity
911
+ * symbol(s): `C'`
912
+ * application domain: generic
913
+ * name: ChannelCapacityPerCharacter
914
+ * quantity dimension: 1
915
+ * measurement unit(s): Sh, Hart, nat
916
+ * tensor order: 0
917
+ * definition: `C' = max T'`, where `T'` is character mean transinformation content (item 13-39)
918
+ * remarks: See ISO/IEC 2382-16, item 16.04.13. In practice, the unit "shannon per character" is generally used, and sometimes the units "hartley per character" and "natural unit per character".
919
+ */
920
+ attribute :>> num: Real;
921
+ attribute :>> mRef: ChannelCapacityPerCharacterUnit[1];
922
+ }
923
+
924
+ attribute channelCapacityPerCharacter: ChannelCapacityPerCharacterValue[*] nonunique :> scalarQuantities;
925
+
926
+ attribute def ChannelCapacityPerCharacterUnit :> DimensionOneUnit {
927
+ }
928
+
929
+ alias ChannelCapacityUnit for ChannelCapacityPerCharacterUnit;
930
+ alias ChannelCapacityValue for ChannelCapacityPerCharacterValue;
931
+ alias channelCapacity for channelCapacityPerCharacter;
932
+
933
+ /* IEC-80000-13 item 13-42 channel time capacity */
934
+ attribute def ChannelTimeCapacityValue :> ScalarQuantityValue {
935
+ doc
936
+ /*
937
+ * source: item 13-42 channel time capacity
938
+ * symbol(s): `C^"*"`
939
+ * application domain: generic
940
+ * name: ChannelTimeCapacity
941
+ * quantity dimension: T^-1
942
+ * measurement unit(s): Sh/s, Hart/s, nat/s
943
+ * tensor order: 0
944
+ * definition: `C^"*" = max T^"*"`, where `T^"*"` is average transinformation rate (item 13-40)
945
+ * remarks: See ISO/IEC 2382-16, item 16.04.13. Note for SysML ISQ: Alias "channel capacity", that was present in IEC 80000-12:2008, has been removed as it duplicates the alias of channel capacity per character (item 13-41).
946
+ */
947
+ attribute :>> num: Real;
948
+ attribute :>> mRef: ChannelTimeCapacityUnit[1];
949
+ }
950
+
951
+ attribute channelTimeCapacity: ChannelTimeCapacityValue[*] nonunique :> scalarQuantities;
952
+
953
+ attribute def ChannelTimeCapacityUnit :> DerivedUnit {
954
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
955
+ attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; }
956
+ }
957
+
958
+ }
src/sysml.library/Domain Libraries/Quantities and Units/ISQLight.sysml ADDED
The diff for this file is too large to render. See raw diff
 
src/sysml.library/Domain Libraries/Quantities and Units/ISQMechanics.sysml ADDED
@@ -0,0 +1,1583 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package ISQMechanics {
2
+ doc
3
+ /*
4
+ * International System of Quantities and Units
5
+ * Generated on 2022-08-07T14:44:27Z from standard ISO-80000-4:2019 "Mechanics"
6
+ * see also https://www.iso.org/obp/ui/#iso:std:iso:80000:-4:ed-2:v1:en
7
+ *
8
+ * Note 1: In documentation comments, AsciiMath notation (see http://asciimath.org/) is used for mathematical concepts,
9
+ * with Greek letters in Unicode encoding. In running text, AsciiMath is placed between backticks.
10
+ * Note 2: For vector and tensor quantities currently the unit and quantity value type for their (scalar) magnitude is
11
+ * defined, as well as their typical Cartesian 3d VectorMeasurementReference (i.e. coordinate system)
12
+ * or TensorMeasurementReference.
13
+ */
14
+
15
+ private import ScalarValues::Real;
16
+ private import Quantities::*;
17
+ private import MeasurementReferences::*;
18
+ private import ISQBase::*;
19
+
20
+ /* Quantity definitions referenced from other ISQ packages */
21
+ private import ISQThermodynamics::EnergyValue;
22
+
23
+ /* ISO-80000-4 item 4-1 mass */
24
+ /* See package ISQBase for the declarations of MassValue and MassUnit */
25
+
26
+ /* ISO-80000-4 item 4-2 mass density, density */
27
+ attribute def MassDensityValue :> ScalarQuantityValue {
28
+ doc
29
+ /*
30
+ * source: item 4-2 mass density, density
31
+ * symbol(s): `ρ`, `ρ_m`
32
+ * application domain: generic
33
+ * name: MassDensity
34
+ * quantity dimension: L^-3*M^1
35
+ * measurement unit(s): kg*m^-3
36
+ * tensor order: 0
37
+ * definition: quantity representing the spatial distribution of mass of a continuous material: `ρ(vec(r)) = (dm)/(dV)` where `m` is mass of the material contained in an infinitesimal domain at point `vec(r)` and `V` is volume of this domain
38
+ * remarks: None.
39
+ */
40
+ attribute :>> num: Real;
41
+ attribute :>> mRef: MassDensityUnit[1];
42
+ }
43
+
44
+ attribute massDensity: MassDensityValue[*] nonunique :> scalarQuantities;
45
+
46
+ attribute def MassDensityUnit :> DerivedUnit {
47
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; }
48
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
49
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF); }
50
+ }
51
+
52
+ alias DensityUnit for MassDensityUnit;
53
+ alias DensityValue for MassDensityValue;
54
+ alias density for massDensity;
55
+
56
+ /* ISO-80000-4 item 4-3 specific volume */
57
+ attribute def SpecificVolumeValue :> ScalarQuantityValue {
58
+ doc
59
+ /*
60
+ * source: item 4-3 specific volume
61
+ * symbol(s): `v`
62
+ * application domain: generic
63
+ * name: SpecificVolume
64
+ * quantity dimension: L^3*M^-1
65
+ * measurement unit(s): kg^-1*m^3
66
+ * tensor order: 0
67
+ * definition: reciprocal of mass density `ρ` (item 4-2): `v = 1/ρ`
68
+ * remarks: None.
69
+ */
70
+ attribute :>> num: Real;
71
+ attribute :>> mRef: SpecificVolumeUnit[1];
72
+ }
73
+
74
+ attribute specificVolume: SpecificVolumeValue[*] nonunique :> scalarQuantities;
75
+
76
+ attribute def SpecificVolumeUnit :> DerivedUnit {
77
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 3; }
78
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; }
79
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF); }
80
+ }
81
+
82
+ /* ISO-80000-4 item 4-4 relative mass density, relative density */
83
+ attribute def RelativeMassDensityValue :> DimensionOneValue {
84
+ doc
85
+ /*
86
+ * source: item 4-4 relative mass density, relative density
87
+ * symbol(s): `d`
88
+ * application domain: generic
89
+ * name: RelativeMassDensity (specializes DimensionOneQuantity)
90
+ * quantity dimension: 1
91
+ * measurement unit(s): 1
92
+ * tensor order: 0
93
+ * definition: quotient of mass density of a substance `ρ` and mass density of a reference substance `ρ_0` : `d = ρ/ρ_0`
94
+ * remarks: Conditions and material should be specified for the reference substance.
95
+ */
96
+ }
97
+ attribute relativeMassDensity: RelativeMassDensityValue :> scalarQuantities;
98
+
99
+ alias relativeDensity for relativeMassDensity;
100
+
101
+ /* ISO-80000-4 item 4-5 surface mass density, surface density */
102
+ attribute def SurfaceMassDensityValue :> ScalarQuantityValue {
103
+ doc
104
+ /*
105
+ * source: item 4-5 surface mass density, surface density
106
+ * symbol(s): `ρ_A`
107
+ * application domain: generic
108
+ * name: SurfaceMassDensity
109
+ * quantity dimension: L^-2*M^1
110
+ * measurement unit(s): kg*m^-2
111
+ * tensor order: 0
112
+ * definition: quantity representing the areal distribution of mass of a continuous material: `ρ_A(vec(r)) = (dm)/(dA)` where `m` is the mass of the material at position `vec(r)` and `A` is area
113
+ * remarks: The name "grammage" should not be used for this quantity.
114
+ */
115
+ attribute :>> num: Real;
116
+ attribute :>> mRef: SurfaceMassDensityUnit[1];
117
+ }
118
+
119
+ attribute surfaceMassDensity: SurfaceMassDensityValue[*] nonunique :> scalarQuantities;
120
+
121
+ attribute def SurfaceMassDensityUnit :> DerivedUnit {
122
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; }
123
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
124
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF); }
125
+ }
126
+
127
+ alias SurfaceDensityUnit for SurfaceMassDensityUnit;
128
+ alias SurfaceDensityValue for SurfaceMassDensityValue;
129
+ alias surfaceDensity for surfaceMassDensity;
130
+
131
+ /* ISO-80000-4 item 4-6 linear mass density, linear density */
132
+ attribute def LinearMassDensityValue :> ScalarQuantityValue {
133
+ doc
134
+ /*
135
+ * source: item 4-6 linear mass density, linear density
136
+ * symbol(s): `ρ_I`
137
+ * application domain: generic
138
+ * name: LinearMassDensity
139
+ * quantity dimension: L^-1*M^1
140
+ * measurement unit(s): kg*m^-1
141
+ * tensor order: 0
142
+ * definition: quantity representing the linear distribution of mass of a continuous material: `ρ_I(vec(r)) = (dm)/(dI)` where `m` is the mass of the material at position `vec(r)` and `l` is length
143
+ * remarks: None.
144
+ */
145
+ attribute :>> num: Real;
146
+ attribute :>> mRef: LinearMassDensityUnit[1];
147
+ }
148
+
149
+ attribute linearMassDensity: LinearMassDensityValue[*] nonunique :> scalarQuantities;
150
+
151
+ attribute def LinearMassDensityUnit :> DerivedUnit {
152
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; }
153
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
154
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF); }
155
+ }
156
+
157
+ alias LinearDensityUnit for LinearMassDensityUnit;
158
+ alias LinearDensityValue for LinearMassDensityValue;
159
+ alias linearDensity for linearMassDensity;
160
+
161
+ /* ISO-80000-4 item 4-7 moment of inertia */
162
+ attribute def MomentOfInertiaValue :> ScalarQuantityValue {
163
+ doc
164
+ /*
165
+ * source: item 4-7 moment of inertia (magnitude)
166
+ * symbol(s): `J`
167
+ * application domain: generic
168
+ * name: MomentOfInertia
169
+ * quantity dimension: L^2*M^1
170
+ * measurement unit(s): kg*m^2
171
+ * tensor order: 0
172
+ * definition: tensor (ISO 80000-2) quantity representing rotational inertia of a rigid body relative to a fixed centre of rotation expressed by the tensor product: `vec(L) = vec(vec(J)) vec(ω)` where `vec(L)` is angular momentum (item 4-11) of the body relative to the reference point and `vec(ω)` is its angular velocity (ISO 80000-3)
173
+ * remarks: The calculation of the value requires an integration.
174
+ */
175
+ attribute :>> num: Real;
176
+ attribute :>> mRef: MomentOfInertiaUnit[1];
177
+ }
178
+
179
+ attribute momentOfInertia: MomentOfInertiaValue[*] nonunique :> scalarQuantities;
180
+
181
+ attribute def MomentOfInertiaUnit :> DerivedUnit {
182
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
183
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
184
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF); }
185
+ }
186
+
187
+ attribute def Cartesian3dMomentOfInertiaTensor :> TensorQuantityValue {
188
+ doc
189
+ /*
190
+ * source: item 4-7 moment of inertia (tensor)
191
+ * symbol(s): `vec(vec(J))`
192
+ * application domain: generic
193
+ * name: MomentOfInertia
194
+ * quantity dimension: L^2*M^1
195
+ * measurement unit(s): kg*m^2
196
+ * tensor order: 2
197
+ * definition: tensor (ISO 80000-2) quantity representing rotational inertia of a rigid body relative to a fixed centre of rotation expressed by the tensor product: `vec(L) = vec(vec(J)) vec(ω)` where `vec(L)` is angular momentum (item 4-11) of the body relative to the reference point and `vec(ω)` is its angular velocity (ISO 80000-3)
198
+ * remarks: The calculation of the value requires an integration.
199
+ */
200
+ attribute :>> isBound = false;
201
+ attribute :>> num: Real[9];
202
+ attribute :>> mRef: Cartesian3dMomentOfInertiaMeasurementReference[1];
203
+ }
204
+
205
+ attribute momentOfInertiaTensor: Cartesian3dMomentOfInertiaTensor :> tensorQuantities;
206
+
207
+ attribute def Cartesian3dMomentOfInertiaMeasurementReference :> TensorMeasurementReference {
208
+ attribute :>> dimensions = (3, 3);
209
+ attribute :>> isBound = false;
210
+ attribute :>> mRefs: MomentOfInertiaUnit[9];
211
+ }
212
+
213
+ /* ISO-80000-4 item 4-8 momentum */
214
+ attribute def MomentumValue :> ScalarQuantityValue {
215
+ doc
216
+ /*
217
+ * source: item 4-8 momentum (magnitude)
218
+ * symbol(s): `p`
219
+ * application domain: generic
220
+ * name: Momentum
221
+ * quantity dimension: L^1*M^1*T^-1
222
+ * measurement unit(s): kg*m*s^-1
223
+ * tensor order: 0
224
+ * definition: product of mass `m` (item 4-1) of a body and velocity `vec(v)` (ISO 80000-3) of its centre of mass: `vec(p) = m vec(v)`
225
+ * remarks: None.
226
+ */
227
+ attribute :>> num: Real;
228
+ attribute :>> mRef: MomentumUnit[1];
229
+ }
230
+
231
+ attribute momentum: MomentumValue[*] nonunique :> scalarQuantities;
232
+
233
+ attribute def MomentumUnit :> DerivedUnit {
234
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; }
235
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
236
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
237
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
238
+ }
239
+
240
+ attribute def Cartesian3dMomentumVector :> VectorQuantityValue {
241
+ doc
242
+ /*
243
+ * source: item 4-8 momentum (vector)
244
+ * symbol(s): `vec(p)`
245
+ * application domain: generic
246
+ * name: Momentum
247
+ * quantity dimension: L^1*M^1*T^-1
248
+ * measurement unit(s): kg*m*s^-1
249
+ * tensor order: 1
250
+ * definition: product of mass `m` (item 4-1) of a body and velocity `vec(v)` (ISO 80000-3) of its centre of mass: `vec(p) = m vec(v)`
251
+ * remarks: None.
252
+ */
253
+ attribute :>> isBound = false;
254
+ attribute :>> num: Real[3];
255
+ attribute :>> mRef: Cartesian3dMomentumCoordinateFrame[1];
256
+ }
257
+
258
+ attribute momentumVector: Cartesian3dMomentumVector :> vectorQuantities;
259
+
260
+ attribute def Cartesian3dMomentumCoordinateFrame :> VectorMeasurementReference {
261
+ attribute :>> dimensions = 3;
262
+ attribute :>> isBound = false;
263
+ attribute :>> isOrthogonal = true;
264
+ attribute :>> mRefs: MomentumUnit[3];
265
+ }
266
+
267
+ /* ISO-80000-4 item 4-9.1 force */
268
+ attribute def ForceValue :> ScalarQuantityValue {
269
+ doc
270
+ /*
271
+ * source: item 4-9.1 force (magnitude)
272
+ * symbol(s): `F`
273
+ * application domain: generic
274
+ * name: Force
275
+ * quantity dimension: L^1*M^1*T^-2
276
+ * measurement unit(s): N, kg*m*s^-2
277
+ * tensor order: 0
278
+ * definition: vector (ISO 80000-2) quantity describing interaction between bodies or particles
279
+ * remarks: None.
280
+ */
281
+ attribute :>> num: Real;
282
+ attribute :>> mRef: ForceUnit[1];
283
+ }
284
+
285
+ attribute force: ForceValue[*] nonunique :> scalarQuantities;
286
+
287
+ attribute def ForceUnit :> DerivedUnit {
288
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; }
289
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
290
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
291
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
292
+ }
293
+
294
+ attribute def Cartesian3dForceVector :> VectorQuantityValue {
295
+ doc
296
+ /*
297
+ * source: item 4-9.1 force (vector)
298
+ * symbol(s): `vec(F)`
299
+ * application domain: generic
300
+ * name: Force
301
+ * quantity dimension: L^1*M^1*T^-2
302
+ * measurement unit(s): N, kg*m*s^-2
303
+ * tensor order: 1
304
+ * definition: vector (ISO 80000-2) quantity describing interaction between bodies or particles
305
+ * remarks: None.
306
+ */
307
+ attribute :>> isBound = false;
308
+ attribute :>> num: Real[3];
309
+ attribute :>> mRef: Cartesian3dForceCoordinateFrame[1];
310
+ }
311
+
312
+ attribute forceVector: Cartesian3dForceVector :> vectorQuantities;
313
+
314
+ attribute def Cartesian3dForceCoordinateFrame :> VectorMeasurementReference {
315
+ attribute :>> dimensions = 3;
316
+ attribute :>> isBound = false;
317
+ attribute :>> isOrthogonal = true;
318
+ attribute :>> mRefs: ForceUnit[3];
319
+ }
320
+
321
+ /* ISO-80000-4 item 4-9.2 weight */
322
+ attribute def Cartesian3dWeightVector :> VectorQuantityValue {
323
+ doc
324
+ /*
325
+ * source: item 4-9.2 weight
326
+ * symbol(s): `vec(F_g)`
327
+ * application domain: generic
328
+ * name: Weight (specializes Force)
329
+ * quantity dimension: L^1*M^1*T^-2
330
+ * measurement unit(s): N, kg*m*s^-2
331
+ * tensor order: 1
332
+ * definition: force (item 4-9.1) acting on a body in the gravitational field of Earth: `vec(F_g) = m vec(g)` where `m` (item 4-1) is the mass of the body and `vec(g)` is the local acceleration of free fall (ISO 80000-3)
333
+ * remarks: In colloquial language, the name "weight" continues to be used where "mass" is meant. This practice should be avoided. Weight is an example of a gravitational force. Weight comprises not only the local gravitational force but also the local centrifugal force due to the rotation of the Earth.
334
+ */
335
+ attribute :>> isBound = false;
336
+ attribute :>> num: Real[3];
337
+ attribute :>> mRef: Cartesian3dForceCoordinateFrame[1];
338
+ }
339
+
340
+ attribute weightVector: Cartesian3dWeightVector :> vectorQuantities;
341
+
342
+ /* ISO-80000-4 item 4-9.3 static friction force, static friction */
343
+ attribute def Cartesian3dStaticFrictionForceVector :> VectorQuantityValue {
344
+ doc
345
+ /*
346
+ * source: item 4-9.3 static friction force, static friction
347
+ * symbol(s): `vec(F_s)`
348
+ * application domain: generic
349
+ * name: StaticFrictionForce (specializes Force)
350
+ * quantity dimension: L^1*M^1*T^-2
351
+ * measurement unit(s): N, kg*m*s^-2
352
+ * tensor order: 1
353
+ * definition: force (item 4-9.1) resisting the motion before a body starts to slide on a surface
354
+ * remarks: For the static friction coefficient, see item 4-23.1.
355
+ */
356
+ attribute :>> isBound = false;
357
+ attribute :>> num: Real[3];
358
+ attribute :>> mRef: Cartesian3dForceCoordinateFrame[1];
359
+ }
360
+
361
+ attribute staticFrictionForceVector: Cartesian3dStaticFrictionForceVector :> vectorQuantities;
362
+
363
+ alias staticFrictionVector for staticFrictionForceVector;
364
+
365
+ /* ISO-80000-4 item 4-9.4 kinetic friction force, dynamic friction force */
366
+ attribute def Cartesian3dKineticFrictionForceVector :> VectorQuantityValue {
367
+ doc
368
+ /*
369
+ * source: item 4-9.4 kinetic friction force, dynamic friction force
370
+ * symbol(s): `vec(F_μ)`
371
+ * application domain: generic
372
+ * name: KineticFrictionForce (specializes Force)
373
+ * quantity dimension: L^1*M^1*T^-2
374
+ * measurement unit(s): N, kg*m*s^-2
375
+ * tensor order: 1
376
+ * definition: force (item 4-9.1) resisting the motion when a body slides on a surface
377
+ * remarks: For the kinetic friction factor, see item 4-23.2.
378
+ */
379
+ attribute :>> isBound = false;
380
+ attribute :>> num: Real[3];
381
+ attribute :>> mRef: Cartesian3dForceCoordinateFrame[1];
382
+ }
383
+
384
+ attribute kineticFrictionForceVector: Cartesian3dKineticFrictionForceVector :> vectorQuantities;
385
+
386
+ alias dynamicFrictionForceVector for kineticFrictionForceVector;
387
+
388
+ /* ISO-80000-4 item 4-9.5 rolling resistance, rolling drag, rolling friction force */
389
+ attribute def Cartesian3dRollingResistanceVector :> VectorQuantityValue {
390
+ doc
391
+ /*
392
+ * source: item 4-9.5 rolling resistance, rolling drag, rolling friction force
393
+ * symbol(s): `vec(F_"rr")`
394
+ * application domain: generic
395
+ * name: RollingResistance (specializes Force)
396
+ * quantity dimension: L^1*M^1*T^-2
397
+ * measurement unit(s): N, kg*m*s^-2
398
+ * tensor order: 1
399
+ * definition: force (item 4-9.1) resisting the motion when a body rolls on a surface
400
+ * remarks: For the rolling resistance factor, see item 4-23.3.
401
+ */
402
+ attribute :>> isBound = false;
403
+ attribute :>> num: Real[3];
404
+ attribute :>> mRef: Cartesian3dForceCoordinateFrame[1];
405
+ }
406
+
407
+ attribute rollingResistanceVector: Cartesian3dRollingResistanceVector :> vectorQuantities;
408
+
409
+ alias rollingDragVector for rollingResistanceVector;
410
+
411
+ alias rollingFrictionForceVector for rollingResistanceVector;
412
+
413
+ /* ISO-80000-4 item 4-9.6 drag force */
414
+ attribute def Cartesian3dDragForceVector :> VectorQuantityValue {
415
+ doc
416
+ /*
417
+ * source: item 4-9.6 drag force
418
+ * symbol(s): `vec(F_D)`
419
+ * application domain: generic
420
+ * name: DragForce (specializes Force)
421
+ * quantity dimension: L^1*M^1*T^-2
422
+ * measurement unit(s): N, kg*m*s^-2
423
+ * tensor order: 1
424
+ * definition: force (item 4-9.1) resisting the motion of a body in a fluid
425
+ * remarks: For the drag coefficient, see item 4-23.4.
426
+ */
427
+ attribute :>> isBound = false;
428
+ attribute :>> num: Real[3];
429
+ attribute :>> mRef: Cartesian3dForceCoordinateFrame[1];
430
+ }
431
+
432
+ attribute dragForceVector: Cartesian3dDragForceVector :> vectorQuantities;
433
+
434
+ /* ISO-80000-4 item 4-10 impulse */
435
+ attribute def ImpulseValue :> ScalarQuantityValue {
436
+ doc
437
+ /*
438
+ * source: item 4-10 impulse (magnitude)
439
+ * symbol(s): `I`
440
+ * application domain: generic
441
+ * name: Impulse
442
+ * quantity dimension: L^1*M^1*T^-1
443
+ * measurement unit(s): N*s, kg*m*s^-1
444
+ * tensor order: 0
445
+ * definition: vector (ISO 80000-2) quantity describing the effect of force acting during a time interval: `vec(I) = int_(t_1)^(t_2) vec(F)*dt` where `vec(F)` is force (item 4-9.1), `t` is time (ISO 80000-3) and `[t_1, t_2]` is considered time interval
446
+ * remarks: For a time interval `[t_1, t_2]`, `vec(I)(t_1, t_2) = vec(p)(t_1) - vec(p)(t_2) = vec(Δp)` where `vec(p)` is momentum (item 4-8).
447
+ */
448
+ attribute :>> num: Real;
449
+ attribute :>> mRef: ImpulseUnit[1];
450
+ }
451
+
452
+ attribute impulse: ImpulseValue[*] nonunique :> scalarQuantities;
453
+
454
+ attribute def ImpulseUnit :> DerivedUnit {
455
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; }
456
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
457
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
458
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
459
+ }
460
+
461
+ attribute def Cartesian3dImpulseVector :> VectorQuantityValue {
462
+ doc
463
+ /*
464
+ * source: item 4-10 impulse (vector)
465
+ * symbol(s): `vec(I)`
466
+ * application domain: generic
467
+ * name: Impulse
468
+ * quantity dimension: L^1*M^1*T^-1
469
+ * measurement unit(s): N*s, kg*m*s^-1
470
+ * tensor order: 1
471
+ * definition: vector (ISO 80000-2) quantity describing the effect of force acting during a time interval: `vec(I) = int_(t_1)^(t_2) vec(F)*dt` where `vec(F)` is force (item 4-9.1), `t` is time (ISO 80000-3) and `[t_1, t_2]` is considered time interval
472
+ * remarks: For a time interval `[t_1, t_2]`, `vec(I)(t_1, t_2) = vec(p)(t_1) - vec(p)(t_2) = vec(Δp)` where `vec(p)` is momentum (item 4-8).
473
+ */
474
+ attribute :>> isBound = false;
475
+ attribute :>> num: Real[3];
476
+ attribute :>> mRef: Cartesian3dImpulseCoordinateFrame[1];
477
+ }
478
+
479
+ attribute impulseVector: Cartesian3dImpulseVector :> vectorQuantities;
480
+
481
+ attribute def Cartesian3dImpulseCoordinateFrame :> VectorMeasurementReference {
482
+ attribute :>> dimensions = 3;
483
+ attribute :>> isBound = false;
484
+ attribute :>> isOrthogonal = true;
485
+ attribute :>> mRefs: ImpulseUnit[3];
486
+ }
487
+
488
+ /* ISO-80000-4 item 4-11 angular momentum */
489
+ attribute def AngularMomentumValue :> ScalarQuantityValue {
490
+ doc
491
+ /*
492
+ * source: item 4-11 angular momentum (magnitude)
493
+ * symbol(s): `L`
494
+ * application domain: generic
495
+ * name: AngularMomentum
496
+ * quantity dimension: L^2*M^1*T^-1
497
+ * measurement unit(s): kg*m^2*s^-1
498
+ * tensor order: 0
499
+ * definition: vector (ISO 80000-2) quantity described by the vector product: `vec(L) = vec(r) xx vec(p)` where `vec(r)` is position vector (ISO 80000-3) with respect to the axis of rotation and `vec(p)` is momentum (item 4-8)
500
+ * remarks: None.
501
+ */
502
+ attribute :>> num: Real;
503
+ attribute :>> mRef: AngularMomentumUnit[1];
504
+ }
505
+
506
+ attribute angularMomentum: AngularMomentumValue[*] nonunique :> scalarQuantities;
507
+
508
+ attribute def AngularMomentumUnit :> DerivedUnit {
509
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
510
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
511
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
512
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
513
+ }
514
+
515
+ attribute def Cartesian3dAngularMomentumVector :> VectorQuantityValue {
516
+ doc
517
+ /*
518
+ * source: item 4-11 angular momentum (vector)
519
+ * symbol(s): `vec(L)`
520
+ * application domain: generic
521
+ * name: AngularMomentum
522
+ * quantity dimension: L^2*M^1*T^-1
523
+ * measurement unit(s): kg*m^2*s^-1
524
+ * tensor order: 1
525
+ * definition: vector (ISO 80000-2) quantity described by the vector product: `vec(L) = vec(r) xx vec(p)` where `vec(r)` is position vector (ISO 80000-3) with respect to the axis of rotation and `vec(p)` is momentum (item 4-8)
526
+ * remarks: None.
527
+ */
528
+ attribute :>> isBound = false;
529
+ attribute :>> num: Real[3];
530
+ attribute :>> mRef: Cartesian3dAngularMomentumCoordinateFrame[1];
531
+ }
532
+
533
+ attribute angularMomentumVector: Cartesian3dAngularMomentumVector :> vectorQuantities;
534
+
535
+ attribute def Cartesian3dAngularMomentumCoordinateFrame :> VectorMeasurementReference {
536
+ attribute :>> dimensions = 3;
537
+ attribute :>> isBound = false;
538
+ attribute :>> isOrthogonal = true;
539
+ attribute :>> mRefs: AngularMomentumUnit[3];
540
+ }
541
+
542
+ /* ISO-80000-4 item 4-12.1 moment of force */
543
+ attribute def MomentOfForceValue :> ScalarQuantityValue {
544
+ doc
545
+ /*
546
+ * source: item 4-12.1 moment of force (magnitude)
547
+ * symbol(s): `M`
548
+ * application domain: generic
549
+ * name: MomentOfForce
550
+ * quantity dimension: L^2*M^1*T^-2
551
+ * measurement unit(s): N*m, kg*m^2*s^-2
552
+ * tensor order: 0
553
+ * definition: vector (ISO 80000-2) quantity described by the vector product: `vec(M) = vec(r) xx vec(F)` where `vec(r)` is position vector (ISO 80000-3) with respect to the axis of rotation and `vec(F)` is force (item 4-9.1)
554
+ * remarks: The bending moment of force is denoted by `vec(M)_b`.
555
+ */
556
+ attribute :>> num: Real;
557
+ attribute :>> mRef: MomentOfForceUnit[1];
558
+ }
559
+
560
+ attribute momentOfForce: MomentOfForceValue[*] nonunique :> scalarQuantities;
561
+
562
+ attribute def MomentOfForceUnit :> DerivedUnit {
563
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
564
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
565
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
566
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
567
+ }
568
+
569
+ attribute def Cartesian3dMomentOfForceVector :> VectorQuantityValue {
570
+ doc
571
+ /*
572
+ * source: item 4-12.1 moment of force (vector)
573
+ * symbol(s): `vec(M)`
574
+ * application domain: generic
575
+ * name: MomentOfForce
576
+ * quantity dimension: L^2*M^1*T^-2
577
+ * measurement unit(s): N*m, kg*m^2*s^-2
578
+ * tensor order: 1
579
+ * definition: vector (ISO 80000-2) quantity described by the vector product: `vec(M) = vec(r) xx vec(F)` where `vec(r)` is position vector (ISO 80000-3) with respect to the axis of rotation and `vec(F)` is force (item 4-9.1)
580
+ * remarks: The bending moment of force is denoted by `vec(M)_b`.
581
+ */
582
+ attribute :>> isBound = false;
583
+ attribute :>> num: Real[3];
584
+ attribute :>> mRef: Cartesian3dMomentOfForceCoordinateFrame[1];
585
+ }
586
+
587
+ attribute momentOfForceVector: Cartesian3dMomentOfForceVector :> vectorQuantities;
588
+
589
+ attribute def Cartesian3dMomentOfForceCoordinateFrame :> VectorMeasurementReference {
590
+ attribute :>> dimensions = 3;
591
+ attribute :>> isBound = false;
592
+ attribute :>> isOrthogonal = true;
593
+ attribute :>> mRefs: MomentOfForceUnit[3];
594
+ }
595
+
596
+ /* ISO-80000-4 item 4-12.2 torque */
597
+ attribute def TorqueValue :> ScalarQuantityValue {
598
+ doc
599
+ /*
600
+ * source: item 4-12.2 torque
601
+ * symbol(s): `T`, `M_Q`
602
+ * application domain: generic
603
+ * name: Torque
604
+ * quantity dimension: L^2*M^1*T^-2
605
+ * measurement unit(s): N*m, kg*m^2*s^-2
606
+ * tensor order: 0
607
+ * definition: quantity described by the scalar product: `T = vec(M)*vec(e_Q)` where `vec(M)` is moment of force (item 4-12.1) and `vec(e_Q)` is unit vector of direction with respect to which the torque is considered
608
+ * remarks: For example, torque is the twisting moment of force with respect to the longitudinal axis of a beam or shaft.
609
+ */
610
+ attribute :>> num: Real;
611
+ attribute :>> mRef: TorqueUnit[1];
612
+ }
613
+
614
+ attribute torque: TorqueValue[*] nonunique :> scalarQuantities;
615
+
616
+ attribute def TorqueUnit :> DerivedUnit {
617
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
618
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
619
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
620
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
621
+ }
622
+
623
+ /* ISO-80000-4 item 4-13 angular impulse */
624
+ attribute def AngularImpulseValue :> ScalarQuantityValue {
625
+ doc
626
+ /*
627
+ * source: item 4-13 angular impulse (magnitude)
628
+ * symbol(s): `H`
629
+ * application domain: generic
630
+ * name: AngularImpulse
631
+ * quantity dimension: L^2*M^1*T^-1
632
+ * measurement unit(s): N*m*s, kg*m^2*s^-1
633
+ * tensor order: 0
634
+ * definition: vector (ISO 80000-2) quantity describing the effect of moment of force during a time interval: `vec(H)(t_1; t_2) = int_(t_1)^(t_2) vec(M) dt` where `vec(M)` is moment of force (item 4-12.1), `t` is time (ISO 80000-3) and `[t_1, t_2]` is considered time interval
635
+ * remarks: For a time interval `[t_1, t_2]`, `vec(H)(t_1, t_2) = vec(L)(t_1) - vec(L)(t_2) = vec(ΔL)` where `vec(L)` is angular momentum.
636
+ */
637
+ attribute :>> num: Real;
638
+ attribute :>> mRef: AngularImpulseUnit[1];
639
+ }
640
+
641
+ attribute angularImpulse: AngularImpulseValue[*] nonunique :> scalarQuantities;
642
+
643
+ attribute def AngularImpulseUnit :> DerivedUnit {
644
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
645
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
646
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
647
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
648
+ }
649
+
650
+ attribute def Cartesian3dAngularImpulseVector :> VectorQuantityValue {
651
+ doc
652
+ /*
653
+ * source: item 4-13 angular impulse (vector)
654
+ * symbol(s): `vec(H)`
655
+ * application domain: generic
656
+ * name: AngularImpulse
657
+ * quantity dimension: L^2*M^1*T^-1
658
+ * measurement unit(s): N*m*s, kg*m^2*s^-1
659
+ * tensor order: 1
660
+ * definition: vector (ISO 80000-2) quantity describing the effect of moment of force during a time interval: `vec(H)(t_1; t_2) = int_(t_1)^(t_2) vec(M) dt` where `vec(M)` is moment of force (item 4-12.1), `t` is time (ISO 80000-3) and `[t_1, t_2]` is considered time interval
661
+ * remarks: For a time interval `[t_1, t_2]`, `vec(H)(t_1, t_2) = vec(L)(t_1) - vec(L)(t_2) = vec(ΔL)` where `vec(L)` is angular momentum.
662
+ */
663
+ attribute :>> isBound = false;
664
+ attribute :>> num: Real[3];
665
+ attribute :>> mRef: Cartesian3dAngularImpulseCoordinateFrame[1];
666
+ }
667
+
668
+ attribute angularImpulseVector: Cartesian3dAngularImpulseVector :> vectorQuantities;
669
+
670
+ attribute def Cartesian3dAngularImpulseCoordinateFrame :> VectorMeasurementReference {
671
+ attribute :>> dimensions = 3;
672
+ attribute :>> isBound = false;
673
+ attribute :>> isOrthogonal = true;
674
+ attribute :>> mRefs: AngularImpulseUnit[3];
675
+ }
676
+
677
+ /* ISO-80000-4 item 4-14.1 pressure */
678
+ attribute def PressureValue :> ScalarQuantityValue {
679
+ doc
680
+ /*
681
+ * source: item 4-14.1 pressure
682
+ * symbol(s): `p`
683
+ * application domain: generic
684
+ * name: Pressure
685
+ * quantity dimension: L^-1*M^1*T^-2
686
+ * measurement unit(s): Pa, N*m^-2, kg*m^-1*s^-2
687
+ * tensor order: 0
688
+ * definition: quotient of the component of a force normal to a surface and its area: `p = (vec(e_n) * vec(F)) / A` where `vec(e_n)` is unit vector of the surface normal, `vec(F)` is force (item 4-9.1) and `A` is area (ISO 80000-3)
689
+ * remarks: None.
690
+ */
691
+ attribute :>> num: Real;
692
+ attribute :>> mRef: PressureUnit[1];
693
+ }
694
+
695
+ attribute pressure: PressureValue[*] nonunique :> scalarQuantities;
696
+
697
+ attribute def PressureUnit :> DerivedUnit {
698
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; }
699
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
700
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
701
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
702
+ }
703
+
704
+ /* ISO-80000-4 item 4-14.2 gauge pressure */
705
+ attribute gaugePressure: PressureValue :> scalarQuantities {
706
+ doc
707
+ /*
708
+ * source: item 4-14.2 gauge pressure
709
+ * symbol(s): `p_e`
710
+ * application domain: generic
711
+ * name: GaugePressure (specializes Pressure)
712
+ * quantity dimension: L^-1*M^1*T^-2
713
+ * measurement unit(s): Pa, N*m^-2, kg*m^-1*s^-2
714
+ * tensor order: 0
715
+ * definition: pressure `p` (item 4-14.1) decremented by ambient pressure `p_amb` : `p_e = p - p_amb`
716
+ * remarks: Often, `p_amb` is chosen as a standard pressure. Gauge pressure is positive or negative.
717
+ */
718
+ }
719
+
720
+ /* ISO-80000-4 item 4-15 stress */
721
+ attribute def StressValue :> ScalarQuantityValue {
722
+ doc
723
+ /*
724
+ * source: item 4-15 stress (magnitude)
725
+ * symbol(s): `σ`
726
+ * application domain: generic
727
+ * name: Stress
728
+ * quantity dimension: L^-1*M^1*T^-2
729
+ * measurement unit(s): Pa, N*m^-2, kg*m^-1*s^-2
730
+ * tensor order: 0
731
+ * definition: tensor (ISO 80000-2) quantity representing state of tension of matter
732
+ * remarks: Stress tensor is symmetric and has three normal-stress and three shear-stress (Cartesian) components.
733
+ */
734
+ attribute :>> num: Real;
735
+ attribute :>> mRef: StressUnit[1];
736
+ }
737
+
738
+ attribute stress: StressValue[*] nonunique :> scalarQuantities;
739
+
740
+ attribute def StressUnit :> DerivedUnit {
741
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; }
742
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
743
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
744
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
745
+ }
746
+
747
+ attribute def Cartesian3dStressTensor :> TensorQuantityValue {
748
+ doc
749
+ /*
750
+ * source: item 4-15 stress (tensor)
751
+ * symbol(s): `vec(vec(σ))`
752
+ * application domain: generic
753
+ * name: Stress
754
+ * quantity dimension: L^-1*M^1*T^-2
755
+ * measurement unit(s): Pa, N*m^-2, kg*m^-1*s^-2
756
+ * tensor order: 2
757
+ * definition: tensor (ISO 80000-2) quantity representing state of tension of matter
758
+ * remarks: Stress tensor is symmetric and has three normal-stress and three shear-stress (Cartesian) components.
759
+ */
760
+ attribute :>> isBound = false;
761
+ attribute :>> num: Real[9];
762
+ attribute :>> mRef: Cartesian3dStressMeasurementReference[1];
763
+ }
764
+
765
+ attribute stressTensor: Cartesian3dStressTensor :> tensorQuantities;
766
+
767
+ attribute def Cartesian3dStressMeasurementReference :> TensorMeasurementReference {
768
+ attribute :>> dimensions = (3, 3);
769
+ attribute :>> isBound = false;
770
+ attribute :>> mRefs: StressUnit[9];
771
+ }
772
+
773
+ /* ISO-80000-4 item 4-16.1 normal stress */
774
+ attribute def NormalStressValue :> ScalarQuantityValue {
775
+ doc
776
+ /*
777
+ * source: item 4-16.1 normal stress
778
+ * symbol(s): `σ_n`, `σ`
779
+ * application domain: generic
780
+ * name: NormalStress
781
+ * quantity dimension: L^-1*M^1*T^-2
782
+ * measurement unit(s): Pa, N*m^-2, kg*m^-1*s^-2
783
+ * tensor order: 0
784
+ * definition: scalar (ISO 80000-2) quantity describing surface action of a force into a body equal to: `σ_n = (d F_n)/(dA)` where `F_n` is the normal component of force (item 4-9.1) and `A` is the area (ISO 80000-3) of the surface element
785
+ * remarks: A couple of mutually opposite forces of magnitude `F` acting on the opposite surfaces of a slice (layer) of homogenous solid matter normal to it, and evenly distributed, cause a constant normal stress `σ_n = F A` in the slice (layer).
786
+ */
787
+ attribute :>> num: Real;
788
+ attribute :>> mRef: NormalStressUnit[1];
789
+ }
790
+
791
+ attribute normalStress: NormalStressValue[*] nonunique :> scalarQuantities;
792
+
793
+ attribute def NormalStressUnit :> DerivedUnit {
794
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; }
795
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
796
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
797
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
798
+ }
799
+
800
+ /* ISO-80000-4 item 4-16.2 shear stress */
801
+ attribute def ShearStressValue :> ScalarQuantityValue {
802
+ doc
803
+ /*
804
+ * source: item 4-16.2 shear stress
805
+ * symbol(s): `τ_s`, `τ`
806
+ * application domain: generic
807
+ * name: ShearStress
808
+ * quantity dimension: L^-1*M^1*T^-2
809
+ * measurement unit(s): Pa, N*m^-2, kg*m^-1*s^-2
810
+ * tensor order: 0
811
+ * definition: scalar (ISO 80000-2) quantity describing surface action of a force into a body equal to: `τ_s = (d F_t)/(dA)` where `F_t` is the tangential component of force (item 4-9.1) and `A` is the area (ISO 80000-3) of the surface element
812
+ * remarks: A couple of mutually opposite forces of magnitude `F` acting on the opposite surfaces of a slice (layer) of homogenous solid matter parallel to it, and evenly distributed, cause a constant shear stress `τ = F/A` in the slice (layer).
813
+ */
814
+ attribute :>> num: Real;
815
+ attribute :>> mRef: ShearStressUnit[1];
816
+ }
817
+
818
+ attribute shearStress: ShearStressValue[*] nonunique :> scalarQuantities;
819
+
820
+ attribute def ShearStressUnit :> DerivedUnit {
821
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; }
822
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
823
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
824
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
825
+ }
826
+
827
+ /* ISO-80000-4 item 4-17.1 strain */
828
+ attribute def StrainValue :> ScalarQuantityValue {
829
+ doc
830
+ /*
831
+ * source: item 4-17.1 strain (magnitude)
832
+ * symbol(s): `ε`
833
+ * application domain: generic
834
+ * name: Strain
835
+ * quantity dimension: 1
836
+ * measurement unit(s): 1
837
+ * tensor order: 0
838
+ * definition: tensor (ISO 80000-2) quantity representing the deformation of matter caused by stress
839
+ * remarks: Strain tensor is symmetric and has three linear-strain and three shear strain (Cartesian) components.
840
+ */
841
+ attribute :>> num: Real;
842
+ attribute :>> mRef: StrainUnit[1];
843
+ }
844
+
845
+ attribute strain: StrainValue[*] nonunique :> scalarQuantities;
846
+
847
+ attribute def StrainUnit :> DimensionOneUnit {
848
+ }
849
+
850
+ attribute def Cartesian3dStrainTensor :> TensorQuantityValue {
851
+ doc
852
+ /*
853
+ * source: item 4-17.1 strain (tensor)
854
+ * symbol(s): `vec(vec(ε))`
855
+ * application domain: generic
856
+ * name: Strain
857
+ * quantity dimension: 1
858
+ * measurement unit(s): 1
859
+ * tensor order: 2
860
+ * definition: tensor (ISO 80000-2) quantity representing the deformation of matter caused by stress
861
+ * remarks: Strain tensor is symmetric and has three linear-strain and three shear strain (Cartesian) components.
862
+ */
863
+ attribute :>> isBound = false;
864
+ attribute :>> num: Real[9];
865
+ attribute :>> mRef: Cartesian3dStrainMeasurementReference[1];
866
+ }
867
+
868
+ attribute strainTensor: Cartesian3dStrainTensor :> tensorQuantities;
869
+
870
+ attribute def Cartesian3dStrainMeasurementReference :> TensorMeasurementReference {
871
+ attribute :>> dimensions = (3, 3);
872
+ attribute :>> isBound = false;
873
+ attribute :>> mRefs: StrainUnit[9];
874
+ }
875
+
876
+ /* ISO-80000-4 item 4-17.2 relative linear strain */
877
+ attribute def RelativeLinearStrainValue :> DimensionOneValue {
878
+ doc
879
+ /*
880
+ * source: item 4-17.2 relative linear strain
881
+ * symbol(s): `ε`, `(e)`
882
+ * application domain: generic
883
+ * name: RelativeLinearStrain (specializes DimensionOneQuantity)
884
+ * quantity dimension: 1
885
+ * measurement unit(s): 1
886
+ * tensor order: 0
887
+ * definition: quotient of change in length `Δl` (ISO 80000-3) of an object and its length `l` (ISO 80000-3): `ε = (Δl)/l`
888
+ * remarks: None.
889
+ */
890
+ }
891
+ attribute relativeLinearStrain: RelativeLinearStrainValue :> scalarQuantities;
892
+
893
+ /* ISO-80000-4 item 4-17.3 shear strain */
894
+ attribute def ShearStrainValue :> DimensionOneValue {
895
+ doc
896
+ /*
897
+ * source: item 4-17.3 shear strain
898
+ * symbol(s): `γ`
899
+ * application domain: generic
900
+ * name: ShearStrain (specializes DimensionOneQuantity)
901
+ * quantity dimension: 1
902
+ * measurement unit(s): 1
903
+ * tensor order: 0
904
+ * definition: quotient of parallel displacement `Δx` (ISO 80000-3) of two surfaces of a layer and the thickness `d` (ISO 80000-3) of the layer: `γ = (Δx)/d`
905
+ * remarks: None.
906
+ */
907
+ }
908
+ attribute shearStrain: ShearStrainValue :> scalarQuantities;
909
+
910
+ /* ISO-80000-4 item 4-17.4 relative volume strain */
911
+ attribute def RelativeVolumeStrainValue :> DimensionOneValue {
912
+ doc
913
+ /*
914
+ * source: item 4-17.4 relative volume strain
915
+ * symbol(s): `θ`
916
+ * application domain: generic
917
+ * name: RelativeVolumeStrain (specializes DimensionOneQuantity)
918
+ * quantity dimension: 1
919
+ * measurement unit(s): 1
920
+ * tensor order: 0
921
+ * definition: quotient of change in volume `ΔV` (ISO 80000-3) of an object and its volume `V_0` (ISO 80000-3): `θ = (ΔV)/V_0`
922
+ * remarks: None.
923
+ */
924
+ }
925
+ attribute relativeVolumeStrain: RelativeVolumeStrainValue :> scalarQuantities;
926
+
927
+ /* ISO-80000-4 item 4-18 Poisson number */
928
+ attribute def PoissonNumberValue :> DimensionOneValue {
929
+ doc
930
+ /*
931
+ * source: item 4-18 Poisson number
932
+ * symbol(s): `μ`, `(v)`
933
+ * application domain: generic
934
+ * name: PoissonNumber (specializes DimensionOneQuantity)
935
+ * quantity dimension: 1
936
+ * measurement unit(s): 1
937
+ * tensor order: 0
938
+ * definition: quotient of change in width `Δb` (width is defined in ISO 80000-3) and change in length `Δl` (length is defined in ISO 80000-3) of an object: `μ = (Δb)/(Δl)`
939
+ * remarks: None.
940
+ */
941
+ }
942
+ attribute poissonNumber: PoissonNumberValue :> scalarQuantities;
943
+
944
+ /* ISO-80000-4 item 4-19.1 modulus of elasticity, Young modulus */
945
+ attribute def ModulusOfElasticityValue :> ScalarQuantityValue {
946
+ doc
947
+ /*
948
+ * source: item 4-19.1 modulus of elasticity, Young modulus
949
+ * symbol(s): `E`, `E_m`, `Y`
950
+ * application domain: generic
951
+ * name: ModulusOfElasticity
952
+ * quantity dimension: L^-1*M^1*T^-2
953
+ * measurement unit(s): Pa, N*m^-2, kg*m^-1*s^-2
954
+ * tensor order: 0
955
+ * definition: quotient of normal stress `σ` (item 4-16.1) and relative linear strain `ε` (item 4-17.2): `E = σ/ε`
956
+ * remarks: Conditions should be specified (e.g. adiabatic or isothermal process).
957
+ */
958
+ attribute :>> num: Real;
959
+ attribute :>> mRef: ModulusOfElasticityUnit[1];
960
+ }
961
+
962
+ attribute modulusOfElasticity: ModulusOfElasticityValue[*] nonunique :> scalarQuantities;
963
+
964
+ attribute def ModulusOfElasticityUnit :> DerivedUnit {
965
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; }
966
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
967
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
968
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
969
+ }
970
+
971
+ alias YoungModulusUnit for ModulusOfElasticityUnit;
972
+ alias YoungModulusValue for ModulusOfElasticityValue;
973
+ alias youngModulus for modulusOfElasticity;
974
+
975
+ /* ISO-80000-4 item 4-19.2 modulus of rigidity, shear modulus */
976
+ attribute def ModulusOfRigidityValue :> ScalarQuantityValue {
977
+ doc
978
+ /*
979
+ * source: item 4-19.2 modulus of rigidity, shear modulus
980
+ * symbol(s): `G`
981
+ * application domain: generic
982
+ * name: ModulusOfRigidity
983
+ * quantity dimension: L^-1*M^1*T^-2
984
+ * measurement unit(s): Pa, N*m^-2, kg*m^-1*s^-2
985
+ * tensor order: 0
986
+ * definition: quotient of shear stress `τ` (item 4-16.2) and shear strain `γ` (item 4-17.3): `G = τ/γ`
987
+ * remarks: Conditions should be specified (e.g. isentropic or isothermal process).
988
+ */
989
+ attribute :>> num: Real;
990
+ attribute :>> mRef: ModulusOfRigidityUnit[1];
991
+ }
992
+
993
+ attribute modulusOfRigidity: ModulusOfRigidityValue[*] nonunique :> scalarQuantities;
994
+
995
+ attribute def ModulusOfRigidityUnit :> DerivedUnit {
996
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; }
997
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
998
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
999
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
1000
+ }
1001
+
1002
+ alias ShearModulusUnit for ModulusOfRigidityUnit;
1003
+ alias ShearModulusValue for ModulusOfRigidityValue;
1004
+ alias shearModulus for modulusOfRigidity;
1005
+
1006
+ /* ISO-80000-4 item 4-19.3 modulus of compression, bulk modulus */
1007
+ attribute def ModulusOfCompressionValue :> ScalarQuantityValue {
1008
+ doc
1009
+ /*
1010
+ * source: item 4-19.3 modulus of compression, bulk modulus
1011
+ * symbol(s): `K`, `K_m`, `B`
1012
+ * application domain: generic
1013
+ * name: ModulusOfCompression
1014
+ * quantity dimension: L^-1*M^1*T^-2
1015
+ * measurement unit(s): Pa, N*m^-2, kg*m^-1*s^-2
1016
+ * tensor order: 0
1017
+ * definition: negative of the quotient of pressure `p` (item 4-14.1) and relative volume strain `θ` (item 4-17.4): `K = -(p/θ)`
1018
+ * remarks: Conditions should be specified (e.g. isentropic or isothermal process).
1019
+ */
1020
+ attribute :>> num: Real;
1021
+ attribute :>> mRef: ModulusOfCompressionUnit[1];
1022
+ }
1023
+
1024
+ attribute modulusOfCompression: ModulusOfCompressionValue[*] nonunique :> scalarQuantities;
1025
+
1026
+ attribute def ModulusOfCompressionUnit :> DerivedUnit {
1027
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; }
1028
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
1029
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
1030
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
1031
+ }
1032
+
1033
+ alias BulkModulusUnit for ModulusOfCompressionUnit;
1034
+ alias BulkModulusValue for ModulusOfCompressionValue;
1035
+ alias bulkModulus for modulusOfCompression;
1036
+
1037
+ /* ISO-80000-4 item 4-20 compressibility */
1038
+ attribute def CompressibilityValue :> ScalarQuantityValue {
1039
+ doc
1040
+ /*
1041
+ * source: item 4-20 compressibility
1042
+ * symbol(s): `ϰ`
1043
+ * application domain: generic
1044
+ * name: Compressibility
1045
+ * quantity dimension: L^1*M^-1*T^2
1046
+ * measurement unit(s): Pa^-1, kg^-1*m*s^2
1047
+ * tensor order: 0
1048
+ * definition: negative relative change of volume `V` (ISO 80000-3) of an object under pressure `p` (item 4-14.1) expressed by: `ϰ = -(1/V)(dV)/(dp)`
1049
+ * remarks: Conditions should be specified (e.g. isentropic or isothermal process). See also ISO 80000-5.
1050
+ */
1051
+ attribute :>> num: Real;
1052
+ attribute :>> mRef: CompressibilityUnit[1];
1053
+ }
1054
+
1055
+ attribute compressibility: CompressibilityValue[*] nonunique :> scalarQuantities;
1056
+
1057
+ attribute def CompressibilityUnit :> DerivedUnit {
1058
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; }
1059
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; }
1060
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 2; }
1061
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
1062
+ }
1063
+
1064
+ /* ISO-80000-4 item 4-21.1 second axial moment of area */
1065
+ attribute def SecondAxialMomentOfAreaValue :> ScalarQuantityValue {
1066
+ doc
1067
+ /*
1068
+ * source: item 4-21.1 second axial moment of area
1069
+ * symbol(s): `I_a`
1070
+ * application domain: generic
1071
+ * name: SecondAxialMomentOfArea
1072
+ * quantity dimension: L^4
1073
+ * measurement unit(s): m^4
1074
+ * tensor order: 0
1075
+ * definition: geometrical characteristic of a shape of a body equal to: `I_a = int int_M r_Q^2 dA` where `M` is the two-dimensional domain of the cross-section of a plane and considered body, `r_Q` is radial distance (ISO 80000-3) from a Q-axis in the plane of the surface considered and `A` is area (ISO 80000-3)
1076
+ * remarks: This quantity is often referred to wrongly as "moment of inertia" (item 4-7). The subscript, `a`, may be omitted when there is no risk of confusion.
1077
+ */
1078
+ attribute :>> num: Real;
1079
+ attribute :>> mRef: SecondAxialMomentOfAreaUnit[1];
1080
+ }
1081
+
1082
+ attribute secondAxialMomentOfArea: SecondAxialMomentOfAreaValue[*] nonunique :> scalarQuantities;
1083
+
1084
+ attribute def SecondAxialMomentOfAreaUnit :> DerivedUnit {
1085
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 4; }
1086
+ attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; }
1087
+ }
1088
+
1089
+ /* ISO-80000-4 item 4-21.2 second polar moment of area */
1090
+ attribute def SecondPolarMomentOfAreaValue :> ScalarQuantityValue {
1091
+ doc
1092
+ /*
1093
+ * source: item 4-21.2 second polar moment of area
1094
+ * symbol(s): `I_p`
1095
+ * application domain: generic
1096
+ * name: SecondPolarMomentOfArea
1097
+ * quantity dimension: L^4
1098
+ * measurement unit(s): m^4
1099
+ * tensor order: 0
1100
+ * definition: geometrical characteristic of a shape of a body equal to: `I_p = int int_M r_Q^2 * dA` where `M` is the two-dimensional domain of the cross-section of a plane and considered body, `r_Q` is radial distance (ISO 80000-3) from a Q-axis perpendicular to the plane of the surface considered and `A` is area (ISO 80000-3)
1101
+ * remarks: This quantity is often referred to wrongly as "moment of inertia" (item 4-7). The subscript, `p`, may be omitted when there is no risk of confusion.
1102
+ */
1103
+ attribute :>> num: Real;
1104
+ attribute :>> mRef: SecondPolarMomentOfAreaUnit[1];
1105
+ }
1106
+
1107
+ attribute secondPolarMomentOfArea: SecondPolarMomentOfAreaValue[*] nonunique :> scalarQuantities;
1108
+
1109
+ attribute def SecondPolarMomentOfAreaUnit :> DerivedUnit {
1110
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 4; }
1111
+ attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; }
1112
+ }
1113
+
1114
+ /* ISO-80000-4 item 4-22 section modulus */
1115
+ attribute def SectionModulusValue :> ScalarQuantityValue {
1116
+ doc
1117
+ /*
1118
+ * source: item 4-22 section modulus
1119
+ * symbol(s): `Z`, `(W)`
1120
+ * application domain: generic
1121
+ * name: SectionModulus
1122
+ * quantity dimension: L^3
1123
+ * measurement unit(s): m^3
1124
+ * tensor order: 0
1125
+ * definition: geometrical characteristic of a shape of a body equal to: `Z = I_a/r_(Q_max)` where `I_a` is the second axial moment of area (item 4-21.1) and `r_(Q,max)` is the maximum radial distance (ISO 80000-3) of any point in the surface considered from the Q-axis with respect to which `I_a` is defined
1126
+ * remarks: None.
1127
+ */
1128
+ attribute :>> num: Real;
1129
+ attribute :>> mRef: SectionModulusUnit[1];
1130
+ }
1131
+
1132
+ attribute sectionModulus: SectionModulusValue[*] nonunique :> scalarQuantities;
1133
+
1134
+ attribute def SectionModulusUnit :> DerivedUnit {
1135
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 3; }
1136
+ attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; }
1137
+ }
1138
+
1139
+ /* ISO-80000-4 item 4-23.1 static friction coefficient, static friction factor, coefficient of static friction */
1140
+ attribute def StaticFrictionCoefficientValue :> DimensionOneValue {
1141
+ doc
1142
+ /*
1143
+ * source: item 4-23.1 static friction coefficient, static friction factor, coefficient of static friction
1144
+ * symbol(s): `μ_s`, `(f_s)`
1145
+ * application domain: generic
1146
+ * name: StaticFrictionCoefficient (specializes DimensionOneQuantity)
1147
+ * quantity dimension: 1
1148
+ * measurement unit(s): 1
1149
+ * tensor order: 0
1150
+ * definition: proportionality factor between the maximum magnitude of the tangential component `F_max` of the static friction force (item 4-9.3) and the magnitude of the normal component `N` of the contact force (item 4-9.1) between two bodies at relative rest with respect to each other: `F_max = μ_s * N`
1151
+ * remarks: When it is not necessary to distinguish between dynamic friction factor and static friction factor, the name friction factor may be used for both.
1152
+ */
1153
+ }
1154
+ attribute staticFrictionCoefficient: StaticFrictionCoefficientValue :> scalarQuantities;
1155
+
1156
+ alias staticFrictionFactor for staticFrictionCoefficient;
1157
+
1158
+ alias coefficientOfStaticFriction for staticFrictionCoefficient;
1159
+
1160
+ /* ISO-80000-4 item 4-23.2 kinetic friction factor, dynamic friction factor */
1161
+ attribute def KineticFrictionFactorValue :> DimensionOneValue {
1162
+ doc
1163
+ /*
1164
+ * source: item 4-23.2 kinetic friction factor, dynamic friction factor
1165
+ * symbol(s): `μ`, `(f)`
1166
+ * application domain: generic
1167
+ * name: KineticFrictionFactor (specializes DimensionOneQuantity)
1168
+ * quantity dimension: 1
1169
+ * measurement unit(s): 1
1170
+ * tensor order: 0
1171
+ * definition: proportionality factor between the magnitudes of the kinetic friction force, `F_μ` (item 4-9.4) and the normal component `N` of the contact force (item 4-9.1): `F_μ = μ * N`
1172
+ * remarks: When it is not necessary to distinguish between dynamic friction factor and static friction factor, the name friction factor may be used for both. The dynamic friction factor `µ` is independent in first approximation of the contact surface.
1173
+ */
1174
+ }
1175
+ attribute kineticFrictionFactor: KineticFrictionFactorValue :> scalarQuantities;
1176
+
1177
+ alias dynamicFrictionFactor for kineticFrictionFactor;
1178
+
1179
+ /* ISO-80000-4 item 4-23.3 rolling resistance factor */
1180
+ attribute def RollingResistanceFactorValue :> DimensionOneValue {
1181
+ doc
1182
+ /*
1183
+ * source: item 4-23.3 rolling resistance factor
1184
+ * symbol(s): `C_"rr"`
1185
+ * application domain: generic
1186
+ * name: RollingResistanceFactor (specializes DimensionOneQuantity)
1187
+ * quantity dimension: 1
1188
+ * measurement unit(s): 1
1189
+ * tensor order: 0
1190
+ * definition: proportionality factor between the magnitude of the tangential component `F` and the magnitude of the normal component `N` of the force applied to a body rolling on a surface at constant speed: `F = C_(rr)*N`
1191
+ * remarks: Also known as rolling resistance coefficient, RRC.
1192
+ */
1193
+ }
1194
+ attribute rollingResistanceFactor: RollingResistanceFactorValue :> scalarQuantities;
1195
+
1196
+ /* ISO-80000-4 item 4-23.4 drag coefficient, drag factor */
1197
+ attribute def DragCoefficientValue :> DimensionOneValue {
1198
+ doc
1199
+ /*
1200
+ * source: item 4-23.4 drag coefficient, drag factor
1201
+ * symbol(s): `C_D`
1202
+ * application domain: generic
1203
+ * name: DragCoefficient (specializes DimensionOneQuantity)
1204
+ * quantity dimension: 1
1205
+ * measurement unit(s): 1
1206
+ * tensor order: 0
1207
+ * definition: factor proportional to magnitude `F_D` of the drag force (item 4-9.6) of a body moving in a fluid, dependent on the shape and speed `v` (ISO 80000-3) of a body: `F_D = 1/2 * C_D * ρ * v^2 * A` where `ρ` is mass density (item 4-2) of the fluid and `A` is cross-section area (ISO 80000-3) of the body
1208
+ * remarks: None.
1209
+ */
1210
+ }
1211
+ attribute dragCoefficient: DragCoefficientValue :> scalarQuantities;
1212
+
1213
+ alias dragFactor for dragCoefficient;
1214
+
1215
+ /* ISO-80000-4 item 4-24 dynamic viscosity, viscosity */
1216
+ attribute def DynamicViscosityValue :> ScalarQuantityValue {
1217
+ doc
1218
+ /*
1219
+ * source: item 4-24 dynamic viscosity, viscosity
1220
+ * symbol(s): `η`
1221
+ * application domain: generic
1222
+ * name: DynamicViscosity
1223
+ * quantity dimension: L^-1*M^1*T^-1
1224
+ * measurement unit(s): Pa*s, kg*m^-1*s^-1
1225
+ * tensor order: 0
1226
+ * definition: for laminar flows, proportionality constant between shear stress `τ_(xz)` (item 4-16.2) in a fluid moving with a velocity `v_x` (ISO 80000-3) and gradient `(d v_x)/dz` perpendicular to the plane of shear: `τ_(xz) = η (d v_x)/(dz)`
1227
+ * remarks: None.
1228
+ */
1229
+ attribute :>> num: Real;
1230
+ attribute :>> mRef: DynamicViscosityUnit[1];
1231
+ }
1232
+
1233
+ attribute dynamicViscosity: DynamicViscosityValue[*] nonunique :> scalarQuantities;
1234
+
1235
+ attribute def DynamicViscosityUnit :> DerivedUnit {
1236
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; }
1237
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
1238
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
1239
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
1240
+ }
1241
+
1242
+ alias ViscosityUnit for DynamicViscosityUnit;
1243
+ alias ViscosityValue for DynamicViscosityValue;
1244
+ alias viscosity for dynamicViscosity;
1245
+
1246
+ /* ISO-80000-4 item 4-25 kinematic viscosity */
1247
+ attribute def KinematicViscosityValue :> ScalarQuantityValue {
1248
+ doc
1249
+ /*
1250
+ * source: item 4-25 kinematic viscosity
1251
+ * symbol(s): `v`
1252
+ * application domain: generic
1253
+ * name: KinematicViscosity
1254
+ * quantity dimension: L^2*T^-1
1255
+ * measurement unit(s): m^2*s^-1
1256
+ * tensor order: 0
1257
+ * definition: quotient of dynamic viscosity `η` (item 4-24) and mass density `ρ` (item 4-2) of a fluid: `v = η/ρ`
1258
+ * remarks: None.
1259
+ */
1260
+ attribute :>> num: Real;
1261
+ attribute :>> mRef: KinematicViscosityUnit[1];
1262
+ }
1263
+
1264
+ attribute kinematicViscosity: KinematicViscosityValue[*] nonunique :> scalarQuantities;
1265
+
1266
+ attribute def KinematicViscosityUnit :> DerivedUnit {
1267
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
1268
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
1269
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); }
1270
+ }
1271
+
1272
+ /* ISO-80000-4 item 4-26 surface tension */
1273
+ attribute def SurfaceTensionValue :> ScalarQuantityValue {
1274
+ doc
1275
+ /*
1276
+ * source: item 4-26 surface tension
1277
+ * symbol(s): `γ`, `σ`
1278
+ * application domain: generic
1279
+ * name: SurfaceTension
1280
+ * quantity dimension: M^1*T^-2
1281
+ * measurement unit(s): N*m^-1, kg*s^-2
1282
+ * tensor order: 0
1283
+ * definition: magnitude of a force acting against the enlargement of area portion of a surface separating a liquid from its surrounding
1284
+ * remarks: The concept of surface energy is closely related to surface tension and has the same dimension.
1285
+ */
1286
+ attribute :>> num: Real;
1287
+ attribute :>> mRef: SurfaceTensionUnit[1];
1288
+ }
1289
+
1290
+ attribute surfaceTension: SurfaceTensionValue[*] nonunique :> scalarQuantities;
1291
+
1292
+ attribute def SurfaceTensionUnit :> DerivedUnit {
1293
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
1294
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
1295
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF); }
1296
+ }
1297
+
1298
+ /* ISO-80000-4 item 4-27.1 power */
1299
+ attribute def PowerValue :> ScalarQuantityValue {
1300
+ doc
1301
+ /*
1302
+ * source: item 4-27.1 power
1303
+ * symbol(s): `P`
1304
+ * application domain: generic
1305
+ * name: Power
1306
+ * quantity dimension: L^2*M^1*T^-3
1307
+ * measurement unit(s): W, J*s^-1, kg*m^2*s^-3
1308
+ * tensor order: 0
1309
+ * definition: quotient of energy (ISO 80000-5) and duration (ISO 80000-3)
1310
+ * remarks: None.
1311
+ */
1312
+ attribute :>> num: Real;
1313
+ attribute :>> mRef: PowerUnit[1];
1314
+ }
1315
+
1316
+ attribute power: PowerValue[*] nonunique :> scalarQuantities;
1317
+
1318
+ attribute def PowerUnit :> DerivedUnit {
1319
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
1320
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
1321
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; }
1322
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
1323
+ }
1324
+
1325
+ /* ISO-80000-4 item 4-27 mechanical power */
1326
+ attribute mechanicalPower: PowerValue :> scalarQuantities {
1327
+ doc
1328
+ /*
1329
+ * source: item 4-27 mechanical power
1330
+ * symbol(s): `P`
1331
+ * application domain: mechanics
1332
+ * name: MechanicalPower (specializes Power)
1333
+ * quantity dimension: L^2*M^1*T^-3
1334
+ * measurement unit(s): W, N*m*s^-1, kg*m^2*s^-3
1335
+ * tensor order: 0
1336
+ * definition: scalar product of force `vec(F)` (item 4-9.1) acting to a body and its velocity `vec(v)` (ISO 80000-3): `P = vec(F) * vec(v)`
1337
+ * remarks: None.
1338
+ */
1339
+ }
1340
+
1341
+ /* ISO-80000-4 item 4-28.1 potential energy */
1342
+ attribute potentialEnergy: EnergyValue :> scalarQuantities {
1343
+ doc
1344
+ /*
1345
+ * source: item 4-28.1 potential energy
1346
+ * symbol(s): `V`, `E_p`
1347
+ * application domain: generic
1348
+ * name: PotentialEnergy (specializes Energy)
1349
+ * quantity dimension: L^2*M^1*T^-2
1350
+ * measurement unit(s): J, kg*m^2*s^-2
1351
+ * tensor order: 0
1352
+ * definition: for conservative force `vec(F)`, scalar additive quantity obeying condition `vec(F) = -nabla F`, if it exists
1353
+ * remarks: For the definition of energy, see ISO 80000-5. A force is conservative when the force field is irrotational, i.e. `rot(F) = 0` , or `vec(F)` is perpendicular to the speed of the body to ensure `vec(F) * d vec(r) = 0` .
1354
+ */
1355
+ }
1356
+
1357
+ /* ISO-80000-4 item 4-28.2 kinetic energy */
1358
+ attribute kineticEnergy: EnergyValue :> scalarQuantities {
1359
+ doc
1360
+ /*
1361
+ * source: item 4-28.2 kinetic energy
1362
+ * symbol(s): `T`, `E_k`
1363
+ * application domain: generic
1364
+ * name: KineticEnergy (specializes Energy)
1365
+ * quantity dimension: L^2*M^1*T^-2
1366
+ * measurement unit(s): J, kg*m^2*s^-2
1367
+ * tensor order: 0
1368
+ * definition: scalar (ISO 80000-2) quantity characterizing a moving body expressed by: `T = 1/2 m v^2` where `m` is mass (item 4-1) of the body and `v` is its speed (ISO 80000-3)
1369
+ * remarks: For the definition of energy, see ISO 80000-5.
1370
+ */
1371
+ }
1372
+
1373
+ /* ISO-80000-4 item 4-28.3 mechanical energy */
1374
+ attribute mechanicalEnergy: EnergyValue :> scalarQuantities {
1375
+ doc
1376
+ /*
1377
+ * source: item 4-28.3 mechanical energy
1378
+ * symbol(s): `E`, `W`
1379
+ * application domain: generic
1380
+ * name: MechanicalEnergy (specializes Energy)
1381
+ * quantity dimension: L^2*M^1*T^-2
1382
+ * measurement unit(s): J, kg*m^2*s^-2
1383
+ * tensor order: 0
1384
+ * definition: sum of kinetic energy `T` (item 4-28.2) and potential energy `V` (item 4-28.1): `E = T+V`
1385
+ * remarks: The symbols `E` and `W` are also used for other kinds of energy. This definition is understood in a classical way and it does not include thermal motion.
1386
+ */
1387
+ }
1388
+
1389
+ /* ISO-80000-4 item 4-28.4 mechanical work, work */
1390
+ attribute mechanicalWork: EnergyValue :> scalarQuantities {
1391
+ doc
1392
+ /*
1393
+ * source: item 4-28.4 mechanical work, work
1394
+ * symbol(s): `A`, `W`
1395
+ * application domain: generic
1396
+ * name: MechanicalWork (specializes Energy)
1397
+ * quantity dimension: L^2*M^1*T^-2
1398
+ * measurement unit(s): J, kg*m^2*s^-2
1399
+ * tensor order: 0
1400
+ * definition: process quantity describing the total action of a force `vec(F)` (item 4-9.1) along a continuous curve `Γ` in three-dimensional space with infinitesimal displacement (ISO 80000-3) `dvec(r)`, as a line integral of their scalar product: `A = int_Γ vec(F) * d vec(r)`
1401
+ * remarks: The definition covers the case `A = -int_Γ p*dV` where `Γ` is a curve in the phase space and implies that work generally depends upon `Γ`, and that type of process must be defined (e.g. isentropic or isothermic).
1402
+ */
1403
+ }
1404
+
1405
+ alias work for mechanicalWork;
1406
+
1407
+ /* ISO-80000-4 item 4-29 mechanical efficiency */
1408
+ attribute def MechanicalEfficiencyValue :> DimensionOneValue {
1409
+ doc
1410
+ /*
1411
+ * source: item 4-29 mechanical efficiency
1412
+ * symbol(s): `η`
1413
+ * application domain: mechanics
1414
+ * name: MechanicalEfficiency (specializes DimensionOneQuantity)
1415
+ * quantity dimension: 1
1416
+ * measurement unit(s): 1
1417
+ * tensor order: 0
1418
+ * definition: quotient of output power `P_"out"` (item 4-27) from a system and input power `P_"in"` (item 4-27) to this system: `η = P_"out"/P_"in"`
1419
+ * remarks: The system must be specified. This quantity is often expressed by the unit percent, symbol %.
1420
+ */
1421
+ }
1422
+ attribute mechanicalEfficiency: MechanicalEfficiencyValue :> scalarQuantities;
1423
+
1424
+ /* ISO-80000-4 item 4-30.1 mass flow */
1425
+ attribute def MassFlowValue :> ScalarQuantityValue {
1426
+ doc
1427
+ /*
1428
+ * source: item 4-30.1 mass flow (magnitude)
1429
+ * symbol(s): `j_m`
1430
+ * application domain: generic
1431
+ * name: MassFlow
1432
+ * quantity dimension: L^-2*M^1*T^-1
1433
+ * measurement unit(s): kg*m^-2*s^-1
1434
+ * tensor order: 0
1435
+ * definition: vector (ISO 80000-2) quantity characterizing a flowing fluid by the product of its local mass density `ρ` (item 4-2) and local velocity `vec(v)` (ISO 80000-3): `vec(j_m) = ρ vec(v)`
1436
+ * remarks: None.
1437
+ */
1438
+ attribute :>> num: Real;
1439
+ attribute :>> mRef: MassFlowUnit[1];
1440
+ }
1441
+
1442
+ attribute massFlow: MassFlowValue[*] nonunique :> scalarQuantities;
1443
+
1444
+ attribute def MassFlowUnit :> DerivedUnit {
1445
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; }
1446
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
1447
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
1448
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
1449
+ }
1450
+
1451
+ attribute def Cartesian3dMassFlowVector :> VectorQuantityValue {
1452
+ doc
1453
+ /*
1454
+ * source: item 4-30.1 mass flow (vector)
1455
+ * symbol(s): `vec(j_m)`
1456
+ * application domain: generic
1457
+ * name: MassFlow
1458
+ * quantity dimension: L^-2*M^1*T^-1
1459
+ * measurement unit(s): kg*m^-2*s^-1
1460
+ * tensor order: 1
1461
+ * definition: vector (ISO 80000-2) quantity characterizing a flowing fluid by the product of its local mass density `ρ` (item 4-2) and local velocity `vec(v)` (ISO 80000-3): `vec(j_m) = ρ vec(v)`
1462
+ * remarks: None.
1463
+ */
1464
+ attribute :>> isBound = false;
1465
+ attribute :>> num: Real[3];
1466
+ attribute :>> mRef: Cartesian3dMassFlowCoordinateFrame[1];
1467
+ }
1468
+
1469
+ attribute massFlowVector: Cartesian3dMassFlowVector :> vectorQuantities;
1470
+
1471
+ attribute def Cartesian3dMassFlowCoordinateFrame :> VectorMeasurementReference {
1472
+ attribute :>> dimensions = 3;
1473
+ attribute :>> isBound = false;
1474
+ attribute :>> isOrthogonal = true;
1475
+ attribute :>> mRefs: MassFlowUnit[3];
1476
+ }
1477
+
1478
+ /* ISO-80000-4 item 4-30.2 mass flow rate */
1479
+ attribute def MassFlowRateValue :> ScalarQuantityValue {
1480
+ doc
1481
+ /*
1482
+ * source: item 4-30.2 mass flow rate
1483
+ * symbol(s): `q_m`
1484
+ * application domain: generic
1485
+ * name: MassFlowRate
1486
+ * quantity dimension: M^1*T^-1
1487
+ * measurement unit(s): kg*s^-1
1488
+ * tensor order: 0
1489
+ * definition: scalar (ISO 80000-2) quantity characterizing the total flow through the two-dimensional domain `A` with normal vector `vec(e)_n` of a flowing fluid with mass flow `vec(j)_m` (item 4-30.1) as an integral: `q_m = int int_A vec(j)_m * vec(e)_n dA` where `dA` is the area (ISO 80000-3) of an element of the two-dimensional domain `A`
1490
+ * remarks: None.
1491
+ */
1492
+ attribute :>> num: Real;
1493
+ attribute :>> mRef: MassFlowRateUnit[1];
1494
+ }
1495
+
1496
+ attribute massFlowRate: MassFlowRateValue[*] nonunique :> scalarQuantities;
1497
+
1498
+ attribute def MassFlowRateUnit :> DerivedUnit {
1499
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
1500
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
1501
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF); }
1502
+ }
1503
+
1504
+ /* ISO-80000-4 item 4-30.3 mass change rate */
1505
+ attribute def MassChangeRateValue :> ScalarQuantityValue {
1506
+ doc
1507
+ /*
1508
+ * source: item 4-30.3 mass change rate
1509
+ * symbol(s): `q_m`
1510
+ * application domain: generic
1511
+ * name: MassChangeRate
1512
+ * quantity dimension: M^1*T^-1
1513
+ * measurement unit(s): kg*s^-1
1514
+ * tensor order: 0
1515
+ * definition: rate of increment of mass `m` (item 4-1): `q_m = (dm)/(dt)` where `dm` is the infinitesimal mass (item 4-1) increment and `dt` is the infinitesimal duration (ISO 80000-3)
1516
+ * remarks: None.
1517
+ */
1518
+ attribute :>> num: Real;
1519
+ attribute :>> mRef: MassChangeRateUnit[1];
1520
+ }
1521
+
1522
+ attribute massChangeRate: MassChangeRateValue[*] nonunique :> scalarQuantities;
1523
+
1524
+ attribute def MassChangeRateUnit :> DerivedUnit {
1525
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
1526
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
1527
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF); }
1528
+ }
1529
+
1530
+ /* ISO-80000-4 item 4-31 volume flow rate */
1531
+ attribute def VolumeFlowRateValue :> ScalarQuantityValue {
1532
+ doc
1533
+ /*
1534
+ * source: item 4-31 volume flow rate
1535
+ * symbol(s): `q_v`
1536
+ * application domain: generic
1537
+ * name: VolumeFlowRate
1538
+ * quantity dimension: L^3*T^-1
1539
+ * measurement unit(s): m^3*s^-1
1540
+ * tensor order: 0
1541
+ * definition: scalar (ISO 80000-2) quantity characterizing the total flow through the two-dimensional domain `A` with the normal vector `vec(e)_n` of a flowing fluid with velocity `vec(v)` (ISO 80000-3) as an integral: `q_v = int int_A vec(v) * vec(e)_n dA` where `dA` is the area (ISO 80000-3) of an element of the two-dimensional domain `A`
1542
+ * remarks: None.
1543
+ */
1544
+ attribute :>> num: Real;
1545
+ attribute :>> mRef: VolumeFlowRateUnit[1];
1546
+ }
1547
+
1548
+ attribute volumeFlowRate: VolumeFlowRateValue[*] nonunique :> scalarQuantities;
1549
+
1550
+ attribute def VolumeFlowRateUnit :> DerivedUnit {
1551
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 3; }
1552
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
1553
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); }
1554
+ }
1555
+
1556
+ /* ISO-80000-4 item 4-32 action quantity */
1557
+ attribute def ActionQuantityValue :> ScalarQuantityValue {
1558
+ doc
1559
+ /*
1560
+ * source: item 4-32 action quantity
1561
+ * symbol(s): `S`
1562
+ * application domain: generic
1563
+ * name: ActionQuantity
1564
+ * quantity dimension: L^2*M^1*T^-1
1565
+ * measurement unit(s): J*s, kg*m^2*s^-1
1566
+ * tensor order: 0
1567
+ * definition: time integral of energy `E` over a time interval `(t_1, t_2)`: `S = int_(t_1)^(t_2) E dt`
1568
+ * remarks: The energy may be expressed by a Lagrangian or Hamiltonian function.
1569
+ */
1570
+ attribute :>> num: Real;
1571
+ attribute :>> mRef: ActionQuantityUnit[1];
1572
+ }
1573
+
1574
+ attribute actionQuantity: ActionQuantityValue[*] nonunique :> scalarQuantities;
1575
+
1576
+ attribute def ActionQuantityUnit :> DerivedUnit {
1577
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
1578
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
1579
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
1580
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
1581
+ }
1582
+
1583
+ }
src/sysml.library/Domain Libraries/Quantities and Units/ISQSpaceTime.sysml ADDED
@@ -0,0 +1,1171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package ISQSpaceTime {
2
+ doc
3
+ /*
4
+ * International System of Quantities and Units
5
+ * Generated on 2022-08-07T14:44:27Z from standard ISO-80000-3:2019 "Space and Time"
6
+ * see also https://www.iso.org/obp/ui/#iso:std:iso:80000:-3:ed-2:v1:en
7
+ *
8
+ * Note 1: In documentation comments, AsciiMath notation (see http://asciimath.org/) is used for mathematical concepts,
9
+ * with Greek letters in Unicode encoding. In running text, AsciiMath is placed between backticks.
10
+ * Note 2: For vector and tensor quantities currently the unit and quantity value type for their (scalar) magnitude is
11
+ * defined, as well as their typical Cartesian 3d VectorMeasurementReference (i.e. coordinate system)
12
+ * or TensorMeasurementReference.
13
+ */
14
+
15
+ private import ScalarValues::Real;
16
+ private import ScalarValues::String;
17
+ private import Quantities::*;
18
+ private import MeasurementReferences::*;
19
+ private import ISQBase::*;
20
+
21
+ /* ISO-80000-3 item 3-1.1 length */
22
+ /* See package ISQBase for the declarations of LengthValue and LengthUnit */
23
+
24
+ /* ISO-80000-3 item 3-1.2 width, breadth */
25
+ attribute width: LengthValue :> scalarQuantities {
26
+ doc
27
+ /*
28
+ * source: item 3-1.2 width, breadth
29
+ * symbol(s): `b`, `B`
30
+ * application domain: generic
31
+ * name: Width (specializes Length)
32
+ * quantity dimension: L^1
33
+ * measurement unit(s): m
34
+ * tensor order: 0
35
+ * definition: minimum length of a straight line segment between two parallel straight lines (in two dimensions) or planes (in three dimensions) that enclose a given geometrical shape
36
+ * remarks: This quantity is non-negative.
37
+ */
38
+ }
39
+
40
+ alias breadth for width;
41
+
42
+ /* ISO-80000-3 item 3-1.3 height, depth, altitude */
43
+ attribute height: LengthValue :> scalarQuantities {
44
+ doc
45
+ /*
46
+ * source: item 3-1.3 height, depth, altitude
47
+ * symbol(s): `h`, `H`
48
+ * application domain: generic
49
+ * name: Height (specializes Length)
50
+ * quantity dimension: L^1
51
+ * measurement unit(s): m
52
+ * tensor order: 0
53
+ * definition: minimum length of a straight line segment between a point and a reference line or reference surface
54
+ * remarks: This quantity is usually signed. The sign expresses the position of the particular point with respect to the reference line or surface and is chosen by convention. The symbol `H` is often used to denote altitude, i.e. height above sea level.
55
+ */
56
+ }
57
+
58
+ alias depth for height;
59
+
60
+ alias altitude for height;
61
+
62
+ /* ISO-80000-3 item 3-1.4 thickness */
63
+ attribute thickness: LengthValue :> scalarQuantities {
64
+ doc
65
+ /*
66
+ * source: item 3-1.4 thickness
67
+ * symbol(s): `d`, `δ`
68
+ * application domain: generic
69
+ * name: Thickness (specializes Length)
70
+ * quantity dimension: L^1
71
+ * measurement unit(s): m
72
+ * tensor order: 0
73
+ * definition: width (item 3-1.2)
74
+ * remarks: This quantity is non-negative.
75
+ */
76
+ }
77
+
78
+ /* ISO-80000-3 item 3-1.5 diameter */
79
+ attribute diameter: LengthValue :> scalarQuantities {
80
+ doc
81
+ /*
82
+ * source: item 3-1.5 diameter
83
+ * symbol(s): `d`, `D`
84
+ * application domain: generic
85
+ * name: Diameter (specializes Length)
86
+ * quantity dimension: L^1
87
+ * measurement unit(s): m
88
+ * tensor order: 0
89
+ * definition: width (item 3-1.2) of a circle, cylinder or sphere
90
+ * remarks: This quantity is non-negative.
91
+ */
92
+ }
93
+
94
+ /* ISO-80000-3 item 3-1.6 radius */
95
+ attribute radius: LengthValue :> scalarQuantities {
96
+ doc
97
+ /*
98
+ * source: item 3-1.6 radius
99
+ * symbol(s): `r`, `R`
100
+ * application domain: generic
101
+ * name: Radius (specializes Length)
102
+ * quantity dimension: L^1
103
+ * measurement unit(s): m
104
+ * tensor order: 0
105
+ * definition: half of a diameter (item 3-1.5)
106
+ * remarks: This quantity is non-negative.
107
+ */
108
+ }
109
+
110
+ /* ISO-80000-3 item 3-1.7 path length, arc length */
111
+ attribute pathLength: LengthValue :> scalarQuantities {
112
+ doc
113
+ /*
114
+ * source: item 3-1.7 path length, arc length
115
+ * symbol(s): `s`
116
+ * application domain: generic
117
+ * name: PathLength (specializes Length)
118
+ * quantity dimension: L^1
119
+ * measurement unit(s): m
120
+ * tensor order: 0
121
+ * definition: length of a rectifiable curve between two of its points
122
+ * remarks: The differential path length at a given point of a curve is: `ds = sqrt(dx^2 + dy^2 + dz^2)` where `x`, `y`, and `z` denote the Cartesian coordinates (ISO 80000-2) of the particular point. There are curves which are not rectifiable, for example fractal curves.
123
+ */
124
+ }
125
+
126
+ alias arcLength for pathLength;
127
+
128
+ /* ISO-80000-3 item 3-1.8 distance */
129
+ attribute distance: LengthValue :> scalarQuantities {
130
+ doc
131
+ /*
132
+ * source: item 3-1.8 distance
133
+ * symbol(s): `d`, `r`
134
+ * application domain: generic
135
+ * name: Distance (specializes Length)
136
+ * quantity dimension: L^1
137
+ * measurement unit(s): m
138
+ * tensor order: 0
139
+ * definition: shortest path length (item 3-1.7) between two points in a metric space
140
+ * remarks: A metric space might be curved. An example of a curved metric space is the surface of the Earth. In this case, distances are measured along great circles. A metric is not necessarily Euclidean.
141
+ */
142
+ }
143
+
144
+ /* ISO-80000-3 item 3-1.9 radial distance */
145
+ attribute radialDistance: LengthValue :> scalarQuantities {
146
+ doc
147
+ /*
148
+ * source: item 3-1.9 radial distance
149
+ * symbol(s): `r_Q`, `ρ`
150
+ * application domain: generic
151
+ * name: RadialDistance (specializes Length)
152
+ * quantity dimension: L^1
153
+ * measurement unit(s): m
154
+ * tensor order: 0
155
+ * definition: distance (item 3-1.8), where one point is located on an axis or within a closed non self-intersecting curve or surface
156
+ * remarks: The subscript Q denotes the point from which the radial distance is measured. Examples of closed non self-intersecting curves are circles or ellipses. Examples of closed non self-intersecting surfaces are surfaces of spheres or egg-shaped objects.
157
+ */
158
+ }
159
+
160
+ attribute def Spatial3dCoordinateFrame :> '3dCoordinateFrame' {
161
+ doc
162
+ /*
163
+ * Most general spatial 3D coordinate frame
164
+ */
165
+ attribute :>> isBound = true;
166
+ }
167
+
168
+ attribute def CartesianSpatial3dCoordinateFrame :> Spatial3dCoordinateFrame {
169
+ doc
170
+ /*
171
+ * Cartesian spatial 3D coordinate frame
172
+ *
173
+ * source: ISO 80000-2 item 2-17.1 Cartesian coordinates
174
+ *
175
+ * The components of a vector expressed on a Cartesian spatial coordinate frame are all LengthValues, and denoted with symbols `x`, `y`, `z`.
176
+ *
177
+ * Note 1: The Cartesian basis vectors `vec(e_x)`, `vec(e_y)` and `vec(e_z)` form an orthonormal right-handed coordinate frame.
178
+ * Note 2: The measurement units for the 3 dimensions are typically the same, but may be different.
179
+ */
180
+ attribute xUnit : LengthUnit = mRefs#(1);
181
+ attribute yUnit : LengthUnit = mRefs#(2);
182
+ attribute zUnit : LengthUnit = mRefs#(3);
183
+ attribute :>> mRefs : LengthUnit[3];
184
+ attribute :>> isOrthogonal = true;
185
+ }
186
+
187
+ readonly attribute universalCartesianSpatial3dCoordinateFrame : CartesianSpatial3dCoordinateFrame[1] {
188
+ doc
189
+ /*
190
+ * A singleton CartesianSpatial3dCoordinateFrame that can be used as a default universal Cartesian 3D coordinate frame.
191
+ */
192
+
193
+ attribute :>> mRefs default (SI::m, SI::m, SI::m) {
194
+ doc /*
195
+ * By default, the universalCartesianSpatial3dCoordinateFrame uses meters as the units on all three axes.
196
+ */
197
+ }
198
+
199
+ attribute :>> transformation[0..0] {
200
+ doc /*
201
+ * The universalCartesianSpatial3dCoordinateFrame is the "top-level" coordinate frame, not nested in any other frame.
202
+ */
203
+ }
204
+
205
+ }
206
+
207
+ attribute def CylindricalSpatial3dCoordinateFrame :> Spatial3dCoordinateFrame {
208
+ doc
209
+ /*
210
+ * Cylindrical spatial 3D coordinate frame
211
+ *
212
+ * source: ISO 80000-2 item 2-17.2 cylindrical coordinates
213
+ *
214
+ * The components of a (position) vector to a point P in a cylindrical coordinate frame are:
215
+ * - radialDistance (symbol `ρ`) defined by LengthValue, that is the radial distance from the cylinder axis to P
216
+ * - azimuth (symbol `φ`) defined by AngularMeasure, that is the angle between the azimuth reference direction and the line segment
217
+ * from the cylinder axis, in the plane that is orthogonal to the cylinder axis and intersects P
218
+ * - z coordinate (symbol `z`) defined by LengthValue, the coordinate along the clyinder axis.
219
+ *
220
+ * Note 1: The basis vectors `vec(e_ρ)(φ)`, `vec(e_φ)(φ)` and `vec(e_z)` form an orthonormal right-handed coordinate frame, where
221
+ * `vec(e_φ)` is tangent to the circular arc in the `φ` direction.
222
+ * Note 2: In order to enable transformation to and from a CartesianSpatial3dCoordinateFrame the `vec(e_x)` Cartesian basis vector is aligned
223
+ * with the `φ=0` direction in the cylindrical frame, and the `vec(e_z)` Cartesian basis vector is aligned with
224
+ * the `vec(e_z)` cylindrical basis vector.
225
+ * Note 3: If `z = 0`, then `ρ` and `φ` are polar coordinates in the XY-plane.
226
+ * Note 4: See also https://en.wikipedia.org/wiki/Cylindrical_coordinate_system .
227
+ */
228
+ attribute radialDistanceUnit : LengthUnit;
229
+ attribute azimuthUnit : AngularMeasureUnit;
230
+ attribute zUnit : LengthUnit;
231
+ attribute :>> mRefs = (radialDistanceUnit, azimuthUnit, zUnit);
232
+ attribute :>> isOrthogonal = true;
233
+ }
234
+
235
+ attribute def SphericalSpatial3dCoordinateFrame :> Spatial3dCoordinateFrame {
236
+ doc
237
+ /*
238
+ * Spherical spatial 3D coordinate frame
239
+ *
240
+ * source: ISO 80000-2 item 2-17.3 spherical coordinates
241
+ *
242
+ * The components of a (position) vector to a point P specified in a spherical coordinate frame are:
243
+ * - radialDistance (symbol `r`) defined by LengthValue, that is the distance from the origin to P
244
+ * - inclination (symbol `θ`) defined by AngularMeasure, that is the angle between the zenith direction and the line segment from origin to P
245
+ * - azimuth (symbol `φ`) defined by AngularMeasure, that is the angle between the azimuth reference direction and the line segment
246
+ * from the origin to the orthogonal projection of P on the reference plane, normal to the zenith direction.
247
+ *
248
+ * Note 1: The basis vectors `vec(e_r)(θ,φ)`, `vec(e_θ)(θ,φ)` and `vec(e_φ)(φ)` form an orthonormal right-handed frame, where
249
+ * `vec(e_θ)` and `vec(e_φ)` are tangent to the respective circular arcs in the `θ` and `φ` directions.
250
+ * Note 2: In order to transform to and from a CartesianSpatial3dCoordinateFrame the `vec(e_x)` Cartesian basis vector is aligned
251
+ * with the `θ=π/4` and `φ=0` direction in the spherical frame, and the `vec(e_z)` Cartesian basis vector is aligned
252
+ * with the `θ=0` zenith direction in the spherical frame.
253
+ * Note 3: If `θ = π/4`, then `ρ` and `φ` are polar coordinates in the XY-plane.
254
+ * Note 4: See also https://en.wikipedia.org/wiki/Spherical_coordinate_system .
255
+ */
256
+ attribute radialDistanceUnit : LengthUnit;
257
+ attribute inclinationUnit : AngularMeasureUnit;
258
+ attribute azimuthUnit : AngularMeasureUnit;
259
+ attribute :>> mRefs = (radialDistanceUnit, inclinationUnit, azimuthUnit);
260
+ attribute :>> isOrthogonal = true;
261
+ }
262
+
263
+ attribute def PlanetarySpatial3dCoordinateFrame :> Spatial3dCoordinateFrame {
264
+ doc
265
+ /*
266
+ * Planetary spatial 3D coordinate frame
267
+ *
268
+ * A planetary spatial 3D coordinate frame is a generalization for any planet of the geographic coordinate frame and geocentric coordinate
269
+ * for Earth. In such coordinate frames, typically the origin is located at the planet's centre of gravity, and the surface of the planet
270
+ * is approximated by a reference ellipsoid centred on the origin, with its major axes oriented along the south to north pole vector and
271
+ * the equatorial plane.
272
+ *
273
+ * The components of a (position) vector to a point P specified in a planetary coordinate frame are:
274
+ * - latitude (symbol `lat` or `φ`) defined by AngularMeasure, that is the angle between the equatorial plane and the vector from
275
+ * the origin to P, similar to the inclination in a spherical spatial coordinate frame. Typically, the zero reference latitude is chosen
276
+ * for positions in the equatorial plane, with positive latitude for positions in the northern hemisphere and negative latitude for positions
277
+ * in the southern hemisphere.
278
+ * - longitude (symbol `long` or `λ`) defined by AngularMeasure, that is the angle between a reference meridian and the meridian
279
+ * passing through P, similar to the azimuth of a spherical spatial coordinate frame. The convention is to connotate positive longitude
280
+ * with eastward direction and negative longitude with westward direction. The reference meridian for `long=0` is chosen to pass
281
+ * through a particular feature of the planet, e.g., for Earth typically the position of the British Royal Observatory in Greenwich, UK.
282
+ * - altitude (symbol `h`) defined by LengthValue, that is the distance between P and the reference ellipsoid
283
+ * in the normal direction to the ellipsoid. Positive altitude specifies a position above the reference ellipsoid surface,
284
+ * while a negative value specifies a position below.
285
+ *
286
+ * Note 1: The reference meridian is also called prime meridian.
287
+ * Note 2: The basis vectors `vec(e_φ)(φ)`, `vec(e_λ)(λ)` and `vec(e_h)(φ,λ)` form an orthonormal right-handed frame, where
288
+ * `vec(e_φ)` and `vec(e_λ)` are tangent to the reference ellipsoid in the respective latitude and longitude directions,
289
+ * and `vec(e_h)` is normal to the reference ellipsoid.
290
+ * Note 3: In order to transform to and from a CartesianSpatial3dCoordinateFrame the `vec(e_x)` Cartesian basis vector is aligned
291
+ * with the `φ=0` and `λ=0` direction in the planetary frame, and the `vec(e_z)` Cartesian basis vector is aligned
292
+ * with the `λ=π/2` (north pole) direction in the planetary frame.
293
+ * Note 4: See also https://en.wikipedia.org/wiki/Planetary_coordinate_system .
294
+ */
295
+ attribute latitudeUnit : AngularMeasureUnit;
296
+ attribute longitudeUnit : AngularMeasureUnit;
297
+ attribute altitudeUnit : LengthUnit;
298
+ attribute :>> mRefs = (longitudeUnit, latitudeUnit, altitudeUnit);
299
+ attribute :>> isOrthogonal = true;
300
+ }
301
+
302
+ attribute def Position3dVector :> '3dVectorQuantityValue' {
303
+ doc
304
+ /*
305
+ * source: item 3-1.10 position vector
306
+ * symbol(s): `vec(r)`
307
+ * application domain: generic
308
+ * name: PositionVector
309
+ * quantity dimension: L^1
310
+ * measurement unit(s): m
311
+ * tensor order: 1
312
+ * definition: vector (ISO 80000-2) quantity from the origin of a coordinate system to a point in space
313
+ * remarks: Position vectors are so-called bounded vectors, i.e. their magnitude (ISO 80000-2) and direction depend on the particular coordinate system used.
314
+ */
315
+ attribute :>> isBound = true;
316
+ attribute :>> mRef: Spatial3dCoordinateFrame[1];
317
+ }
318
+ attribute position3dVector: Position3dVector :> vectorQuantities;
319
+
320
+ attribute def CartesianPosition3dVector :> Position3dVector {
321
+ attribute x : LengthValue = num#(1) [mRef.mRefs#(1)];
322
+ attribute y : LengthValue = num#(2) [mRef.mRefs#(2)];
323
+ attribute z : LengthValue = num#(3) [mRef.mRefs#(3)];
324
+ attribute :>> mRef : CartesianSpatial3dCoordinateFrame[1];
325
+ }
326
+ attribute cartesianPosition3dVector : CartesianPosition3dVector :> position3dVector;
327
+
328
+ attribute def CylindricalPosition3dVector :> Position3dVector {
329
+ attribute <'ρ'> radialDistance : LengthValue = num#(1) [mRef.mRefs#(1)];
330
+ attribute <'φ'> azimuth : AngularMeasureUnit = num#(2) [mRef.mRefs#(2)];
331
+ attribute <h> height : LengthValue = num#(3) [mRef.mRefs#(3)];
332
+ attribute :>> mRef : CylindricalSpatial3dCoordinateFrame[1];
333
+ }
334
+ attribute cylindricalPosition3dVector : CylindricalPosition3dVector :> position3dVector;
335
+
336
+ attribute def SphericalPosition3dVector :> Position3dVector {
337
+ attribute <r> radialDistance : LengthValue = num#(1) [mRef.mRefs#(1)];
338
+ attribute <'θ'> inclination : AngularMeasureUnit = num#(2) [mRef.mRefs#(2)];
339
+ attribute <'φ'> azimuth : AngularMeasureUnit = num#(3) [mRef.mRefs#(3)];
340
+ attribute :>> mRef : SphericalSpatial3dCoordinateFrame[1];
341
+ }
342
+ attribute sphericalPosition3dVector : SphericalPosition3dVector :> position3dVector;
343
+
344
+ attribute def PlanetaryPosition3dVector :> Position3dVector {
345
+ attribute <lat> latitude : AngularMeasureUnit = num#(1) [mRef.mRefs#(1)];
346
+ attribute <long> longitude : AngularMeasureUnit = num#(2) [mRef.mRefs#(2)];
347
+ attribute <h> altitude : LengthValue = num#(3) [mRef.mRefs#(3)];
348
+ attribute :>> mRef : PlanetarySpatial3dCoordinateFrame[1];
349
+ }
350
+ attribute planetaryPosition3dVector : PlanetaryPosition3dVector :> position3dVector;
351
+
352
+ /* ISO-80000-3 item 3-1.11 displacement */
353
+ abstract attribute def Displacement3dVector :> '3dVectorQuantityValue' {
354
+ doc
355
+ /*
356
+ * source: item 3-1.11 displacement
357
+ * symbol(s): `vec(Δr)`
358
+ * application domain: generic
359
+ * name: Displacement
360
+ * quantity dimension: L^1
361
+ * measurement unit(s): m
362
+ * tensor order: 1
363
+ * definition: vector (ISO 80000-2) quantity between any two points in space
364
+ * remarks: Displacement vectors are so-called free vectors, i.e. their magnitude (ISO 80000-2) and direction do not depend on a particular coordinate system. The magnitude of this vector is also called displacement.
365
+ */
366
+ attribute :>> isBound = false;
367
+ attribute :>> mRef: Spatial3dCoordinateFrame[1];
368
+ }
369
+ attribute displacement3dVector: Displacement3dVector :> vectorQuantities;
370
+
371
+ attribute def CartesianDisplacement3dVector :> Displacement3dVector {
372
+ attribute x : LengthValue = num#(1) [mRef.mRefs#(1)];
373
+ attribute y : LengthValue = num#(2) [mRef.mRefs#(2)];
374
+ attribute z : LengthValue = num#(3) [mRef.mRefs#(3)];
375
+ attribute :>> mRef: CartesianSpatial3dCoordinateFrame[1];
376
+ }
377
+ attribute cartesianDisplacement3dVector: CartesianDisplacement3dVector :> displacement3dVector;
378
+
379
+ attribute def CylindricalDisplacement3dVector :> Displacement3dVector {
380
+ attribute <'ρ'> radialDistance : LengthValue = num#(1) [mRef.mRefs#(1)];
381
+ attribute <'φ'> azimuth : AngularMeasureUnit = num#(2) [mRef.mRefs#(2)];
382
+ attribute <h> height : LengthValue = num#(3) [mRef.mRefs#(3)];
383
+ attribute :>> mRef: CylindricalSpatial3dCoordinateFrame[1];
384
+ }
385
+ attribute cylindricalDisplacement3dVector: CylindricalDisplacement3dVector :> displacement3dVector;
386
+
387
+ attribute def SphericalDisplacement3dVector :> Displacement3dVector {
388
+ attribute <r> radialDistance : LengthValue = num#(1) [mRef.mRefs#(1)];
389
+ attribute <'θ'> inclination : AngularMeasureUnit = num#(2) [mRef.mRefs#(2)];
390
+ attribute <'φ'> azimuth : AngularMeasureUnit = num#(3) [mRef.mRefs#(3)];
391
+ attribute :>> mRef: SphericalSpatial3dCoordinateFrame[1];
392
+ }
393
+ attribute sphericalDisplacement3dVector: SphericalDisplacement3dVector :> displacement3dVector;
394
+
395
+ /* ISO-80000-3 item 3-1.12 radius of curvature */
396
+ attribute radiusOfCurvature: LengthValue :> scalarQuantities {
397
+ doc
398
+ /*
399
+ * source: item 3-1.12 radius of curvature
400
+ * symbol(s): `ρ`
401
+ * application domain: generic
402
+ * name: RadiusOfCurvature (specializes Length)
403
+ * quantity dimension: L^1
404
+ * measurement unit(s): m
405
+ * tensor order: 0
406
+ * definition: radius (item 3-1.6) of the osculating circle of a planar curve at a particular point of the curve
407
+ * remarks: The radius of curvature is only defined for curves which are at least twice continuously differentiable.
408
+ */
409
+ }
410
+
411
+ /* ISO-80000-3 item 3-2 curvature */
412
+ attribute def CurvatureValue :> ScalarQuantityValue {
413
+ doc
414
+ /*
415
+ * source: item 3-2 curvature
416
+ * symbol(s): `κ`
417
+ * application domain: generic
418
+ * name: Curvature
419
+ * quantity dimension: L^-1
420
+ * measurement unit(s): m^-1
421
+ * tensor order: 0
422
+ * definition: inverse of the radius of curvature (item 3-1.12)
423
+ * remarks: The curvature is given by: `κ = 1/ρ` where `ρ` denotes the radius of curvature (item 3-1.12).
424
+ */
425
+ attribute :>> num: Real;
426
+ attribute :>> mRef: CurvatureUnit[1];
427
+ }
428
+
429
+ attribute curvature: CurvatureValue[*] nonunique :> scalarQuantities;
430
+
431
+ attribute def CurvatureUnit :> DerivedUnit {
432
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; }
433
+ attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; }
434
+ }
435
+
436
+ /* ISO-80000-3 item 3-3 area */
437
+ attribute def AreaValue :> ScalarQuantityValue {
438
+ doc
439
+ /*
440
+ * source: item 3-3 area
441
+ * symbol(s): `A`, `S`
442
+ * application domain: generic
443
+ * name: Area
444
+ * quantity dimension: L^2
445
+ * measurement unit(s): m^2
446
+ * tensor order: 0
447
+ * definition: extent of a two-dimensional geometrical shape
448
+ * remarks: The surface element at a given point of a surface is given by: `dA = g du dv` where `u` and `v` denote the Gaussian surface coordinates and `g` denotes the determinant of the metric tensor (ISO 80000-2) at the particular point. The symbol `dσ` is also used for the surface element.
449
+ */
450
+ attribute :>> num: Real;
451
+ attribute :>> mRef: AreaUnit[1];
452
+ }
453
+
454
+ attribute area: AreaValue[*] nonunique :> scalarQuantities;
455
+
456
+ attribute def AreaUnit :> DerivedUnit {
457
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
458
+ attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; }
459
+ }
460
+
461
+ /* ISO-80000-3 item 3-4 volume */
462
+ attribute def VolumeValue :> ScalarQuantityValue {
463
+ doc
464
+ /*
465
+ * source: item 3-4 volume
466
+ * symbol(s): `V`, `(S)`
467
+ * application domain: generic
468
+ * name: Volume
469
+ * quantity dimension: L^3
470
+ * measurement unit(s): m^3
471
+ * tensor order: 0
472
+ * definition: extent of a three-dimensional geometrical shape
473
+ * remarks: The volume element in Euclidean space is given by: `dV = dx dy dz` where `dx`, `dy`, and `dz` denote the differentials of the Cartesian coordinates (ISO 80000-2). The symbol `dτ` is also used for the volume element.
474
+ */
475
+ attribute :>> num: Real;
476
+ attribute :>> mRef: VolumeUnit[1];
477
+ }
478
+
479
+ attribute volume: VolumeValue[*] nonunique :> scalarQuantities;
480
+
481
+ attribute def VolumeUnit :> DerivedUnit {
482
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 3; }
483
+ attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; }
484
+ }
485
+
486
+ /* ISO-80000-3 item 3-5 angular measure, plane angle */
487
+ attribute def AngularMeasureValue :> ScalarQuantityValue {
488
+ doc
489
+ /*
490
+ * source: item 3-5 angular measure, plane angle
491
+ * symbol(s): `α`, `β`, `γ`
492
+ * application domain: generic
493
+ * name: AngularMeasure
494
+ * quantity dimension: 1
495
+ * measurement unit(s): rad, 1
496
+ * tensor order: 0
497
+ * definition: measure of a geometric figure, called plane angle, formed by two rays, called the sides of the plane angle, emanating from a common point, called the vertex of the plane angle
498
+ * remarks: The angular measure is given by: `α = s/r` where `s` denotes the arc length (item 3-1.7) of the included arc of a circle, centred at the vertex of the plane angle, and `r` the radius (item 3-1.6) of that circle. Other symbols are also used.
499
+ */
500
+ attribute :>> num: Real;
501
+ attribute :>> mRef: AngularMeasureUnit[1];
502
+ }
503
+
504
+ attribute angularMeasure: AngularMeasureValue[*] nonunique :> scalarQuantities;
505
+
506
+ attribute def AngularMeasureUnit :> DimensionOneUnit {
507
+ }
508
+
509
+ alias PlaneAngleUnit for AngularMeasureUnit;
510
+ alias PlaneAngleValue for AngularMeasureValue;
511
+ alias planeAngle for angularMeasure;
512
+
513
+ /* ISO-80000-3 item 3-6 rotational displacement, angular displacement */
514
+ attribute rotationalDisplacement: AngularMeasureValue :> scalarQuantities {
515
+ doc
516
+ /*
517
+ * source: item 3-6 rotational displacement, angular displacement
518
+ * symbol(s): `ϑ`, `φ`
519
+ * application domain: generic
520
+ * name: RotationalDisplacement (specializes AngularMeasure)
521
+ * quantity dimension: 1
522
+ * measurement unit(s): rad, 1
523
+ * tensor order: 0
524
+ * definition: quotient of the traversed circular path length (item 3-1.7) of a point in space during a rotation and its distance (item 3-1.8) from the axis or centre of rotation
525
+ * remarks: The rotational displacement is given by: `φ = s/r` where `s` denotes the traversed path length (item 3-1.7) along the periphery of a circle, centred at the vertex of the plane angle, and `r` the radius (item 3-1.6) of that circle. The rotational displacement is signed. The sign denotes the direction of rotation and is chosen by convention. Other symbols are also used.
526
+ */
527
+ }
528
+
529
+ alias angularDisplacement for rotationalDisplacement;
530
+
531
+ /* ISO-80000-3 item 3-7 phase angle */
532
+ attribute phaseAngle: AngularMeasureValue :> scalarQuantities {
533
+ doc
534
+ /*
535
+ * source: item 3-7 phase angle
536
+ * symbol(s): `φ`, `ϕ`
537
+ * application domain: generic
538
+ * name: PhaseAngle (specializes AngularMeasure)
539
+ * quantity dimension: 1
540
+ * measurement unit(s): rad, 1
541
+ * tensor order: 0
542
+ * definition: angular measure (item 3-5) between the positive real axis and the radius of the polar representation of the complex number in the complex plane
543
+ * remarks: The phase angle (often imprecisely referred to as the "phase") is the argument of a complex number. Other symbols are also used.
544
+ */
545
+ }
546
+
547
+ /* ISO-80000-3 item 3-8 solid angular measure */
548
+ attribute def SolidAngularMeasureValue :> ScalarQuantityValue {
549
+ doc
550
+ /*
551
+ * source: item 3-8 solid angular measure
552
+ * symbol(s): `Ω`
553
+ * application domain: generic
554
+ * name: SolidAngularMeasure
555
+ * quantity dimension: 1
556
+ * measurement unit(s): sr, 1
557
+ * tensor order: 0
558
+ * definition: measure of a conical geometric figure, called solid angle, formed by all rays, originating from a common point, called the vertex of the solid angle, and passing through the points of a closed, non-self-intersecting curve in space considered as the border of a surface
559
+ * remarks: The differential solid angular measure expressed in spherical coordinates (ISO 80000-2) is given by: `dΩ = A/r^2 * sin(θ * dθ * dφ)` where `A` is area, `r` is radius, `θ` and `φ` are spherical coordinates.
560
+ */
561
+ attribute :>> num: Real;
562
+ attribute :>> mRef: SolidAngularMeasureUnit[1];
563
+ }
564
+
565
+ attribute solidAngularMeasure: SolidAngularMeasureValue[*] nonunique :> scalarQuantities;
566
+
567
+ attribute def SolidAngularMeasureUnit :> DimensionOneUnit {
568
+ }
569
+
570
+ /* ISO-80000-3 item 3-9 duration, time */
571
+ /* See package ISQBase for the declarations of DurationValue and DurationUnit */
572
+
573
+ alias TimeUnit for DurationUnit;
574
+ alias TimeValue for DurationValue;
575
+ alias time for duration;
576
+
577
+ /* ISO-80000-3 item 3-10.1 velocity */
578
+ attribute def CartesianVelocity3dVector :> '3dVectorQuantityValue' {
579
+ doc
580
+ /*
581
+ * source: item 3-10.1 velocity
582
+ * symbol(s): `vec(v)`, `u,v,w`
583
+ * application domain: generic
584
+ * name: Velocity
585
+ * quantity dimension: L^1*T^-1
586
+ * measurement unit(s): m/s, m*s^-1
587
+ * tensor order: 1
588
+ * definition: vector (ISO 80000-2) quantity giving the rate of change of a position vector (item 3-1.10)
589
+ * remarks: The velocity vector is given by: `vec(v) = (d vec(r)) / (dt)` where `vec(r)` denotes the position vector (item 3-1.10) and `t` the duration (item 3-9). When the general symbol `vec(v)` is not used for the velocity, the symbols `u`, `v`, `w` may be used for the components (ISO 80000-2) of the velocity.
590
+ */
591
+ attribute :>> isBound = false;
592
+ attribute :>> mRef: CartesianVelocity3dCoordinateFrame[1];
593
+ }
594
+ attribute cartesianVelocity3dVector: CartesianVelocity3dVector :> vectorQuantities;
595
+
596
+ attribute def CartesianVelocity3dCoordinateFrame :> '3dCoordinateFrame' {
597
+ attribute :>> isBound = false;
598
+ attribute :>> isOrthogonal = true;
599
+ attribute :>> mRefs: SpeedUnit[3];
600
+ }
601
+
602
+ /* ISO-80000-3 item 3-10.2 speed */
603
+ attribute def SpeedValue :> ScalarQuantityValue {
604
+ doc
605
+ /*
606
+ * source: item 3-10.2 speed
607
+ * symbol(s): `v`
608
+ * application domain: generic
609
+ * name: Speed
610
+ * quantity dimension: L^1*T^-1
611
+ * measurement unit(s): m/s, m*s^-1
612
+ * tensor order: 0
613
+ * definition: magnitude (ISO 80000-2) of the velocity (item 3-10.1)
614
+ * remarks: None.
615
+ */
616
+ attribute :>> num: Real;
617
+ attribute :>> mRef: SpeedUnit[1];
618
+ }
619
+
620
+ attribute speed: SpeedValue[*] nonunique :> scalarQuantities;
621
+
622
+ attribute def SpeedUnit :> DerivedUnit {
623
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; }
624
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
625
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); }
626
+ }
627
+
628
+ /* ISO-80000-3 item 3-11 acceleration */
629
+ attribute def AccelerationValue :> ScalarQuantityValue {
630
+ doc
631
+ /*
632
+ * source: item 3-11 acceleration (magnitude)
633
+ * symbol(s): `a`
634
+ * application domain: generic
635
+ * name: Acceleration
636
+ * quantity dimension: L^1*T^-2
637
+ * measurement unit(s): m*s^-2
638
+ * tensor order: 0
639
+ * definition: vector (ISO 80000-2) quantity giving the rate of change of velocity (item 3-10)
640
+ * remarks: The acceleration vector is given by: `vec(a) = (d vec(v))/(dt)` where `vec(v)` denotes the velocity (item 3-10.1) and `t` the duration (item 3-9). The magnitude (ISO 80000-2) of the acceleration of free fall is usually denoted by `g`.
641
+ */
642
+ attribute :>> num: Real;
643
+ attribute :>> mRef: AccelerationUnit[1];
644
+ }
645
+
646
+ attribute acceleration: AccelerationValue[*] nonunique :> scalarQuantities;
647
+
648
+ attribute def AccelerationUnit :> DerivedUnit {
649
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; }
650
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
651
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); }
652
+ }
653
+
654
+ attribute def CartesianAcceleration3dVector :> '3dVectorQuantityValue' {
655
+ doc
656
+ /*
657
+ * source: item 3-11 acceleration (vector)
658
+ * symbol(s): `vec(a)`
659
+ * application domain: generic
660
+ * name: Acceleration
661
+ * quantity dimension: L^1*T^-2
662
+ * measurement unit(s): m*s^-2
663
+ * tensor order: 1
664
+ * definition: vector (ISO 80000-2) quantity giving the rate of change of velocity (item 3-10)
665
+ * remarks: The acceleration vector is given by: `vec(a) = (d vec(v))/(dt)` where `vec(v)` denotes the velocity (item 3-10.1) and `t` the duration (item 3-9). The magnitude (ISO 80000-2) of the acceleration of free fall is usually denoted by `g`.
666
+ */
667
+ attribute :>> isBound = false;
668
+ attribute :>> mRef: CartesianAcceleration3dCoordinateFrame[1];
669
+ }
670
+
671
+ attribute cartesianAcceleration3dVector: CartesianAcceleration3dVector :> vectorQuantities;
672
+
673
+ attribute def CartesianAcceleration3dCoordinateFrame :> VectorMeasurementReference {
674
+ attribute :>> dimensions = 3;
675
+ attribute :>> isBound = false;
676
+ attribute :>> isOrthogonal = true;
677
+ attribute :>> mRefs: AccelerationUnit[3];
678
+ }
679
+
680
+ /* ISO-80000-3 item 3-12 angular velocity */
681
+ attribute def AngularVelocityValue :> ScalarQuantityValue {
682
+ doc
683
+ /*
684
+ * source: item 3-12 angular velocity (magnitude)
685
+ * symbol(s): `ω`
686
+ * application domain: generic
687
+ * name: AngularVelocity
688
+ * quantity dimension: T^-1
689
+ * measurement unit(s): rad*s^-1, s^-1
690
+ * tensor order: 0
691
+ * definition: vector (ISO 80000-2) quantity giving the rate of change of the rotational displacement (item 3-6) as its magnitude (ISO 80000-2) and with a direction equal to the direction of the axis of rotation
692
+ * remarks: The angular velocity vector is given by: `vec(ω) = (d φ) / (dt) vec(u)` where `φ` denotes the angular displacement (item 3-6), `t` the duration (item 3-9), and `vec(u)` the unit vector (ISO 80000-2) along the axis of rotation in the direction for which the rotation corresponds to a right-hand spiral.
693
+ */
694
+ attribute :>> num: Real;
695
+ attribute :>> mRef: AngularVelocityUnit[1];
696
+ }
697
+
698
+ attribute angularVelocity: AngularVelocityValue[*] nonunique :> scalarQuantities;
699
+
700
+ attribute def AngularVelocityUnit :> DerivedUnit {
701
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
702
+ attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; }
703
+ }
704
+
705
+ attribute def Cartesian3dAngularVelocityVector :> VectorQuantityValue {
706
+ doc
707
+ /*
708
+ * source: item 3-12 angular velocity (vector)
709
+ * symbol(s): `vec(ω)`
710
+ * application domain: generic
711
+ * name: AngularVelocity
712
+ * quantity dimension: T^-1
713
+ * measurement unit(s): rad*s^-1, s^-1
714
+ * tensor order: 1
715
+ * definition: vector (ISO 80000-2) quantity giving the rate of change of the rotational displacement (item 3-6) as its magnitude (ISO 80000-2) and with a direction equal to the direction of the axis of rotation
716
+ * remarks: The angular velocity vector is given by: `vec(ω) = (d φ) / (dt) vec(u)` where `φ` denotes the angular displacement (item 3-6), `t` the duration (item 3-9), and `vec(u)` the unit vector (ISO 80000-2) along the axis of rotation in the direction for which the rotation corresponds to a right-hand spiral.
717
+ */
718
+ attribute :>> isBound = false;
719
+ attribute :>> num: Real[3];
720
+ attribute :>> mRef: Cartesian3dAngularVelocityCoordinateFrame[1];
721
+ }
722
+
723
+ attribute angularVelocityVector: Cartesian3dAngularVelocityVector :> vectorQuantities;
724
+
725
+ attribute def Cartesian3dAngularVelocityCoordinateFrame :> VectorMeasurementReference {
726
+ attribute :>> dimensions = 3;
727
+ attribute :>> isBound = false;
728
+ attribute :>> isOrthogonal = true;
729
+ attribute :>> mRefs: AngularVelocityUnit[3];
730
+ }
731
+
732
+ /* ISO-80000-3 item 3-13 angular acceleration */
733
+ attribute def AngularAccelerationValue :> ScalarQuantityValue {
734
+ doc
735
+ /*
736
+ * source: item 3-13 angular acceleration (magnitude)
737
+ * symbol(s): `α`
738
+ * application domain: generic
739
+ * name: AngularAcceleration
740
+ * quantity dimension: T^-2
741
+ * measurement unit(s): rad*s^-2, s^-2
742
+ * tensor order: 0
743
+ * definition: vector (ISO 80000-2) quantity giving the rate of change of angular velocity (item 3-12)
744
+ * remarks: The angular acceleration vector is given by: `vec α = (d vec(ω))/(dt)` Where `vec(ω)` denotes the angular velocity (item 3-12) and `t` the duration (item 3-9).
745
+ */
746
+ attribute :>> num: Real;
747
+ attribute :>> mRef: AngularAccelerationUnit[1];
748
+ }
749
+
750
+ attribute angularAcceleration: AngularAccelerationValue[*] nonunique :> scalarQuantities;
751
+
752
+ attribute def AngularAccelerationUnit :> DerivedUnit {
753
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
754
+ attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; }
755
+ }
756
+
757
+ attribute def Cartesian3dAngularAccelerationVector :> VectorQuantityValue {
758
+ doc
759
+ /*
760
+ * source: item 3-13 angular acceleration (vector)
761
+ * symbol(s): `vec(α)`
762
+ * application domain: generic
763
+ * name: AngularAcceleration
764
+ * quantity dimension: T^-2
765
+ * measurement unit(s): rad*s^-2, s^-2
766
+ * tensor order: 1
767
+ * definition: vector (ISO 80000-2) quantity giving the rate of change of angular velocity (item 3-12)
768
+ * remarks: The angular acceleration vector is given by: `vec α = (d vec(ω))/(dt)` Where `vec(ω)` denotes the angular velocity (item 3-12) and `t` the duration (item 3-9).
769
+ */
770
+ attribute :>> isBound = false;
771
+ attribute :>> num: Real[3];
772
+ attribute :>> mRef: Cartesian3dAngularAccelerationCoordinateFrame[1];
773
+ }
774
+
775
+ attribute angularAccelerationVector: Cartesian3dAngularAccelerationVector :> vectorQuantities;
776
+
777
+ attribute def Cartesian3dAngularAccelerationCoordinateFrame :> VectorMeasurementReference {
778
+ attribute :>> dimensions = 3;
779
+ attribute :>> isBound = false;
780
+ attribute :>> isOrthogonal = true;
781
+ attribute :>> mRefs: AngularAccelerationUnit[3];
782
+ }
783
+
784
+ /* ISO-80000-3 item 3-14 period duration, period */
785
+ attribute periodDuration: DurationValue :> scalarQuantities {
786
+ doc
787
+ /*
788
+ * source: item 3-14 period duration, period
789
+ * symbol(s): `T`
790
+ * application domain: generic
791
+ * name: PeriodDuration (specializes Duration)
792
+ * quantity dimension: T^1
793
+ * measurement unit(s): s
794
+ * tensor order: 0
795
+ * definition: duration (item 3-9) of one cycle of a periodic event
796
+ * remarks: A periodic event is an event that occurs regularly with a fixed time interval.
797
+ */
798
+ }
799
+
800
+ alias period for periodDuration;
801
+
802
+ /* ISO-80000-3 item 3-15 time constant */
803
+ attribute timeConstant: DurationValue :> scalarQuantities {
804
+ doc
805
+ /*
806
+ * source: item 3-15 time constant
807
+ * symbol(s): `τ`, `T`
808
+ * application domain: generic
809
+ * name: TimeConstant (specializes Duration)
810
+ * quantity dimension: T^1
811
+ * measurement unit(s): s
812
+ * tensor order: 0
813
+ * definition: parameter characterizing the response to a step input of a first-order, linear time-invariant system
814
+ * remarks: If a quantity is a function of the duration (item 3-9) expressed by: `F(t) prop e^(-t/τ)` where `t` denotes the duration (item 3-9), then `τ` denotes the time constant. Here the time constant `τ` applies to an exponentially decaying quantity.
815
+ */
816
+ }
817
+
818
+ /* ISO-80000-3 item 3-16 rotation */
819
+ attribute rotation: CountValue :> scalarQuantities {
820
+ doc
821
+ /*
822
+ * source: item 3-16 rotation
823
+ * symbol(s): `N`
824
+ * application domain: generic
825
+ * name: Rotation (specializes Count)
826
+ * quantity dimension: 1
827
+ * measurement unit(s): 1
828
+ * tensor order: 0
829
+ * definition: number of revolutions
830
+ * remarks: `N` is the number (not necessarily an integer) of revolutions, for example, of a rotating body about a given axis. Its value is given by: `N = φ/(2 π)` where `φ` denotes the measure of rotational displacement (item 3-6).
831
+ */
832
+ }
833
+
834
+ /* ISO-80000-3 item 3-17.1 frequency */
835
+ attribute def FrequencyValue :> ScalarQuantityValue {
836
+ doc
837
+ /*
838
+ * source: item 3-17.1 frequency
839
+ * symbol(s): `f`, `ν`
840
+ * application domain: generic
841
+ * name: Frequency
842
+ * quantity dimension: T^-1
843
+ * measurement unit(s): Hz, s^-1
844
+ * tensor order: 0
845
+ * definition: inverse of period duration (item 3-14)
846
+ * remarks: The frequency is given by: `f = 1/T` where `T` denotes the period duration (item 3-14).
847
+ */
848
+ attribute :>> num: Real;
849
+ attribute :>> mRef: FrequencyUnit[1];
850
+ }
851
+
852
+ attribute frequency: FrequencyValue[*] nonunique :> scalarQuantities;
853
+
854
+ attribute def FrequencyUnit :> DerivedUnit {
855
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
856
+ attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; }
857
+ }
858
+
859
+ /* ISO-80000-3 item 3-17.2 rotational frequency */
860
+ attribute rotationalFrequency: FrequencyValue :> scalarQuantities {
861
+ doc
862
+ /*
863
+ * source: item 3-17.2 rotational frequency
864
+ * symbol(s): `n`
865
+ * application domain: generic
866
+ * name: RotationalFrequency (specializes Frequency)
867
+ * quantity dimension: T^-1
868
+ * measurement unit(s): s^-1
869
+ * tensor order: 0
870
+ * definition: duration (item 3-9) of one cycle of a periodic event
871
+ * remarks: The rotational frequency is given by: `n = (dN) / (dt)` where `N` denotes the rotation (item 3-16) and `t` is the duration (item 3-9).
872
+ */
873
+ }
874
+
875
+ /* ISO-80000-3 item 3-18 angular frequency */
876
+ attribute def AngularFrequencyValue :> ScalarQuantityValue {
877
+ doc
878
+ /*
879
+ * source: item 3-18 angular frequency
880
+ * symbol(s): `ω`
881
+ * application domain: generic
882
+ * name: AngularFrequency
883
+ * quantity dimension: T^-1
884
+ * measurement unit(s): rad*s^-1, s^-1
885
+ * tensor order: 0
886
+ * definition: rate of change of the phase angle (item 3-7)
887
+ * remarks: The angular frequency is given by: `ω = 2 π f` where `f` denotes the frequency (item 3-17.1).
888
+ */
889
+ attribute :>> num: Real;
890
+ attribute :>> mRef: AngularFrequencyUnit[1];
891
+ }
892
+
893
+ attribute angularFrequency: AngularFrequencyValue[*] nonunique :> scalarQuantities;
894
+
895
+ attribute def AngularFrequencyUnit :> DerivedUnit {
896
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
897
+ attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; }
898
+ }
899
+
900
+ /* ISO-80000-3 item 3-19 wavelength */
901
+ attribute wavelength: LengthValue :> scalarQuantities {
902
+ doc
903
+ /*
904
+ * source: item 3-19 wavelength
905
+ * symbol(s): `λ`
906
+ * application domain: generic
907
+ * name: Wavelength (specializes Length)
908
+ * quantity dimension: L^1
909
+ * measurement unit(s): m
910
+ * tensor order: 0
911
+ * definition: length (item 3-1.1) of the repetition interval of a wave
912
+ * remarks: None.
913
+ */
914
+ }
915
+
916
+ /* ISO-80000-3 item 3-20 repetency, wavenumber */
917
+ attribute def RepetencyValue :> ScalarQuantityValue {
918
+ doc
919
+ /*
920
+ * source: item 3-20 repetency, wavenumber
921
+ * symbol(s): `σ`, `ṽ`
922
+ * application domain: generic
923
+ * name: Repetency
924
+ * quantity dimension: L^-1
925
+ * measurement unit(s): m^-1
926
+ * tensor order: 0
927
+ * definition: inverse of the wavelength (item 3-19)
928
+ * remarks: The repetency is given by: `σ = 1 / λ` where `λ` denotes the wavelength (item 3-19).
929
+ */
930
+ attribute :>> num: Real;
931
+ attribute :>> mRef: RepetencyUnit[1];
932
+ }
933
+
934
+ attribute repetency: RepetencyValue[*] nonunique :> scalarQuantities;
935
+
936
+ attribute def RepetencyUnit :> DerivedUnit {
937
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; }
938
+ attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; }
939
+ }
940
+
941
+ alias WavenumberUnit for RepetencyUnit;
942
+ alias WavenumberValue for RepetencyValue;
943
+ alias wavenumber for repetency;
944
+
945
+ /* ISO-80000-3 item 3-21 wave vector */
946
+ attribute def Cartesian3dWaveVector :> VectorQuantityValue {
947
+ doc
948
+ /*
949
+ * source: item 3-21 wave vector
950
+ * symbol(s): `vec(k)`
951
+ * application domain: generic
952
+ * name: WaveVector
953
+ * quantity dimension: L^-1
954
+ * measurement unit(s): m^-1
955
+ * tensor order: 1
956
+ * definition: vector normal to the surfaces of constant phase angle (item 3-7) of a wave, with the magnitude (ISO 80000-2) of repetency (item 3-20)
957
+ * remarks: None.
958
+ */
959
+ attribute :>> isBound = false;
960
+ attribute :>> num: Real[3];
961
+ attribute :>> mRef: Cartesian3dWaveCoordinateFrame[1];
962
+ }
963
+
964
+ attribute waveVector: Cartesian3dWaveVector :> vectorQuantities;
965
+
966
+ attribute def Cartesian3dWaveCoordinateFrame :> VectorMeasurementReference {
967
+ attribute :>> dimensions = 3;
968
+ attribute :>> isBound = false;
969
+ attribute :>> isOrthogonal = true;
970
+ attribute :>> mRefs: RepetencyUnit[3];
971
+ }
972
+
973
+ /* ISO-80000-3 item 3-22 angular repetency, angular wavenumber */
974
+ attribute def AngularRepetencyValue :> ScalarQuantityValue {
975
+ doc
976
+ /*
977
+ * source: item 3-22 angular repetency, angular wavenumber
978
+ * symbol(s): `k`
979
+ * application domain: generic
980
+ * name: AngularRepetency
981
+ * quantity dimension: L^-1
982
+ * measurement unit(s): m^-1
983
+ * tensor order: 0
984
+ * definition: magnitude (ISO 80000-2) of the wave vector (item 3-21)
985
+ * remarks: The angular repetency is given by: `κ = (2 π)/λ` where `λ` denotes the wavelength (item 3-19).
986
+ */
987
+ attribute :>> num: Real;
988
+ attribute :>> mRef: AngularRepetencyUnit[1];
989
+ }
990
+
991
+ attribute angularRepetency: AngularRepetencyValue[*] nonunique :> scalarQuantities;
992
+
993
+ attribute def AngularRepetencyUnit :> DerivedUnit {
994
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; }
995
+ attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; }
996
+ }
997
+
998
+ alias AngularWavenumberUnit for AngularRepetencyUnit;
999
+ alias AngularWavenumberValue for AngularRepetencyValue;
1000
+ alias angularWavenumber for angularRepetency;
1001
+
1002
+ /* ISO-80000-3 item 3-23.1 phase velocity, phase speed */
1003
+ attribute def PhaseVelocityValue :> ScalarQuantityValue {
1004
+ doc
1005
+ /*
1006
+ * source: item 3-23.1 phase velocity, phase speed
1007
+ * symbol(s): `c`, `v`, `(ν)`, `c_φ`, `v_φ`, `(ν_φ)`
1008
+ * application domain: generic
1009
+ * name: PhaseVelocity
1010
+ * quantity dimension: L^1*T^-1
1011
+ * measurement unit(s): m*s^-1
1012
+ * tensor order: 0
1013
+ * definition: speed with which the phase angle (item 3-7) of a wave propagates in space
1014
+ * remarks: The phase velocity is given by: `c = ω/κ` where `ω` denotes the angular frequency (item 3-18) and `k` the angular repetency (item 3-22). If phase velocities of electromagnetic waves and other phase velocities are both involved, then `c` should be used for the former and `υ` for the latter. Phase velocity can also be written as `c = λ f`.
1015
+ */
1016
+ attribute :>> num: Real;
1017
+ attribute :>> mRef: PhaseVelocityUnit[1];
1018
+ }
1019
+
1020
+ attribute phaseVelocity: PhaseVelocityValue[*] nonunique :> scalarQuantities;
1021
+
1022
+ attribute def PhaseVelocityUnit :> DerivedUnit {
1023
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; }
1024
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
1025
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); }
1026
+ }
1027
+
1028
+ alias PhaseSpeedUnit for PhaseVelocityUnit;
1029
+ alias PhaseSpeedValue for PhaseVelocityValue;
1030
+ alias phaseSpeed for phaseVelocity;
1031
+
1032
+ /* ISO-80000-3 item 3-23.2 group velocity, group speed */
1033
+ attribute groupVelocity: SpeedValue :> scalarQuantities {
1034
+ doc
1035
+ /*
1036
+ * source: item 3-23.2 group velocity, group speed
1037
+ * symbol(s): `c_g`, `v_g`, `(ν_g)`
1038
+ * application domain: generic
1039
+ * name: GroupVelocity (specializes Speed)
1040
+ * quantity dimension: L^1*T^-1
1041
+ * measurement unit(s): m*s^-1
1042
+ * tensor order: 0
1043
+ * definition: speed with which the envelope of a wave propagates in space
1044
+ * remarks: The group velocity is given by: `c_g = (d ω)/ (dk)` where `ω` denotes the angular frequency (item 3-18) and `k` the angular repetency (item 3-22).
1045
+ */
1046
+ }
1047
+
1048
+ alias groupSpeed for groupVelocity;
1049
+
1050
+ /* ISO-80000-3 item 3-24 damping coefficient */
1051
+ attribute def DampingCoefficientValue :> ScalarQuantityValue {
1052
+ doc
1053
+ /*
1054
+ * source: item 3-24 damping coefficient
1055
+ * symbol(s): `δ`
1056
+ * application domain: generic
1057
+ * name: DampingCoefficient
1058
+ * quantity dimension: T^-1
1059
+ * measurement unit(s): s^-1
1060
+ * tensor order: 0
1061
+ * definition: inverse of the time constant (item 3-15) of an exponentially varying quantity
1062
+ * remarks: None.
1063
+ */
1064
+ attribute :>> num: Real;
1065
+ attribute :>> mRef: DampingCoefficientUnit[1];
1066
+ }
1067
+
1068
+ attribute dampingCoefficient: DampingCoefficientValue[*] nonunique :> scalarQuantities;
1069
+
1070
+ attribute def DampingCoefficientUnit :> DerivedUnit {
1071
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
1072
+ attribute :>> quantityDimension { :>> quantityPowerFactors = durationPF; }
1073
+ }
1074
+
1075
+ /* ISO-80000-3 item 3-25 logarithmic decrement */
1076
+ attribute def LogarithmicDecrementValue :> DimensionOneValue {
1077
+ doc
1078
+ /*
1079
+ * source: item 3-25 logarithmic decrement
1080
+ * symbol(s): `Λ`
1081
+ * application domain: generic
1082
+ * name: LogarithmicDecrement (specializes DimensionOneQuantity)
1083
+ * quantity dimension: 1
1084
+ * measurement unit(s): 1
1085
+ * tensor order: 0
1086
+ * definition: product of damping coefficient (item 3-24) and period duration (item 3-14)
1087
+ * remarks: None.
1088
+ */
1089
+ }
1090
+ attribute logarithmicDecrement: LogarithmicDecrementValue :> scalarQuantities;
1091
+
1092
+ /* ISO-80000-3 item 3-26.1 attenuation, extinction */
1093
+ attribute def AttenuationValue :> ScalarQuantityValue {
1094
+ doc
1095
+ /*
1096
+ * source: item 3-26.1 attenuation, extinction
1097
+ * symbol(s): `α`
1098
+ * application domain: generic
1099
+ * name: Attenuation
1100
+ * quantity dimension: L^-1
1101
+ * measurement unit(s): m^-1
1102
+ * tensor order: 0
1103
+ * definition: gradual decrease in magnitude (ISO 80000-2) of any kind of flux through a medium
1104
+ * remarks: If a quantity is a function of distance (item 3-1.8) expressed by: `f(x) prop e^(-α x)` where `x` denotes distance (item 3-1.8), then `α` denotes attenuation. The inverse of attenuation is called attenuation length.
1105
+ */
1106
+ attribute :>> num: Real;
1107
+ attribute :>> mRef: AttenuationUnit[1];
1108
+ }
1109
+
1110
+ attribute attenuation: AttenuationValue[*] nonunique :> scalarQuantities;
1111
+
1112
+ attribute def AttenuationUnit :> DerivedUnit {
1113
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; }
1114
+ attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; }
1115
+ }
1116
+
1117
+ alias ExtinctionUnit for AttenuationUnit;
1118
+ alias ExtinctionValue for AttenuationValue;
1119
+ alias extinction for attenuation;
1120
+
1121
+ /* ISO-80000-3 item 3-26.2 phase coefficient */
1122
+ attribute def PhaseCoefficientValue :> ScalarQuantityValue {
1123
+ doc
1124
+ /*
1125
+ * source: item 3-26.2 phase coefficient
1126
+ * symbol(s): `β`
1127
+ * application domain: generic
1128
+ * name: PhaseCoefficient
1129
+ * quantity dimension: L^-1
1130
+ * measurement unit(s): rad/m, m^-1
1131
+ * tensor order: 0
1132
+ * definition: change of phase angle (item 3-7) with the length (item 3-1.1) along the path travelled by a plane wave
1133
+ * remarks: If a quantity is a function of distance expressed by: `f(x) prop cos(β(x-x_0))` where `x` denotes distance (item 3-1.8), then `β` denotes the phase coefficient.
1134
+ */
1135
+ attribute :>> num: Real;
1136
+ attribute :>> mRef: PhaseCoefficientUnit[1];
1137
+ }
1138
+
1139
+ attribute phaseCoefficient: PhaseCoefficientValue[*] nonunique :> scalarQuantities;
1140
+
1141
+ attribute def PhaseCoefficientUnit :> DerivedUnit {
1142
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; }
1143
+ attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; }
1144
+ }
1145
+
1146
+ /* ISO-80000-3 item 3-26.3 propagation coefficient */
1147
+ attribute def PropagationCoefficientValue :> ScalarQuantityValue {
1148
+ doc
1149
+ /*
1150
+ * source: item 3-26.3 propagation coefficient
1151
+ * symbol(s): `γ`
1152
+ * application domain: generic
1153
+ * name: PropagationCoefficient
1154
+ * quantity dimension: L^-1
1155
+ * measurement unit(s): m^-1
1156
+ * tensor order: 0
1157
+ * definition: measure of the change of amplitude and phase angle (item 3-7) of a plane wave propagating in a given direction
1158
+ * remarks: The propagation coefficient is given by: `γ = α + iβ` where `α` denotes attenuation (item 3-26.1) and `β` the phase coefficient (item 3-26.2) of a plane wave.
1159
+ */
1160
+ attribute :>> num: Real;
1161
+ attribute :>> mRef: PropagationCoefficientUnit[1];
1162
+ }
1163
+
1164
+ attribute propagationCoefficient: PropagationCoefficientValue[*] nonunique :> scalarQuantities;
1165
+
1166
+ attribute def PropagationCoefficientUnit :> DerivedUnit {
1167
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; }
1168
+ attribute :>> quantityDimension { :>> quantityPowerFactors = lengthPF; }
1169
+ }
1170
+
1171
+ }
src/sysml.library/Domain Libraries/Quantities and Units/ISQThermodynamics.sysml ADDED
@@ -0,0 +1,1256 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package ISQThermodynamics {
2
+ doc
3
+ /*
4
+ * International System of Quantities and Units
5
+ * Generated on 2022-08-07T14:44:27Z from standard ISO-80000-5:2019 "Thermodynamics"
6
+ * see also https://www.iso.org/obp/ui/#iso:std:iso:80000:-5:ed-2:v1:en
7
+ *
8
+ * Note 1: In documentation comments, AsciiMath notation (see http://asciimath.org/) is used for mathematical concepts,
9
+ * with Greek letters in Unicode encoding. In running text, AsciiMath is placed between backticks.
10
+ * Note 2: For vector and tensor quantities currently the unit and quantity value type for their (scalar) magnitude is
11
+ * defined, as well as their typical Cartesian 3d VectorMeasurementReference (i.e. coordinate system)
12
+ * or TensorMeasurementReference.
13
+ */
14
+
15
+ private import ScalarValues::Real;
16
+ private import Quantities::*;
17
+ private import MeasurementReferences::*;
18
+ private import ISQBase::*;
19
+
20
+ /* Quantity definitions referenced from other ISQ packages */
21
+
22
+
23
+ /* ISO-80000-5 item 5-1 thermodynamic temperature, temperature */
24
+ /* See package ISQBase for the declarations of ThermodynamicTemperatureValue and ThermodynamicTemperatureUnit */
25
+
26
+ alias TemperatureUnit for ThermodynamicTemperatureUnit;
27
+ alias TemperatureValue for ThermodynamicTemperatureValue;
28
+ alias temperature for thermodynamicTemperature;
29
+
30
+ /* ISO-80000-5 item 5-2 Celsius temperature */
31
+ attribute def CelsiusTemperatureValue :> ScalarQuantityValue {
32
+ doc
33
+ /*
34
+ * source: item 5-2 Celsius temperature
35
+ * symbol(s): `t`, `θ`
36
+ * application domain: generic
37
+ * name: CelsiusTemperature
38
+ * quantity dimension: Θ^1
39
+ * measurement unit(s): °C
40
+ * tensor order: 0
41
+ * definition: temperature difference from the thermodynamic temperature of the ice point is called the Celsius temperature t, which is defined by the quantity equation: `t = T - T_0` where `T` is thermodynamic temperature (item 5-1) and `T_0 = 273,15 K`
42
+ * remarks: The unit degree Celsius is a special name for the kelvin for use in stating values of Celsius temperature. The unit degree Celsius is by definition equal in magnitude to the kelvin. A difference or interval of temperature may be expressed in kelvin or in degrees Celsius. The thermodynamic temperature `T_0` is 0,01 K below the thermodynamic temperature of the triple point of water. The symbol °C for the degree Celsius shall be preceded by a space (see ISO 80000-1). Prefixes are not allowed in combination with the unit °C.
43
+ */
44
+ attribute :>> num: Real;
45
+ attribute :>> mRef: CelsiusTemperatureUnit[1];
46
+ }
47
+
48
+ attribute celsiusTemperature: CelsiusTemperatureValue[*] nonunique :> scalarQuantities;
49
+
50
+ attribute def CelsiusTemperatureUnit :> DerivedUnit {
51
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = 1; }
52
+ attribute :>> quantityDimension { :>> quantityPowerFactors = thermodynamicTemperaturePF; }
53
+ }
54
+
55
+ /* ISO-80000-5 item 5-3.1 linear expansion coefficient */
56
+ attribute def LinearExpansionCoefficientValue :> ScalarQuantityValue {
57
+ doc
58
+ /*
59
+ * source: item 5-3.1 linear expansion coefficient
60
+ * symbol(s): `α_l`
61
+ * application domain: generic
62
+ * name: LinearExpansionCoefficient
63
+ * quantity dimension: Θ^-1
64
+ * measurement unit(s): K^-1
65
+ * tensor order: 0
66
+ * definition: relative change of length with temperature: `α_l = 1/l * (dl)/(dT)` where l is length (ISO 80000-3) and `T` is thermodynamic temperature (item 5-1)
67
+ * remarks: The subscripts in the symbols may be omitted when there is no risk of confusion.
68
+ */
69
+ attribute :>> num: Real;
70
+ attribute :>> mRef: LinearExpansionCoefficientUnit[1];
71
+ }
72
+
73
+ attribute linearExpansionCoefficient: LinearExpansionCoefficientValue[*] nonunique :> scalarQuantities;
74
+
75
+ attribute def LinearExpansionCoefficientUnit :> DerivedUnit {
76
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; }
77
+ attribute :>> quantityDimension { :>> quantityPowerFactors = thermodynamicTemperaturePF; }
78
+ }
79
+
80
+ /* ISO-80000-5 item 5-3.2 cubic expansion coefficient */
81
+ attribute def CubicExpansionCoefficientValue :> ScalarQuantityValue {
82
+ doc
83
+ /*
84
+ * source: item 5-3.2 cubic expansion coefficient
85
+ * symbol(s): `α_V`, `γ`
86
+ * application domain: generic
87
+ * name: CubicExpansionCoefficient
88
+ * quantity dimension: Θ^-1
89
+ * measurement unit(s): K^-1
90
+ * tensor order: 0
91
+ * definition: relative change of volume with temperature: `α_V = 1/V * (dV)/(dT)` where `V` is volume (ISO 80000-3) and `T` is thermodynamic temperature (item 5-1)
92
+ * remarks: Also called volumetric expansion coefficient. The subscripts in the symbols may be omitted when there is no risk of confusion.
93
+ */
94
+ attribute :>> num: Real;
95
+ attribute :>> mRef: CubicExpansionCoefficientUnit[1];
96
+ }
97
+
98
+ attribute cubicExpansionCoefficient: CubicExpansionCoefficientValue[*] nonunique :> scalarQuantities;
99
+
100
+ attribute def CubicExpansionCoefficientUnit :> DerivedUnit {
101
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; }
102
+ attribute :>> quantityDimension { :>> quantityPowerFactors = thermodynamicTemperaturePF; }
103
+ }
104
+
105
+ /* ISO-80000-5 item 5-3.3 relative pressure coefficient */
106
+ attribute def RelativePressureCoefficientValue :> ScalarQuantityValue {
107
+ doc
108
+ /*
109
+ * source: item 5-3.3 relative pressure coefficient
110
+ * symbol(s): `α_p`
111
+ * application domain: generic
112
+ * name: RelativePressureCoefficient
113
+ * quantity dimension: Θ^-1
114
+ * measurement unit(s): K^-1
115
+ * tensor order: 0
116
+ * definition: relative change of pressure with temperature at constant volume: `α_p = 1/p * ((partial p)/(partial T))_V` where `p` is pressure (ISO 80000-4), `T` is thermodynamic temperature (item 5-1), and `V` is volume (ISO 80000-3)
117
+ * remarks: The subscripts in the symbols may be omitted when there is no risk of confusion.
118
+ */
119
+ attribute :>> num: Real;
120
+ attribute :>> mRef: RelativePressureCoefficientUnit[1];
121
+ }
122
+
123
+ attribute relativePressureCoefficient: RelativePressureCoefficientValue[*] nonunique :> scalarQuantities;
124
+
125
+ attribute def RelativePressureCoefficientUnit :> DerivedUnit {
126
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; }
127
+ attribute :>> quantityDimension { :>> quantityPowerFactors = thermodynamicTemperaturePF; }
128
+ }
129
+
130
+ /* ISO-80000-5 item 5-4 pressure coefficient */
131
+ attribute def PressureCoefficientValue :> ScalarQuantityValue {
132
+ doc
133
+ /*
134
+ * source: item 5-4 pressure coefficient
135
+ * symbol(s): `β`
136
+ * application domain: generic
137
+ * name: PressureCoefficient
138
+ * quantity dimension: L^-1*M^1*T^-2*Θ^-1
139
+ * measurement unit(s): Pa/K, kg*m^-1*s^-2*K^-1
140
+ * tensor order: 0
141
+ * definition: change of pressure with temperature at constant volume: `β = ((partial p)/(partial T))_V` where `p` is pressure (ISO 80000-4), `T` is thermodynamic temperature (item 5-1), and `V` is volume (ISO 80000-3)
142
+ * remarks: None.
143
+ */
144
+ attribute :>> num: Real;
145
+ attribute :>> mRef: PressureCoefficientUnit[1];
146
+ }
147
+
148
+ attribute pressureCoefficient: PressureCoefficientValue[*] nonunique :> scalarQuantities;
149
+
150
+ attribute def PressureCoefficientUnit :> DerivedUnit {
151
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -1; }
152
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
153
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
154
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; }
155
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, thermodynamicTemperaturePF); }
156
+ }
157
+
158
+ /* ISO-80000-5 item 5-5.1 isothermal compressibility */
159
+ attribute def IsothermalCompressibilityValue :> ScalarQuantityValue {
160
+ doc
161
+ /*
162
+ * source: item 5-5.1 isothermal compressibility
163
+ * symbol(s): `ϰ_T`
164
+ * application domain: generic
165
+ * name: IsothermalCompressibility
166
+ * quantity dimension: L^1*M^-1*T^2
167
+ * measurement unit(s): Pa^-1, kg^-1*m*s^2
168
+ * tensor order: 0
169
+ * definition: negative relative change of volume with pressure at constant temperature: `ϰ_T = -1/V * ((partial V)/(partial p))_T` where `V` is volume (ISO 80000-3), `p` is pressure (ISO 80000-4), and `T` is thermodynamic temperature (item 5-1)
170
+ * remarks: The subscripts in the symbols may be omitted when there is no risk of confusion.
171
+ */
172
+ attribute :>> num: Real;
173
+ attribute :>> mRef: IsothermalCompressibilityUnit[1];
174
+ }
175
+
176
+ attribute isothermalCompressibility: IsothermalCompressibilityValue[*] nonunique :> scalarQuantities;
177
+
178
+ attribute def IsothermalCompressibilityUnit :> DerivedUnit {
179
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; }
180
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; }
181
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 2; }
182
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
183
+ }
184
+
185
+ /* ISO-80000-5 item 5-5.2 isentropic compressibility */
186
+ attribute def IsentropicCompressibilityValue :> ScalarQuantityValue {
187
+ doc
188
+ /*
189
+ * source: item 5-5.2 isentropic compressibility
190
+ * symbol(s): `ϰ_S`
191
+ * application domain: generic
192
+ * name: IsentropicCompressibility
193
+ * quantity dimension: L^1*M^-1*T^2
194
+ * measurement unit(s): Pa^-1, kg^-1*m*s^2
195
+ * tensor order: 0
196
+ * definition: negative relative change of volume with pressure at constant entropy: `ϰ_S = -1/V * ((partial V)/(partial p))_S` where `V` is volume (ISO 80000-3), `p` is pressure (ISO 80000-4), and `S` is entropy (item 5-18)
197
+ * remarks: The subscripts in the symbols may be omitted when there is no risk of confusion.
198
+ */
199
+ attribute :>> num: Real;
200
+ attribute :>> mRef: IsentropicCompressibilityUnit[1];
201
+ }
202
+
203
+ attribute isentropicCompressibility: IsentropicCompressibilityValue[*] nonunique :> scalarQuantities;
204
+
205
+ attribute def IsentropicCompressibilityUnit :> DerivedUnit {
206
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; }
207
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; }
208
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 2; }
209
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
210
+ }
211
+
212
+ /* ISO-80000-5 item 5-6.1 heat, amount of heat */
213
+ attribute heat: EnergyValue :> scalarQuantities {
214
+ doc
215
+ /*
216
+ * source: item 5-6.1 heat, amount of heat
217
+ * symbol(s): `Q`
218
+ * application domain: generic
219
+ * name: Heat (specializes Energy)
220
+ * quantity dimension: L^2*M^1*T^-2
221
+ * measurement unit(s): J, kg*m^2*s^-2
222
+ * tensor order: 0
223
+ * definition: difference between the increase in the internal energy (item 5-20.2) of a system and the work (ISO 80000-4) done on the system, provided that the amounts of substances within the system are not changed
224
+ * remarks: The heat transferred in an isothermal phase transformation should be expressed as the change in the appropriate state functions, e.g. `T ΔS`, where `T` is thermodynamic temperature (item 5-1) and `S` is entropy (item 5-18), or `ΔH`, where `H` is enthalpy (item 5-20.3). NOTE A supply of heat can correspond to an increase in thermodynamic temperature or to other effects, such as phase change or chemical processes; see item 5-6.2.
225
+ */
226
+ }
227
+
228
+ alias amountOfHeat for heat;
229
+
230
+ /* ISO-80000-5 item 5-6.2 latent heat */
231
+ attribute latentHeat: EnergyValue :> scalarQuantities {
232
+ doc
233
+ /*
234
+ * source: item 5-6.2 latent heat
235
+ * symbol(s): `Q`
236
+ * application domain: generic
237
+ * name: LatentHeat (specializes Energy)
238
+ * quantity dimension: L^2*M^1*T^-2
239
+ * measurement unit(s): J, kg*m^2*s^-2
240
+ * tensor order: 0
241
+ * definition: energy released or absorbed by a system during a constant-temperature process
242
+ * remarks: Examples of latent heat are latent heat of fusion (melting) and latent heat of vaporization (boiling).
243
+ */
244
+ }
245
+
246
+ /* ISO-80000-5 item 5-7 heat flow rate */
247
+ attribute def HeatFlowRateValue :> ScalarQuantityValue {
248
+ doc
249
+ /*
250
+ * source: item 5-7 heat flow rate
251
+ * symbol(s): `dot(Q)`
252
+ * application domain: generic
253
+ * name: HeatFlowRate
254
+ * quantity dimension: L^2*M^1*T^-3
255
+ * measurement unit(s): W, J/s, kg*m^2*s^-3
256
+ * tensor order: 0
257
+ * definition: time rate at which heat (item 5-6.1) crosses a given surface
258
+ * remarks: None.
259
+ */
260
+ attribute :>> num: Real;
261
+ attribute :>> mRef: HeatFlowRateUnit[1];
262
+ }
263
+
264
+ attribute heatFlowRate: HeatFlowRateValue[*] nonunique :> scalarQuantities;
265
+
266
+ attribute def HeatFlowRateUnit :> DerivedUnit {
267
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
268
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
269
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; }
270
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
271
+ }
272
+
273
+ /* ISO-80000-5 item 5-8 density of heat flow rate */
274
+ attribute def DensityOfHeatFlowRateValue :> ScalarQuantityValue {
275
+ doc
276
+ /*
277
+ * source: item 5-8 density of heat flow rate
278
+ * symbol(s): `q`, `φ`
279
+ * application domain: generic
280
+ * name: DensityOfHeatFlowRate
281
+ * quantity dimension: M^1*T^-3
282
+ * measurement unit(s): W/m^2, kg*s^-3
283
+ * tensor order: 0
284
+ * definition: quotient of heat flow rate and area: `q = dot Q / A` where `dot Q` is heat flow rate (item 5-7) and A is area (ISO 80000-3) of a given surface
285
+ * remarks: None.
286
+ */
287
+ attribute :>> num: Real;
288
+ attribute :>> mRef: DensityOfHeatFlowRateUnit[1];
289
+ }
290
+
291
+ attribute densityOfHeatFlowRate: DensityOfHeatFlowRateValue[*] nonunique :> scalarQuantities;
292
+
293
+ attribute def DensityOfHeatFlowRateUnit :> DerivedUnit {
294
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
295
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; }
296
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF); }
297
+ }
298
+
299
+ /* ISO-80000-5 item 5-9 thermal conductivity */
300
+ attribute def ThermalConductivityValue :> ScalarQuantityValue {
301
+ doc
302
+ /*
303
+ * source: item 5-9 thermal conductivity
304
+ * symbol(s): `λ_l`, `(ϰ)`
305
+ * application domain: generic
306
+ * name: ThermalConductivity
307
+ * quantity dimension: L^1*M^1*T^-3*Θ^-1
308
+ * measurement unit(s): W/(m*K), kg*m*s^-3*K^-1
309
+ * tensor order: 0
310
+ * definition: quotient of density of heat flow rate (item 5-8) and thermodynamic temperature gradient that has the same direction as the heat flow
311
+ * remarks: None.
312
+ */
313
+ attribute :>> num: Real;
314
+ attribute :>> mRef: ThermalConductivityUnit[1];
315
+ }
316
+
317
+ attribute thermalConductivity: ThermalConductivityValue[*] nonunique :> scalarQuantities;
318
+
319
+ attribute def ThermalConductivityUnit :> DerivedUnit {
320
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; }
321
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
322
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; }
323
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; }
324
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, thermodynamicTemperaturePF); }
325
+ }
326
+
327
+ /* ISO-80000-5 item 5-10.1 coefficient of heat transfer */
328
+ attribute def CoefficientOfHeatTransferValue :> ScalarQuantityValue {
329
+ doc
330
+ /*
331
+ * source: item 5-10.1 coefficient of heat transfer
332
+ * symbol(s): `K`, `(k)`
333
+ * application domain: generic
334
+ * name: CoefficientOfHeatTransfer
335
+ * quantity dimension: M^1*T^-3*Θ^-1
336
+ * measurement unit(s): W/(m^2*K), kg*s^-3*K^-1
337
+ * tensor order: 0
338
+ * definition: quotient of density of heat flow rate (item 5-8) and thermodynamic temperature (item 5-1) difference
339
+ * remarks: In building technology, the coefficient of heat transfer is often called thermal transmittance, with the symbol U (no longer recommended). See remark to item 5-13.
340
+ */
341
+ attribute :>> num: Real;
342
+ attribute :>> mRef: CoefficientOfHeatTransferUnit[1];
343
+ }
344
+
345
+ attribute coefficientOfHeatTransfer: CoefficientOfHeatTransferValue[*] nonunique :> scalarQuantities;
346
+
347
+ attribute def CoefficientOfHeatTransferUnit :> DerivedUnit {
348
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
349
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; }
350
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; }
351
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF, thermodynamicTemperaturePF); }
352
+ }
353
+
354
+ /* ISO-80000-5 item 5-10.2 surface coefficient of heat transfer */
355
+ attribute def SurfaceCoefficientOfHeatTransferValue :> ScalarQuantityValue {
356
+ doc
357
+ /*
358
+ * source: item 5-10.2 surface coefficient of heat transfer
359
+ * symbol(s): `h`, `(α)`
360
+ * application domain: generic
361
+ * name: SurfaceCoefficientOfHeatTransfer
362
+ * quantity dimension: M^1*T^-3*Θ^-1
363
+ * measurement unit(s): W/(m^2*K), kg*s^-3*K^-1
364
+ * tensor order: 0
365
+ * definition: quotient of density of heat flow rate and the difference of the temperature at the surface and a reference temperature: `h = q / (T_s - T_r)` where q is density of heat flow rate (item 5-8), `T_s` is the thermodynamic temperature (item 5-1) at the surface, and `T_r` is a reference thermodynamic temperature characterizing the adjacent surroundings
366
+ * remarks: None.
367
+ */
368
+ attribute :>> num: Real;
369
+ attribute :>> mRef: SurfaceCoefficientOfHeatTransferUnit[1];
370
+ }
371
+
372
+ attribute surfaceCoefficientOfHeatTransfer: SurfaceCoefficientOfHeatTransferValue[*] nonunique :> scalarQuantities;
373
+
374
+ attribute def SurfaceCoefficientOfHeatTransferUnit :> DerivedUnit {
375
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
376
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; }
377
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; }
378
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF, thermodynamicTemperaturePF); }
379
+ }
380
+
381
+ /* ISO-80000-5 item 5-11 thermal insulance, coefficient of thermal insulance */
382
+ attribute def ThermalInsulanceValue :> ScalarQuantityValue {
383
+ doc
384
+ /*
385
+ * source: item 5-11 thermal insulance, coefficient of thermal insulance
386
+ * symbol(s): `M`
387
+ * application domain: generic
388
+ * name: ThermalInsulance
389
+ * quantity dimension: M^-1*T^3*Θ^1
390
+ * measurement unit(s): m^2*K/W, kg^-1*s^3*K
391
+ * tensor order: 0
392
+ * definition: inverse of coefficient of heat transfer `K`: `M = 1/K` where `K` is coefficient of heat transfer (item 5-10.1)
393
+ * remarks: In building technology, this quantity is often called thermal resistance, with the symbol R.
394
+ */
395
+ attribute :>> num: Real;
396
+ attribute :>> mRef: ThermalInsulanceUnit[1];
397
+ }
398
+
399
+ attribute thermalInsulance: ThermalInsulanceValue[*] nonunique :> scalarQuantities;
400
+
401
+ attribute def ThermalInsulanceUnit :> DerivedUnit {
402
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; }
403
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 3; }
404
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = 1; }
405
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (massPF, durationPF, thermodynamicTemperaturePF); }
406
+ }
407
+
408
+ alias CoefficientOfThermalInsulanceUnit for ThermalInsulanceUnit;
409
+ alias CoefficientOfThermalInsulanceValue for ThermalInsulanceValue;
410
+ alias coefficientOfThermalInsulance for thermalInsulance;
411
+
412
+ /* ISO-80000-5 item 5-12 thermal resistance */
413
+ attribute def ThermalResistanceValue :> ScalarQuantityValue {
414
+ doc
415
+ /*
416
+ * source: item 5-12 thermal resistance
417
+ * symbol(s): `R`
418
+ * application domain: generic
419
+ * name: ThermalResistance
420
+ * quantity dimension: L^-2*M^-1*T^3*Θ^1
421
+ * measurement unit(s): K/W, kg^-1*m^-2*s^3*K
422
+ * tensor order: 0
423
+ * definition: quotient of thermodynamic temperature (item 5-1) difference and heat flow rate (item 5-7)
424
+ * remarks: See remark to item 5-11.
425
+ */
426
+ attribute :>> num: Real;
427
+ attribute :>> mRef: ThermalResistanceUnit[1];
428
+ }
429
+
430
+ attribute thermalResistance: ThermalResistanceValue[*] nonunique :> scalarQuantities;
431
+
432
+ attribute def ThermalResistanceUnit :> DerivedUnit {
433
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -2; }
434
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; }
435
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 3; }
436
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = 1; }
437
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, thermodynamicTemperaturePF); }
438
+ }
439
+
440
+ /* ISO-80000-5 item 5-13 thermal conductance */
441
+ attribute def ThermalConductanceValue :> ScalarQuantityValue {
442
+ doc
443
+ /*
444
+ * source: item 5-13 thermal conductance
445
+ * symbol(s): `G`, `(H)`
446
+ * application domain: generic
447
+ * name: ThermalConductance
448
+ * quantity dimension: L^2*M^1*T^-3*Θ^-1
449
+ * measurement unit(s): W/K, kg*m^2*s^-3*K^-1
450
+ * tensor order: 0
451
+ * definition: inverse of thermal resistance `R`: `G = 1/R` where `R` is thermal resistance (item 5-12)
452
+ * remarks: See remark to item 5-11. This quantity is also called heat transfer coefficient. See item 5-10.1.
453
+ */
454
+ attribute :>> num: Real;
455
+ attribute :>> mRef: ThermalConductanceUnit[1];
456
+ }
457
+
458
+ attribute thermalConductance: ThermalConductanceValue[*] nonunique :> scalarQuantities;
459
+
460
+ attribute def ThermalConductanceUnit :> DerivedUnit {
461
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
462
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
463
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -3; }
464
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; }
465
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, thermodynamicTemperaturePF); }
466
+ }
467
+
468
+ /* ISO-80000-5 item 5-14 thermal diffusivity */
469
+ attribute def ThermalDiffusivityValue :> ScalarQuantityValue {
470
+ doc
471
+ /*
472
+ * source: item 5-14 thermal diffusivity
473
+ * symbol(s): `a`
474
+ * application domain: generic
475
+ * name: ThermalDiffusivity
476
+ * quantity dimension: L^2*T^-1
477
+ * measurement unit(s): m^2*s^-1
478
+ * tensor order: 0
479
+ * definition: quotient of thermal conductivity and the product of mass density and specific heat capacity: `a = λ / (ρ C_p)` where `λ` is thermal conductivity (item 5-9), `ρ` is mass density (ISO 80000-4), and `c_p` is specific heat capacity at constant pressure (item 5-16.2)
480
+ * remarks: None.
481
+ */
482
+ attribute :>> num: Real;
483
+ attribute :>> mRef: ThermalDiffusivityUnit[1];
484
+ }
485
+
486
+ attribute thermalDiffusivity: ThermalDiffusivityValue[*] nonunique :> scalarQuantities;
487
+
488
+ attribute def ThermalDiffusivityUnit :> DerivedUnit {
489
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
490
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -1; }
491
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); }
492
+ }
493
+
494
+ /* ISO-80000-5 item 5-15 heat capacity */
495
+ attribute def HeatCapacityValue :> ScalarQuantityValue {
496
+ doc
497
+ /*
498
+ * source: item 5-15 heat capacity
499
+ * symbol(s): `C`
500
+ * application domain: generic
501
+ * name: HeatCapacity
502
+ * quantity dimension: L^2*M^1*T^-2*Θ^-1
503
+ * measurement unit(s): J/K, kg*m^2*s^-2*K^-1
504
+ * tensor order: 0
505
+ * definition: derivative of added heat with respect to thermodynamic temperature of a system: `C = (dQ)/(dT)` where `Q` is amount of heat (item 5-6.1) and `T` is thermodynamic temperature (item 5-1)
506
+ * remarks: Heat capacity is not completely defined unless specified as seen in items 5-16.2, 5-16.3 and 5-16.4.
507
+ */
508
+ attribute :>> num: Real;
509
+ attribute :>> mRef: HeatCapacityUnit[1];
510
+ }
511
+
512
+ attribute heatCapacity: HeatCapacityValue[*] nonunique :> scalarQuantities;
513
+
514
+ attribute def HeatCapacityUnit :> DerivedUnit {
515
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
516
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
517
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
518
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; }
519
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, thermodynamicTemperaturePF); }
520
+ }
521
+
522
+ /* ISO-80000-5 item 5-16.1 specific heat capacity */
523
+ attribute def SpecificHeatCapacityValue :> ScalarQuantityValue {
524
+ doc
525
+ /*
526
+ * source: item 5-16.1 specific heat capacity
527
+ * symbol(s): `c`
528
+ * application domain: generic
529
+ * name: SpecificHeatCapacity
530
+ * quantity dimension: L^2*T^-2*Θ^-1
531
+ * measurement unit(s): J/(kg*K), m^2*s^-2*K^-1
532
+ * tensor order: 0
533
+ * definition: quotient of heat capacity and mass: `c = C/m` where `C` is heat capacity (item 5-15) and `m` is mass (ISO 80000-4)
534
+ * remarks: For the corresponding quantities related to the amount of substance, see ISO 80000-9.
535
+ */
536
+ attribute :>> num: Real;
537
+ attribute :>> mRef: SpecificHeatCapacityUnit[1];
538
+ }
539
+
540
+ attribute specificHeatCapacity: SpecificHeatCapacityValue[*] nonunique :> scalarQuantities;
541
+
542
+ attribute def SpecificHeatCapacityUnit :> DerivedUnit {
543
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
544
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
545
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; }
546
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF, thermodynamicTemperaturePF); }
547
+ }
548
+
549
+ /* ISO-80000-5 item 5-16.2 specific heat capacity at constant pressure */
550
+ attribute def SpecificHeatCapacityAtConstantPressureValue :> ScalarQuantityValue {
551
+ doc
552
+ /*
553
+ * source: item 5-16.2 specific heat capacity at constant pressure
554
+ * symbol(s): `c_p`
555
+ * application domain: generic
556
+ * name: SpecificHeatCapacityAtConstantPressure
557
+ * quantity dimension: L^2*T^-2*Θ^-1
558
+ * measurement unit(s): J/(kg*K), m^2*s^-2*K^-1
559
+ * tensor order: 0
560
+ * definition: specific heat capacity (item 5-16.1) at constant pressure (ISO 80000-4)
561
+ * remarks: Also called specific isobaric heat capacity.
562
+ */
563
+ attribute :>> num: Real;
564
+ attribute :>> mRef: SpecificHeatCapacityAtConstantPressureUnit[1];
565
+ }
566
+
567
+ attribute specificHeatCapacityAtConstantPressure: SpecificHeatCapacityAtConstantPressureValue[*] nonunique :> scalarQuantities;
568
+
569
+ attribute def SpecificHeatCapacityAtConstantPressureUnit :> DerivedUnit {
570
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
571
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
572
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; }
573
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF, thermodynamicTemperaturePF); }
574
+ }
575
+
576
+ /* ISO-80000-5 item 5-16.3 specific heat capacity at constant volume */
577
+ attribute def SpecificHeatCapacityAtConstantVolumeValue :> ScalarQuantityValue {
578
+ doc
579
+ /*
580
+ * source: item 5-16.3 specific heat capacity at constant volume
581
+ * symbol(s): `c_V`
582
+ * application domain: generic
583
+ * name: SpecificHeatCapacityAtConstantVolume
584
+ * quantity dimension: L^2*T^-2*Θ^-1
585
+ * measurement unit(s): J/(kg*K), m^2*s^-2*K^-1
586
+ * tensor order: 0
587
+ * definition: specific heat capacity (item 5-16.1) at constant volume (ISO 80000-3)
588
+ * remarks: Also called specific isochoric heat capacity.
589
+ */
590
+ attribute :>> num: Real;
591
+ attribute :>> mRef: SpecificHeatCapacityAtConstantVolumeUnit[1];
592
+ }
593
+
594
+ attribute specificHeatCapacityAtConstantVolume: SpecificHeatCapacityAtConstantVolumeValue[*] nonunique :> scalarQuantities;
595
+
596
+ attribute def SpecificHeatCapacityAtConstantVolumeUnit :> DerivedUnit {
597
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
598
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
599
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; }
600
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF, thermodynamicTemperaturePF); }
601
+ }
602
+
603
+ /* ISO-80000-5 item 5-16.4 specific heat capacity at saturated vapour pressure */
604
+ attribute def SpecificHeatCapacityAtSaturatedVapourPressureValue :> ScalarQuantityValue {
605
+ doc
606
+ /*
607
+ * source: item 5-16.4 specific heat capacity at saturated vapour pressure
608
+ * symbol(s): `c_"sat"`
609
+ * application domain: generic
610
+ * name: SpecificHeatCapacityAtSaturatedVapourPressure
611
+ * quantity dimension: L^2*T^-2*Θ^-1
612
+ * measurement unit(s): J/(kg*K), m^2*s^-2*K^-1
613
+ * tensor order: 0
614
+ * definition: specific heat capacity (item 5-16.1) at saturated vapour pressure (ISO 80000-4)
615
+ * remarks: None.
616
+ */
617
+ attribute :>> num: Real;
618
+ attribute :>> mRef: SpecificHeatCapacityAtSaturatedVapourPressureUnit[1];
619
+ }
620
+
621
+ attribute specificHeatCapacityAtSaturatedVapourPressure: SpecificHeatCapacityAtSaturatedVapourPressureValue[*] nonunique :> scalarQuantities;
622
+
623
+ attribute def SpecificHeatCapacityAtSaturatedVapourPressureUnit :> DerivedUnit {
624
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
625
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
626
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; }
627
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF, thermodynamicTemperaturePF); }
628
+ }
629
+
630
+ /* ISO-80000-5 item 5-17.1 ratio of specific heat capacities */
631
+ attribute def RatioOfSpecificHeatCapacitiesValue :> DimensionOneValue {
632
+ doc
633
+ /*
634
+ * source: item 5-17.1 ratio of specific heat capacities
635
+ * symbol(s): `γ`
636
+ * application domain: generic
637
+ * name: RatioOfSpecificHeatCapacities (specializes DimensionOneQuantity)
638
+ * quantity dimension: 1
639
+ * measurement unit(s): 1
640
+ * tensor order: 0
641
+ * definition: quotient of specific heat capacity at constant pressure and specific heat capacity at constant volume: `γ = c_p/c_V` where `c_p` is specific heat capacity at constant pressure (item 5-16.2) and `c_V` is specific heat capacity at constant volume (item 5-16.3)
642
+ * remarks: This quantity can also be expressed by `γ = C_p/C_V` where `C_p` is heat capacity at constant pressure and `C_V` is heat capacity at constant volume.
643
+ */
644
+ }
645
+ attribute ratioOfSpecificHeatCapacities: RatioOfSpecificHeatCapacitiesValue :> scalarQuantities;
646
+
647
+ /* ISO-80000-5 item 5-17.2 isentropic exponent, isentropic expansion factor */
648
+ attribute def IsentropicExponentValue :> DimensionOneValue {
649
+ doc
650
+ /*
651
+ * source: item 5-17.2 isentropic exponent, isentropic expansion factor
652
+ * symbol(s): `ϰ`
653
+ * application domain: generic
654
+ * name: IsentropicExponent (specializes DimensionOneQuantity)
655
+ * quantity dimension: 1
656
+ * measurement unit(s): 1
657
+ * tensor order: 0
658
+ * definition: the negative of relative pressure change, divided by relative volume change, at constant entropy: `ϰ = -V/p * ((partial p)/(partial V))_S` where `V` is volume (ISO 80000-3), `p` is pressure (ISO 80000-4), and `S` is entropy (item 5-18)
659
+ * remarks: For an ideal gas, `ϰ` is equal to `γ` (item 5-17.1).
660
+ */
661
+ }
662
+ attribute isentropicExponent: IsentropicExponentValue :> scalarQuantities;
663
+
664
+ alias isentropicExpansionFactor for isentropicExponent;
665
+
666
+ /* ISO-80000-5 item 5-18 entropy */
667
+ attribute def EntropyValue :> ScalarQuantityValue {
668
+ doc
669
+ /*
670
+ * source: item 5-18 entropy
671
+ * symbol(s): `S`
672
+ * application domain: generic
673
+ * name: Entropy
674
+ * quantity dimension: L^2*M^1*T^-2*Θ^-1
675
+ * measurement unit(s): J/K, kg*m^2*s^-2*K^-1
676
+ * tensor order: 0
677
+ * definition: natural logarithm of number of equally probable microscopic configurations in a macroscopic system, multiplied by the Boltzmann constant: `S = k lnW` where `W` is number of configurations and `k` is the Boltzmann constant (ISO 80000-1)
678
+ * remarks: None.
679
+ */
680
+ attribute :>> num: Real;
681
+ attribute :>> mRef: EntropyUnit[1];
682
+ }
683
+
684
+ attribute entropy: EntropyValue[*] nonunique :> scalarQuantities;
685
+
686
+ attribute def EntropyUnit :> DerivedUnit {
687
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
688
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
689
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
690
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; }
691
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, thermodynamicTemperaturePF); }
692
+ }
693
+
694
+ /* ISO-80000-5 item 5-19 specific entropy */
695
+ attribute def SpecificEntropyValue :> ScalarQuantityValue {
696
+ doc
697
+ /*
698
+ * source: item 5-19 specific entropy
699
+ * symbol(s): `s`
700
+ * application domain: generic
701
+ * name: SpecificEntropy
702
+ * quantity dimension: L^2*T^-2*Θ^-1
703
+ * measurement unit(s): J/(kg*K), m^2*s^-2*K^-1
704
+ * tensor order: 0
705
+ * definition: quotient of entropy and mass: `s = S/m` where `S` is entropy (item 5-18) and `m` is mass (ISO 80000-4)
706
+ * remarks: For the corresponding quantity related to amount of substance, see ISO 80000-9.
707
+ */
708
+ attribute :>> num: Real;
709
+ attribute :>> mRef: SpecificEntropyUnit[1];
710
+ }
711
+
712
+ attribute specificEntropy: SpecificEntropyValue[*] nonunique :> scalarQuantities;
713
+
714
+ attribute def SpecificEntropyUnit :> DerivedUnit {
715
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
716
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
717
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; }
718
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF, thermodynamicTemperaturePF); }
719
+ }
720
+
721
+ /* ISO-80000-5 item 5-20.1 energy */
722
+ attribute def EnergyValue :> ScalarQuantityValue {
723
+ doc
724
+ /*
725
+ * source: item 5-20.1 energy
726
+ * symbol(s): `E`
727
+ * application domain: thermodynamics
728
+ * name: Energy
729
+ * quantity dimension: L^2*M^1*T^-2
730
+ * measurement unit(s): J, kg*m^2*s^-2
731
+ * tensor order: 0
732
+ * definition: ability of a system to do work (ISO 80000-4)
733
+ * remarks: Energy exists in different forms that are mutually transformable into each other, either totally or partially. In contrast to internal energy (item 5-20.2), energy is not a state function.
734
+ */
735
+ attribute :>> num: Real;
736
+ attribute :>> mRef: EnergyUnit[1];
737
+ }
738
+
739
+ attribute energy: EnergyValue[*] nonunique :> scalarQuantities;
740
+
741
+ attribute def EnergyUnit :> DerivedUnit {
742
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
743
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
744
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
745
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF); }
746
+ }
747
+
748
+ /* ISO-80000-5 item 5-20.2 internal energy, thermodynamic energy */
749
+ attribute internalEnergy: EnergyValue :> scalarQuantities {
750
+ doc
751
+ /*
752
+ * source: item 5-20.2 internal energy, thermodynamic energy
753
+ * symbol(s): `U`
754
+ * application domain: generic
755
+ * name: InternalEnergy (specializes Energy)
756
+ * quantity dimension: L^2*M^1*T^-2
757
+ * measurement unit(s): J, kg*m^2*s^-2
758
+ * tensor order: 0
759
+ * definition: energy of a system whose change is given by the amount of the heat (item 5-6.1) transferred to the system and the work (ISO 80000-4) done on the system, provided that the system is closed and no chemical reactions occur
760
+ * remarks: In thermodynamic text books, usually the formula `ΔU = Q + W` is used. Note that the zero of the energy is undefined.
761
+ */
762
+ }
763
+
764
+ alias thermodynamicEnergy for internalEnergy;
765
+
766
+ /* ISO-80000-5 item 5-20.3 enthalpy */
767
+ attribute enthalpy: EnergyValue :> scalarQuantities {
768
+ doc
769
+ /*
770
+ * source: item 5-20.3 enthalpy
771
+ * symbol(s): `H`
772
+ * application domain: generic
773
+ * name: Enthalpy (specializes Energy)
774
+ * quantity dimension: L^2*M^1*T^-2
775
+ * measurement unit(s): J, kg*m^2*s^-2
776
+ * tensor order: 0
777
+ * definition: sum of internal energy of the system and the product of pressure and volume of the system: `H = U + p*V` where U is internal energy (item 5-20.2), `p` is pressure (ISO 80000-4), and `V` is volume (ISO 80000-3)
778
+ * remarks: None.
779
+ */
780
+ }
781
+
782
+ /* ISO-80000-5 item 5-20.4 Helmholtz energy, Helmholtz function */
783
+ attribute helmholtzEnergy: EnergyValue :> scalarQuantities {
784
+ doc
785
+ /*
786
+ * source: item 5-20.4 Helmholtz energy, Helmholtz function
787
+ * symbol(s): `A`, `F`
788
+ * application domain: generic
789
+ * name: HelmholtzEnergy (specializes Energy)
790
+ * quantity dimension: L^2*M^1*T^-2
791
+ * measurement unit(s): J, kg*m^2*s^-2
792
+ * tensor order: 0
793
+ * definition: difference of internal energy of the system and the product of thermodynamic temperature and entropy of the system: `A = U - TS` where `U` is internal energy (item 5-20.2), `T` is thermodynamic temperature (item 5-1), and `S` is entropy (item 5-18)
794
+ * remarks: The name Helmholtz free energy is also used. However, this term is not recommended.
795
+ */
796
+ }
797
+
798
+ alias helmholtzFunction for helmholtzEnergy;
799
+
800
+ /* ISO-80000-5 item 5-20.5 Gibbs energy, Gibbs function */
801
+ attribute gibbsEnergy: EnergyValue :> scalarQuantities {
802
+ doc
803
+ /*
804
+ * source: item 5-20.5 Gibbs energy, Gibbs function
805
+ * symbol(s): `G`
806
+ * application domain: generic
807
+ * name: GibbsEnergy (specializes Energy)
808
+ * quantity dimension: L^2*M^1*T^-2
809
+ * measurement unit(s): J, kg*m^2*s^-2
810
+ * tensor order: 0
811
+ * definition: difference of the enthalpy and the product of thermodynamic temperature and entropy of the system: `G = H - T*S` where H is enthalpy (item 5-20.3), `T` is thermodynamic temperature (item 5-1), and `S` is entropy (item 5-18)
812
+ * remarks: The name Gibbs free energy is also used. However, this term is not recommended.
813
+ */
814
+ }
815
+
816
+ alias gibbsFunction for gibbsEnergy;
817
+
818
+ /* ISO-80000-5 item 5-21.1 specific energy */
819
+ attribute def SpecificEnergyValue :> ScalarQuantityValue {
820
+ doc
821
+ /*
822
+ * source: item 5-21.1 specific energy
823
+ * symbol(s): `e`
824
+ * application domain: generic
825
+ * name: SpecificEnergy
826
+ * quantity dimension: L^2*T^-2
827
+ * measurement unit(s): J/kg, m^2*s^-2
828
+ * tensor order: 0
829
+ * definition: quotient of energy and mass: `e = E/m` where `E` is energy (item 5-20.1) and `m` is mass (ISO 80000-4)
830
+ * remarks: None.
831
+ */
832
+ attribute :>> num: Real;
833
+ attribute :>> mRef: SpecificEnergyUnit[1];
834
+ }
835
+
836
+ attribute specificEnergy: SpecificEnergyValue[*] nonunique :> scalarQuantities;
837
+
838
+ attribute def SpecificEnergyUnit :> DerivedUnit {
839
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
840
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
841
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); }
842
+ }
843
+
844
+ /* ISO-80000-5 item 5-21.2 specific internal energy, specific thermodynamic energy */
845
+ attribute specificInternalEnergy: SpecificEnergyValue :> scalarQuantities {
846
+ doc
847
+ /*
848
+ * source: item 5-21.2 specific internal energy, specific thermodynamic energy
849
+ * symbol(s): `u`
850
+ * application domain: generic
851
+ * name: SpecificInternalEnergy (specializes SpecificEnergy)
852
+ * quantity dimension: L^2*T^-2
853
+ * measurement unit(s): J/kg, m^2*s^-2
854
+ * tensor order: 0
855
+ * definition: quotient of internal energy and mass: `u = U/m` where `U` is internal energy (item 5-20.2) and `m` is mass (ISO 80000-4)
856
+ * remarks: None.
857
+ */
858
+ }
859
+
860
+ alias specificThermodynamicEnergy for specificInternalEnergy;
861
+
862
+ /* ISO-80000-5 item 5-21.3 specific enthalpy */
863
+ attribute def SpecificEnthalpyValue :> ScalarQuantityValue {
864
+ doc
865
+ /*
866
+ * source: item 5-21.3 specific enthalpy
867
+ * symbol(s): `h`
868
+ * application domain: generic
869
+ * name: SpecificEnthalpy
870
+ * quantity dimension: L^2*T^-2
871
+ * measurement unit(s): J/kg, m^2*s^-2
872
+ * tensor order: 0
873
+ * definition: quotient of enthalpy and mass: `h = H/m` where `H` is enthalpy (item 5-20.3) and `m` is mass (ISO 80000-4)
874
+ * remarks: None.
875
+ */
876
+ attribute :>> num: Real;
877
+ attribute :>> mRef: SpecificEnthalpyUnit[1];
878
+ }
879
+
880
+ attribute specificEnthalpy: SpecificEnthalpyValue[*] nonunique :> scalarQuantities;
881
+
882
+ attribute def SpecificEnthalpyUnit :> DerivedUnit {
883
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
884
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
885
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF); }
886
+ }
887
+
888
+ /* ISO-80000-5 item 5-21.4 specific Helmholtz energy, specific Helmholtz function */
889
+ attribute specificHelmholtzEnergy: SpecificEnergyValue :> scalarQuantities {
890
+ doc
891
+ /*
892
+ * source: item 5-21.4 specific Helmholtz energy, specific Helmholtz function
893
+ * symbol(s): `a`, `f`
894
+ * application domain: generic
895
+ * name: SpecificHelmholtzEnergy (specializes SpecificEnergy)
896
+ * quantity dimension: L^2*T^-2
897
+ * measurement unit(s): J/kg, m^2*s^-2
898
+ * tensor order: 0
899
+ * definition: quotient of Helmholtz energy and mass: `a = A/m` where A is Helmholtz energy (item 5-20.4) and m is mass (ISO 80000-4)
900
+ * remarks: The name specific Helmholtz free energy is also used. However, this term is not recommended.
901
+ */
902
+ }
903
+
904
+ alias specificHelmholtzFunction for specificHelmholtzEnergy;
905
+
906
+ /* ISO-80000-5 item 5-21.5 specific Gibbs energy, specific Gibbs function */
907
+ attribute specificGibbsEnergy: SpecificEnergyValue :> scalarQuantities {
908
+ doc
909
+ /*
910
+ * source: item 5-21.5 specific Gibbs energy, specific Gibbs function
911
+ * symbol(s): `g`
912
+ * application domain: generic
913
+ * name: SpecificGibbsEnergy (specializes SpecificEnergy)
914
+ * quantity dimension: L^2*T^-2
915
+ * measurement unit(s): J/kg, m^2*s^-2
916
+ * tensor order: 0
917
+ * definition: quotient of Gibbs energy and mass: `g = G/m` where `G` is Gibbs energy (item 5-20.5) and `m` is mass (ISO 80000-4)
918
+ * remarks: The name specific Gibbs free energy is also used. However, this term is not recommended.
919
+ */
920
+ }
921
+
922
+ alias specificGibbsFunction for specificGibbsEnergy;
923
+
924
+ /* ISO-80000-5 item 5-22 Massieu function */
925
+ attribute def MassieuFunctionValue :> ScalarQuantityValue {
926
+ doc
927
+ /*
928
+ * source: item 5-22 Massieu function
929
+ * symbol(s): `J`
930
+ * application domain: generic
931
+ * name: MassieuFunction
932
+ * quantity dimension: L^2*M^1*T^-2*Θ^-1
933
+ * measurement unit(s): J/K, kg*m^2*s^-2*K^-1
934
+ * tensor order: 0
935
+ * definition: quotient of the negative of Helmholtz energy and temperature: `J = -A/T` where `A` is Helmholtz energy (item 5-20.4) and `T` is thermodynamic temperature (item 5-1)
936
+ * remarks: None.
937
+ */
938
+ attribute :>> num: Real;
939
+ attribute :>> mRef: MassieuFunctionUnit[1];
940
+ }
941
+
942
+ attribute massieuFunction: MassieuFunctionValue[*] nonunique :> scalarQuantities;
943
+
944
+ attribute def MassieuFunctionUnit :> DerivedUnit {
945
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
946
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
947
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
948
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; }
949
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, thermodynamicTemperaturePF); }
950
+ }
951
+
952
+ /* ISO-80000-5 item 5-23 Planck function */
953
+ attribute def PlanckFunctionValue :> ScalarQuantityValue {
954
+ doc
955
+ /*
956
+ * source: item 5-23 Planck function
957
+ * symbol(s): `Y`
958
+ * application domain: generic
959
+ * name: PlanckFunction
960
+ * quantity dimension: L^2*M^1*T^-2*Θ^-1
961
+ * measurement unit(s): J/K, kg*m^2*s^-2*K^-1
962
+ * tensor order: 0
963
+ * definition: quotient of the negative of Gibbs energy and temperature: `Y = -G/T` where G is Gibbs energy (item 5-20.5) and `T` is thermodynamic temperature (item 5-1)
964
+ * remarks: None.
965
+ */
966
+ attribute :>> num: Real;
967
+ attribute :>> mRef: PlanckFunctionUnit[1];
968
+ }
969
+
970
+ attribute planckFunction: PlanckFunctionValue[*] nonunique :> scalarQuantities;
971
+
972
+ attribute def PlanckFunctionUnit :> DerivedUnit {
973
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
974
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
975
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
976
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; }
977
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, thermodynamicTemperaturePF); }
978
+ }
979
+
980
+ /* ISO-80000-5 item 5-24 Joule-Thomson coefficient */
981
+ attribute def JouleThomsonCoefficientValue :> ScalarQuantityValue {
982
+ doc
983
+ /*
984
+ * source: item 5-24 Joule-Thomson coefficient
985
+ * symbol(s): `μ_"JT"`
986
+ * application domain: generic
987
+ * name: JouleThomsonCoefficient
988
+ * quantity dimension: L^1*M^-1*T^2*Θ^1
989
+ * measurement unit(s): K/Pa, kg^-1*m*s^2*K
990
+ * tensor order: 0
991
+ * definition: change of thermodynamic temperature with respect to pressure in a Joule-Thomson process at constant enthalpy: `μ_(JT) = ((partial T)/(partial p))_H` where `T` is thermodynamic temperature (item 5-1), `p` is pressure (ISO 80000-4) and H is enthalpy (item 5-20.3)
992
+ * remarks: None.
993
+ */
994
+ attribute :>> num: Real;
995
+ attribute :>> mRef: JouleThomsonCoefficientUnit[1];
996
+ }
997
+
998
+ attribute jouleThomsonCoefficient: JouleThomsonCoefficientValue[*] nonunique :> scalarQuantities;
999
+
1000
+ attribute def JouleThomsonCoefficientUnit :> DerivedUnit {
1001
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 1; }
1002
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = -1; }
1003
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = 2; }
1004
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = 1; }
1005
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF, durationPF, thermodynamicTemperaturePF); }
1006
+ }
1007
+
1008
+ /* ISO-80000-5 item 5-25.1 thermal efficiency */
1009
+ attribute def ThermalEfficiencyValue :> DimensionOneValue {
1010
+ doc
1011
+ /*
1012
+ * source: item 5-25.1 thermal efficiency
1013
+ * symbol(s): `η`
1014
+ * application domain: thermodynamics
1015
+ * name: ThermalEfficiency (specializes DimensionOneQuantity)
1016
+ * quantity dimension: 1
1017
+ * measurement unit(s): 1
1018
+ * tensor order: 0
1019
+ * definition: quotient of work (ISO 80000-4) delivered by a heat engine and supplied heat: `η = W/Q` where `W` is work (ISO 80000-4) and `Q` is heat (item 5-6.1)
1020
+ * remarks: None.
1021
+ */
1022
+ }
1023
+ attribute thermalEfficiency: ThermalEfficiencyValue :> scalarQuantities;
1024
+
1025
+ /* ISO-80000-5 item 5-25.2 maximum thermal efficiency */
1026
+ attribute def MaximumThermalEfficiencyValue :> DimensionOneValue {
1027
+ doc
1028
+ /*
1029
+ * source: item 5-25.2 maximum thermal efficiency
1030
+ * symbol(s): `η_"max"`
1031
+ * application domain: generic
1032
+ * name: MaximumThermalEfficiency (specializes DimensionOneQuantity)
1033
+ * quantity dimension: 1
1034
+ * measurement unit(s): 1
1035
+ * tensor order: 0
1036
+ * definition: efficiency determined by the quotient of the temperatures of the hot source and the cold sink: `η_max = 1 - T_c/T_h` where `T_c` is the thermodynamic temperature (item 5-1) of the cold sink and `T_h` is the thermodynamic temperature (item 5-1) of the hot source
1037
+ * remarks: An ideal heat engine operating according to the Carnot process is delivering the maximum efficiency.
1038
+ */
1039
+ }
1040
+ attribute maximumThermalEfficiency: MaximumThermalEfficiencyValue :> scalarQuantities;
1041
+
1042
+ /* ISO-80000-5 item 5-26 specific gas constant */
1043
+ attribute def SpecificGasConstantValue :> ScalarQuantityValue {
1044
+ doc
1045
+ /*
1046
+ * source: item 5-26 specific gas constant
1047
+ * symbol(s): `R_s`
1048
+ * application domain: generic
1049
+ * name: SpecificGasConstant
1050
+ * quantity dimension: L^2*T^-2*Θ^-1
1051
+ * measurement unit(s): J/(kg*K), m^2*s^-2*K^-1
1052
+ * tensor order: 0
1053
+ * definition: quotient of the Boltzmann constant `k` (ISO 80000-1) and the mass `m` (ISO 80000-4) of the gas particle
1054
+ * remarks: None.
1055
+ */
1056
+ attribute :>> num: Real;
1057
+ attribute :>> mRef: SpecificGasConstantUnit[1];
1058
+ }
1059
+
1060
+ attribute specificGasConstant: SpecificGasConstantValue[*] nonunique :> scalarQuantities;
1061
+
1062
+ attribute def SpecificGasConstantUnit :> DerivedUnit {
1063
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = 2; }
1064
+ private attribute durationPF: QuantityPowerFactor[1] { :>> quantity = isq.T; :>> exponent = -2; }
1065
+ private attribute thermodynamicTemperaturePF: QuantityPowerFactor[1] { :>> quantity = isq.'Θ'; :>> exponent = -1; }
1066
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, durationPF, thermodynamicTemperaturePF); }
1067
+ }
1068
+
1069
+ /* ISO-80000-5 item 5-27 mass concentration of water */
1070
+ attribute def MassConcentrationOfWaterValue :> ScalarQuantityValue {
1071
+ doc
1072
+ /*
1073
+ * source: item 5-27 mass concentration of water
1074
+ * symbol(s): `w`
1075
+ * application domain: generic
1076
+ * name: MassConcentrationOfWater
1077
+ * quantity dimension: L^-3*M^1
1078
+ * measurement unit(s): kg*m^-3
1079
+ * tensor order: 0
1080
+ * definition: quotient of mass of water and a specified volume: `w = m/V` where `m` is mass (ISO 80000-4) of water, irrespective of the form of aggregation state, and `V` is volume (ISO 80000-3)
1081
+ * remarks: Mass concentration of water at saturation is denoted `w_"sat"`.
1082
+ */
1083
+ attribute :>> num: Real;
1084
+ attribute :>> mRef: MassConcentrationOfWaterUnit[1];
1085
+ }
1086
+
1087
+ attribute massConcentrationOfWater: MassConcentrationOfWaterValue[*] nonunique :> scalarQuantities;
1088
+
1089
+ attribute def MassConcentrationOfWaterUnit :> DerivedUnit {
1090
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; }
1091
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
1092
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF); }
1093
+ }
1094
+
1095
+ /* ISO-80000-5 item 5-28 mass concentration of water vapour absolute humidity */
1096
+ attribute def MassConcentrationOfWaterVapourAbsoluteHumidityValue :> ScalarQuantityValue {
1097
+ doc
1098
+ /*
1099
+ * source: item 5-28 mass concentration of water vapour absolute humidity
1100
+ * symbol(s): `v`
1101
+ * application domain: generic
1102
+ * name: MassConcentrationOfWaterVapourAbsoluteHumidity
1103
+ * quantity dimension: L^-3*M^1
1104
+ * measurement unit(s): kg*m^-3
1105
+ * tensor order: 0
1106
+ * definition: quotient of mass of water vapour and a specified volume: `v = m/V` where m is mass (ISO 80000-4) of water vapour and `V` is volume (ISO 80000-3)
1107
+ * remarks: Mass concentration of water vapour at saturation is denoted `v_"sat"`.
1108
+ */
1109
+ attribute :>> num: Real;
1110
+ attribute :>> mRef: MassConcentrationOfWaterVapourAbsoluteHumidityUnit[1];
1111
+ }
1112
+
1113
+ attribute massConcentrationOfWaterVapourAbsoluteHumidity: MassConcentrationOfWaterVapourAbsoluteHumidityValue[*] nonunique :> scalarQuantities;
1114
+
1115
+ attribute def MassConcentrationOfWaterVapourAbsoluteHumidityUnit :> DerivedUnit {
1116
+ private attribute lengthPF: QuantityPowerFactor[1] { :>> quantity = isq.L; :>> exponent = -3; }
1117
+ private attribute massPF: QuantityPowerFactor[1] { :>> quantity = isq.M; :>> exponent = 1; }
1118
+ attribute :>> quantityDimension { :>> quantityPowerFactors = (lengthPF, massPF); }
1119
+ }
1120
+
1121
+ /* ISO-80000-5 item 5-29 mass ratio of water to dry matter */
1122
+ attribute def MassRatioOfWaterToDryMatterValue :> DimensionOneValue {
1123
+ doc
1124
+ /*
1125
+ * source: item 5-29 mass ratio of water to dry matter
1126
+ * symbol(s): `u`
1127
+ * application domain: generic
1128
+ * name: MassRatioOfWaterToDryMatter (specializes DimensionOneQuantity)
1129
+ * quantity dimension: 1
1130
+ * measurement unit(s): 1
1131
+ * tensor order: 0
1132
+ * definition: quotient of mass of water and mass of dry matter: `u = m/m_d` where `m` is mass (ISO 80000-4) of water and `m_d` is mass of dry matter
1133
+ * remarks: Mass ratio of water to dry matter at saturation is denoted `u_"sat"`.
1134
+ */
1135
+ }
1136
+ attribute massRatioOfWaterToDryMatter: MassRatioOfWaterToDryMatterValue :> scalarQuantities;
1137
+
1138
+ /* ISO-80000-5 item 5-30 mass ratio of water vapour to dry gas */
1139
+ attribute def MassRatioOfWaterVapourToDryGasValue :> DimensionOneValue {
1140
+ doc
1141
+ /*
1142
+ * source: item 5-30 mass ratio of water vapour to dry gas
1143
+ * symbol(s): `r`, `(x)`
1144
+ * application domain: generic
1145
+ * name: MassRatioOfWaterVapourToDryGas (specializes DimensionOneQuantity)
1146
+ * quantity dimension: 1
1147
+ * measurement unit(s): 1
1148
+ * tensor order: 0
1149
+ * definition: quotient of mass of water vapour and mass of dry gas: `r = m/m_d` where `m` is mass (ISO 80000-4) of water vapour and `m_d` is mass of dry gas
1150
+ * remarks: Mass ratio of water vapour to dry gas at saturation is denoted `r_"sat"`. Mass ratio of water vapour to dry gas is also called mixing ratio.
1151
+ */
1152
+ }
1153
+ attribute massRatioOfWaterVapourToDryGas: MassRatioOfWaterVapourToDryGasValue :> scalarQuantities;
1154
+
1155
+ /* ISO-80000-5 item 5-31 mass fraction of water */
1156
+ attribute def MassFractionOfWaterValue :> DimensionOneValue {
1157
+ doc
1158
+ /*
1159
+ * source: item 5-31 mass fraction of water
1160
+ * symbol(s): `w_(H_(2)O)`
1161
+ * application domain: generic
1162
+ * name: MassFractionOfWater (specializes DimensionOneQuantity)
1163
+ * quantity dimension: 1
1164
+ * measurement unit(s): 1
1165
+ * tensor order: 0
1166
+ * definition: quantity given by: `w_(H_(2)O) = u/(1+u)` where `u` is mass ratio of water to dry matter (item 5-29)
1167
+ * remarks: None.
1168
+ */
1169
+ }
1170
+ attribute massFractionOfWater: MassFractionOfWaterValue :> scalarQuantities;
1171
+
1172
+ /* ISO-80000-5 item 5-32 mass fraction of dry matter */
1173
+ attribute def MassFractionOfDryMatterValue :> DimensionOneValue {
1174
+ doc
1175
+ /*
1176
+ * source: item 5-32 mass fraction of dry matter
1177
+ * symbol(s): `w_d`
1178
+ * application domain: generic
1179
+ * name: MassFractionOfDryMatter (specializes DimensionOneQuantity)
1180
+ * quantity dimension: 1
1181
+ * measurement unit(s): 1
1182
+ * tensor order: 0
1183
+ * definition: quantity given by: `w_d = 1 - w_(H_(2)O)` where `w_(H_(2)O)` is mass fraction of water (item 5-31)
1184
+ * remarks: None.
1185
+ */
1186
+ }
1187
+ attribute massFractionOfDryMatter: MassFractionOfDryMatterValue :> scalarQuantities;
1188
+
1189
+ /* ISO-80000-5 item 5-33 relative humidity */
1190
+ attribute def RelativeHumidityValue :> DimensionOneValue {
1191
+ doc
1192
+ /*
1193
+ * source: item 5-33 relative humidity
1194
+ * symbol(s): `φ`
1195
+ * application domain: generic
1196
+ * name: RelativeHumidity (specializes DimensionOneQuantity)
1197
+ * quantity dimension: 1
1198
+ * measurement unit(s): 1
1199
+ * tensor order: 0
1200
+ * definition: quotient of partial pressure of water vapour and partial pressure at its saturation: `φ = p/p_"sat"` where `p` is partial pressure (ISO 80000-4) of vapour and `p_"sat"` is its partial pressure at saturation at the same temperature
1201
+ * remarks: Relative humidity is often referred to as RH and expressed in percent. See also remark in item 5-35.
1202
+ */
1203
+ }
1204
+ attribute relativeHumidity: RelativeHumidityValue :> scalarQuantities;
1205
+
1206
+ /* ISO-80000-5 item 5-34 relative mass concentration of vapour */
1207
+ attribute def RelativeMassConcentrationOfVapourValue :> DimensionOneValue {
1208
+ doc
1209
+ /*
1210
+ * source: item 5-34 relative mass concentration of vapour
1211
+ * symbol(s): `φ`
1212
+ * application domain: generic
1213
+ * name: RelativeMassConcentrationOfVapour (specializes DimensionOneQuantity)
1214
+ * quantity dimension: 1
1215
+ * measurement unit(s): 1
1216
+ * tensor order: 0
1217
+ * definition: quotient of mass concentration of water vapour and mass concentration at its saturation: `φ = v/v_"sat"` where `v` is mass concentration of water vapour (item 5-28) and `v_"sat"` is its mass concentration of water vapour at saturation of the same temperature
1218
+ * remarks: For water vapour concentrations up to 1 kg/m^3, the relative humidity (item 5-33) is assumed to be equal to relative mass concentration of vapour. For details see Reference [8].
1219
+ */
1220
+ }
1221
+ attribute relativeMassConcentrationOfVapour: RelativeMassConcentrationOfVapourValue :> scalarQuantities;
1222
+
1223
+ /* ISO-80000-5 item 5-35 relative mass ratio of vapour */
1224
+ attribute def RelativeMassRatioOfVapourValue :> DimensionOneValue {
1225
+ doc
1226
+ /*
1227
+ * source: item 5-35 relative mass ratio of vapour
1228
+ * symbol(s): `ψ`
1229
+ * application domain: generic
1230
+ * name: RelativeMassRatioOfVapour (specializes DimensionOneQuantity)
1231
+ * quantity dimension: 1
1232
+ * measurement unit(s): 1
1233
+ * tensor order: 0
1234
+ * definition: quotient of mass ratio of water vapour to dry gas and mass ratio of water vapour to dry gas at saturation: `ψ = r/r_"sat"` where `r` is mass ratio of water vapour to dry gas (item 5-30) and `r_"sat"` is its mass ratio of water vapour to dry gas at saturation of the same temperature
1235
+ * remarks: This quantity is also used as an approximation of relative humidity (item 5-33).
1236
+ */
1237
+ }
1238
+ attribute relativeMassRatioOfVapour: RelativeMassRatioOfVapourValue :> scalarQuantities;
1239
+
1240
+ /* ISO-80000-5 item 5-36 dew-point temperature */
1241
+ attribute dewPointTemperature: ThermodynamicTemperatureValue :> scalarQuantities {
1242
+ doc
1243
+ /*
1244
+ * source: item 5-36 dew-point temperature
1245
+ * symbol(s): `T_d`
1246
+ * application domain: generic
1247
+ * name: DewPointTemperature (specializes ThermodynamicTemperature)
1248
+ * quantity dimension: Θ^1
1249
+ * measurement unit(s): K
1250
+ * tensor order: 0
1251
+ * definition: temperature at which water vapour in the air reaches saturation under isobaric conditions
1252
+ * remarks: The corresponding Celsius temperature, denoted `t_d`, is still called dew-point temperature. The unit for the corresponding Celsius temperature is degree Celsius, symbol °C.
1253
+ */
1254
+ }
1255
+
1256
+ }
src/sysml.library/Domain Libraries/Quantities and Units/MeasurementRefCalculations.sysml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package MeasurementRefCalculations {
2
+ doc
3
+ /*
4
+ * This package package defines calculations on MeasurementUnits and CoordinateFrames.
5
+ */
6
+
7
+ private import ScalarValues::String;
8
+ private import ScalarValues::Real;
9
+ private import MeasurementReferences::MeasurementUnit;
10
+ private import MeasurementReferences::ScalarMeasurementReference;
11
+ private import MeasurementReferences::CoordinateFrame;
12
+
13
+ /* MeasurementUnit operations */
14
+ calc def '*' specializes DataFunctions::'*' { in x: MeasurementUnit[1]; in y: MeasurementUnit[1]; return : MeasurementUnit[1]; }
15
+ calc def '/' specializes DataFunctions::'/' { in x: MeasurementUnit[1]; in y: MeasurementUnit[1]; return : MeasurementUnit[1]; }
16
+ calc def '**' specializes DataFunctions::'**' { in x: MeasurementUnit[1]; in y: Real[1]; return : MeasurementUnit[1]; }
17
+ calc def '^' specializes DataFunctions::'^' { in x: MeasurementUnit[1]; in y: Real[1]; return : MeasurementUnit[1]; }
18
+
19
+ /* CoordinateFrame and MeasurementUnit operations */
20
+ calc def 'CoordinateFrame*' specializes DataFunctions::'*' { in x: CoordinateFrame[1]; in y: MeasurementUnit[1]; return : CoordinateFrame[1]; }
21
+ calc def 'CoordinateFrame/' specializes DataFunctions::'/' { in x: CoordinateFrame[1]; in y: MeasurementUnit[1]; return : CoordinateFrame[1]; }
22
+
23
+ calc def ToString specializes BaseFunctions::ToString {
24
+ doc
25
+ /*
26
+ * Returns the Unicode string symbol representing a scalar measurement reference.
27
+ */
28
+ in x: ScalarMeasurementReference[1]; return : String[1];
29
+ }
30
+ }
src/sysml.library/Domain Libraries/Quantities and Units/MeasurementReferences.sysml ADDED
@@ -0,0 +1,526 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package MeasurementReferences {
2
+ doc
3
+ /*
4
+ * This package defines the representations for measurement references.
5
+ */
6
+
7
+ private import Collections::Array;
8
+ private import Collections::List;
9
+ private import ScalarValues::*;
10
+ private import VectorValues::ThreeVectorValue;
11
+
12
+ private import SequenceFunctions::size;
13
+ private import SequenceFunctions::equals;
14
+ private import ControlFunctions::forAll;
15
+ private import Quantities::QuantityDimension;
16
+ private import Quantities::VectorQuantityValue;
17
+ private import Quantities::scalarQuantities;
18
+ private import Quantities::ScalarQuantityValue;
19
+ private import Quantities::SystemOfQuantities;
20
+ private import ISQSpaceTime::angularMeasure;
21
+
22
+ attribute def TensorMeasurementReference :> Array {
23
+ doc
24
+ /*
25
+ * TensorMeasurementReference is the most general AttributeDefinition to represent measurement references.
26
+ *
27
+ * The concept "measurement reference" is defined in [VIM] "quantity" NOTE 2 as "A reference can be a measurement unit,
28
+ * a measurement procedure, a reference material, or a combination of such.", see https://jcgm.bipm.org/vim/en/1.1.html .
29
+ * In addition [VIM] "quantity" NOTE 5 states that "A quantity as defined here is a scalar. However, a vector or a tensor,
30
+ * the components of which are quantities, is also considered to be a quantity". However, the rest of [VIM] does not explicitly
31
+ * define how tensor and vector quantities can be or should be supported.
32
+ *
33
+ * In this package, in line with TensorQuantityValue in package Quantities, the most general kind of measurement reference
34
+ * is TensorMeasurementReference that represents a measurement reference for any order of tensor quantity. Since the order can
35
+ * also be one or zero, this includes vector and scalar quantities. The specializations VectorMeasurementReference and
36
+ * ScalarMeasurementReference are defined to specifically represent measurement references for vector and scalar quantities.
37
+ *
38
+ * TensorMeasurementReference specializes Array, which provides its multi-dimensional structure. The order of a tensor is equivalent
39
+ * to the rank of an Array.
40
+ *
41
+ * Attribute isBound specifies whether the vector space product is bound (isBound is true) or free (isBound is false).
42
+ *
43
+ * Attribute mRefs specifies the scalar measurement references for all dimensions of a tensor quantity.
44
+ *
45
+ * The short name of a TensorMeasurementReference is the unique symbol by which the measurement reference is known.
46
+ * The name of a TensorMeasurementReference is spelled-out human readable name of the measurement reference.
47
+ *
48
+ * For example, typical measurement references for (scalar) quantity speed are declared with the following humanId and name:
49
+ * <'m/s'> and 'metre per second',
50
+ * <'km/h'> and 'kilometre per hour',
51
+ * <'mi/h'> and 'mile per hour'.
52
+ *
53
+ * A measurement reference can have zero or more definitionalQuantityValues that allow to specify
54
+ * quantity values that carry a particular meaning or relevance for the measurement reference.
55
+ */
56
+
57
+ attribute isBound: Boolean[1] default false;
58
+ attribute order :>> rank;
59
+ attribute mRefs: ScalarMeasurementReference[1..*] nonunique :>> elements;
60
+ attribute definitionalQuantityValues: DefinitionalQuantityValue[0..*];
61
+ }
62
+
63
+ attribute def VectorMeasurementReference :> TensorMeasurementReference {
64
+ doc
65
+ /*
66
+ * A VectorMeasurementReference is a specialization of TensorMeasurementReference for vector quantities that are
67
+ * typed by a VectorQuantityValue. Its order is one. Implicitly, it defines a vector space of dimension `n` = dimensions[1].
68
+ * The magnitudes of the `n` basis unit vectors that span the vector space are defined by the mRefs which each are
69
+ * a ScalarMeasurementReference, typically a MeasurementUnit or an IntervalScale.
70
+ *
71
+ * Attribute isOrthogonal declares whether the basis vectors of the vector space are orthogonal, i.e., whether all
72
+ * inner products of any pair of basis vectors are equal to zero.
73
+ *
74
+ * A pair of a specialization of VectorQuantityValue and a specialization of VectorMeasurementReference can also be used to
75
+ * define a vector space for state vectors as used in state-space representation models.
76
+ */
77
+
78
+ attribute :>> dimensions: Positive[0..1];
79
+ attribute isOrthogonal: Boolean[1] default true;
80
+ }
81
+
82
+ abstract attribute def ScalarMeasurementReference :> VectorMeasurementReference {
83
+ doc
84
+ /*
85
+ * A ScalarMeasurementReference is a specialization of VectorMeasurementReference for scalar quantities
86
+ * that are typed by a ScalarQuantityValue and for components of tensor or vector quantities.
87
+ * Its order is zero. A ScalarMeasurementReference is also a generalization of MeasurementUnit and MeasurementScale.
88
+ * It establishes how to interpret the numerical value (num) of a ScalarQuantityValue or a component of
89
+ * a tensor or vector quantity value, and establishes its actual quantity dimension.
90
+ *
91
+ * Attribute mRefs is bound to self for a ScalarMeasurementReference, for consistency with tensor and vector measurement references,
92
+ * as the dimension or component of a scalar quantity is itself.
93
+ */
94
+
95
+ attribute :>> dimensions = ();
96
+ attribute :>> isOrthogonal = true;
97
+ attribute :>> mRefs = self;
98
+ attribute quantityDimension: QuantityDimension[1];
99
+ }
100
+
101
+ attribute def CoordinateFrame :> VectorMeasurementReference {
102
+ doc
103
+ /*
104
+ * CoordinateFrame is a VectorMeasurementReference with the specific purpose to quantify (i.e., coordinatize) a vector space,
105
+ * and locate and orient it with respect to another CoordinateFrame.
106
+ *
107
+ * Optional attribute transformation enables specification of the location and orientation of this CoordinateFrame as dependent
108
+ * and nested with respect to another (reference) coordinate frame. Typically the other CoordinateFrame is the frame of
109
+ * the next higher element (Object, Item or Part) in a composite structure.
110
+ */
111
+
112
+ attribute transformation: CoordinateTransformation[0..1] {
113
+ attribute :>> target = that;
114
+ }
115
+ }
116
+
117
+ attribute def '3dCoordinateFrame' :> CoordinateFrame {
118
+ doc
119
+ /*
120
+ * Most general 3-dimensional coordinate frame
121
+ */
122
+ attribute :>> dimensions = 3;
123
+ }
124
+ alias ThreeDCoordinateFrame for '3dCoordinateFrame';
125
+
126
+ abstract attribute def CoordinateTransformation {
127
+ doc
128
+ /*
129
+ * CoordinateTransformation is the most general representation of the transformation of a target VectorMeasurementReference
130
+ * with respect to a source VectorMeasurementReference.
131
+ */
132
+ attribute source: VectorMeasurementReference[1];
133
+ attribute target: VectorMeasurementReference[1];
134
+ assert constraint validSourceTargetDimensions { source.dimensions == target.dimensions }
135
+ }
136
+
137
+ attribute def CoordinateFramePlacement :> CoordinateTransformation {
138
+ doc
139
+ /*
140
+ * CoordinateFramePlacement is a CoordinateTransformation by placement of the target frame in the source frame.
141
+ *
142
+ * Attribute origin specifies the location of the origin of the target frame as a vector in the source frame.
143
+ *
144
+ * Attribute basisDirections specifies the orientation of the target frame by specifying the directions of
145
+ * the respective basis vectors of the target frame via direction vectors in the source frame. An empty sequence of
146
+ * basisDirections signifies no change of orientation of the target coordinate frame.
147
+ */
148
+
149
+ attribute origin : VectorQuantityValue[1];
150
+ attribute basisDirections : VectorQuantityValue[0..*] ordered nonunique;
151
+ assert constraint validOriginDimensions { origin.dimensions == source.dimensions }
152
+ assert constraint { size(basisDirections) == 0 or size(basisDirections) == source.dimensions#(1)}
153
+ assert constraint validateBasisDirections { basisDirections->forAll { in basisDirection : VectorQuantityValue;
154
+ basisDirection.dimensions->equals(source.dimensions) }
155
+ }
156
+ }
157
+
158
+ abstract attribute def TranslationOrRotation {
159
+ doc
160
+ /*
161
+ * TranslationOrRotation is an abstract union of Translation and Rotation
162
+ */
163
+ }
164
+
165
+ attribute def Translation :> TranslationOrRotation {
166
+ doc
167
+ /*
168
+ * Representation of a translation with respect to a coordinate frame
169
+ *
170
+ * Attribute translationVector specifies the displacement vector that constitutes the translation.
171
+ */
172
+
173
+ attribute translationVector : VectorQuantityValue[1];
174
+ }
175
+
176
+ attribute def Rotation :> TranslationOrRotation {
177
+ doc
178
+ /*
179
+ * Representation of a rotation about an axis over an angle
180
+ *
181
+ * Attribute axisDirection specifies the direction of the rotation axis.
182
+ * Attribute angle specifies the angle of rotation, where a positive value implies right-handed rotation.
183
+ * Attribute isIntrinsic asserts whether the intermediate coordinate frame moves with the rotation or not,
184
+ * i.e. whether an instrinsic or extrinsic rotation is specified.
185
+ *
186
+ * See https://en.wikipedia.org/wiki/Davenport_chained_rotations for details.
187
+ */
188
+
189
+ attribute axisDirection : VectorQuantityValue[1];
190
+ attribute angle :>> angularMeasure;
191
+ attribute isIntrinsic : Boolean[1] default true;
192
+ }
193
+
194
+ attribute def TranslationRotationSequence :> CoordinateTransformation, List {
195
+ doc
196
+ /*
197
+ * Coordinate frame transformation specified by a sequence of translations and/or rotations
198
+ *
199
+ * Note: This is a coordinate transformation that is convenient for interpretation by humans.
200
+ * In particular a sequence of rotations about the principal axes of a coordinate frame is much more easy understandable
201
+ * than a rotation about an arbitrary axis.
202
+ * Any sequence can be reduced to a single combination of a translation and a rotation about a particular axis, but in general
203
+ * the original sequence cannot be retrieved as there are infinitely many sequences representing the reduced transformation.
204
+ */
205
+
206
+ attribute :>> elements : TranslationOrRotation[1..*] ordered nonunique;
207
+ }
208
+
209
+ attribute def AffineTransformationMatrix3d :> CoordinateTransformation, Array {
210
+ doc
211
+ /*
212
+ * AffineTransformationMatrix3d is a three dimensional CoordinateTransformation specified via an affine transformation matrix
213
+ *
214
+ * The interpretation of the matrix is as follows:
215
+ * - the upper left 3x3 matrix represents the rotation matrix
216
+ * - the uper right 3x1 column vector represents the translation vector
217
+ * - the bottom row must be the row vector (0, 0, 0, 1).
218
+ *
219
+ * I.e. the matrix has the following form:
220
+ * ( R, R, R, T,
221
+ * R, R, R, T,
222
+ * R, R, R, T,
223
+ * 0, 0, 0, 1 )
224
+ * where the cells marked R form the rotation matrix and the cells marked T form the translation vector.
225
+ *
226
+ * Note: See https://en.wikipedia.org/wiki/Transformation_matrix, under affine transformations for a general explanation.
227
+ */
228
+
229
+ attribute rotationMatrix : Array {
230
+ attribute :>> elements : Real[9] ordered nonunique;
231
+ attribute :>> dimensions = (3, 3);
232
+ }
233
+ attribute translationVector : ThreeVectorValue[1] { :>> elements : Real[3]; }
234
+ attribute :>> dimensions = (4, 4);
235
+ attribute :>> elements : Real[16] ordered nonunique = (
236
+ rotationMatrix.elements#(1), rotationMatrix.elements#(2), rotationMatrix.elements#(3), translationVector#(1),
237
+ rotationMatrix.elements#(4), rotationMatrix.elements#(5), rotationMatrix.elements#(6), translationVector#(2),
238
+ rotationMatrix.elements#(7), rotationMatrix.elements#(8), rotationMatrix.elements#(9), translationVector#(3),
239
+ 0, 0, 0, 1);
240
+ assert constraint validSourceDimensions { source.dimensions == 3 }
241
+ }
242
+
243
+ attribute def NullTransformation :> AffineTransformationMatrix3d {
244
+ doc
245
+ /*
246
+ * NullTransformation is a three dimensional CoordinateTransformation that places the target CoordinateFrame at the
247
+ * same position and orientation as the source CoordinateFrame.
248
+ */
249
+ attribute :>> rotationMatrix {
250
+ attribute :>> elements = (1, 0, 0, 0, 1, 0, 0, 0, 1);
251
+ }
252
+ attribute :>> translationVector {
253
+ attribute :>> elements = (0, 0, 0);
254
+ }
255
+ }
256
+
257
+ attribute nullTransformation : NullTransformation [1];
258
+
259
+ abstract attribute def MeasurementUnit :> ScalarMeasurementReference {
260
+ doc
261
+ /*
262
+ * Representation of a measurement unit.
263
+ *
264
+ * Note: MeasurementUnit directly specializes ScalarMeasurementReference in order to allow for efficient and intuitive definition of a ratio scale.
265
+ *
266
+ * A MeasurementUnit can be used in two ways:
267
+ * 1. Directly as the mRef in a ScalarQuantityValue, which implies that the effective measurement reference is a ratio scale defined by the unit.
268
+ * 2. As the unit of a MeasurementScale.
269
+ *
270
+ * A MeasurementUnit specifies one or more UnitPowerFactors.
271
+ */
272
+
273
+ attribute :>> isBound = false;
274
+ attribute unitPowerFactors: UnitPowerFactor[0..*] ordered;
275
+ attribute unitConversion: UnitConversion[0..1];
276
+ assert constraint hasValidUnitPowerFactors : VerifyUnitPowerFactors {
277
+ in unitPowerFactors = MeasurementUnit::unitPowerFactors;
278
+ in quantityDimension = MeasurementUnit::quantityDimension;
279
+ }
280
+ }
281
+
282
+
283
+ abstract attribute def SimpleUnit :> MeasurementUnit {
284
+ doc
285
+ /*
286
+ * Representation of a measurement unit that does not depend on any other measurement unit.
287
+ */
288
+
289
+ private attribute simpleUnitSelf: SimpleUnit = self;
290
+ attribute :>> unitPowerFactors: UnitPowerFactor[1] {
291
+ attribute unit :>> UnitPowerFactor::unit = simpleUnitSelf;
292
+ attribute exponent :>> UnitPowerFactor::exponent = 1;
293
+ }
294
+ }
295
+
296
+
297
+ abstract attribute def DerivedUnit :> MeasurementUnit {
298
+ doc
299
+ /*
300
+ * Representation of a derived measurement unit that depends on one or more powers of other measurement units.
301
+ *
302
+ * VIM defines "derived unit" as "measurement unit for a derived quantity", see https://jcgm.bipm.org/vim/en/1.11.html .
303
+ */
304
+ }
305
+
306
+
307
+ attribute def UnitPowerFactor {
308
+ doc
309
+ /*
310
+ * Representation of a measurement unit power factor, which is a tuple
311
+ * of a referenced measurement unit and an exponent.
312
+ */
313
+
314
+ attribute unit: MeasurementUnit;
315
+ attribute exponent: Real;
316
+ }
317
+
318
+ abstract attribute def UnitConversion {
319
+ doc
320
+ /*
321
+ * Representation of the linear conversion relationship between one measurement unit and another measurement unit, that acts as a reference.
322
+ *
323
+ * Attribute isExact asserts whether the conversionFactor is exact or not. By default it is set true.
324
+ */
325
+
326
+ attribute referenceUnit: MeasurementUnit;
327
+ attribute conversionFactor: Real;
328
+ attribute isExact: Boolean default true;
329
+ }
330
+
331
+ attribute def ConversionByConvention :> UnitConversion {
332
+ doc
333
+ /*
334
+ * Representation of a UnitConversion that is defined according to some convention.
335
+ */
336
+ }
337
+
338
+ attribute def ConversionByPrefix :> UnitConversion {
339
+ doc
340
+ /*
341
+ * Representation of a UnitConversion that is defined through reference to a named unit prefix,
342
+ * that in turn represents a decimal or binary multiple or sub-multiple, as defined in ISO/IEC 80000-1.
343
+ *
344
+ * Note: The actual value of the conversion factor is derived from the definition of the unit prefix.
345
+ *
346
+ * Examples: kilometre for conversion factor 1000 with reference unit metre, nanofarad for 1E-9 farad.
347
+ */
348
+
349
+ attribute prefix: UnitPrefix[1];
350
+ attribute conversionFactor redefines UnitConversion::conversionFactor = prefix.conversionFactor;
351
+ }
352
+
353
+ attribute def UnitPrefix {
354
+ doc
355
+ /*
356
+ * Representation of a multiple or sub-multiple measurement unit prefix as defined in ISO/IEC 80000-1.
357
+ */
358
+
359
+ attribute longName: String;
360
+ attribute symbol: String;
361
+ attribute conversionFactor: Real;
362
+ }
363
+
364
+
365
+ abstract attribute def MeasurementScale :> ScalarMeasurementReference {
366
+ doc
367
+ /*
368
+ * Representation of a non-ratio measurement scale as opposed to a ratio measurement scale defined by a MeasurementUnit.
369
+ *
370
+ * Note: A ratio scale is implied by direct use of a MeasurementUnit as the mRef in a ScalarQuantityValue.
371
+ */
372
+
373
+ attribute unit: MeasurementUnit;
374
+ attribute quantityValueMapping: QuantityValueMapping[0..1];
375
+ }
376
+
377
+ attribute def OrdinalScale :> MeasurementScale {
378
+ doc
379
+ /*
380
+ * Representation of an ordinal measurement scale.
381
+ */
382
+ }
383
+
384
+ attribute def IntervalScale :> MeasurementScale, CoordinateFrame {
385
+ doc
386
+ /*
387
+ * Representation of an interval measurement scale.
388
+ *
389
+ * An IntervalScale is also a CoordinateFrame
390
+ * The offset of one interval measurement scale w.r.t. another interval or ratio scale is defined through a quantityValueMapping, see MeasurementReference.
391
+ */
392
+
393
+ attribute :>> isBound = true;
394
+ }
395
+
396
+ attribute def CyclicRatioScale :> MeasurementScale {
397
+ doc
398
+ /*
399
+ * Representation of a ratio measurement scale with a periodic cycle.
400
+ *
401
+ * Note: The magnitude of the periodic cycle is defined by the modulus of the scale.
402
+ * Example: Planar angle with modulus 360 degrees, therefore on such a cyclic ratio scale,
403
+ * an angle of 450 degrees is equivalent to an angle of 90 degrees, and -60 degrees is equivalent to 300 degrees.
404
+ */
405
+
406
+ attribute modulus: Number;
407
+ }
408
+
409
+ attribute def LogarithmicScale :> MeasurementScale {
410
+ doc
411
+ /*
412
+ * Representation of a logarithmic measurement scale
413
+ *
414
+ * The magnitude v of a ratio quantity value expressed on a logarithmic scale
415
+ * for a magnitude x of a quantity value expressed on a ratio scale is computed as follows:
416
+ * v = f * log_base( (x / x_ref )^a )
417
+ * where:
418
+ * f is a multiplication factor,
419
+ * log_base is the log function for the given logarithm base,
420
+ * x is the actual quantity,
421
+ * x_ref is a reference quantity,
422
+ * a is an exponent.
423
+ */
424
+
425
+ attribute logarithmBase: Number;
426
+ attribute factor: Number;
427
+ attribute exponent: Number;
428
+ attribute referenceQuantity: ScalarQuantityValue[0..1];
429
+ }
430
+
431
+ attribute def QuantityValueMapping {
432
+ doc
433
+ /*
434
+ * Representation of the mapping of equivalent quantity values expressed on two different MeasurementReferences
435
+ *
436
+ * A QuantityValueMapping specifies a mapping from a given mappedQuantityValue owned by the MeasurementReference
437
+ * that owns the QuantityValueMapping to a referenceQuantityValue owned by another MeasurementReference.
438
+ *
439
+ * Example: The mapping between the temperature value of 0.01 degree Celsius on the celsius temperature scale
440
+ * to the equivalent temperature value of 273.16 K on the kelvin temperature scale,
441
+ * would specify a mappedQuantityValue referencing the
442
+ * the DefinitionalQuantityValue (0.01, "absolute thermodynamic temperature of the triple point of water")
443
+ * of the celsius interval scale, and a referenceQuantityValue referencing the
444
+ * DefinitionalQuantityValue (273.16, "absolute thermodynamic temperature of the triple point of water")
445
+ * of the kelvin ratio scale.
446
+ */
447
+
448
+ attribute mappedQuantityValue: DefinitionalQuantityValue;
449
+ attribute referenceQuantityValue: DefinitionalQuantityValue;
450
+ }
451
+
452
+ attribute def DefinitionalQuantityValue {
453
+ doc
454
+ /*
455
+ * Representation of a particular quantity value that is used in the definition of a TensorMeasurementReference
456
+ *
457
+ * Typically such a particular value is defined by convention. It can be used to define a selected reference value,
458
+ * such as the meaning of zero on a measurement scale or the origin of a top-level coordinate frame.
459
+ *
460
+ * Example: The 'kelvin' MeasurementReference for thermodynamic temperature could have a
461
+ * DefinitionalQuantityValue {
462
+ * :>> num = 273.16;
463
+ * :>> definition = "thermodynamic temperature of the triple point of Vienna Standard Mean Ocean Water in kelvin";
464
+ * }
465
+ * that is value of the definition of the scale.
466
+ */
467
+
468
+ attribute num: Number[1..*];
469
+ attribute definition: String;
470
+ }
471
+
472
+ attribute def DimensionOneUnit :> DerivedUnit {
473
+ doc
474
+ /*
475
+ * Explicit definition of "unit of dimension one", also known as "dimensionless unit".
476
+ */
477
+
478
+ attribute :>> unitPowerFactors = ();
479
+ }
480
+ attribute def DimensionOneValue :> ScalarQuantityValue {
481
+ doc
482
+ /*
483
+ * A ScalarQuantityValue with a DimensionOneUnit.
484
+ */
485
+ attribute :>> num: Real;
486
+ attribute :>> mRef: DimensionOneUnit;
487
+ }
488
+ attribute dimensionOneQuantities : DimensionOneValue[*] nonunique :> scalarQuantities;
489
+
490
+ attribute one : DimensionOneUnit[1] = DimensionOneUnit();
491
+
492
+ attribute def CountValue :> DimensionOneValue {
493
+ doc
494
+ /*
495
+ * Explicit definition of a generic "count" quantity as a DimensionOneValue.
496
+ */
497
+ }
498
+ attribute countQuantities : CountValue[*] nonunique :> dimensionOneQuantities;
499
+
500
+ attribute def SystemOfUnits {
501
+ doc
502
+ /*
503
+ * A SystemOfUnits represents the essentials of [VIM] concept "system of units" (https://jcgm.bipm.org/vim/en/1.13.html), defined as a
504
+ * "set of base units and derived units, together with their multiples and submultiples, defined in accordance with given rules,
505
+ * for a given system of quantities".
506
+ * The base units are a particular selection of measurement units for each of the base quantities of a system of quantities,
507
+ * that form the basis on top of which all other (derived) units are defined.
508
+ *
509
+ * Attribute systemOfQuantities speficies the associated SystemOfQuantities.
510
+ */
511
+
512
+ attribute longName: String[1];
513
+ attribute systemOfQuantities : SystemOfQuantities[1];
514
+ attribute baseUnits: SimpleUnit[1..*] ordered;
515
+ }
516
+
517
+ constraint def VerifyUnitPowerFactors {
518
+ doc
519
+ /*
520
+ * Constraint definition to verify that the given unit power factors comply with the required quantity dimension
521
+ */
522
+
523
+ in unitPowerFactors: UnitPowerFactor[*] ordered;
524
+ in quantityDimension: QuantityDimension[1];
525
+ }
526
+ }
src/sysml.library/Domain Libraries/Quantities and Units/Quantities.sysml ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package Quantities {
2
+ doc
3
+ /*
4
+ * This package defines the root representations for quantities and their values.
5
+ */
6
+
7
+ private import Collections::*;
8
+ private import ScalarValues::NumericalValue;
9
+ private import ScalarValues::Number;
10
+ private import ScalarValues::Real;
11
+ private import ScalarValues::Natural;
12
+ private import ScalarValues::Boolean;
13
+ private import ScalarValues::String;
14
+ private import VectorValues::NumericalVectorValue;
15
+ private import VectorValues::ThreeVectorValue;
16
+
17
+ abstract attribute def TensorQuantityValue :> Array {
18
+ doc
19
+ /*
20
+ * The value of a quantity is a tuple of one or more numbers (i.e. mathematical number values) and a reference to a measurement reference.
21
+ * The most general case is a multi-dimensional, tensor quantity of any order. In engineering, the majority of quantities used are
22
+ * scalar and vector quantities, that are tensor quantities of order 0 and 1 respectively.
23
+ * The measurement reference used to express a quantity value must have a type, dimensions and order that match the quantity, i.e.,
24
+ * a TensorQuantityValue must use a TensorMeasurementReference, a VectorQuantityValue a VectorMeasurementReference,
25
+ * and a ScalarQuantityValue a ScalarMeasurementReference. See package MeasurementReferences for details.
26
+ */
27
+
28
+ attribute isBound: Boolean;
29
+ attribute num: Number[1..*] ordered nonunique :>> elements;
30
+ attribute mRef: MeasurementReferences::TensorMeasurementReference;
31
+ attribute :>> dimensions = mRef.dimensions;
32
+ attribute order :>> rank;
33
+ attribute contravariantOrder: Natural;
34
+ attribute covariantOrder: Natural;
35
+
36
+ assert constraint orderSum { contravariantOrder + covariantOrder == order }
37
+ assert constraint boundMatch { (isBound == mRef.isBound) or (not isBound and mRef.isBound) }
38
+ }
39
+
40
+ abstract attribute def VectorQuantityValue :> TensorQuantityValue, NumericalVectorValue {
41
+ attribute :>> mRef: MeasurementReferences::VectorMeasurementReference;
42
+ }
43
+
44
+ abstract attribute def ScalarQuantityValue :> VectorQuantityValue, NumericalValue {
45
+ attribute :>> mRef: MeasurementReferences::ScalarMeasurementReference;
46
+ }
47
+
48
+ abstract attribute tensorQuantities: TensorQuantityValue[*] nonunique {
49
+ doc
50
+ /*
51
+ * Quantities are defined as self-standing features that can be used to consistently specify quantities as
52
+ * features of occurrences. Each single quantity feature is subsetting the root feature tensorQuantities.
53
+ * In other words, the codomain of a quantity feature is a suitable specialization of TensorQuantityValue.
54
+ */
55
+ }
56
+ abstract attribute vectorQuantities: VectorQuantityValue[*] nonunique :> tensorQuantities;
57
+ abstract attribute scalarQuantities: ScalarQuantityValue[*] nonunique :> vectorQuantities;
58
+
59
+ abstract attribute def '3dVectorQuantityValue' :> VectorQuantityValue, ThreeVectorValue {
60
+ doc
61
+ /*
62
+ * Most general representation of real 3-vector quantities
63
+ */
64
+
65
+ attribute :>> num: Real[3];
66
+ }
67
+ alias ThreeDVectorQuantityValue for '3dVectorQuantityValue';
68
+
69
+ /*
70
+ * Define generic aliases QuantityValue and quantities for the top level quantity attribute def and attribute.
71
+ */
72
+ alias QuantityValue for TensorQuantityValue;
73
+ alias quantities for tensorQuantities;
74
+
75
+ attribute def SystemOfQuantities {
76
+ doc
77
+ /*
78
+ * A SystemOfQuantities represents the essentials of [VIM] concept "system of quantities" (https://jcgm.bipm.org/vim/en/1.3.html), defined as a
79
+ * "set of quantities together with a set of noncontradictory equations relating those quantities".
80
+ * In order to establish such a set of noncontradictory equations a set of base quantities is selected. Subsequently the system of quantities is
81
+ * completed by adding derived quantities which are products of powers of the base quantities.
82
+ */
83
+
84
+ attribute baseQuantities: ScalarQuantityValue[*] ordered :> scalarQuantities;
85
+ }
86
+
87
+ attribute def QuantityPowerFactor {
88
+ doc
89
+ /*
90
+ * Representation of a quantity power factor, being the combination of a quantity and an exponent.
91
+ *
92
+ * A sequence of QuantityPowerFactors for the baseQuantities of a SystemOfQuantities define the QuantityDimension of a scalar quantity.
93
+ */
94
+
95
+ attribute quantity: ScalarQuantityValue[1];
96
+ attribute exponent: Real[1];
97
+ }
98
+
99
+ attribute def QuantityDimension {
100
+ doc
101
+ /*
102
+ * Representation of quantity dimension, which is the product of powers of the set of base quantities defined for a particular system of quantities, units and scales.
103
+ */
104
+
105
+ attribute quantityPowerFactors: QuantityPowerFactor[*] ordered;
106
+ }
107
+ }
src/sysml.library/Domain Libraries/Quantities and Units/QuantityCalculations.sysml ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package QuantityCalculations {
2
+ doc
3
+ /*
4
+ * This package package defines calculations for the construction of and computations on ScalarQuantityValues.
5
+ */
6
+
7
+ private import ScalarValues::*;
8
+ private import Quantities::ScalarQuantityValue;
9
+ private import MeasurementReferences::ScalarMeasurementReference;
10
+ private import MeasurementReferences::DimensionOneValue;
11
+
12
+ calc def '[' specializes BaseFunctions::'[' {
13
+ in num: Number[1];
14
+ in mRef: ScalarMeasurementReference[1];
15
+ return quantity : ScalarQuantityValue[1];
16
+ }
17
+
18
+ calc def isZero specializes NumericalFunctions::isZero {
19
+ in x: ScalarQuantityValue[1];
20
+ return : Boolean[1] = NumericalFunctions::isZero(x.num);
21
+ }
22
+ calc def isUnit specializes NumericalFunctions::isUnit {
23
+ in x: ScalarQuantityValue[1];
24
+ return : Boolean[1] = NumericalFunctions::isUnit(x.num);
25
+ }
26
+
27
+ calc def abs specializes NumericalFunctions::abs { in x: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; }
28
+
29
+ calc def '+' specializes NumericalFunctions::'+' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[0..1]; return : ScalarQuantityValue; }
30
+ calc def '-' specializes NumericalFunctions::'-' { in x: ScalarQuantityValue; in y: ScalarQuantityValue[0..1]; return : ScalarQuantityValue[1]; }
31
+ calc def '*' specializes NumericalFunctions::'*' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; }
32
+ calc def '/' specializes NumericalFunctions::'/' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; }
33
+ calc def '**' specializes NumericalFunctions::'**' { in x: ScalarQuantityValue[1]; in y: Real[1]; return : ScalarQuantityValue[1]; }
34
+ calc def '^' specializes NumericalFunctions::'^' { in x: ScalarQuantityValue[1]; in y: Real[1]; return : ScalarQuantityValue[1]; }
35
+
36
+ calc def '<' specializes NumericalFunctions::'<' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : Boolean[1]; }
37
+ calc def '>' specializes NumericalFunctions::'>' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : Boolean[1]; }
38
+ calc def '<=' specializes NumericalFunctions::'<=' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : Boolean[1]; }
39
+ calc def '>=' specializes NumericalFunctions::'>=' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : Boolean[1]; }
40
+
41
+ calc def max specializes NumericalFunctions::max { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; }
42
+ calc def min specializes NumericalFunctions::min { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; }
43
+
44
+ calc def '==' specializes DataFunctions::'==' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : Boolean[1]; }
45
+
46
+ calc def sqrt{ in x: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; }
47
+
48
+ calc def floor { in x: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; }
49
+ calc def round { in x: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; }
50
+
51
+ calc def ToString specializes BaseFunctions::ToString { in x: ScalarQuantityValue[1]; return : String; }
52
+ calc def ToInteger { in x: ScalarQuantityValue[1]; return : Integer[1]; }
53
+ calc def ToRational { in x: ScalarQuantityValue[1]; return : Rational[1]; }
54
+ calc def ToReal { in x: ScalarQuantityValue[1]; return : Real[1]; }
55
+ calc def ToDimensionOneValue { in x: Real[1]; return : DimensionOneValue[1]; }
56
+
57
+ calc def sum specializes NumericalFunctions::sum { in collection: ScalarQuantityValue[0..*];
58
+ private attribute zero : ScalarQuantityValue[1];
59
+ assert constraint { isZero(zero) }
60
+ return : ScalarQuantityValue = NumericalFunctions::sum0(collection, zero);
61
+ }
62
+
63
+ calc def product specializes NumericalFunctions::product { in collection: ScalarQuantityValue[0..*];
64
+ private attribute one : ScalarQuantityValue[1];
65
+ assert constraint { isUnit(one) }
66
+ return : ScalarQuantityValue = NumericalFunctions::product1(collection, one);
67
+ }
68
+
69
+ calc def ConvertQuantity{ in x: ScalarQuantityValue[1]; in targetMRef: ScalarMeasurementReference[1]; return : ScalarQuantityValue[1]; }
70
+ }
src/sysml.library/Domain Libraries/Quantities and Units/SI.sysml ADDED
@@ -0,0 +1,367 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package SI {
2
+ doc
3
+ /*
4
+ * International System of (Measurement) Units -- Système International d'Unités (SI), as defined in ISO/IEC 80000
5
+ *
6
+ * Note 1: In accordance with ISO/IEC 80000 en-GB spelling is used for the names and definitions of the units.
7
+ * Note 2: This is a representative but not yet complete list of measurement units.
8
+ */
9
+
10
+ private import MeasurementReferences::*;
11
+ public import ISQ::*;
12
+ public import SIPrefixes::*;
13
+
14
+ /*
15
+ * SI simple unit needed in support of creation of the base units
16
+ */
17
+ attribute <g> gram : MassUnit;
18
+
19
+ /*
20
+ * SI base units
21
+ */
22
+ attribute <m> metre : LengthUnit;
23
+ attribute <kg> kilogram : MassUnit { :>> unitConversion: ConversionByPrefix { :>> prefix = kilo; :>> referenceUnit = g; } }
24
+ attribute <s> second : DurationUnit;
25
+ attribute <A> ampere : ElectricCurrentUnit;
26
+ attribute <K> kelvin : ThermodynamicTemperatureUnit, TemperatureDifferenceUnit {
27
+ attribute temperatureOfWaterAtTriplePointInK: DefinitionalQuantityValue {
28
+ :>> num = 27316/100;
29
+ :>> definition = "temperature in kelvin of pure water at the triple point";
30
+ }
31
+ attribute :>> definitionalQuantityValues = temperatureOfWaterAtTriplePointInK;
32
+ }
33
+ attribute <mol> mole : AmountOfSubstanceUnit;
34
+ attribute <cd> candela : LuminousIntensityUnit;
35
+
36
+ /*
37
+ * Declare the SI system of units with its explicit base units
38
+ * and its associated system of quantities, the ISQ.
39
+ */
40
+ attribute <si> 'ISO/IEC 80000 International System of Units' : SystemOfUnits {
41
+ :>> systemOfQuantities = isq;
42
+ :>> baseUnits = (m, kg, s, A, K, mol, cd);
43
+ }
44
+
45
+ /*
46
+ * Units with special names
47
+ */
48
+ attribute <B> byte : StorageCapacityUnit = one;
49
+ attribute <Bd> baud : ModulationRateUnit = s^-1;
50
+ attribute <bit> bit : StorageCapacityUnit = one;
51
+ attribute <Bq> becquerel : NuclearActivityUnit = s^-1;
52
+ attribute <C> coulomb : ElectricChargeUnit = A*s;
53
+ attribute <dB> decibel : SoundPressureLevelUnit = one;
54
+ attribute <dec> decade : LogarithmicFrequencyRangeUnit = one;
55
+ attribute <E> erlang : TrafficIntensityUnit = one;
56
+ attribute <F> farad : CapacitanceUnit = C/V;
57
+ attribute <Gy> gray : AbsorbedDoseUnit = J/kg;
58
+ attribute <H> henry : PermeanceUnit, InductanceUnit = Wb/A;
59
+ attribute <Hart> hartley : InformationContentUnit = one;
60
+ attribute <Hz> hertz : FrequencyUnit = s^-1;
61
+ attribute <J> joule : EnergyUnit = N*m;
62
+ //attribute <kat> katal : CatalyticActivityUnit = mol/s;
63
+ attribute <lm> lumen : LuminousFluxUnit = cd*sr;
64
+ attribute <lx> lux : IlluminanceUnit = lm/m^2;
65
+ attribute <N> newton : ForceUnit = kg*m/s^2;
66
+ attribute <nat> 'natural unit of information' : InformationContentUnit = one;
67
+ attribute <o> octet : StorageCapacityUnit = one;
68
+ attribute <oct> octave : LogarithmicFrequencyRangeUnit = one;
69
+ attribute <Pa> pascal : PressureUnit = N/m^2;
70
+ attribute <rad> radian : AngularMeasureUnit = m/m;
71
+ attribute <S> siemens : ConductanceUnit = 'Ω'^-1;
72
+ attribute <Sh> shannon : InformationContentUnit = one;
73
+ attribute <sr> steradian : SolidAngularMeasureUnit = m^2/m^2;
74
+ attribute <Sv> sievert : DoseEquivalentUnit = J/kg;
75
+ attribute <T> tesla : MagneticFluxDensityUnit = Wb/m^2;
76
+ attribute <V> volt : ElectricPotentialUnit = W/A;
77
+ attribute <W> watt : PowerUnit = J/s;
78
+ attribute <Wb> weber : MagneticFluxUnit = V*s;
79
+ attribute <'Ω'> ohm : ResistanceUnit = V/A;
80
+
81
+ /*
82
+ * Units recognized in SI as specified in ISO 80000-1:2009
83
+ */
84
+ attribute <'Å'> 'ångström' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 1.0e-10; } }
85
+ attribute <b> barn : AreaUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = 'm²'; :>> conversionFactor = 1.0e-28; } }
86
+ attribute <d> day: DurationUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = hour; :>> conversionFactor = 24; } }
87
+ attribute <Da> dalton : MassUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg; :>> conversionFactor = 1.66053906660e-27; :>> isExact = false; } }
88
+ attribute <eV> electronvolt : EnergyUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = J; :>> conversionFactor = 1.602176487e-19; :>> isExact = false; } }
89
+ attribute <h> hour: DurationUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = min; :>> conversionFactor = 60; } }
90
+ attribute <min> minute : DurationUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = s; :>> conversionFactor = 60; } }
91
+ attribute <L> litre : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = 'm³'; :>> conversionFactor = 1.0e-3; } }
92
+ attribute tonne : MassUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg; :>> conversionFactor = 1.0e-3; } }
93
+ alias 'metric ton' for tonne;
94
+ attribute <u> 'atomic mass unit' : MassUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = Da; :>> conversionFactor = 1.0; } }
95
+ attribute <ua> 'astronomical unit' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 149597870691e11; :>> isExact = false; } }
96
+ attribute <var> 'volt ampere reactive' : PowerUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = V*A; :>> conversionFactor = 1.0; } }
97
+ attribute <'°'> degree : AngularMeasureUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = rad; :>> conversionFactor = 1.745329E-02; :>> isExact = false; } } // conversionFactor should become pi/180
98
+ attribute <'′'> 'minute (angle)' : AngularMeasureUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = rad; :>> conversionFactor = 2.908882E-04; :>> isExact = false; } }
99
+ alias arcmin for '′';
100
+ attribute <'″'> 'second (angle)' : AngularMeasureUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = rad; :>> conversionFactor = 4.848137E-06; :>> isExact = false; } }
101
+ alias arcsec for '″';
102
+
103
+ /*
104
+ * Derived units used in parts 3 to 12 of ISO/IEC 80000
105
+ */
106
+ attribute <'A⋅m⁻²⋅K⁻²'> 'ampere metre to the power minus 2 kelvin to the power minus 2' : RichardsonConstantUnit = A*m^-2*K^-2;
107
+ attribute <'A⋅m²'> 'ampere metre squared' : MagneticMomentUnit = A*m^2;
108
+ attribute <'A⋅m²⋅J⁻¹⋅s⁻¹'> 'ampere metre squared joule to the power minus 1 second to the power minus 1' : GyromagneticRatioUnit = A*m^2*J^-1*s^-1;
109
+ attribute <'A⋅s/kg'> 'ampere second per kilogram' : GyromagneticRatioUnit = A*s/kg;
110
+ attribute <'A/m'> 'ampere per metre' : LinearElectricCurrentDensityUnit = A/m;
111
+ attribute <'A/m²'> 'ampere per square metre' : ElectricCurrentDensityUnit = A/m^2;
112
+ attribute <'B/s'> 'byte per second' : TransferRateUnit = B/s;
113
+ attribute <'bit/s'> 'bit per second' : BinaryDigitRateUnit = bit/s;
114
+ attribute <'Bq/kg'> 'becquerel per kilogram' : SpecificActivityUnit = Bq/kg;
115
+ attribute <'Bq/m²'> 'becquerel per square metre' : SurfaceActivityDensityUnit = Bq/m^2;
116
+ attribute <'Bq/m³'> 'becquerel per cubic metre' : ActivityDensityUnit = Bq/m^3;
117
+ attribute <'C⋅m'> 'coulomb metre' : ElectricDipoleMomentUnit = C*m;
118
+ attribute <'C/(kg⋅s)'> 'coulomb per kilogram second' : ExposureRateUnit = C/(kg*s);
119
+ attribute <'C/kg'> 'coulomb per kilogram' : ExposureUnit = C/kg;
120
+ attribute <'C/m'> 'coulomb per metre' : LinearDensityOfElectricChargeUnit = C/m;
121
+ attribute <'C/m²'> 'coulomb per square metre' : SurfaceDensityOfElectricChargeUnit = C/m^2;
122
+ attribute <'C/m³'> 'coulomb per cubic metre' : ElectricChargeDensityUnit = C/m^3;
123
+ attribute <'cd⋅m⁻²'> 'candela metre to the power minus 2' : LuminanceUnit = cd*m^-2;
124
+ attribute <'cd⋅sr'> 'candela steradian' : LuminousFluxUnit = cd*sr;
125
+ attribute <'cd⋅sr⋅kg⁻¹⋅m⁻²⋅s³'> 'candela steradian kilogram to the power minus 1 metre to the power minus 2 second to the power 3' : LuminousEfficacyOfRadiationUnit = cd*sr*kg^-1*m^-2*s^3;
126
+ attribute <'cd⋅sr⋅m⁻²'> 'candela steradian metre to the power minus 2' : IlluminanceUnit = cd*sr*m^-2;
127
+ attribute <'cd⋅sr⋅m⁻²⋅s'> 'candela steradian metre to the power minus 2 second' : LuminousExposureUnit = cd*sr*m^-2*s;
128
+ attribute <'cd⋅sr⋅s'> 'candela steradian second' : LuminousEnergyUnit = cd*sr*s;
129
+ attribute <'eV⋅J⋅kg⋅m²⋅s⁻²'> 'electronvolt joule kilogram metre squared second to the power minus 2' : HartreeEnergyUnit = eV*J*kg*m^2*s^-2;
130
+ attribute <'eV⋅m⁻²/kg'> 'electronvolt metre to the power minus 2 per kilogram' : TotalMassStoppingPowerUnit = eV*m^-2/kg;
131
+ attribute <'eV/m'> 'electronvolt per metre' : TotalLinearStoppingPowerUnit = eV/m;
132
+ attribute <'eV/m²'> 'electronvolt per square metre' : EnergyFluenceUnit = eV/m^2;
133
+ attribute <'F/m'> 'farad per metre' : ElectricConstantUnit = F/m;
134
+ attribute <'g/L'> 'g per l' : MassConcentrationUnit = g/L;
135
+ attribute <'g/mol'> 'g per mole' : MolarMassUnit = g/mol;
136
+ attribute <'Gy/s'> 'gray per second' : AbsorbedDoseRateUnit = Gy/s;
137
+ attribute <'H/m'> 'henry per metre' : MagneticConstantUnit = H/m;
138
+ attribute <'H⁻¹'> 'henry to the power minus 1' : ReluctanceUnit = H^-1;
139
+ attribute <'Hart/s'> 'hartley per second' : AverageInformationRateUnit = Hart/s;
140
+ attribute <'J⋅m²/kg'> 'joule metre squared per kilogram' : TotalMassStoppingPowerUnit = J*m^2/kg;
141
+ attribute <'J⋅s'> 'joule second' : ActionQuantityUnit = J*s;
142
+ attribute <'J⋅s⋅eV⋅s'> 'joule second electronvolt second' : TotalAngularMomentumUnit = J*s*eV*s;
143
+ attribute <'J⋅s⁻¹'> 'joule second to the power minus 1' : PowerUnit = J*s^-1;
144
+ attribute <'J/(kg⋅K)'> 'joule per kilogram kelvin' : SpecificHeatCapacityUnit = J/(kg*K);
145
+ attribute <'J/(m²⋅nm)'> 'joule per square metre nm' : SpectralRadiantExposureUnit = J/(m^2*nm);
146
+ attribute <'J/(m³⋅nm)'> 'joule per cubic metre nm' : SpectralRadiantEnergyDensityInTermsOfWavelengthUnit = J/(m^3*nm);
147
+ attribute <'J/(mol⋅K)'> 'joule per mole kelvin' : MolarHeatCapacityUnit = J/(mol*K);
148
+ attribute <'J/K'> 'joule per kelvin' : HeatCapacityUnit = J/K;
149
+ attribute <'J/kg'> 'joule per kilogram' : SpecificEnergyUnit = J/kg;
150
+ attribute <'J/m'> 'joule per metre' : TotalLinearStoppingPowerUnit = J/m;
151
+ attribute <'J/m²'> 'joule per square metre' : SpectralRadiantEnergyDensityInTermsOfWavenumberUnit = J/m^2;
152
+ attribute <'J/m³'> 'joule per cubic metre' : ElectromagneticEnergyDensityUnit = J/m^3;
153
+ attribute <'J/mol'> 'joule per mole' : MolarInternalEnergyUnit = J/mol;
154
+ attribute <'J/nm'> 'joule per nm' : SpectralRadiantEnergyUnit = J/nm;
155
+ attribute <'J/s'> 'joule per second' : HeatFlowRateUnit = J/s;
156
+ attribute <'J⁻¹⋅m⁻³⋅eV⁻¹⋅m⁻³'> 'joule to the power minus 1 metre to the power minus 3 electronvolt to the power minus 1 metre to the power minus 3' : EnergyDensityOfStatesUnit = J^-1*m^-3*eV^-1*m^-3;
157
+ attribute <'K/Pa'> 'kelvin per pascal' : JouleThomsonCoefficientUnit = K/Pa;
158
+ attribute <'K/W'> 'kelvin per watt' : ThermalResistanceUnit = K/W;
159
+ attribute <'K⁻¹'> 'kelvin to the power minus 1' : LinearExpansionCoefficientUnit = K^-1;
160
+ attribute <'kg⋅m⋅s⁻¹'> 'kilogram metre second to the power minus 1' : MomentumUnit = kg*m*s^-1;
161
+ attribute <'kg⋅m⋅s⁻²'> 'kilogram metre second to the power minus 2' : ForceUnit = kg*m*s^-2;
162
+ attribute <'kg⋅m⋅s⁻³'> 'kilogram metre second to the power minus 3' : SpectralRadiantFluxUnit = kg*m*s^-3;
163
+ attribute <'kg⋅m⋅s⁻³⋅K⁻¹'> 'kilogram metre second to the power minus 3 kelvin to the power minus 1' : ThermalConductivityUnit = kg*m*s^-3*K^-1;
164
+ attribute <'kg⋅m⋅s⁻³⋅sr⁻¹'> 'kilogram metre second to the power minus 3 steradian to the power minus 1' : SpectralRadiantIntensityUnit = kg*m*s^-3*sr^-1;
165
+ attribute <'kg⋅m⁻¹'> 'kilogram metre to the power minus 1' : LinearMassDensityUnit = kg*m^-1;
166
+ attribute <'kg⋅m⁻¹⋅s⁻¹'> 'kilogram metre to the power minus 1 second to the power minus 1' : DynamicViscosityUnit = kg*m^-1*s^-1;
167
+ attribute <'kg⋅m⁻¹⋅s⁻²'> 'kilogram metre to the power minus 1 second to the power minus 2' : PressureUnit = kg*m^-1*s^-2;
168
+ attribute <'kg⋅m⁻¹⋅s⁻²⋅K⁻¹'> 'kilogram metre to the power minus 1 second to the power minus 2 kelvin to the power minus 1' : PressureCoefficientUnit = kg*m^-1*s^-2*K^-1;
169
+ attribute <'kg⋅m⁻¹⋅s⁻³'> 'kilogram metre to the power minus 1 second to the power minus 3' : SpectralIrradianceUnit = kg*m^-1*s^-3;
170
+ attribute <'kg⋅m⁻¹⋅s⁻³⋅sr⁻¹'> 'kilogram metre to the power minus 1 second to the power minus 3 steradian to the power minus 1' : SpectralRadianceUnit = kg*m^-1*s^-3*sr^-1;
171
+ attribute <'kg⋅m⁻²'> 'kilogram metre to the power minus 2' : SurfaceMassDensityUnit = kg*m^-2;
172
+ attribute <'kg⋅m⁻²⋅s⁻¹'> 'kilogram metre to the power minus 2 second to the power minus 1' : MassFlowUnit = kg*m^-2*s^-1;
173
+ attribute <'kg⋅m⁻²⋅s⁻²'> 'kilogram metre to the power minus 2 second to the power minus 2' : SpectralRadiantEnergyDensityInTermsOfWavelengthUnit = kg*m^-2*s^-2;
174
+ attribute <'kg⋅m⁻³'> 'kilogram metre to the power minus 3' : MassDensityUnit = kg*m^-3;
175
+ attribute <'kg⋅m⁻⁴⋅s⁻¹'> 'kilogram metre to the power minus 4 second to the power minus 1' : AcousticImpedanceUnit = kg*m^-4*s^-1;
176
+ attribute <'kg⋅m²'> 'kilogram metre squared' : MomentOfInertiaUnit = kg*m^2;
177
+ attribute <'kg⋅m²⋅s⁻¹'> 'kilogram metre squared second to the power minus 1' : AngularMomentumUnit = kg*m^2*s^-1;
178
+ attribute <'kg⋅m²⋅s⁻²'> 'kilogram metre squared second to the power minus 2' : MomentOfForceUnit = kg*m^2*s^-2;
179
+ attribute <'kg⋅m²⋅s⁻²⋅K⁻¹'> 'kilogram metre squared second to the power minus 2 kelvin to the power minus 1' : HeatCapacityUnit = kg*m^2*s^-2*K^-1;
180
+ attribute <'kg⋅m²⋅s⁻²⋅K⁻¹⋅mol⁻¹'> 'kilogram metre squared second to the power minus 2 kelvin to the power minus 1 mole to the power minus 1' : MolarHeatCapacityUnit = kg*m^2*s^-2*K^-1*mol^-1;
181
+ attribute <'kg⋅m²⋅s⁻²⋅mol⁻¹'> 'kilogram metre squared second to the power minus 2 mole to the power minus 1' : MolarInternalEnergyUnit = kg*m^2*s^-2*mol^-1;
182
+ attribute <'kg⋅m²⋅s⁻³'> 'kilogram metre squared second to the power minus 3' : PowerUnit = kg*m^2*s^-3;
183
+ attribute <'kg⋅m²⋅s⁻³⋅A⁻¹'> 'kilogram metre squared second to the power minus 3 ampere to the power minus 1' : ElectricPotentialDifferenceUnit = kg*m^2*s^-3*A^-1;
184
+ attribute <'kg⋅m²⋅s⁻³⋅A⁻¹⋅K⁻¹'> 'kilogram metre squared second to the power minus 3 ampere to the power minus 1 kelvin to the power minus 1' : SeebeckCoefficientForSubstancesAAndBUnit = kg*m^2*s^-3*A^-1*K^-1;
185
+ attribute <'kg⋅m²⋅s⁻³⋅K⁻¹'> 'kilogram metre squared second to the power minus 3 kelvin to the power minus 1' : ThermalConductanceUnit = kg*m^2*s^-3*K^-1;
186
+ attribute <'kg���m²⋅s⁻³⋅sr⁻¹'> 'kilogram metre squared second to the power minus 3 steradian to the power minus 1' : RadiantIntensityUnit = kg*m^2*s^-3*sr^-1;
187
+ attribute <'kg⋅m³⋅s⁻³⋅A⁻²'> 'kilogram metre cubed second to the power minus 3 ampere to the power minus 2' : ResistivityUnit = kg*m^3*s^-3*A^-2;
188
+ attribute <'kg⋅mol⁻¹'> 'kilogram mole to the power minus 1' : MolarMassUnit = kg*mol^-1;
189
+ attribute <'kg⋅s⁻¹'> 'kilogram second to the power minus 1' : MassFlowRateUnit = kg*s^-1;
190
+ attribute <'kg⋅s⁻²'> 'kilogram second to the power minus 2' : SurfaceTensionUnit = kg*s^-2;
191
+ attribute <'kg⋅s⁻²⋅A⁻¹'> 'kilogram second to the power minus 2 ampere to the power minus 1' : MagneticFluxDensityUnit = kg*s^-2*A^-1;
192
+ attribute <'kg⋅s⁻³'> 'kilogram second to the power minus 3' : DensityOfHeatFlowRateUnit = kg*s^-3;
193
+ attribute <'kg⋅s⁻³⋅K⁻¹'> 'kilogram second to the power minus 3 kelvin to the power minus 1' : CoefficientOfHeatTransferUnit = kg*s^-3*K^-1;
194
+ attribute <'kg⋅s⁻³⋅sr⁻¹'> 'kilogram second to the power minus 3 steradian to the power minus 1' : RadianceUnit = kg*s^-3*sr^-1;
195
+ attribute <'kg⁻¹⋅A'> 'kilogram to the power minus 1 ampere' : ExposureRateUnit = kg^-1*A;
196
+ attribute <'kg⁻¹⋅m⋅s²'> 'kilogram to the power minus 1 metre second to the power 2' : CompressibilityUnit = kg^-1*m*s^2;
197
+ attribute <'kg⁻¹⋅m⋅s²⋅K'> 'kilogram to the power minus 1 metre second to the power 2 kelvin' : JouleThomsonCoefficientUnit = kg^-1*m*s^2*K;
198
+ attribute <'kg⁻¹⋅m⁻²⋅s³⋅K'> 'kilogram to the power minus 1 metre to the power minus 2 second to the power 3 kelvin' : ThermalResistanceUnit = kg^-1*m^-2*s^3*K;
199
+ attribute <'kg⁻¹⋅m⁻³⋅s³⋅A²'> 'kilogram to the power minus 1 metre to the power minus 3 second to the power 3 ampere to the power 2' : ElectrolyticConductivityUnit = kg^-1*m^-3*s^3*A^2;
200
+ attribute <'kg⁻¹⋅m⁻⁵⋅s²'> 'kilogram to the power minus 1 metre to the power minus 5 second to the power 2' : EnergyDensityOfStatesUnit = kg^-1*m^-5*s^2;
201
+ attribute <'kg⁻¹⋅m²'> 'kilogram to the power minus 1 metre squared' : MassAttenuationCoefficientUnit = kg^-1*m^2;
202
+ attribute <'kg⁻¹⋅m³'> 'kilogram to the power minus 1 metre cubed' : SpecificVolumeUnit = kg^-1*m^3;
203
+ attribute <'kg⁻¹⋅s⋅A'> 'kilogram to the power minus 1 second ampere' : GyromagneticRatioUnit = kg^-1*s*A;
204
+ attribute <'kg⁻¹⋅s⁻¹'> 'kilogram to the power minus 1 second to the power minus 1' : SpecificActivityUnit = kg^-1*s^-1;
205
+ attribute <'kg⁻¹⋅s²'> 'kilogram to the power minus 1 second to the power 2' : EnergyDistributionOfCrossSectionUnit = kg^-1*s^2;
206
+ attribute <'kg⁻¹⋅s²⋅A'> 'kilogram to the power minus 1 second to the power 2 ampere' : MobilityUnit = kg^-1*s^2*A;
207
+ attribute <'kg⁻¹⋅s³⋅A²⋅mol⁻¹'> 'kilogram to the power minus 1 second to the power 3 ampere to the power 2 mole to the power minus 1' : MolarConductivityUnit = kg^-1*s^3*A^2*mol^-1;
208
+ attribute <'kg⁻¹⋅s³⋅K'> 'kilogram to the power minus 1 second to the power 3 kelvin' : ThermalInsulanceUnit = kg^-1*s^3*K;
209
+ attribute <'kg²⋅m⁻²⋅s⁻³'> 'kilogram to the power 2 metre to the power minus 2 second to the power minus 3' : SoundExposureUnit = kg^2*m^-2*s^-3;
210
+ attribute <'kg²⋅m⁴⋅s⁻⁶⋅A⁻²⋅K⁻²'> 'kilogram to the power 2 metre to the power 4 second to the power minus 6 ampere to the power minus 2 kelvin to the power minus 2' : LorenzCoefficientUnit = kg^2*m^4*s^-6*A^-2*K^-2;
211
+ attribute <'lm⋅s'> 'lumen second' : LuminousEnergyUnit = lm*s;
212
+ attribute <'lm/m²'> 'lumen per square metre' : LuminousExitanceUnit = lm/m^2;
213
+ attribute <'lm/W'> 'lumen per watt' : LuminousEfficacyOfRadiationUnit = lm/W;
214
+ attribute <'lx⋅s'> 'lux second' : LuminousExposureUnit = lx*s;
215
+ attribute <'m⋅s⁻¹'> 'metre second to the power minus 1' : SpeedUnit = m*s^-1;
216
+ attribute <'m⋅s⁻²'> 'metre second to the power minus 2' : AccelerationUnit = m*s^-2;
217
+ attribute <'m/s'> 'metre per second' : SpeedUnit = m/s;
218
+ attribute <'m⁻¹'> 'metre to the power minus 1' : CurvatureUnit = m^-1;
219
+ attribute <'m⁻²'> 'metre to the power minus 2' : PhotonExposureUnit = m^-2;
220
+ attribute <'m⁻²⋅s⁻¹'> 'metre to the power minus 2 second to the power minus 1' : PhotonIrradianceUnit = m^-2*s^-1;
221
+ attribute <'m⁻²⋅s⁻¹⋅sr⁻¹'> 'metre to the power minus 2 second to the power minus 1 steradian to the power minus 1' : PhotonRadianceUnit = m^-2*s^-1*sr^-1;
222
+ attribute <'m⁻³'> 'metre to the power minus 3' : ParticleConcentrationUnit = m^-3;
223
+ attribute <'m⁻³⋅s'> 'metre to the power minus 3 second' : DensityOfVibrationalStatesUnit = m^-3*s;
224
+ attribute <'m⁻³⋅s⁻¹'> 'metre to the power minus 3 second to the power minus 1' : ActivityDensityUnit = m^-3*s^-1;
225
+ attribute <'m²'> 'metre squared' : AreaUnit = m^2;
226
+ attribute <'m²⋅A'> 'metre squared ampere' : MagneticDipoleMomentUnit = m^2*A;
227
+ attribute <'m²⋅K/W'> 'metre squared kelvin per watt' : ThermalInsulanceUnit = m^2*K/W;
228
+ attribute <'m²⋅mol⁻¹'> 'metre squared mole to the power minus 1' : MolarAbsorptionCoefficientUnit = m^2*mol^-1;
229
+ attribute <'m²⋅s⁻¹'> 'metre squared second to the power minus 1' : KinematicViscosityUnit = m^2*s^-1;
230
+ attribute <'m²⋅s⁻²'> 'metre squared second to the power minus 2' : SpecificEnergyUnit = m^2*s^-2;
231
+ attribute <'m²⋅s⁻²⋅K⁻¹'> 'metre squared second to the power minus 2 kelvin to the power minus 1' : SpecificHeatCapacityUnit = m^2*s^-2*K^-1;
232
+ attribute <'m²⋅s⁻³'> 'metre squared second to the power minus 3' : DoseEquivalentUnit = m^2*s^-3;
233
+ attribute <'m²⋅sr⁻¹'> 'metre squared steradian to the power minus 1' : DirectionDistributionOfCrossSectionUnit = m^2*sr^-1;
234
+ attribute <'m²/(J⋅sr)'> 'metre squared per joule steradian' : DirectionAndEnergyDistributionOfCrossSectionUnit = m^2/(J*sr);
235
+ attribute <'m²/(V⋅s)'> 'metre squared per volt second' : MobilityUnit = m^2/(V*s);
236
+ attribute <'m²/J'> 'metre squared per joule' : EnergyDistributionOfCrossSectionUnit = m^2/J;
237
+ attribute <'m³'> 'metre cubed' : VolumeUnit = m^3;
238
+ attribute <'m³⋅mol⁻¹'> 'metre cubed mole to the power minus 1' : MolarVolumeUnit = m^3*mol^-1;
239
+ attribute <'m³⋅s⁻¹'> 'metre cubed second to the power minus 1' : VolumeFlowRateUnit = m^3*s^-1;
240
+ attribute <'m³/C⋅m³⋅s⁻¹⋅A⁻¹'> 'metre cubed per coulomb cubic metre second to the power minus 1 ampere to the power minus 1' : HallCoefficientUnit = m^3/C*m^3*s^-1*A^-1;
241
+ attribute <'m⁴'> 'metre to the power 4' : SecondAxialMomentOfAreaUnit = m^4;
242
+ attribute <'m⁴⋅s⁻²'> 'metre to the power 4 second to the power minus 2' : TotalMassStoppingPowerUnit = m^4*s^-2;
243
+ attribute <'mL/L '> 'ml per l' : VolumeFractionUnit = mL/L;
244
+ attribute <'mol⋅kg⁻¹'> 'mole kilogram to the power minus 1' : IonicStrengthUnit = mol*kg^-1;
245
+ attribute <'mol⋅m⁻³'> 'mole metre to the power minus 3' : AmountOfSubstanceConcentrationUnit = mol*m^-3;
246
+ attribute <'mol/kg'> 'mole per kilogram' : MolalityUnit = mol/kg;
247
+ attribute <'mol/L'> 'mole per l' : AmountOfSubstanceConcentrationUnit = mol/L;
248
+ attribute <'mol/m³'> 'mole per cubic metre' : EquilibriumConstantOnConcentrationBasisUnit = mol/m^3;
249
+ attribute <'N⋅m'> 'newton metre' : MomentOfForceUnit, TorqueUnit = N*m;
250
+ attribute <'N⋅m⋅s'> 'newton metre second' : AngularImpulseUnit = N*m*s;
251
+ attribute <'N⋅m⋅s⁻¹'> 'newton metre second to the power minus 1' : PowerUnit = N*m*s^-1;
252
+ attribute <'N⋅m⁻¹'> 'newton metre to the power minus 1' : SurfaceTensionUnit = N*m^-1;
253
+ attribute <'N⋅m⁻²'> 'newton metre to the power minus 2' : PressureUnit = N*m^-2;
254
+ attribute <'N⋅s'> 'newton second' : ImpulseUnit = N*s;
255
+ attribute <'nat/s'> 'natural unit of information per second' : AverageInformationRateUnit = nat/s;
256
+ attribute <'o/s'> 'octet per second' : TransferRateUnit = o/s;
257
+ attribute <'Pa⋅s'> 'pascal second' : DynamicViscosityUnit = Pa*s;
258
+ attribute <'Pa⋅s/m'> 'pascal second per metre' : CharacteristicImpedanceOfAMediumForLongitudinalWavesUnit = Pa*s/m;
259
+ attribute <'Pa⋅s/m³'> 'pascal second per cubic metre' : AcousticImpedanceUnit = Pa*s/m^3;
260
+ attribute <'Pa/K'> 'pascal per kelvin' : PressureCoefficientUnit = Pa/K;
261
+ attribute <'Pa⁻¹'> 'pascal to the power minus 1' : CompressibilityUnit = Pa^-1;
262
+ attribute <'Pa²⋅s'> 'pascal to the power 2 second' : SoundExposureUnit = Pa^2*s;
263
+ attribute <'rad⋅m²/kg¹'> 'radian metre squared per kilogram to the power 1' : SpecificOpticalRotatoryPowerUnit = rad*m^2/kg^1;
264
+ attribute <'rad⋅m²/mol'> 'radian metre squared per mole' : MolarOpticalRotatoryPowerUnit = rad*m^2/mol;
265
+ attribute <'rad⋅s⁻¹'> 'radian second to the power minus 1' : AngularVelocityUnit = rad*s^-1;
266
+ attribute <'rad⋅s⁻²'> 'radian second to the power minus 2' : AngularAccelerationUnit = rad*s^-2;
267
+ attribute <'rad/m'> 'radian per metre' : PhaseCoefficientUnit = rad/m;
268
+ attribute <'s⋅A'> 'second ampere' : ElectricChargeUnit = s*A;
269
+ attribute <'S⋅m²/mol'> 'siemens metre squared per mole' : MolarConductivityUnit = S*m^2/mol;
270
+ attribute <'S/m'> 'siemens per metre' : ConductivityUnit = S/m;
271
+ attribute <'s⁻¹'> 'second to the power minus 1' : AngularVelocityUnit = s^-1;
272
+ attribute <'s⁻¹⋅sr⁻¹'> 'second to the power minus 1 steradian to the power minus 1' : PhotonIntensityUnit = s^-1*sr^-1;
273
+ attribute <'s⁻²'> 'second to the power minus 2' : AngularAccelerationUnit = s^-2;
274
+ attribute <'Sh/s'> 'shannon per second' : AverageInformationRateUnit = Sh/s;
275
+ attribute <'Sv/s'> 'sievert per second' : DoseEquivalentUnit = Sv/s;
276
+ attribute <'V⋅A'> 'volt ampere' : PowerUnit = V*A;
277
+ attribute <'V/K'> 'volt per kelvin' : SeebeckCoefficientForSubstancesAAndBUnit = V/K;
278
+ attribute <'V/m'> 'volt per metre' : ElectricFieldStrengthUnit = V/m;
279
+ attribute <'V²/K²'> 'volt to the power 2 per kelvin to the power 2' : LorenzCoefficientUnit = V^2/K^2;
280
+ attribute <'W⋅h'> 'watt hour' : EnergyUnit = W*h;
281
+ attribute <'W/(m⋅K)'> 'watt per metre kelvin' : ThermalConductivityUnit = W/(m*K);
282
+ attribute <'W/(m²⋅K)'> 'watt per square metre kelvin' : CoefficientOfHeatTransferUnit = W/(m^2*K);
283
+ attribute <'W/(m²⋅nm)'> 'watt per square metre nm' : SpectralIrradianceUnit = W/(m^2*nm);
284
+ attribute <'W/(sr⋅m²)'> 'watt per steradian square metre' : RadianceUnit = W/(sr*m^2);
285
+ attribute <'W/(sr⋅m²⋅nm)'> 'watt per steradian square metre nm' : SpectralRadianceUnit = W/(sr*m^2*nm);
286
+ attribute <'W/(sr⋅nm)'> 'watt per steradian nm' : SpectralRadiantIntensityUnit = W/(sr*nm);
287
+ attribute <'W/K'> 'watt per kelvin' : ThermalConductanceUnit = W/K;
288
+ attribute <'W/kg'> 'watt per kilogram' : DoseEquivalentUnit = W/kg;
289
+ attribute <'W/m²'> 'watt per square metre' : DensityOfHeatFlowRateUnit = W/m^2;
290
+ attribute <'W/nm'> 'watt per nm' : SpectralRadiantFluxUnit = W/nm;
291
+ attribute <'W/sr'> 'watt per steradian' : RadiantIntensityUnit = W/sr;
292
+ attribute <'Wb⋅m'> 'weber metre' : MagneticDipoleMomentUnit = Wb*m;
293
+ attribute <'Wb/m'> 'weber per metre' : MagneticVectorPotentialUnit = Wb/m;
294
+ attribute <'Ω⋅m'> 'ohm metre' : ResistivityUnit = 'Ω'*m;
295
+
296
+ alias 'm/s²' for 'm⋅s⁻²';
297
+
298
+ /*
299
+ * Prefixed units
300
+ */
301
+
302
+ /* Length */
303
+ attribute <nm> nanometre : LengthUnit { :>> unitConversion: ConversionByPrefix { :>> prefix = nano; :>> referenceUnit = m; } }
304
+ attribute <mm> millimetre : LengthUnit { :>> unitConversion: ConversionByPrefix { :>> prefix = milli; :>> referenceUnit = m; } }
305
+ attribute <cm> centimetre : LengthUnit { :>> unitConversion: ConversionByPrefix { :>> prefix = centi; :>> referenceUnit = m; } }
306
+ attribute <km> kilometre : LengthUnit { :>> unitConversion: ConversionByPrefix { :>> prefix = kilo; :>> referenceUnit = m; } }
307
+
308
+ /* Volume */
309
+ attribute <mL> millilitre : VolumeUnit { :>> unitConversion: ConversionByPrefix { :>> prefix = milli; :>> referenceUnit = L; } }
310
+
311
+ /* Force */
312
+ attribute <mN> millinewton : ForceUnit { :>> unitConversion: ConversionByPrefix { :>> prefix = milli; :>> referenceUnit = N; } }
313
+
314
+ /* Energy */
315
+ attribute <kJ> kilojoule : EnergyUnit { :>> unitConversion: ConversionByPrefix { :>> prefix = kilo; :>> referenceUnit = J; } }
316
+ attribute <MJ> megajoule : EnergyUnit { :>> unitConversion: ConversionByPrefix { :>> prefix = mega; :>> referenceUnit = J; } }
317
+ attribute <GJ> gigajoule : EnergyUnit { :>> unitConversion: ConversionByPrefix { :>> prefix = giga; :>> referenceUnit = J; } }
318
+
319
+ /* Power */
320
+ attribute <kW> kilowatt : PowerUnit { :>> unitConversion: ConversionByPrefix { :>> prefix = kilo; :>> referenceUnit = W; } }
321
+
322
+ /* Speed */
323
+ attribute <'km/h'> 'kilometre per hour': SpeedUnit = km/h;
324
+
325
+ /*
326
+ * Celsius units
327
+ */
328
+
329
+ attribute <'°C'> 'degree celsius (temperature difference)' : TemperatureDifferenceUnit {
330
+ doc
331
+ /*
332
+ * degree Celsius unit for temperature interval (i.e. temperature difference) quantities
333
+ */
334
+
335
+ attribute :>> unitConversion: ConversionByConvention { :>> referenceUnit = K; :>> conversionFactor = 1; }
336
+ }
337
+
338
+ attribute <'°C_abs'> 'degree celsius (absolute temperature scale)' : IntervalScale {
339
+ doc
340
+ /*
341
+ * degree Celsius interval scale for absolute (thermodynamic) temperature quantities
342
+ *
343
+ * The interval scale is defined with an explicit transformation with respect to
344
+ * the kelvin thermodynamic temperature scale that specifies the zero shift.
345
+ */
346
+
347
+ attribute :>> unit = '°C';
348
+ attribute temperatureWaterAtFreezingPointInC: DefinitionalQuantityValue {
349
+ :>> num = 0; :>> definition = "temperature in degree Celsius of pure water at freezing point";
350
+ }
351
+ private attribute temperatureWaterAtTriplePointInC: DefinitionalQuantityValue {
352
+ :>> num = 1/100; :>> definition = "temperature in degree Celsius of pure water at the triple point";
353
+ }
354
+ private attribute celsiusToKelvinScaleMapping: QuantityValueMapping {
355
+ :>> mappedQuantityValue = temperatureWaterAtTriplePointInC;
356
+ :>> referenceQuantityValue = K.temperatureOfWaterAtTriplePointInK;
357
+ }
358
+ attribute :>> definitionalQuantityValues = (temperatureWaterAtTriplePointInC, temperatureWaterAtFreezingPointInC);
359
+ attribute :>> quantityValueMapping = celsiusToKelvinScaleMapping;
360
+
361
+ /* CoordinateFramePlacement (zero shift) w.r.t. the kelvin thermodynamic temperature scale */
362
+ private attribute zeroDegreeCelsiusInKelvin: ThermodynamicTemperatureValue = 273.15 [K];
363
+ attribute zeroDegreeCelsiusToKelvinShift : CoordinateFramePlacement :>> transformation {
364
+ :>> source = K; :>> origin = zeroDegreeCelsiusInKelvin;
365
+ }
366
+ }
367
+ }
src/sysml.library/Domain Libraries/Quantities and Units/SIPrefixes.sysml ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package SIPrefixes {
2
+ doc
3
+ /*
4
+ * Definition of SI unit prefixes as specified in ISO/IEC 80000-1
5
+ */
6
+
7
+ private import MeasurementReferences::*;
8
+
9
+ /*
10
+ * ISO/IEC 80000-1 prefixes for decimal multiples and sub-multiples
11
+ *
12
+ * See also https://en.wikipedia.org/wiki/Unit_prefix
13
+ */
14
+ attribute yocto: UnitPrefix { :>> longName = "yocto"; :>> symbol = "y"; :>> conversionFactor = 1E-24; }
15
+ attribute zepto: UnitPrefix { :>> longName = "zepto"; :>> symbol = "z"; :>> conversionFactor = 1E-21; }
16
+ attribute atto: UnitPrefix { :>> longName = "atto"; :>> symbol = "a"; :>> conversionFactor = 1E-18; }
17
+ attribute femto: UnitPrefix { :>> longName = "femto"; :>> symbol = "f"; :>> conversionFactor = 1E-15; }
18
+ attribute pico: UnitPrefix { :>> longName = "pico"; :>> symbol = "p"; :>> conversionFactor = 1E-12; }
19
+ attribute nano: UnitPrefix { :>> longName = "nano"; :>> symbol = "n"; :>> conversionFactor = 1E-9; }
20
+ attribute micro: UnitPrefix { :>> longName = "micro"; :>> symbol = "μ"; :>> conversionFactor = 1E-6; }
21
+ attribute milli: UnitPrefix { :>> longName = "milli"; :>> symbol = "m"; :>> conversionFactor = 1E-3; }
22
+ attribute centi: UnitPrefix { :>> longName = "centi"; :>> symbol = "c"; :>> conversionFactor = 1E-2; }
23
+ attribute deci: UnitPrefix { :>> longName = "deci"; :>> symbol = "d"; :>> conversionFactor = 1E-1; }
24
+ attribute deca: UnitPrefix { :>> longName = "deca"; :>> symbol = "da"; :>> conversionFactor = 1E1; }
25
+ attribute hecto: UnitPrefix { :>> longName = "hecto"; :>> symbol = "h"; :>> conversionFactor = 1E2; }
26
+ attribute kilo: UnitPrefix { :>> longName = "kilo"; :>> symbol = "k"; :>> conversionFactor = 1E3; }
27
+ attribute mega: UnitPrefix { :>> longName = "mega"; :>> symbol = "M"; :>> conversionFactor = 1E6; }
28
+ attribute giga: UnitPrefix { :>> longName = "giga"; :>> symbol = "G"; :>> conversionFactor = 1E9; }
29
+ attribute tera: UnitPrefix { :>> longName = "tera"; :>> symbol = "T"; :>> conversionFactor = 1E12; }
30
+ attribute peta: UnitPrefix { :>> longName = "peta"; :>> symbol = "P"; :>> conversionFactor = 1E15; }
31
+ attribute exa: UnitPrefix { :>> longName = "exa"; :>> symbol = "E"; :>> conversionFactor = 1E18; }
32
+ attribute zetta: UnitPrefix { :>> longName = "zetta"; :>> symbol = "Z"; :>> conversionFactor = 1E21; }
33
+ attribute yotta: UnitPrefix { :>> longName = "yotta"; :>> symbol = "Y"; :>> conversionFactor = 1E24; }
34
+
35
+ /*
36
+ * ISO/IEC 80000-1 prefixes for binary multiples, i.e. multiples of 1024 (= 2^10)
37
+ *
38
+ * See also https://en.wikipedia.org/wiki/Binary_prefix
39
+ */
40
+ attribute kibi: UnitPrefix { :>> longName = "kibi"; :>> symbol = "Ki"; :>> conversionFactor = 1024; }
41
+ attribute mebi: UnitPrefix { :>> longName = "mebi"; :>> symbol = "Mi"; :>> conversionFactor = 1024^2; }
42
+ attribute gibi: UnitPrefix { :>> longName = "gibi"; :>> symbol = "Gi"; :>> conversionFactor = 1024^3; }
43
+ attribute tebi: UnitPrefix { :>> longName = "tebi"; :>> symbol = "Ti"; :>> conversionFactor = 1024^4; }
44
+ attribute pebi: UnitPrefix { :>> longName = "pebi"; :>> symbol = "Pi"; :>> conversionFactor = 1024^5; }
45
+ attribute exbi: UnitPrefix { :>> longName = "exbi"; :>> symbol = "Ei"; :>> conversionFactor = 1024^6; }
46
+ attribute zebi: UnitPrefix { :>> longName = "zebi"; :>> symbol = "Zi"; :>> conversionFactor = 1024^7; }
47
+ attribute yobi: UnitPrefix { :>> longName = "yobi"; :>> symbol = "Yi"; :>> conversionFactor = 1024^8; }
48
+ }
src/sysml.library/Domain Libraries/Quantities and Units/TensorCalculations.sysml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package TensorCalculations {
2
+ doc
3
+ /*
4
+ * This package package defines calculations for the construction of and computations on TensorQuantityValues.
5
+ */
6
+
7
+ private import ScalarValues::Boolean;
8
+ private import ScalarValues::Number;
9
+ private import Quantities::ScalarQuantityValue;
10
+ private import Quantities::VectorQuantityValue;
11
+ private import Quantities::TensorQuantityValue;
12
+ private import MeasurementReferences::TensorMeasurementReference;
13
+ private import MeasurementReferences::CoordinateTransformation;
14
+
15
+ calc def '[' specializes BaseFunctions::'[' {
16
+ in elements: Number[1..n] ordered;
17
+ in mRef: TensorMeasurementReference[1];
18
+ return quantity: TensorQuantityValue[1];
19
+ private attribute n = mRef.flattenedSize;
20
+ }
21
+
22
+ calc def isZeroTensorQuantity {
23
+ in x : TensorQuantityValue[1];
24
+ return : Boolean[1];
25
+ }
26
+ calc def isUnitTensorQuantity {
27
+ in x : TensorQuantityValue[1];
28
+ return : Boolean[1];
29
+ }
30
+
31
+ /* Addition and subtraction */
32
+ calc def '+' :> DataFunctions::'+' { in : TensorQuantityValue[1]; in : TensorQuantityValue[1]; return : TensorQuantityValue[1]; }
33
+ calc def '-' :> DataFunctions::'-' { in : TensorQuantityValue[1]; in : TensorQuantityValue[1]; return : TensorQuantityValue[1]; }
34
+
35
+ /* Multiplication and division */
36
+ calc def scalarTensorMult { in : Number[1]; in : TensorQuantityValue[1]; return : TensorQuantityValue[1]; }
37
+ calc def TensorScalarMult { in : TensorQuantityValue[1]; in : Number[1]; return : TensorQuantityValue[1]; }
38
+ calc def scalarQuantityTensorMult { in : ScalarQuantityValue[1]; in : TensorQuantityValue[1]; return : TensorQuantityValue[1]; }
39
+ calc def TensorScalarQuantityMult { in : TensorQuantityValue[1]; in : ScalarQuantityValue[1]; return : TensorQuantityValue[1]; }
40
+ calc def tensorVectorMult { in : TensorQuantityValue[1]; in : VectorQuantityValue[1]; return : VectorQuantityValue[1]; }
41
+ calc def vectorTensorMult { in : VectorQuantityValue[1]; in : TensorQuantityValue[1]; return : VectorQuantityValue[1]; }
42
+ calc def tensorTensorMult { in : TensorQuantityValue[1]; in : TensorQuantityValue[1]; return : TensorQuantityValue[1]; }
43
+
44
+ /* Tensor transformation */
45
+ calc def transform {
46
+ in transformation : CoordinateTransformation;
47
+ in sourceTensor : TensorQuantityValue;
48
+ return targetTensor : TensorQuantityValue;
49
+ }
50
+ }
src/sysml.library/Domain Libraries/Quantities and Units/Time.sysml ADDED
@@ -0,0 +1,279 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package Time {
2
+ doc
3
+ /*
4
+ * This package specifies concepts to support time-related quantities and metrology, beyond
5
+ * the quantities duration and time as defined in [ISO 80000-3]. Representations of the
6
+ * Gregorian calendar date and time of day as specified by the [ISO 8601-1] standard are used.
7
+ */
8
+
9
+ private import Occurrences::Occurrence;
10
+ private import ScalarValues::Real;
11
+ private import ScalarValues::Integer;
12
+ private import ScalarValues::Natural;
13
+ private import ScalarValues::String;
14
+ private import Quantities::ScalarQuantityValue;
15
+ private import Quantities::scalarQuantities;
16
+ private import MeasurementReferences::*;
17
+ public import ISQBase::DurationValue;
18
+ public import ISQBase::DurationUnit;
19
+ public import ISQBase::duration;
20
+ public import ISQSpaceTime::TimeValue;
21
+ public import ISQSpaceTime::TimeUnit;
22
+ public import ISQSpaceTime::time;
23
+
24
+ readonly part universalClock : Clock[1] :> Clocks::universalClock {
25
+ doc
26
+ /*
27
+ * universalClock is a single Clock that can be used as a default universal time reference.
28
+ */
29
+ }
30
+
31
+ part def Clock :> Clocks::Clock {
32
+ doc
33
+ /*
34
+ * A Clock provides a currentTime as a TimeInstantValue that advances montonically over its lifetime.
35
+ */
36
+
37
+ attribute :>> currentTime : TimeInstantValue;
38
+ }
39
+
40
+ calc def TimeOf :> Clocks::TimeOf {
41
+ doc
42
+ /*
43
+ * TimeOf returns a TimeInstantValue for a given Occurrence relative to a given Clock. This TimeInstantValue is the
44
+ * time of the start of the Occurrence, which is considered to be synchronized with the snapshot of the Clock with a
45
+ * currentTime equal to the returned timeInstant.
46
+ */
47
+
48
+ in o : Occurrence[1];
49
+ in clock : Clock[1] default localClock;
50
+ return timeInstant : TimeInstantValue[1];
51
+ }
52
+
53
+ calc def DurationOf :> Clocks::DurationOf {
54
+ doc
55
+ /*
56
+ * DurationOf returns the duration of a given Occurrence relative to a given Clock, which is equal to the TimeOf
57
+ * the end snapshot of the Occurrence minus the TimeOf its start snapshot.
58
+ */
59
+
60
+ in o : Occurrence[1];
61
+ in clock : Clock[1] default localClock;
62
+ return duration : DurationValue;
63
+ }
64
+
65
+ attribute def TimeScale :> IntervalScale {
66
+ doc
67
+ /*
68
+ * Generic time scale to express a time instant, including a textual definition of the meaning of zero time instant value
69
+ *
70
+ * Attribute definitionalEpoch captures the specification of the time instant with value zero, also known as the (reference) epoch.
71
+ */
72
+
73
+ attribute :>> unit: DurationUnit[1];
74
+ attribute definitionalEpoch: DefinitionalQuantityValue[1];
75
+ attribute :>> definitionalQuantityValues = definitionalEpoch;
76
+ }
77
+
78
+ attribute def TimeInstantValue :> ScalarQuantityValue {
79
+ doc
80
+ /*
81
+ * Representation of a time instant quantity
82
+ *
83
+ * Also known as instant (of time), or, point in time.
84
+ */
85
+
86
+ attribute :>> num: Real[1];
87
+ attribute :>> mRef: TimeScale[1];
88
+ }
89
+ attribute timeInstant: TimeInstantValue :> scalarQuantities;
90
+
91
+ abstract attribute def DateTime :> TimeInstantValue {
92
+ doc
93
+ /*
94
+ * Generic representation of a time instant as a calendar date and time of day
95
+ */
96
+ }
97
+
98
+ abstract attribute def Date :> TimeInstantValue {
99
+ doc
100
+ /*
101
+ * Generic representation of a time instant as a calendar date
102
+ */
103
+ }
104
+
105
+ abstract attribute def TimeOfDay :> TimeInstantValue {
106
+ doc
107
+ /*
108
+ * Generic representation of a time instant as a time of day
109
+ */
110
+ }
111
+
112
+ attribute <UTC> 'Coordinated Universal Time' : TimeScale {
113
+ doc
114
+ /*
115
+ * Representation of the Coordinated Universal Time (UTC) time scale
116
+ *
117
+ * UTC is the primary time standard by which the world regulates clocks and time. It is within about 1 second of mean solar time
118
+ * at 0° longitude and is not adjusted for daylight saving time.
119
+ * UTC is obtained from International Atomic Time (TAI) by the insertion of leap seconds according to the advice of
120
+ * the International Earth Rotation and Reference Systems Service (IERS) to ensure approximate agreement
121
+ * with the time derived from the rotation of the Earth.
122
+ *
123
+ * References:
124
+ * ITU-R TF.460-6 (see https://www.itu.int/rec/R-REC-TF.460/en)
125
+ * BIPM technical services: Time Metrology (see https://www.bipm.org/en/time-metrology)
126
+ *
127
+ * Introductions:
128
+ * For UTC see https://en.wikipedia.org/wiki/Coordinated_Universal_Time
129
+ * For TAI see https://en.wikipedia.org/wiki/International_Atomic_Time
130
+ */
131
+
132
+ attribute :>> unit = SI::s;
133
+ attribute :>> definitionalEpoch: DefinitionalQuantityValue { :>> num = 0; :>> definition = "UTC epoch at 1 January 1958 at 0 hour 0 minute 0 second"; }
134
+ }
135
+
136
+ attribute def UtcTimeInstantValue :> DateTime {
137
+ :>> mRef = UTC {
138
+ doc
139
+ /*
140
+ * Representation of a time instant expressed on the Coordinated Universal Time (UTC) time scale
141
+ */
142
+ }
143
+ }
144
+ attribute utcTimeInstant: UtcTimeInstantValue :> timeInstant;
145
+
146
+ /*
147
+ * Representations of a Gregorian calendar date and time of day as specified by the ISO 8601-1 standard.
148
+ *
149
+ * As explained in ISO 8601-1 clause 4.2.1:
150
+ * ISO 8601-1 uses the Gregorian calendar for the identification of calendar days.
151
+ *
152
+ * The Gregorian calendar provides a time scale consisting of a series of contiguous calendar years,
153
+ * each identified by a year number represented by an integer, greater than that of the
154
+ * immediately preceding calendar year by 1. ISO 8601-1 allows the identification of calendar years
155
+ * by their year number for years both before and after the introduction of the Gregorian calendar.
156
+ *
157
+ * The Gregorian calendar distinguishes common years of 365 consecutive calendar days and leap years
158
+ * of 366 consecutive calendar days.
159
+ *
160
+ * In the Gregorian calendar each calendar year is divided into 12 sequential calendar months,
161
+ * each consisting of a specific number of calendar days in the range 28 to 31. Usage of the Gregorian calendar
162
+ * for identifying dates preceding its introduction (15 October 1582) should only be by mutual agreement
163
+ * of the communicating partners.
164
+ *
165
+ * Reference: ISO 8601-1:2019 (First edition)
166
+ * "Date and time — Representations for information interchange — Part 1: Basic rules"
167
+ * (see https://www.iso.org/standard/70907.html)
168
+ */
169
+
170
+ attribute def Iso8601DateTimeEncoding :> String {
171
+ doc
172
+ /*
173
+ * Extended string encoding of an ISO 8601-1 date and time
174
+ *
175
+ * The format of the string must comply with the following EBNF production:
176
+ * ['+' | '-'] YYYY '-' MM '-' DD 'T' hh ':' mm ':' ss ['.' fff [fff]] ('Z' | timezoneOffset )
177
+ * where:
178
+ * YYYY is 4-or-more-digit year number, which can be negative for years before 0000;
179
+ * MM is 2-digit month in year number, in which 01 is January, 02 is February, ..., 12 is December;
180
+ * DD is 2-digit day in month number in range 01 to 28, 29, 30, 31 depending on month and leap year;
181
+ * hh is 2-digit hour in day number in range 00 to 23;
182
+ * mm is 2-digit minute in hour in range 00 to 59;
183
+ * ss is 2-digit second in minute in range 00 to 60, in in case of leap second;
184
+ * ['.' fff [fff]] is an optional 3-digit millisecond or 6-digit microsecond fraction;
185
+ * timezoneOffset is ('+' | '-') hhOffset ':' mmOffset, denoting the local timezone hour and minute offset w.r.t. UTC,
186
+ * in which '+' specifies an offset ahead of UTC and '-' specifies an offset behind UTC;
187
+ *
188
+ * Note 1: All components are expressed with leading zeros.
189
+ * Note 2: 'Z' instead of timezoneOffset denotes a UTC time, i.e. zero time offset.
190
+ * Note 3: The ss value may only be 60 when a leap second is inserted.
191
+ *
192
+ * Examples of such a date and time value are:
193
+ * 2021-08-30T12:30:24Z (UTC date and time with second precision)
194
+ * 2018-01-23T23:14:44.304827Z (UTC date and time with microsecond precision)
195
+ * 1969-07-20T20:17:00Z (UTC date and time with second precision)
196
+ * 1969-07-20T15:17:00-05:00 (local date and time with second precision for a timezone 5 hour behind UTC)
197
+ * 1969-07-20T22:17:00+02:00 (local date and time with second precision for a timezone 2 hour ahead of UTC)
198
+ *
199
+ * TODO: Add constraint to verify ISO 8691 extended string encoding.
200
+ */
201
+ }
202
+
203
+ attribute def Iso8601DateTime :> UtcTimeInstantValue {
204
+ doc
205
+ /*
206
+ * Representation of an ISO 8601-1 date and time in extended string format
207
+ */
208
+
209
+ attribute val: Iso8601DateTimeEncoding;
210
+ attribute :>> num = getElapsedUtcTime(val);
211
+ private calc getElapsedUtcTime {
212
+ in iso8601DateTime: Iso8601DateTimeEncoding;
213
+ /* Return the number of seconds elapsed since the UTC epoch.
214
+ * Can be negative when the date and time is earlier than the epoch.
215
+ */
216
+ return : Real;
217
+ }
218
+ }
219
+
220
+ attribute def Iso8601DateTimeStructure :> UtcTimeInstantValue {
221
+ doc
222
+ /*
223
+ * Representation of an ISO 8601 date and time with explicit date and time component attributes
224
+ *
225
+ * TO DO: Specify restrictions for attributes month (1 to 12), day (1 to 31), hour (0 to 23), minute (0 to 59), second (0 to 60),
226
+ * microsecond (0 to 999999), hourOffset (-12 to +12), minuteOffset (-59 to +59)
227
+ *
228
+ * The total time offset is equal to the summation of hourOffset and minuteOffset.
229
+ */
230
+
231
+ attribute year: Integer;
232
+ attribute month: Natural;
233
+ attribute day: Natural;
234
+ attribute hour: Natural;
235
+ attribute minute: Natural;
236
+ attribute second: Natural;
237
+ attribute microsecond: Natural;
238
+ attribute hourOffset: Integer;
239
+ attribute minuteOffset: Integer;
240
+ attribute :>> num = getElapsedUtcTime(year, month, day, hour, minute, second, microsecond, hourOffset, minuteOffset);
241
+ private calc getElapsedUtcTime {
242
+ in year: Integer;
243
+ in month: Natural;
244
+ in day: Natural;
245
+ in hour: Natural;
246
+ in minute: Natural;
247
+ in second: Natural;
248
+ in microsecond: Natural;
249
+ in hourOffset: Integer;
250
+ in minuteOffest: Integer;
251
+ return : Real;
252
+ }
253
+ }
254
+
255
+ calc convertIso8601DateTimeToStructure {
256
+ doc
257
+ /*
258
+ * Calculation to convert an ISO 8601 date and time instant from string to component structure representation
259
+ */
260
+
261
+ in iso8601DateTime: Iso8601DateTime;
262
+ /* Parse ISO 8601 string encoding to date and time components */
263
+ return : Iso8601DateTimeStructure;
264
+ }
265
+
266
+ calc convertIso8601StructureToDateTime {
267
+ doc
268
+ /*
269
+ * Calculation to convert an ISO 8601 date and time instant from component structure to string representation
270
+ */
271
+
272
+ in iso8601DateTimeStructure: Iso8601DateTimeStructure;
273
+ attribute x: Iso8601DateTime;
274
+ /* Concatenate ISO 8601 date and time components to string
275
+ * year-month-dayThour:minute:second±hourOffset:minuteOffset
276
+ */
277
+ return : Iso8601DateTime;
278
+ }
279
+ }
src/sysml.library/Domain Libraries/Quantities and Units/USCustomaryUnits.sysml ADDED
@@ -0,0 +1,255 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package <USCU> USCustomaryUnits {
2
+ doc
3
+ /*
4
+ * Measurement unit declarations generated from NIST SP811 Appendix B
5
+ *
6
+ * See https://www.nist.gov/pml/special-publication-811/nist-guide-si-appendix-b-conversion-factors/nist-guide-si-appendix-b8
7
+ */
8
+
9
+ private import MeasurementReferences::*;
10
+ public import ISQ::*;
11
+ private import SI::*;
12
+
13
+ attribute 'acre (based on US survey foot)' : AreaUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^2; :>> conversionFactor = 4.046873E+03; :>> isExact = false; } }
14
+ attribute 'acre foot (based on US survey foot)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 1.233489E+03; :>> isExact = false; } }
15
+ attribute <bbl> 'barrel (for petroleum, 42 gallons (US))' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 1.589873E-01; :>> isExact = false; } }
16
+ attribute <Btu_IT> 'British thermal unit (IT)' : EnergyUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = J; :>> conversionFactor = 1.055056E+03; :>> isExact = false; } }
17
+ alias Btu for Btu_IT;
18
+ attribute <Btu_th> 'British thermal unit (th)' : EnergyUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = J; :>> conversionFactor = 1.054350E+03; :>> isExact = false; } }
19
+ attribute <Btu_mean> 'British thermal unit (mean)' : EnergyUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = J; :>> conversionFactor = 1.05587E+03; :>> isExact = false; } }
20
+ attribute <'Btu_39°F'> 'British thermal unit (39 °F)' : EnergyUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = J; :>> conversionFactor = 1.05967E+03; :>> isExact = false; } }
21
+ attribute <'Btu_59°F'> 'British thermal unit (59 °F)' : EnergyUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = J; :>> conversionFactor = 1.05480E+03; :>> isExact = false; } }
22
+ attribute <'Btu_60°F'> 'British thermal unit (60 °F)' : EnergyUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = J; :>> conversionFactor = 1.05468E+03; :>> isExact = false; } }
23
+ attribute <'Btu_IT⋅ft/(h⋅ft²⋅°F)'> 'British thermal unit (IT) foot per hour square foot degree Fahrenheit' : ThermalConductivityUnit = Btu_IT*ft/(h*ft^2*'°F');
24
+ attribute <'Btu_th⋅ft/(h⋅ft²⋅°F)'> 'British thermal unit (th) foot per hour square foot degree Fahrenheit' : ThermalConductivityUnit = Btu_th*ft/(h*ft^2*'°F');
25
+ attribute <'Btu_IT⋅in/(h⋅ft²⋅°F)'> 'British thermal unit (IT) inch per hour square foot degree Fahrenheit' : ThermalConductivityUnit = Btu_IT*'in'/(h*ft^2*'°F');
26
+ attribute <'Btu_th⋅in/(h⋅ft²⋅°F)'> 'British thermal unit (th) inch per hour square foot degree Fahrenheit' : ThermalConductivityUnit = Btu_th*'in'/(h*ft^2*'°F');
27
+ attribute <'Btu_IT⋅in/(s⋅ft²⋅°F)'> 'British thermal unit (IT) inch per second square foot degree Fahrenheit' : ThermalConductivityUnit = Btu_IT*'in'/(s*ft^2*'°F');
28
+ attribute <'Btu_th⋅in/(s⋅ft²⋅°F)'> 'British thermal unit (th) inch per second square foot degree Fahrenheit' : ThermalConductivityUnit = Btu_th*'in'/(s*ft^2*'°F');
29
+ //attribute <'Btu_IT/ft³'> 'British thermal unit (IT) per cubic foot' : EnergyDensityUnit = Btu_IT/ft^3;
30
+ //attribute <'Btu_th/ft³'> 'British thermal unit (th) per cubic foot' : EnergyDensityUnit = Btu_th/ft^3;
31
+ attribute <'Btu_IT/°F'> 'British thermal unit (IT) per degree Fahrenheit' : HeatCapacityUnit = Btu_IT/'°F';
32
+ attribute <'Btu_th/°F'> 'British thermal unit (th) per degree Fahrenheit' : HeatCapacityUnit = Btu_th/'°F';
33
+ attribute <'Btu_IT/°R'> 'British thermal unit (IT) per degree Rankine' : HeatCapacityUnit = Btu_IT/'°R';
34
+ attribute <'Btu_th/°R'> 'British thermal unit (th) per degree Rankine' : HeatCapacityUnit = Btu_th/'°R';
35
+ attribute <'Btu_IT/h'> 'British thermal unit (IT) per hour' : PowerUnit = Btu_IT/h;
36
+ attribute <'Btu_th/h'> 'British thermal unit (th) per hour' : PowerUnit = Btu_th/h;
37
+ attribute <'Btu_IT/(h⋅ft²⋅°F)'> 'British thermal unit (IT) per hour square foot degree Fahrenheit' : CoefficientOfHeatTransferUnit = Btu_IT/(h*ft^2*'°F');
38
+ attribute <'Btu_th/(h⋅ft²⋅°F)'> 'British thermal unit (th) per hour square foot degree Fahrenheit' : CoefficientOfHeatTransferUnit = Btu_th/(h*ft^2*'°F');
39
+ attribute <'Btu_th/min'> 'British thermal unit (th) per minute' : PowerUnit = Btu_th/min;
40
+ attribute <'Btu_IT/lb'> 'British thermal unit (IT) per pound' : SpecificEnergyUnit = Btu_IT/lb;
41
+ attribute <'Btu_th/lb'> 'British thermal unit (th) per pound' : SpecificEnergyUnit = Btu_th/lb;
42
+ attribute <'Btu_IT/(lb⋅°F)'> 'British thermal unit (IT) per pound degree Fahrenheit' : SpecificHeatCapacityUnit = Btu_IT/(lb*'°F');
43
+ attribute <'Btu_th/(lb⋅°F)'> 'British thermal unit (th) per pound degree Fahrenheit' : SpecificHeatCapacityUnit = Btu_th/(lb*'°F');
44
+ attribute <'Btu_IT/(lb⋅°R)'> 'British thermal unit (IT) per pound degree Rankine' : SpecificHeatCapacityUnit = Btu_IT/(lb*'°R');
45
+ attribute <'Btu_th/(lb⋅°R)'> 'British thermal unit (th) per pound degree Rankine' : SpecificHeatCapacityUnit = Btu_th/(lb*'°R');
46
+ attribute <'Btu_IT/s'> 'British thermal unit (IT) per second' : PowerUnit = Btu_IT/s;
47
+ attribute <'Btu_th/s'> 'British thermal unit (th) per second' : PowerUnit = Btu_th/s;
48
+ attribute <'Btu_IT/(s⋅ft²⋅°F)'> 'British thermal unit (IT) per second square foot degree Fahrenheit' : CoefficientOfHeatTransferUnit = Btu_IT/(s*ft^2*'°F');
49
+ attribute <'Btu_th/(s⋅ft²⋅°F)'> 'British thermal unit (th) per second square foot degree Fahrenheit' : CoefficientOfHeatTransferUnit = Btu_th/(s*ft^2*'°F');
50
+ //attribute <'Btu_IT/ft²'> 'British thermal unit (IT) per square foot' : SurfaceHeatDensityUnit = Btu_IT/ft^2;
51
+ //attribute <'Btu_th/ft²'> 'British thermal unit (th) per square foot' : SurfaceHeatDensityUnit = Btu_th/ft^2;
52
+ attribute <'Btu_IT/(ft²⋅h)'> 'British thermal unit (IT) per square foot hour' : DensityOfHeatFlowRateUnit = Btu_IT/(ft^2*h);
53
+ attribute <'Btu_th/(ft²⋅h)'> 'British thermal unit (th) per square foot hour' : DensityOfHeatFlowRateUnit = Btu_th/(ft^2*h);
54
+ attribute <'Btu_th/(ft²⋅min)'> 'British thermal unit (th) per square foot minute' : DensityOfHeatFlowRateUnit = Btu_th/(ft^2*min);
55
+ attribute <'Btu_IT/(ft²⋅s)'> 'British thermal unit (IT) per square foot second' : DensityOfHeatFlowRateUnit = Btu_IT/(ft^2*s);
56
+ attribute <'Btu_th/(ft²⋅s)'> 'British thermal unit (th) per square foot second' : DensityOfHeatFlowRateUnit = Btu_th/(ft^2*s);
57
+ attribute <'Btu_th/(in²⋅s)'> 'British thermal unit (th) per square inch second' : DensityOfHeatFlowRateUnit = Btu_th/('in'^2*s);
58
+ attribute <bu> 'bushel (US)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 3.523907E-02; :>> isExact = false; } }
59
+ attribute <'cd/in²'> 'candela per square inch' : LuminanceUnit = cd/'in'^2;
60
+ attribute <ch> 'chain (based on US survey foot)' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 2.011684E+01; :>> isExact = false; } }
61
+ attribute 'circular mil' : AreaUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^2; :>> conversionFactor = 5.067075E-10; :>> isExact = false; } }
62
+ attribute 'clo' : ThermalInsulanceUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^2*K/W; :>> conversionFactor = 1.55E-01; :>> isExact = false; } }
63
+ attribute 'cord (128 ft^3)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 3.624556E+00; :>> isExact = false; } }
64
+ attribute <'ft³'> 'cubic foot' : VolumeUnit = ft^3;
65
+ attribute <'ft³/min'> 'cubic foot per minute' : VolumeFlowRateUnit = ft^3/min;
66
+ attribute <'ft³/s'> 'cubic foot per second' : VolumeFlowRateUnit = ft^3/s;
67
+ attribute <'in³'> 'cubic inch' : VolumeUnit = 'in'^3;
68
+ attribute <'in³/min'> 'cubic inch per minute' : VolumeFlowRateUnit = 'in'^3/min;
69
+ attribute <'mi³'> 'cubic mile' : VolumeUnit = mi^3;
70
+ attribute <'yd³'> 'cubic yard' : VolumeUnit = yd^3;
71
+ attribute <'yd³/min'> 'cubic yard per minute' : VolumeFlowRateUnit = yd^3/min;
72
+ attribute 'cup (US)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 2.365882E-04; :>> isExact = false; } }
73
+ attribute <'°F'> 'degree Fahrenheit (temperature difference)' : TemperatureDifferenceUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = K; :>> conversionFactor = 5/9; :>> isExact = true; } }
74
+ attribute <'°F⋅h/Btu_IT'> 'degree Fahrenheit hour per British thermal unit (IT)' : ThermalResistanceUnit = '°F'*h/Btu_IT;
75
+ attribute <'°F⋅h/Btu_th'> 'degree Fahrenheit hour per British thermal unit (th)' : ThermalResistanceUnit = '°F'*h/Btu_th;
76
+ attribute <'°F⋅h⋅ft²/Btu_IT'> 'degree Fahrenheit hour square foot per British thermal unit (IT)' : ThermalInsulanceUnit = '°F'*h*ft^2/Btu_IT;
77
+ attribute <'°F⋅h⋅ft²/Btu_th'> 'degree Fahrenheit hour square foot per British thermal unit (th)' : ThermalInsulanceUnit = '°F'*h*ft^2/Btu_th;
78
+ //attribute <'°F⋅h⋅ft²/(Btu_IT⋅in)'> 'degree Fahrenheit hour square foot per British thermal unit (IT) inch' : ThermalResistivityUnit = '°F'*h*ft^2/(Btu_IT*'in');
79
+ //attribute <'°F⋅h⋅ft²/(Btu_th⋅in)'> 'degree Fahrenheit hour square foot per British thermal unit (th) inch' : ThermalResistivityUnit = '°F'*h*ft^2/(Btu_th*'in');
80
+ attribute <'°F⋅s/Btu_IT'> 'degree Fahrenheit second per British thermal unit (IT)' : ThermalResistanceUnit = '°F'*s/Btu_IT;
81
+ attribute <'°F⋅s/Btu_th'> 'degree Fahrenheit second per British thermal unit (th)' : ThermalResistanceUnit = '°F'*s/Btu_th;
82
+ attribute <'°R'> 'degree Rankine' : ThermodynamicTemperatureUnit, TemperatureDifferenceUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = K; :>> conversionFactor = 5/9; :>> isExact = true; } }
83
+ attribute 'fathom (based on US survey foot)' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 1.828804E+00; :>> isExact = false; } }
84
+ attribute <floz> 'fluid ounce (US)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 2.957353E-05; :>> isExact = false; } }
85
+ attribute <ft> 'foot' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 3.048E-01; } }
86
+ attribute 'foot (US survey)' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 3.048006E-01; :>> isExact = false; } }
87
+ attribute 'footcandle' : IlluminanceUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = lx; :>> conversionFactor = 1.076391E+01; :>> isExact = false; } }
88
+ attribute 'footlambert' : LuminanceUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = cd/m^2; :>> conversionFactor = 3.426259E+00; :>> isExact = false; } }
89
+ attribute <ftHg> 'foot of mercury, conventional' : PressureUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = Pa; :>> conversionFactor = 4.063666E+04; :>> isExact = false; } }
90
+ attribute 'foot of water (39.2 °F)' : PressureUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = Pa; :>> conversionFactor = 2.98898E+03; :>> isExact = false; } }
91
+ attribute <ftH2O> 'foot of water, conventional' : PressureUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = Pa; :>> conversionFactor = 2.989067E+03; :>> isExact = false; } }
92
+ attribute <'ft/h'> 'foot per hour' : SpeedUnit = ft/h;
93
+ attribute <'ft/min'> 'foot per minute' : SpeedUnit = ft/min;
94
+ attribute <'ft/s'> 'foot per second' : SpeedUnit = ft/s;
95
+ attribute <'ft/s²'> 'foot per second squared' : AccelerationUnit = ft/s^2;
96
+ attribute 'foot poundal' : EnergyUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = J; :>> conversionFactor = 4.214011E-02; :>> isExact = false; } }
97
+ attribute <'ft⋅lbf'> 'foot pound-force' : EnergyUnit = ft*lbf;
98
+ attribute <'ft⋅lbf/h'> 'foot pound-force per hour' : PowerUnit = ft*lbf/h;
99
+ attribute <'ft⋅lbf/min'> 'foot pound-force per minute' : PowerUnit = ft*lbf/min;
100
+ attribute <'ft⋅lbf/s'> 'foot pound-force per second' : PowerUnit = ft*lbf/s;
101
+ attribute <'ft⁴'> 'foot to the fourth power' : SecondAxialMomentOfAreaUnit = ft^4;
102
+ attribute <gal> 'gallon (US)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 3.785412E-03; :>> isExact = false; } }
103
+ attribute <'gal/d'> 'gallon (US) per day' : VolumeFlowRateUnit = gal/d;
104
+ //attribute <'gal/(hp⋅h)'> 'gallon (US) per horsepower hour' : EnergySpecificVolumeUnit = gal/(hp*h);
105
+ attribute <'gal/min'> 'gallon (US) per minute (gpm)' : VolumeFlowRateUnit = gal/min;
106
+ attribute <gi> 'gill (US)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 1.182941E-04; :>> isExact = false; } }
107
+ attribute <gr> 'grain' : MassUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg; :>> conversionFactor = 6.479891E-05; } }
108
+ attribute <'gr/gal'> 'grain per gallon (US)' : MassDensityUnit = gr/gal;
109
+ attribute <hp> 'horsepower (550 ft*lbf/s)' : PowerUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = W; :>> conversionFactor = 7.456999E+02; :>> isExact = false; } }
110
+ attribute 'horsepower (boiler)' : PowerUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = W; :>> conversionFactor = 9.80950E+03; :>> isExact = false; } }
111
+ attribute 'horsepower (electric)' : PowerUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = W; :>> conversionFactor = 7.46E+02; } }
112
+ attribute 'horsepower (water)' : PowerUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = W; :>> conversionFactor = 7.46043E+02; :>> isExact = false; } }
113
+ attribute 'hundredweight (long, 112 lb)' : MassUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg; :>> conversionFactor = 5.080235E+01; :>> isExact = false; } }
114
+ attribute 'hundredweight (short, 100 lb)' : MassUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg; :>> conversionFactor = 4.535924E+01; :>> isExact = false; } }
115
+ attribute <'in'> 'inch' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 2.54E-02; } }
116
+ attribute 'inch of mercury (32 °F)' : PressureUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = Pa; :>> conversionFactor = 3.38638E+03; :>> isExact = false; } }
117
+ attribute 'inch of mercury (60 °F)' : PressureUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = Pa; :>> conversionFactor = 3.37685E+03; :>> isExact = false; } }
118
+ attribute <inHg> 'inch of mercury, conventional' : PressureUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = Pa; :>> conversionFactor = 3.386389E+03; :>> isExact = false; } }
119
+ attribute 'inch of water (39.2 °F)' : PressureUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = Pa; :>> conversionFactor = 2.49082E+02; :>> isExact = false; } }
120
+ attribute 'inch of water (60 °F)' : PressureUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = Pa; :>> conversionFactor = 2.4884E+02; :>> isExact = false; } }
121
+ attribute <inH2O> 'inch of water, conventional' : PressureUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = Pa; :>> conversionFactor = 2.490889E+02; :>> isExact = false; } }
122
+ attribute <'in/s'> 'inch per second' : SpeedUnit = 'in'/s;
123
+ attribute <'in/s²'> 'inch per second squared' : AccelerationUnit = 'in'/s^2;
124
+ attribute <'in⁴'> 'inch to the fourth power' : SecondAxialMomentOfAreaUnit = 'in'^4;
125
+ attribute <kip> 'kip (1 kip = 1000 lbf)' : ForceUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = N; :>> conversionFactor = 4.448222E+03; :>> isExact = false; } }
126
+ attribute <'kip/in²'> 'kip per square inch (ksi)' : PressureUnit = kip/'in'^2;
127
+ attribute <knot> 'knot (nautical mile per hour)' : SpeedUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m/s; :>> conversionFactor = 5.144444E-01; :>> isExact = false; } }
128
+ //attribute <'cal_th/cm²'> 'langley' : SurfaceHeatDensityUnit = cal_th/cm^2;
129
+ attribute <'lm/ft²'> 'lumen per square foot' : IlluminanceUnit = lm/ft^2;
130
+ attribute 'microinch' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 2.54E-08; } }
131
+ attribute <mil> 'mil (0.001 in)' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 2.54E-05; } }
132
+ attribute <mi> 'mile' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 1.609344E+03; } }
133
+ attribute 'mile (based on US survey foot)' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 1.609347E+03; :>> isExact = false; } }
134
+ attribute <nmi> 'mile, nautical' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 1.852E+03; } }
135
+ alias NM for nmi;
136
+ //attribute <'mi/gal'> 'mile per gallon (US)' : FuelEconomyUnit = mi/gal;
137
+ //alias mpg for 'mi/gal';
138
+ attribute <'mi/h'> 'mile per hour' : SpeedUnit = mi/h;
139
+ alias mph for 'mi/h';
140
+ attribute <'mi/min'> 'mile per minute' : SpeedUnit = mi/min;
141
+ attribute <'mi/s'> 'mile per second' : SpeedUnit = mi/s;
142
+ attribute 'ohm circular-mil per foot' : ResistivityUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = 'Ω'*m; :>> conversionFactor = 1.662426E-09; :>> isExact = false; } }
143
+ attribute <oz> 'ounce (avoirdupois)' : MassUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg; :>> conversionFactor = 2.834952E-02; :>> isExact = false; } }
144
+ attribute 'ounce (US fluid)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 2.957353E-05; :>> isExact = false; } }
145
+ attribute <ozf> 'ounce (avoirdupois)-force' : ForceUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = N; :>> conversionFactor = 2.780139E-01; :>> isExact = false; } }
146
+ attribute <'ozf⋅in'> 'ounce (avoirdupois)-force inch' : MomentOfForceUnit = ozf*'in';
147
+ attribute <'oz/in³'> 'ounce (avoirdupois) per cubic inch' : MassDensityUnit = oz/'in'^3;
148
+ attribute <'oz/gal'> 'ounce (avoirdupois) per gallon (US)' : MassDensityUnit = oz/gal;
149
+ attribute <'oz/ft²'> 'ounce (avoirdupois) per square foot' : SurfaceMassDensityUnit = oz/ft^2;
150
+ attribute <'oz/in²'> 'ounce (avoirdupois) per square inch' : SurfaceMassDensityUnit = oz/'in'^2;
151
+ attribute <'oz/yd²'> 'ounce (avoirdupois) per square yard' : SurfaceMassDensityUnit = oz/yd^2;
152
+ attribute <pk> 'peck (US)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 8.809768E-03; :>> isExact = false; } }
153
+ //attribute 'perm (0 °C)' : VapourTransmissionUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg/(Pa*s*m^2); :>> conversionFactor = 5.72135E-11; :>> isExact = false; } }
154
+ //attribute 'perm (23 °C)' : VapourTransmissionUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg/(Pa*s*m^2); :>> conversionFactor = 5.74525E-11; :>> isExact = false; } }
155
+ //attribute 'perm inch (0 °C)' : VapourTransmissionUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg/('Pa·s·m'); :>> conversionFactor = 1.45322E-12; :>> isExact = false; } }
156
+ //attribute 'perm inch (23 °C)' : VapourTransmissionUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg/('Pa·s·m'); :>> conversionFactor = 1.45929E-12; :>> isExact = false; } }
157
+ attribute <pica> 'pica (computer) (1/6 in)' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 4.233333E-03; :>> isExact = false; } }
158
+ attribute 'pica (printer′s)' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 4.217518E-03; :>> isExact = false; } }
159
+ attribute <drypt> 'pint (US dry)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 5.506105E-04; :>> isExact = false; } }
160
+ attribute <liqpt> 'pint (US liquid)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 4.731765E-04; :>> isExact = false; } }
161
+ attribute <pt> 'point (computer) (1/72 in)' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 3.527778E-04; :>> isExact = false; } }
162
+ attribute 'point (printer′s)' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 3.514598E-04; :>> isExact = false; } }
163
+ attribute <lb> 'pound (avoirdupois)' : MassUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg; :>> conversionFactor = 4.535924E-01; :>> isExact = false; } }
164
+ attribute <'lb⋅ft²'> 'pound foot squared' : MomentOfInertiaUnit = lb*ft^2;
165
+ attribute <lbf> 'pound-force' : ForceUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = N; :>> conversionFactor = 4.448222E+00; :>> isExact = false; } }
166
+ attribute <'lbf⋅ft'> 'pound-force foot' : MomentOfForceUnit = lbf*ft;
167
+ attribute <'lbf⋅ft/in'> 'pound-force foot per inch' : ForceUnit = lbf*ft/'in';
168
+ attribute <'lbf⋅in'> 'pound-force inch' : MomentOfForceUnit = lbf*'in';
169
+ attribute <'lbf⋅in/in'> 'pound-force inch per inch' : ForceUnit = lbf*'in'/'in';
170
+ attribute <'lbf/ft'> 'pound-force per foot' : SurfaceTensionUnit = lbf/ft;
171
+ attribute <'lbf/in'> 'pound-force per inch' : SurfaceTensionUnit = lbf/'in';
172
+ //attribute 'pound-force per pound (lbf/lb) (thrust to mass ratio)' : ThrustToMassRatioUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = N/kg; :>> conversionFactor = 9.80665E+00; } }
173
+ attribute <'lbf/ft²'> 'pound-force per square foot' : PressureUnit = lbf/ft^2;
174
+ attribute <'lbf/in²'> 'pound-force per square inch' : PressureUnit = lbf/'in'^2;
175
+ alias psi for 'lbf/in²';
176
+ attribute <'lbf⋅s/ft²'> 'pound-force second per square foot' : DynamicViscosityUnit = lbf*s/ft^2;
177
+ attribute <'lbf⋅s/in²'> 'pound-force second per square inch' : DynamicViscosityUnit = lbf*s/'in'^2;
178
+ attribute <'lb⋅in²'> 'pound inch squared' : MomentOfInertiaUnit = lb*'in'^2;
179
+ attribute <'lb/ft³'> 'pound per cubic foot' : MassDensityUnit = lb/ft^3;
180
+ attribute <'lb/in³'> 'pound per cubic inch' : MassDensityUnit = lb/'in'^3;
181
+ attribute <'lb/yd³'> 'pound per cubic yard' : MassDensityUnit = lb/yd^3;
182
+ attribute <'lb/ft'> 'pound per foot' : LinearMassDensityUnit = lb/ft;
183
+ attribute <'lb/(ft⋅h)'> 'pound per foot hour' : DynamicViscosityUnit = lb/(ft*h);
184
+ attribute <'lb/(ft⋅s)'> 'pound per foot second' : DynamicViscosityUnit = lb/(ft*s);
185
+ attribute <'lb/gal'> 'pound per gallon (US)' : MassDensityUnit = lb/gal;
186
+ //attribute <'lb/(hp⋅h)'> 'pound per horsepower hour' : FuelConsumptionUnit = lb/(hp*h);
187
+ attribute <'lb/h'> 'pound per hour' : MassFlowRateUnit = lb/h;
188
+ attribute <'lb/in'> 'pound per inch' : LinearMassDensityUnit = lb/'in';
189
+ attribute <'lb/min'> 'pound per minute' : MassFlowRateUnit = lb/min;
190
+ attribute <'lb/s'> 'pound per second' : MassFlowRateUnit = lb/s;
191
+ attribute <'lb/ft²'> 'pound per square foot' : SurfaceMassDensityUnit = lb/ft^2;
192
+ attribute <'lb/in²'> 'pound per square inch (not pound-force)' : SurfaceMassDensityUnit = lb/'in'^2;
193
+ attribute <'lb/yd'> 'pound per yard' : LinearMassDensityUnit = lb/yd;
194
+ attribute 'pound-force per square inch (psi)' : PressureUnit = lbf/'in'^2;
195
+ attribute 'quad (10^15 Btu_IT)' : EnergyUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = J; :>> conversionFactor = 1.055056E+18; :>> isExact = false; } }
196
+ attribute <dryqt> 'quart (US dry)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 1.101221E-03; :>> isExact = false; } }
197
+ attribute <liqqt> 'quart (US liquid)' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 9.463529E-04; :>> isExact = false; } }
198
+ attribute <rd> 'rod (based on US survey foot)' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 5.029210E+00; :>> isExact = false; } }
199
+ attribute <slug> 'slug' : MassUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg; :>> conversionFactor = 1.459390E+01; :>> isExact = false; } }
200
+ attribute <'slug/ft³'> 'slug per cubic foot' : MassDensityUnit = slug/ft^3;
201
+ attribute <'slug/(ft⋅s)'> 'slug per foot second' : DynamicViscosityUnit = slug/(ft*s);
202
+ attribute <'ft²'> 'square foot' : AreaUnit = ft^2;
203
+ attribute <'ft²/h'> 'square foot per hour' : KinematicViscosityUnit = ft^2/h;
204
+ attribute <'ft²/s'> 'square foot per second' : KinematicViscosityUnit = ft^2/s;
205
+ attribute <'in²'> 'square inch' : AreaUnit = 'in'^2;
206
+ attribute <'mi²'> 'square mile' : AreaUnit = mi^2;
207
+ attribute 'square mile (based on US survey foot)' : AreaUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^2; :>> conversionFactor = 2.589998E+06; :>> isExact = false; } }
208
+ attribute <'yd²'> 'square yard' : AreaUnit = yd^2;
209
+ attribute 'tablespoon' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 1.478676E-05; :>> isExact = false; } }
210
+ attribute 'teaspoon' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 4.928922E-06; :>> isExact = false; } }
211
+ attribute 'therm (EC)' : EnergyUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = J; :>> conversionFactor = 1.05506E+08; } }
212
+ attribute 'therm (US)' : EnergyUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = J; :>> conversionFactor = 1.054804E+08; } }
213
+ attribute <AT> 'ton, assay' : MassUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg; :>> conversionFactor = 2.916667E-02; :>> isExact = false; } }
214
+ attribute 'ton-force (2000 lbf)' : ForceUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = N; :>> conversionFactor = 8.896443E+03; :>> isExact = false; } }
215
+ attribute 'ton, long (2240 lb)' : MassUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg; :>> conversionFactor = 1.016047E+03; :>> isExact = false; } }
216
+ attribute 'ton, long, per cubic yard' : MassDensityUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg/m^3; :>> conversionFactor = 1.328939E+03; :>> isExact = false; } }
217
+ attribute 'ton of refrigeration (12 000 Btu_IT/h)' : PowerUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = W; :>> conversionFactor = 3.516853E+03; :>> isExact = false; } }
218
+ attribute 'ton, register' : VolumeUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m^3; :>> conversionFactor = 2.831685E+00; :>> isExact = false; } }
219
+ attribute 'ton, short (2000 lb)' : MassUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg; :>> conversionFactor = 9.071847E+02; :>> isExact = false; } }
220
+ attribute 'ton, short, per cubic yard' : MassDensityUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg/m^3; :>> conversionFactor = 1.186553E+03; :>> isExact = false; } }
221
+ attribute 'ton, short, per hour' : MassFlowRateUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = kg/s; :>> conversionFactor = 2.519958E-01; :>> isExact = false; } }
222
+ attribute 'unit pole' : MagneticFluxUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = Wb; :>> conversionFactor = 1.256637E-07; :>> isExact = false; } }
223
+ attribute <'W/in²'> 'watt per square inch' : DensityOfHeatFlowRateUnit = W/'in'^2;
224
+ attribute <yd> 'yard' : LengthUnit { :>> unitConversion: ConversionByConvention { :>> referenceUnit = m; :>> conversionFactor = 9.144E-01; } }
225
+
226
+
227
+ attribute <'°F_abs'> 'degree fahrenheit (absolute temperature scale)' : IntervalScale {
228
+ doc
229
+ /*
230
+ * degree Fahrenheit interval scale for absolute (thermodynamic) temperature quantities
231
+ *
232
+ * The interval scale is defined with an explicit transformation with respect to
233
+ * the kelvin thermodynamic temperature scale that specifies the zero shift.
234
+ */
235
+
236
+ :>> unit = '°F';
237
+ private attribute temperatureWaterAtFreezingPointInF: DefinitionalQuantityValue {
238
+ :>> num = 32.0;
239
+ :>> definition = "temperature in degree Fahrenheit of pure water at freezing point";
240
+ }
241
+ private attribute fahrenheitToCelsiusScaleMapping: QuantityValueMapping {
242
+ :>> mappedQuantityValue = temperatureWaterAtFreezingPointInF;
243
+ :>> referenceQuantityValue = '°C_abs'.temperatureWaterAtFreezingPointInC;
244
+
245
+ }
246
+ attribute :>> definitionalQuantityValues = temperatureWaterAtFreezingPointInF;
247
+ attribute :>> quantityValueMapping = fahrenheitToCelsiusScaleMapping;
248
+
249
+ /* CoordinateFramePlacement (zero shift) w.r.t. the kelvin thermodynamic temperature scale */
250
+ private attribute zeroDegreeFahrenheitInKelvin: ThermodynamicTemperatureValue = 229835/900 [K];
251
+ attribute zeroDegreeFahrenheitToKelvinShift : CoordinateFramePlacement :>> transformation {
252
+ :>> source = K; :>> origin = zeroDegreeFahrenheitInKelvin;
253
+ }
254
+ }
255
+ }
src/sysml.library/Domain Libraries/Quantities and Units/VectorCalculations.sysml ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package VectorCalculations {
2
+ doc
3
+ /*
4
+ * This package package defines calculations for the construction of and computations on VectorQuantityValues.
5
+ */
6
+
7
+ private import ScalarValues::Boolean;
8
+ private import ScalarValues::Number;
9
+ private import Quantities::ScalarQuantityValue;
10
+ private import Quantities::VectorQuantityValue;
11
+ private import MeasurementReferences::VectorMeasurementReference;
12
+ private import MeasurementReferences::CoordinateTransformation;
13
+
14
+ calc def '[' :> BaseFunctions::'[' {
15
+ in elements: Number[1..n] ordered;
16
+ in mRef: VectorMeasurementReference[1];
17
+ return quantity : VectorQuantityValue[1];
18
+ private attribute n = mRef.flattenedSize;
19
+ }
20
+
21
+ calc def isZeroVectorQuantity :> VectorFunctions::isZeroVector {
22
+ in : VectorQuantityValue[1];
23
+ return : Boolean[1];
24
+ }
25
+ calc def isUnitVectorQuantity {
26
+ in : VectorQuantityValue[1];
27
+ return : Boolean[1];
28
+ }
29
+
30
+ /* Addition and subtraction */
31
+ calc def '+' :> VectorFunctions::'+' { in : VectorQuantityValue[1]; in : VectorQuantityValue[1]; return : VectorQuantityValue[1]; }
32
+ calc def '-' :> VectorFunctions::'-' { in : VectorQuantityValue[1]; in : VectorQuantityValue[1]; return : VectorQuantityValue[1]; }
33
+
34
+ /* Multiplication and division */
35
+ calc def scalarVectorMult :> VectorFunctions::scalarVectorMult { in : Number[1]; in : VectorQuantityValue[1]; return : VectorQuantityValue[1]; }
36
+ calc def vectorScalarMult :> VectorFunctions::vectorScalarMult { in : VectorQuantityValue[1]; in : Number[1]; return : VectorQuantityValue[1]; }
37
+ calc def scalarQuantityVectorMult { in : ScalarQuantityValue[1]; in : VectorQuantityValue[1]; return : VectorQuantityValue[1]; }
38
+ calc def vectorScalarQuantityMult { in : VectorQuantityValue[1]; in : ScalarQuantityValue[1]; return : VectorQuantityValue[1]; }
39
+ calc def vectorScalarDiv :> VectorFunctions::vectorScalarDiv { in : VectorQuantityValue[1]; in : Number[1]; return : VectorQuantityValue[1]; }
40
+ calc def vectorScalarQuantityDiv { in : VectorQuantityValue[1]; in : ScalarQuantityValue[1]; return : VectorQuantityValue[1]; }
41
+ calc def inner :> VectorFunctions::inner { in : VectorQuantityValue[1]; in : VectorQuantityValue[1]; return : Number[1]; }
42
+ calc def outer { in : VectorQuantityValue[1]; in : VectorQuantityValue[1]; return : VectorQuantityValue[1]; }
43
+
44
+ alias '*' for scalarVectorMult;
45
+
46
+ /* Norm and angle */
47
+ calc def norm :> VectorFunctions::norm { in : VectorQuantityValue[1]; return : Number[1]; }
48
+ calc def angle :> VectorFunctions::angle { in : VectorQuantityValue[1]; in : VectorQuantityValue[1]; return : Number[1]; }
49
+
50
+ /* Coordinate transformation */
51
+ calc def transform {
52
+ in transformation : CoordinateTransformation;
53
+ in sourceVector : VectorQuantityValue {
54
+ :>> mRef = transformation.source;
55
+ }
56
+ return targetVector : VectorQuantityValue {
57
+ :>> mRef = transformation.target {
58
+ :>> dimensions = sourceVector.mRef.dimensions;
59
+ }
60
+ }
61
+ }
62
+ }
src/sysml.library/Domain Libraries/Requirement Derivation/DerivationConnections.sysml ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package DerivationConnections {
2
+ doc
3
+ /*
4
+ * This package provides a library model for derivation connections between requirements.
5
+ */
6
+
7
+ private import SequenceFunctions::excludes;
8
+ private import ControlFunctions::allTrue;
9
+
10
+ requirement originalRequirements[*] {
11
+ doc /* originalRequirements are the original requirements in Derivation connections. */
12
+ }
13
+ requirement derivedRequirements[*] {
14
+ doc /* derivedRequirements are the derived requirments in Derivation connections. */
15
+ }
16
+
17
+ abstract connection def Derivation {
18
+ doc
19
+ /*
20
+ * A Derivation connection asserts that one or more derivedRequirements are derived from
21
+ * a single originalRequirement. This means that any subject that satisfies the
22
+ * originalRequirement should, in itself or though other things related to it, satisfy
23
+ * each of the derivedRequirements.
24
+ *
25
+ * A connection usage typed by Derivation must have requirement usages for all its ends.
26
+ * The single end for the originalRequirement should subset originalRequirement, while
27
+ * the rest of the ends should subset derivedRequirements.
28
+ */
29
+
30
+ ref requirement :>> participant {
31
+ doc /* All the participants in a Derivation must be requirements. */
32
+ }
33
+
34
+ ref requirement originalRequirement[1] :>> originalRequirements :> participant {
35
+ doc /* The single original requirement. */
36
+ }
37
+ ref requirement :>> derivedRequirements[1..*] :> participant {
38
+ doc /* The one or more requirements that are derived from the original requirement. */
39
+ }
40
+
41
+ private assert constraint originalNotDerived {
42
+ doc /* The original requirement must not be a derived requirement. */
43
+
44
+ derivedRequirements->excludes(originalRequirement)
45
+ }
46
+
47
+ private assert constraint originalImpliesDerived {
48
+ doc
49
+ /*
50
+ * Whenever the originalRequirement is satisfied, all of the derivedRequirements must also
51
+ * be satisfied.
52
+ */
53
+
54
+ originalRequirement.result implies allTrue(derivedRequirements.result)
55
+ }
56
+ }
57
+
58
+ abstract connection derivations : Derivation[*] {
59
+ doc /* derivations is the base feature for Derivation connection usages. */
60
+ }
61
+ }
src/sysml.library/Domain Libraries/Requirement Derivation/RequirementDerivation.sysml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package RequirementDerivation {
2
+ doc /* This package provides language-extension metadata for modeling requirement derivation. */
3
+
4
+ public import DerivationConnections::*;
5
+ private import Metaobjects::SemanticMetadata;
6
+
7
+ metadata def <original> OriginalRequirementMetadata :> SemanticMetadata {
8
+ doc
9
+ /*
10
+ * OriginalRequirementMetadata identifies a usage as an original requirement.
11
+ * It is intended to be used to tag the original requirement end of a Derivation.
12
+ */
13
+
14
+ :> annotatedElement : SysML::Usage;
15
+ :>> baseType = originalRequirements meta SysML::Usage;
16
+ }
17
+
18
+ metadata def <derive> DerivedRequirementMetadata :> SemanticMetadata {
19
+ doc
20
+ /*
21
+ * DerivedRequirementMetadata identifies a usage as a derived requirement.
22
+ * It is intended to be used to tag the derived requirement ends of a Derivation.
23
+ */
24
+
25
+ :> annotatedElement : SysML::Usage;
26
+ :>> baseType = derivedRequirements meta SysML::Usage;
27
+ }
28
+
29
+ metadata def <derivation> DerivationMetadata :> SemanticMetadata {
30
+ doc
31
+ /*
32
+ * DerivationMetadata is SemanticMetadata for a Derivation connection.
33
+ */
34
+
35
+ :> annotatedElement : SysML::ConnectionDefinition;
36
+ :> annotatedElement : SysML::ConnectionUsage;
37
+ :>> baseType = derivations meta SysML::Usage;
38
+ }
39
+ }
src/sysml.library/Systems Library/Actions.sysml ADDED
@@ -0,0 +1,505 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package Actions {
2
+ doc
3
+ /*
4
+ * This package defines the base types for actions and related behavioral elements in the
5
+ * SysML language.
6
+ */
7
+
8
+ private import Base::Anything;
9
+ private import ScalarValues::Positive;
10
+ private import ScalarValues::Natural;
11
+ private import SequenceFunctions::size;
12
+ private import SequenceFunctions::isEmpty;
13
+ private import Occurrences::Occurrence;
14
+ private import Occurrences::HappensWhile;
15
+ private import Performances::Performance;
16
+ private import Performances::performances;
17
+ private import Transfers::SendPerformance;
18
+ private import Transfers::sendPerformances;
19
+ private import Transfers::AcceptPerformance;
20
+ private import Transfers::acceptPerformances;
21
+ private import FeatureReferencingPerformances::FeatureWritePerformance;
22
+ private import ControlPerformances::MergePerformance;
23
+ private import ControlPerformances::DecisionPerformance;
24
+ private import ControlPerformances::IfThenPerformance;
25
+ private import ControlPerformances::IfThenElsePerformance;
26
+ private import ControlPerformances::LoopPerformance;
27
+ private import TransitionPerformances::TransitionPerformance;
28
+ private import TransitionPerformances::NonStateTransitionPerformance;
29
+ private import Transfers::MessageTransfer;
30
+ private import Connections::MessageConnection;
31
+
32
+ abstract action def Action :> Performance {
33
+ doc
34
+ /*
35
+ * Action is the most general class of Performances of ActionDefinitions in a system or
36
+ * part of a system. Action is the base class of all ActionDefinitions.
37
+ */
38
+
39
+ ref action self: Action :>> Performance::self;
40
+ ref action incomingTransfers :>> Performance::incomingTransfers;
41
+
42
+ action start: Action :>> startShot {
43
+ doc
44
+ /*
45
+ * The starting snapshot of an Action.
46
+ */
47
+ }
48
+
49
+ action done: Action :>> endShot {
50
+ doc
51
+ /*
52
+ * The ending snapshot of an Action.
53
+ */
54
+ }
55
+
56
+ action subactions: Action[0..*] :> actions, subperformances {
57
+ doc
58
+ /*
59
+ * The subperformances of this Action that are Actions.
60
+ */
61
+
62
+ ref occurrence :>> this = (that as Action).this {
63
+ doc
64
+ /*
65
+ * The "this" reference of a subaction is always the same as that of
66
+ * its owning Action.
67
+ */
68
+ }
69
+ }
70
+
71
+ action sendSubactions: SendAction[0..*] :> subactions, sendActions {
72
+ doc
73
+ /*
74
+ * The subactions of this Action that are SendActions.
75
+ */
76
+ }
77
+
78
+ action acceptSubactions: AcceptAction[0..*] :> subactions, acceptActions {
79
+ doc
80
+ /*
81
+ * The subactions of this Action that are AcceptActions.
82
+ */
83
+ }
84
+
85
+ abstract action controls : ControlAction[0..*] :> subactions {
86
+ doc
87
+ /*
88
+ * The subactions of this Action that are ControlActions.
89
+ */
90
+ }
91
+
92
+ abstract action merges : MergeAction[0..*] :> controls {
93
+ doc
94
+ /*
95
+ * The controls of this Action that are MergeActions.
96
+ */
97
+ }
98
+
99
+ abstract action decisions : DecisionAction :> controls {
100
+ doc
101
+ /*
102
+ * The controls of this Action that are DecisionActions.
103
+ */
104
+ }
105
+
106
+ abstract action joins : JoinAction :> controls {
107
+ doc
108
+ /*
109
+ * The controls of this Action that are JoinActions.
110
+ */
111
+ }
112
+
113
+ abstract action forks : ForkAction :> controls {
114
+ doc
115
+ /*
116
+ * The controls of this Action that are ForkActions.
117
+ */
118
+ }
119
+
120
+ abstract action transitions : TransitionAction[0..*] :> subactions, transitionActions {
121
+ doc
122
+ /*
123
+ * The subactions of this Action that are TransitionActions.
124
+ */
125
+ }
126
+
127
+ abstract action decisionTransitions : DecisionTransitionAction[0..*] :> transitions {
128
+ doc
129
+ /*
130
+ * The subactions of this Action that are DecisionTransitionActions.
131
+ */
132
+ }
133
+
134
+ abstract action assignments : AssignmentAction[0..*] :> subactions, assignmentActions {
135
+ doc
136
+ /*
137
+ * The subactions of this Action that are AssignmentActions.
138
+ */
139
+ }
140
+
141
+ abstract action ifSubactions : IfThenAction[0..*] :> subactions, ifThenActions {
142
+ doc
143
+ /*
144
+ * The subactions of this Action that are IfThenActions (including IfThenElseActions).
145
+ */
146
+ }
147
+
148
+ abstract action loops : LoopAction[0..*] :> subactions, loopActions {
149
+ doc
150
+ /*
151
+ * The subactions of this Action that are LoopActions.
152
+ */
153
+ }
154
+
155
+ abstract action whileLoops : WhileLoopAction[0..*] :> loops, whileLoopActions {
156
+ doc
157
+ /*
158
+ * The loops of this Action that are WhileLoopActions.
159
+ */
160
+ }
161
+
162
+ abstract action forLoops : ForLoopAction[0..*] :> loops, forLoopActions {
163
+ doc
164
+ /*
165
+ * The loops of this Action that are ForLoopActions.
166
+ */
167
+ }
168
+ }
169
+
170
+ abstract action actions: Action[0..*] nonunique :> performances {
171
+ doc
172
+ /*
173
+ * actions is the base feature for all ActionUsages.
174
+ */
175
+ }
176
+
177
+ action def SendAction :> Action, SendPerformance {
178
+ doc
179
+ /*
180
+ * A SendAction is an Action used to type SendActionUsages. It initiates an outgoingTransferFromSelf
181
+ * from a designated sender Occurrence with a given payload, optionally to a designated receiver.
182
+ */
183
+
184
+ in payload :>> sentItem;
185
+ ref sentMessage :>> sentTransfer: MessageTransfer, MessageConnection;
186
+ }
187
+
188
+ abstract action sendActions: SendAction[0..*] nonunique :> actions, sendPerformances {
189
+ doc
190
+ /*
191
+ * sendActions is the base feature for all SendActionUsages.
192
+ */
193
+ }
194
+
195
+ action def AcceptMessageAction :> Action, AcceptPerformance {
196
+ doc
197
+ /*
198
+ * An AcceptMessageAction is an Action that identifies an incomingTransferToSelf
199
+ * of a designated receiver Occurrence, providing its payload as output.
200
+ */
201
+ inout payload :>> acceptedItem;
202
+ ref acceptedMessage :>> acceptedTransfer: MessageTransfer, MessageConnection;
203
+ }
204
+
205
+ action def AcceptAction :> AcceptMessageAction {
206
+ doc
207
+ /*
208
+ * An AcceptAction is an AcceptMessageAction used to type AcceptActionUsages that are
209
+ * not accepters for TransitionActions. It waits for a payload or message of the specified
210
+ * kind to be accepted by a nested state transition.
211
+ */
212
+ ref :>> acceptedMessage = aState.aTransition.accepter.acceptedMessage;
213
+ state aState {
214
+ transition aTransition first start accept apayload: Anything via receiver then done;
215
+ }
216
+ bind payload = aState.aTransition.apayload;
217
+ }
218
+
219
+ abstract action acceptActions: AcceptAction[0..*] nonunique :> actions, acceptPerformances {
220
+ doc
221
+ /*
222
+ * acceptActions is the base feature for standalone AcceptActionUsages.
223
+ */
224
+ }
225
+
226
+ abstract action def ControlAction :> Action {
227
+ doc
228
+ /*
229
+ * A ControlAction is the Action of a control node, which has no inherent behavior.
230
+ */
231
+
232
+ bind start = done {
233
+ doc
234
+ /*
235
+ * A ControlAction is instantaneous.
236
+ */
237
+ }
238
+ }
239
+
240
+ action def MergeAction :> ControlAction, MergePerformance {
241
+ doc
242
+ /*
243
+ * A MergeAction is the ControlAction for a merge node.
244
+ *
245
+ * Note: Incoming succession connectors to a MergeAction must have source multiplicity
246
+ * 0..1 and subset the incomingHBLink feature inherited from MergePerformance.
247
+ */
248
+ }
249
+
250
+ action def DecisionAction :> ControlAction, DecisionPerformance {
251
+ doc
252
+ /*
253
+ * A DecisionAction is the ControlAction for a decision node.
254
+ *
255
+ * Note: Outgoing succession connectors from a DecisionAction must have target multiplicity
256
+ * 0..1 and subset the outgoingHBLink feature inherited from DecisionPerformance.
257
+ * If an outgoing succession has a guard, it should have a transitionStep typed by
258
+ * DecisionTransition.
259
+ */
260
+ }
261
+
262
+ action def JoinAction :> ControlAction {
263
+ doc
264
+ /*
265
+ * A JoinAction is the ControlAction for a JoinNode.
266
+ *
267
+ * Note: Join behavior results from requiring that the source multiplicity of all
268
+ * incoming succession connectors be 1..1.
269
+ */
270
+ }
271
+
272
+ action def ForkAction :> ControlAction {
273
+ doc
274
+ /*
275
+ * A ForkAction is the ControlAction for a ForkNode.
276
+ *
277
+ * Note: Fork behavior results from requiring that the target multiplicity of all
278
+ * outgoing succession connectors be 1..1.
279
+ */
280
+ }
281
+
282
+ abstract action def TransitionAction :> Action, TransitionPerformance {
283
+ doc
284
+ /*
285
+ * A TransitionAction is a TransitionPerformance with an Action as transitionLinkSource.
286
+ * It is the base type of all TransitionUsages.
287
+ */
288
+
289
+ in transitionLinkSource : Action :>> TransitionPerformance::transitionLinkSource;
290
+ ref acceptedMessage : MessageConnection :>> trigger;
291
+
292
+ ref receiver :>> triggerTarget;
293
+
294
+ action accepter : AcceptMessageAction :>> 'accept';
295
+
296
+ bind receiver = accepter.receiver;
297
+ bind acceptedMessage = accepter.acceptedMessage;
298
+
299
+ action effect: Action :>> TransitionPerformance::effect;
300
+ }
301
+
302
+ action def DecisionTransitionAction :> TransitionAction, NonStateTransitionPerformance {
303
+ doc
304
+ /*
305
+ * A DecisionTransitionAction is a TransitionAction and NonStateTransitionPerformance that has a
306
+ * guard, but no trigger or effects. It is the base type of TransitionUsages used as
307
+ * conditional successions in action models.
308
+ */
309
+
310
+ ref action :>> accepter[0..0];
311
+ ref action :>> effect[0..0];
312
+ }
313
+
314
+ abstract action transitionActions: TransitionAction[0..*] nonunique :> actions {
315
+ doc
316
+ /*
317
+ * transitionActions is the base feature for all TransitionUsages.
318
+ */
319
+ }
320
+
321
+ action def AssignmentAction :> FeatureWritePerformance, Action {
322
+ doc
323
+ /*
324
+ * An AssignmentAction is an Action, used to type an AssignmentActionUsage. It is also a
325
+ * FeatureWritePerformance that updates the accessedFeature of its target Occurrence with
326
+ * the given replacementValues.
327
+ */
328
+
329
+ in target : Occurrence[1];
330
+ inout replacementValues : Anything[0..*] nonunique;
331
+ }
332
+
333
+ abstract action assignmentActions : AssignmentAction[0..*] nonunique :> actions {
334
+ doc
335
+ /*
336
+ * assignmentActions is the base feature for all AssignmentActionsUsages.
337
+ */
338
+
339
+ in :>> target : Occurrence[1] default that as Occurrence {
340
+ doc
341
+ /*
342
+ * The default target for assignmentActions is its featuring instance (if that is
343
+ * an Occurrence).
344
+ */
345
+ }
346
+ }
347
+
348
+ action def IfThenAction :> Action, IfThenPerformance {
349
+ doc
350
+ /*
351
+ * An IfThenAction is a Kernel IfThenPerformance that is also an Action.
352
+ * It is the base type for all IfActionUsages.
353
+ */
354
+
355
+ in :>> ifTest[1];
356
+ in action :>> thenClause[0..1];
357
+ }
358
+
359
+ action def IfThenElseAction :> IfThenAction, IfThenElsePerformance {
360
+ doc
361
+ /*
362
+ * An IfThenElseAction is a Kernel IfThenElsePeformance that is also an IfThenAction.
363
+ * It is the base type for all IfActionUsages that have an elseAction.
364
+ */
365
+
366
+ in :>> ifTest[1];
367
+ in action :>> thenClause[0..1];
368
+ in action :>> elseClause[0..1];
369
+ }
370
+
371
+ abstract action ifThenActions : IfThenAction[0..*] nonunique :> actions {
372
+ doc
373
+ /*
374
+ * ifThenActions is the base feature for all IfActionUsages.
375
+ */
376
+ }
377
+
378
+ abstract action ifThenElseActions : IfThenElseAction[0..*] nonunique :> actions {
379
+ doc
380
+ /*
381
+ * ifThenElseActions is the base feature for all IfActionUsages that have an elseAction.
382
+ */
383
+ }
384
+
385
+ abstract action def LoopAction :> Action {
386
+ doc
387
+ /*
388
+ * A LoopAction is the base type for all LoopActionUsages.
389
+ */
390
+
391
+
392
+ in action body[0..*] {
393
+ doc
394
+ /*
395
+ * The action that is performed repeatedly in the loop.
396
+ */
397
+ }
398
+ }
399
+
400
+ action def WhileLoopAction :> LoopAction, LoopPerformance {
401
+ doc
402
+ /*
403
+ * A WhileLoopAction is a Kernel LoopPerformance that is also a LoopAction.
404
+ * It is the base type for all WhileLoopActionUsages.
405
+ */
406
+
407
+ in :>> whileTest default {true} {
408
+ doc
409
+ /*
410
+ * A Boolean expression that must be true for the loop to continue.
411
+ * It is evaluated before the body is performed and is always evaluated at
412
+ * least once.
413
+ */
414
+ }
415
+
416
+ in action body :>> LoopAction::body, LoopPerformance::body {
417
+ doc
418
+ /*
419
+ * The action that is performed while the whileTest is true and the
420
+ * untilTest is false.
421
+ */
422
+ }
423
+
424
+ in :>> untilTest default {false} {
425
+ doc
426
+ /*
427
+ * A Boolean expression that must be false for the loop to continue.
428
+ * It is evaluated after the body is performed.
429
+ */
430
+ }
431
+ }
432
+
433
+ private abstract action def ForLoopActionBase :> LoopAction {
434
+ in action body;
435
+ in ref seq[0..*] ordered nonunique;
436
+ }
437
+
438
+ action def ForLoopAction :> ForLoopActionBase {
439
+ doc
440
+ /*
441
+ * A ForLoopAction is a LoopAction that iterates over an ordered sequence of values.
442
+ * It is the base type for all ForLoopActionUsages.
443
+ */
444
+
445
+ protected ref var[0..1] :> seq {
446
+ doc
447
+ /*
448
+ * The loop variable that is assigned successive elements of seq on each
449
+ * iteration of the loop.
450
+ */
451
+ }
452
+
453
+ in ref :>> seq {
454
+ doc
455
+ /*
456
+ * The sequence of values over which the loop iterates.
457
+ */
458
+ }
459
+
460
+ in action :>> body {
461
+ doc
462
+ /*
463
+ * The action that is performed on each iteration of the loop.
464
+ */
465
+ }
466
+
467
+ private attribute index : Positive {
468
+ doc
469
+ /*
470
+ * The index of the element of seq assigned to var on the current iteration
471
+ * of the loop.
472
+ */
473
+ }
474
+
475
+ private action initialization
476
+ assign index := 1;
477
+ then private action whileLoop
478
+ while index <= size(seq) {
479
+ assign var := seq#(index);
480
+ then perform body;
481
+ then assign index := index + 1;
482
+ }
483
+ }
484
+
485
+ abstract action loopActions : LoopAction[0..*] nonunique :> actions {
486
+ doc
487
+ /*
488
+ * loopActions is the base feature for all LoopActionUsages.
489
+ */
490
+ }
491
+
492
+ abstract action whileLoopActions : WhileLoopAction[0..*] nonunique :> loopActions {
493
+ doc
494
+ /*
495
+ * whileLoopActions is the base feature for all WhileLoopActionUsages.
496
+ */
497
+ }
498
+
499
+ abstract action forLoopActions : ForLoopAction[0..*] nonunique :> loopActions {
500
+ doc
501
+ /*
502
+ * forLoopActions is the base feature for all ForLoopActionUsages.
503
+ */
504
+ }
505
+ }
src/sysml.library/Systems Library/Allocations.sysml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package Allocations {
2
+ doc
3
+ /*
4
+ * This package defines the base types for allocations and related structural elements
5
+ * in the SysML language.
6
+ */
7
+
8
+ private import Base::Anything;
9
+ private import Connections::*;
10
+
11
+ allocation def Allocation :> BinaryConnection {
12
+ doc
13
+ /*
14
+ * Allocation is the most general class of allocation, represented as a connection
15
+ * between the source of the allocation and the target. Allocation is the base type
16
+ * of all AllocationDefinitions.
17
+ */
18
+
19
+ end source: Anything[0..*] :>> BinaryConnection::source;
20
+ end target: Anything[0..*] :>> BinaryConnection::target;
21
+ }
22
+
23
+ abstract allocation allocations: Allocation[0..*] nonunique :> binaryConnections {
24
+ doc
25
+ /*
26
+ * allocations is the base feature of all AllocationUsages.
27
+ */
28
+ }
29
+ }
src/sysml.library/Systems Library/AnalysisCases.sysml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package AnalysisCases {
2
+ doc
3
+ /*
4
+ * This package defines the base types for analysis cases and related behavioral elements
5
+ * in the SysML language.
6
+ */
7
+
8
+ private import Performances::Evaluation;
9
+ private import Performances::evaluations;
10
+ private import Calculations::Calculation;
11
+ private import Cases::Case;
12
+ private import Cases::cases;
13
+
14
+ abstract analysis def AnalysisCase :> Case {
15
+ doc
16
+ /*
17
+ * AnalysisCase is the most general class of performances of AnalysisCaseDefinitions.
18
+ * AnalysisCase is the base class of all AnalysisCaseDefinitions.
19
+ */
20
+
21
+ ref analysis self : AnalysisCase :>> Case::self;
22
+ subject subj :>> Case::subj;
23
+
24
+ abstract analysis subAnalysisCases : AnalysisCase[0..*] :> analysisCases, subcases {
25
+ doc
26
+ /*
27
+ * Other AnalysisCases carried out as part of the performance of this AnalysisCase.
28
+ */
29
+ }
30
+ }
31
+
32
+ abstract analysis analysisCases : AnalysisCase[0..*] nonunique :> cases {
33
+ doc
34
+ /*
35
+ * analysisCases is the base feature of all AnalysisCaseUsages.
36
+ */
37
+ }
38
+ }
src/sysml.library/Systems Library/Attributes.sysml ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package Attributes {
2
+ doc
3
+ /*
4
+ * This package defines the base types for attributes and related structural elements
5
+ * in the SysML language.
6
+ */
7
+
8
+ private import Base::DataValue;
9
+ private import Base::dataValues;
10
+
11
+ alias AttributeValue for DataValue {
12
+ doc
13
+ /*
14
+ * AttributeValue is the most general type of data values that represent qualities or characteristics
15
+ * of a system or part of a system. AttributeValue is the base type of all AttributeDefinitions.
16
+ */
17
+ }
18
+
19
+ alias attributeValues for dataValues {
20
+ doc
21
+ /*
22
+ * attributeValues is the base feature for all AttributeUsages.
23
+ */
24
+ }
25
+ }
src/sysml.library/Systems Library/Calculations.sysml ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package Calculations {
2
+ doc
3
+ /*
4
+ * This package defines the base types for calculations and related behavioral elements in the
5
+ * SysML language.
6
+ */
7
+
8
+ private import Performances::Evaluation;
9
+ private import Performances::evaluations;
10
+ private import Actions::Action;
11
+ private import Actions::actions;
12
+
13
+ abstract calc def Calculation :> Action, Evaluation {
14
+ doc
15
+ /*
16
+ * Calculation is the most general class of evaluations of CalculationDefinitions in a
17
+ * system or part of a system. Calculation is the base class of all CalculationDefinitions.
18
+ */
19
+
20
+ ref calc self: Calculation :>> Action::self, Evaluation::self;
21
+
22
+ abstract calc subcalculations: Calculation :> calculations, subactions {
23
+ doc
24
+ /*
25
+ * The subactions of this Calculation that are Calculations.
26
+ */
27
+ }
28
+
29
+ }
30
+
31
+ abstract calc calculations: Calculation[0..*] nonunique :> actions, evaluations {
32
+ doc
33
+ /*
34
+ * calculations is the base Feature for all CalculationUsages.
35
+ */
36
+ }
37
+ }
src/sysml.library/Systems Library/Cases.sysml ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package Cases {
2
+ doc
3
+ /*
4
+ * This package defines the base types for cases and related behavioral elements
5
+ * in the SysML language.
6
+ */
7
+
8
+ private import Base::Anything;
9
+ private import Requirements::RequirementCheck;
10
+ private import Calculations::Calculation;
11
+ private import Calculations::calculations;
12
+ private import Parts::Part;
13
+ private import Parts::parts;
14
+
15
+ abstract case def Case :> Calculation {
16
+ doc
17
+ /*
18
+ * Case is the most general class of performances of CaseDefinitions.
19
+ * Case is the base class of all CaseDefinitions.
20
+ */
21
+
22
+ ref case self : Case :>> Calculation::self;
23
+
24
+ subject subj : Anything[1] {
25
+ doc
26
+ /*
27
+ * The subject that was investigated by this Case.
28
+ */
29
+ }
30
+
31
+ ref part actors : Part[0..*] :> parts {
32
+ doc
33
+ /*
34
+ * The Parts that fill the role of actors for this Case.
35
+ * (Note: This is not itself an actor parameter, because specific actor
36
+ * parameters will be added for specific Cases.)
37
+ */
38
+ }
39
+
40
+ objective obj : RequirementCheck[1] {
41
+ doc
42
+ /*
43
+ * A check of whether the objective RequirementUsage was satisfied for this Case.
44
+ */
45
+
46
+ subject subj default Case::result;
47
+ }
48
+
49
+ return ref result[0..*] {
50
+ doc
51
+ /*
52
+ * The result determined by the case, which should satisfy the case objective.
53
+ */
54
+ }
55
+
56
+ abstract case subcases : Case[0..*] :> cases, subcalculations {
57
+ doc
58
+ /*
59
+ * Other Cases carried out as part of the performance of this Case.
60
+ */
61
+ }
62
+
63
+ }
64
+
65
+ abstract case cases : Case[0..*] nonunique :> calculations {
66
+ doc
67
+ /*
68
+ * cases is the base Feature of all CaseUsages.
69
+ */
70
+ }
71
+ }
src/sysml.library/Systems Library/Connections.sysml ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package Connections {
2
+ doc
3
+ /*
4
+ * This package defines the base types for connections and related structural elements
5
+ * in the SysML language.
6
+ */
7
+
8
+ private import Base::Anything;
9
+ private import Occurrences::Occurrence;
10
+ private import Occurrences::HappensDuring;
11
+ private import Objects::LinkObject;
12
+ private import Objects::linkObjects;
13
+ private import Objects::BinaryLinkObject;
14
+ private import Objects::binaryLinkObjects;
15
+ private import Transfers::Transfer;
16
+ private import Transfers::transfers;
17
+ private import Transfers::FlowTransfer;
18
+ private import Transfers::flowTransfers;
19
+ private import Transfers::FlowTransferBefore;
20
+ private import Transfers::flowTransfersBefore;
21
+ private import ScalarValues::Natural;
22
+ private import Parts::Part;
23
+ private import Parts::parts;
24
+ private import Actions::Action;
25
+ private import Actions::actions;
26
+
27
+ abstract connection def Connection :> LinkObject, Part {
28
+ doc
29
+ /*
30
+ * Connection is the most general class of links between things within some
31
+ * containing structure. Connection is the base type of all ConnectionDefinitions.
32
+ */
33
+ }
34
+
35
+ abstract connection def BinaryConnection :> Connection, BinaryLinkObject {
36
+ doc
37
+ /*
38
+ * BinaryConnection is the most general class of binary links between two things
39
+ * within some containing structure. BinaryConnection is the base type of all
40
+ * ConnectionDefinitions with exactly two ends.
41
+ */
42
+
43
+ end source: Anything[0..*] :>> BinaryLinkObject::source;
44
+ end target: Anything[0..*] :>> BinaryLinkObject::target;
45
+ }
46
+
47
+ abstract flow def MessageConnection :> BinaryConnection, Transfer, Action {
48
+ doc
49
+ /*
50
+ * MessageConnection is the class of binary connections that represent a transfer
51
+ * of objects or values between two occurrences. It is the base type of all
52
+ * FlowConnectionDefinitions.
53
+ */
54
+
55
+ end occurrence source: Occurrence[0..*] :>> BinaryConnection::source, Transfer::source;
56
+ end occurrence target: Occurrence[0..*] :>> BinaryConnection::target, Transfer::target;
57
+
58
+ ref payload :>> 'item';
59
+
60
+ private ref part thisConnection = self;
61
+
62
+ in event occurrence sourceEvent [1] default thisConnection.start {
63
+ doc
64
+ /*
65
+ * An occurrence happening during the source of this flow connection
66
+ * that is either the start of the connection or happens before it.
67
+ */
68
+ }
69
+ in event occurrence targetEvent [1] default thisConnection.done {
70
+ doc
71
+ /*
72
+ * An occurrence happening during the target of this flow connection
73
+ * that is either the end of the connection or happens after it.
74
+ */
75
+ }
76
+
77
+ connection :HappensDuring connect sourceEvent to source[1];
78
+ connection :HappensDuring connect targetEvent to target[1];
79
+
80
+ private attribute seBeforeNum: Natural[1] = if sourceEvent==thisConnection.start ? 0 else 1;
81
+ private attribute teAfterNum: Natural[1] = if targetEvent==thisConnection.done ? 0 else 1;
82
+ succession [seBeforeNum] first sourceEvent[0..1] then self[0..1];
83
+ succession [teAfterNum] first self[0..1] then targetEvent[0..1];
84
+ }
85
+
86
+ abstract flow def FlowConnection :> MessageConnection, FlowTransfer {
87
+ doc
88
+ /*
89
+ * FlowConnection is the subclass of message connections that a alsow flow transfers.
90
+ * It is the base type for FlowConnectionUsages that identify their source output and
91
+ * target input.
92
+ */
93
+
94
+ end occurrence source: Occurrence[0..*] :>> MessageConnection::source, FlowTransfer::source;
95
+ end occurrence target: Occurrence[0..*] :>> MessageConnection::target, FlowTransfer::target;
96
+ }
97
+
98
+ abstract flow def SuccessionFlowConnection :> FlowConnection, FlowTransferBefore {
99
+ doc
100
+ /*
101
+ * SuccessionFlowConnection is the subclass of flow connections that represent
102
+ * temporally ordered transfers. It is the base type for all SuccessionFlowConnectionUsages.
103
+ */
104
+
105
+ end occurrence source: Occurrence[0..*] :>> FlowConnection::source, FlowTransferBefore::source;
106
+ end occurrence target: Occurrence[0..*] :>> FlowConnection::target, FlowTransferBefore::target;
107
+ }
108
+
109
+ abstract connection connections: Connection[0..*] nonunique :> linkObjects, parts {
110
+ doc
111
+ /*
112
+ * connections is the base feature of all ConnectionUsages.
113
+ */
114
+ }
115
+
116
+ abstract connection binaryConnections: Connection[0..*] nonunique :> connections, binaryLinkObjects {
117
+ doc
118
+ /*
119
+ * binaryConnections is the base feature of all binary ConnectionUsages.
120
+ */
121
+ }
122
+
123
+ abstract message messageConnections: MessageConnection[0..*] nonunique :> binaryConnections, transfers, actions {
124
+ doc
125
+ /*
126
+ * messageConnections is the base feature of all FlowConnectionUsages.
127
+ */
128
+
129
+ end occurrence source: Occurrence[0..*] :>> MessageConnection::source, binaryConnections::source, transfers::source;
130
+ end occurrence target: Occurrence[0..*] :>> MessageConnection::target, binaryConnections::target, transfers::target;
131
+ }
132
+
133
+ abstract message flowConnections: FlowConnection[0..*] nonunique :> messageConnections, flowTransfers {
134
+ doc
135
+ /*
136
+ * flowConnections is the base feature of all FlowConnectionUsages that identify their source output
137
+ * and target input.
138
+ */
139
+
140
+ end occurrence source: Occurrence[0..*] :>> FlowConnection::source, messageConnections::source, flowTransfers::source;
141
+ end occurrence target: Occurrence[0..*] :>> FlowConnection::target, messageConnections::target, flowTransfers::target;
142
+ }
143
+
144
+ abstract message successionFlowConnections: SuccessionFlowConnection[0..*] nonunique :> flowConnections, flowTransfersBefore {
145
+ doc
146
+ /*
147
+ * successionFlowConnections is the base feature of all SuccessionFlowConnectionUsages.
148
+ */
149
+
150
+ end occurrence source: Occurrence[0..*] :>> SuccessionFlowConnection::source, flowConnections::source, flowTransfersBefore::source;
151
+ end occurrence target: Occurrence[0..*] :>> SuccessionFlowConnection::target, flowConnections::target, flowTransfersBefore::target;
152
+ }
153
+ }
src/sysml.library/Systems Library/Constraints.sysml ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package Constraints {
2
+ doc
3
+ /*
4
+ * This package defines the base types for constraints and related elements in the
5
+ * SysML language.
6
+ */
7
+
8
+ private import Performances::BooleanEvaluation;
9
+ private import Performances::booleanEvaluations;
10
+ private import Performances::trueEvaluations;
11
+ private import Performances::falseEvaluations;
12
+
13
+ abstract constraint def ConstraintCheck :> BooleanEvaluation {
14
+ doc
15
+ /*
16
+ * ConstraintCheck is the most general class for constraint checking. ConstraintCheck is the base
17
+ * type of all ConstraintDefinitions.
18
+ */
19
+
20
+ ref constraint self: ConstraintCheck :>> BooleanEvaluation::self;
21
+ }
22
+
23
+ abstract constraint constraintChecks: ConstraintCheck[0..*] nonunique :> booleanEvaluations {
24
+ doc
25
+ /*
26
+ * constraintChecks is the base feature of all ConstraintUsages.
27
+ */
28
+ }
29
+
30
+ abstract constraint assertedConstraintChecks :> constraintChecks, trueEvaluations {
31
+ doc
32
+ /*
33
+ * assertedConstraintChecks is the subset of constraintChecks for ConstraintChecks asserted to be true.
34
+ */
35
+ }
36
+
37
+ abstract constraint negatedConstraintChecks :> constraintChecks, falseEvaluations {
38
+ doc
39
+ /*
40
+ * negatedConstraintChecks is the subset of constraintChecks for ConstraintChecks asserted to be false.
41
+ */
42
+ }
43
+
44
+ }
src/sysml.library/Systems Library/Interfaces.sysml ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package Interfaces {
2
+ doc
3
+ /*
4
+ * This package defines the base types for interfaces and related structural elements in the SysML language.
5
+ */
6
+
7
+ private import Connections::Connection;
8
+ private import Connections::connections;
9
+ private import Connections::BinaryConnection;
10
+ private import Connections::binaryConnections;
11
+ private import Ports::Port;
12
+
13
+ abstract interface def Interface :> Connection {
14
+ doc
15
+ /*
16
+ * Interface is the most general class of links between Ports on Parts
17
+ * within some containing structure. Interface is the base type of all
18
+ * InterfaceDefinitions.
19
+ */
20
+ }
21
+
22
+ abstract interface def BinaryInterface :> Interface, BinaryConnection {
23
+ doc
24
+ /*
25
+ * BinaryInterface is the most general class of links between two Ports
26
+ * on Parts within some containing structure. BinaryInterface is the base
27
+ * type of all binary InterfaceDefinitions with exactly two ends.
28
+ */
29
+
30
+ end source: Port[0..*] :>> BinaryConnection::source;
31
+ end target: Port[0..*] :>> BinaryConnection::target;
32
+ }
33
+
34
+ abstract interface interfaces: Interface[0..*] nonunique :> connections {
35
+ doc
36
+ /*
37
+ * interfaces is the base feature of all InterfaceUsages.
38
+ */
39
+ }
40
+
41
+ abstract interface binaryInterfaces: BinaryInterface[0..*] nonunique :> interfaces, binaryConnections {
42
+ doc
43
+ /*
44
+ * interfaces is the base feature of all binary InterfaceUsages.
45
+ */
46
+ }
47
+
48
+ }
src/sysml.library/Systems Library/Items.sysml ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package Items {
2
+ doc
3
+ /*
4
+ * This package defines the base types for items and related structural elements in the
5
+ * SysML language.
6
+ */
7
+
8
+ private import Objects::Object;
9
+ private import Objects::objects;
10
+ private import Parts::Part;
11
+ private import Parts::parts;
12
+ private import Occurrences::HappensWhile;
13
+ private import Occurrences::JustOutsideOf;
14
+ private import Objects::StructuredSpaceObject;
15
+ private import Constraints::ConstraintCheck;
16
+ private import Constraints::constraintChecks;
17
+ private import CollectionFunctions::contains;
18
+ private import SequenceFunctions::isEmpty;
19
+ private import SequenceFunctions::notEmpty;
20
+ private import SequenceFunctions::includes;
21
+ private import SequenceFunctions::union;
22
+ private import ControlFunctions::forAll;
23
+
24
+ abstract item def Item :> Object {
25
+ doc
26
+ /*
27
+ * Item is the most general class of objects that are part of, exist in or flow through a system.
28
+ * Item is the base type of all ItemDefinitions.
29
+ */
30
+
31
+ ref self: Item :>> Object::self;
32
+
33
+ item start: Item :>> startShot;
34
+ item done: Item :>> endShot;
35
+
36
+ item shape : Item :>> spaceBoundary {
37
+ doc
38
+ /*
39
+ * The shape of an Item is its spatial boundary.
40
+ */
41
+ }
42
+
43
+ item envelopingShapes : Item[0..*] {
44
+ doc
45
+ /*
46
+ * Each enveloping shape is the shape of an Item that spacially overlaps this Item for its
47
+ * entire lifetime.
48
+ */
49
+
50
+ /* Enables two dimensional items to be enveloped by two or three dimensional shapes. */
51
+ attribute :>> innerSpaceDimension =
52
+ if (that as Item).innerSpaceDimension == 3 | (that as Item).outerSpaceDimension == 3? 2
53
+ else (that as Item).outerSpaceDimension - 1 {
54
+ doc
55
+ /*
56
+ * Enables two dimensional items to be enveloped by two or three dimensional shapes.
57
+ */
58
+ }
59
+ assert constraint { (that as Item).innerSpaceDimension < 3 implies notEmpty(outerSpaceDimension) }
60
+
61
+ item envelopingItem [1];
62
+
63
+ assert constraint {
64
+ doc
65
+ /*
66
+ * This constraint prevents an envelopingShape frombeing a portion.
67
+ */
68
+
69
+ envelopingItem.shape.spaceTimeCoincidentOccurrences->includes(that) and
70
+ envelopingItem.spaceTimeEnclosedOccurrences->includes(that.that)
71
+ }
72
+ }
73
+
74
+ item boundingShapes : StructuredSpaceObject [0..*] :> envelopingShapes {
75
+ doc
76
+ /*
77
+ * envelopingShapes that are structured space objects with every face or every edge
78
+ * intersecting this Item.
79
+ */
80
+
81
+ item boundingShape: Item :>> self;
82
+
83
+ item :>> faces {
84
+ item face :>> self;
85
+ item inter [1];
86
+ assert constraint { contains(inter.intersectionsOf, union(face, boundingShape)) }
87
+ }
88
+ item :>> edges {
89
+ item edge :>> self;
90
+ item inter [1];
91
+ assert constraint { isEmpty(faces) implies
92
+ contains(inter.intersectionsOf, union(edge, boundingShape)) }
93
+ }
94
+ }
95
+
96
+ item voids :>> innerSpaceOccurrences [0..*] {
97
+ doc
98
+ /*
99
+ * Voids are inner space occurrences of this Item.
100
+ */
101
+ }
102
+
103
+ attribute isSolid = isEmpty(voids) {
104
+ doc
105
+ /*
106
+ * An Item is solid if it has no voids.
107
+ */
108
+ }
109
+
110
+ abstract item subitems: Item[0..*] :> items, subobjects {
111
+ doc
112
+ /*
113
+ * The Items that are composite subitems of this Item.
114
+ */
115
+ }
116
+
117
+ abstract part subparts: Part[0..*] :> subitems, parts {
118
+ doc
119
+ /*
120
+ * The subitems of this Item that are Parts.
121
+ */
122
+ }
123
+
124
+ abstract constraint checkedConstraints: ConstraintCheck[0..*] :> constraintChecks, ownedPerformances {
125
+ doc
126
+ /*
127
+ * Constraints that have been checked by this Item.
128
+ */
129
+ }
130
+ }
131
+
132
+ connection def Touches :> JustOutsideOf, HappensWhile {
133
+ doc
134
+ /*
135
+ * Touching items are just outside each other and happen at the same time.
136
+ */
137
+
138
+ end item touchedItemToo [0..*] :>> separateSpaceToo, thisOccurrence;
139
+ end item touchedItem [0..*] :>> separateSpace, thatOccurrence;
140
+ }
141
+
142
+ abstract item items : Item[0..*] nonunique :> objects {
143
+ doc
144
+ /*
145
+ * items is the base feature of all ItemUsages.
146
+ */
147
+ }
148
+
149
+ }
src/sysml.library/Systems Library/Metadata.sysml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ standard library package Metadata {
2
+ doc
3
+ /*
4
+ * This package defines the base types for metadata definitions and related
5
+ * metadata annotations in the SysML language.
6
+ */
7
+
8
+ private import Metaobjects::Metaobject;
9
+ private import Metaobjects::metaobjects;
10
+ private import Items::Item;
11
+ private import Items::items;
12
+
13
+ abstract metadata def MetadataItem :> Metaobject, Item {
14
+ doc
15
+ /*
16
+ * MetadataItem is the most general class of Items that represent Metaobjects.
17
+ * MetadataItem is the base type of all MetadataDefinitions.
18
+ */
19
+ }
20
+
21
+ abstract item metadataItems : MetadataItem[0..*] :> metaobjects, items {
22
+ doc
23
+ /*
24
+ * metadataItems is the base feature of all MetadataUsages.
25
+ *
26
+ * Note: It is not itself a MetadataUsage, because it is not being used as an
27
+ * AnnotatingElement here.
28
+ */
29
+ }
30
+ }