1 -- Created on: 1994-02-08
2 -- Created by: Gilles DEBARBOUILLE
3 -- Copyright (c) 1994-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
19 ---Purpose: The Quantities component deals with
20 -- mathematical and physical quantities.
21 -- A mathematical quantity is characterized by its value. It is a real value.
22 -- A physical quantity is characterized by:
23 -- - its value, which is also a real value, and
24 -- - the unit in which it is expressed. This unit may
25 -- be either an international unit complying with
26 -- the International Unit System (SI) or a user
27 -- defined unit. The unit is managed by the
28 -- physical quantity user.
29 -- Each mathematical or physical quantity is
30 -- described by its name. This ensures distinction
31 -- between two different quantities.
32 -- Moreover, both physical and mathematical
33 -- quantities are also manipulated as real values:
34 -- - They are defined as aliases of reals, so all
35 -- functions provided by the Standard_Real
36 -- class are available on each quantity.
37 -- - You may also mix several physical quantities
38 -- in a mathematical or physical formula involving real values.
39 -- Associated with the physical quantities, a range
40 -- of functions provides tools to manage unit conversions.
41 -- The physical quantities described in this chapter
42 -- are commonly used basic physical quantities.
43 -- Nevertheless, the Quantity package includes all
44 -- physical quantities you may require.
45 -- The Quantities component also provides
46 -- resources to manage time information (dates and
47 -- periods) and color definition.
53 -------------------------------
54 -------------------------------
56 alias Scalaire is Real;
57 ---Purpose: Mathematical quantities.
59 alias Parameter is Real;
61 ---Category: Mathematical quantities.
63 alias Quotient is Real;
65 ---Category: Mathematical quantities.
69 ---Category: Mathematical quantities.
71 alias Coefficient is Real;
73 ---Category: Mathematical quantities.
77 ---Category: Mathematical quantities.
81 ---Category: Mathematical quantities.
83 alias Constant is Real;
85 ---Category: Mathematical quantities.
87 alias Content is Real;
89 ---Category: Mathematical quantities.
93 ---Category: Mathematical quantities.
95 alias Normality is Real;
96 ---Category: Mathematical quantities.
103 -- Defined as a quantity of matter. Gives rise to the
104 -- inertial and gravitational properties of a body.
105 -- It is measured in kilograms.
106 ---Category: Physical quantities.
108 alias PlaneAngle is Real;
110 -- Defined as a difference in direction.
111 -- It is measured in radians.
112 ---Category: Physical quantities.
114 alias SolidAngle is Real;
116 -- Defined as an angle formed by three or more planes.
117 -- It is measured in steradians.
118 ---Category: Physical quantities.
120 alias Length is Real;
122 -- Defined as spatial extension.
123 -- It is measured in metres.
124 ---Category: Physical quantities.
128 -- Defined as superficial extension.
129 -- It is measured in square metres.
130 ---Category: Physical quantities.
132 alias Volume is Real;
134 -- Defined as an extension in three dimensions.
135 -- It is measured in cubic metres.
136 ---Category: Physical quantities.
140 -- Defined as distance covered per unit time.
141 -- It is measured in metres per second.
142 ---Category: Physical quantities.
144 alias Velocity is Real;
146 -- Defined as distance covered per unit time in a
147 -- given direction. It is a vector quantity.
148 -- It is measured in metres per second.
149 ---Category: Physical quantities.
151 alias Acceleration is Real;
153 -- Defined as the change of velocity per unit time.
154 -- It is a vector quantity.
155 -- It is measured in metres per second per second.
156 ---Category: Physical quantities.
158 alias AngularVelocity is Real;
160 -- Defined as the rate at which a body moves around an axis.
161 -- It is quantified as change in direction per unit time.
162 -- It is measured in radians per second.
163 ---Category: Physical quantities.
165 alias Frequency is Real;
167 -- Defined as the number of oscillations per unit time.
168 -- It is measured in cycles per second.
169 ---Category: Physical quantities.
171 alias Temperature is Real;
173 -- Defined as a measure of the average kinetic energy
174 -- of the molecules in a body.
175 -- It is measured in degrees kelvin.
176 ---Category: Physical quantities.
178 alias AmountOfSubstance is Real;
180 -- Defined as a dimensionless quantity proportional to
181 -- the number of specified particles of a substance.
182 -- Amount of substance is measured in moles.
183 -- For all substances the number of molecules in a mole
184 -- is given by Avogadro's Constant.
185 ---Category: Physical quantities.
187 alias Density is Real;
189 -- Defined as mass per unit volume.
190 -- It is measured in kilograms per cubic metre.
191 ---Category: Physical quantities.
193 alias MassFlow is Real;
195 -- Defined as mass per unit time.
196 -- It is measured in kilograms per second.
197 ---Category: Physical quantities.
199 alias VolumeFlow is Real;
201 -- Defined as volume per unit time.
202 -- It is measured in cubic metres per second.
203 ---Category: Physical quantities.
205 alias Consumption is Real;
207 -- Defined as a measure of fuel used per unit distance
208 -- travelled, or distance travelled per unit of fuel.
209 -- It is measured in litres per 100 kilometres or in
210 -- miles per gallon (UK or US).
211 ---Category: Physical quantities.
213 alias Momentum is Real;
215 -- Defined as the product of mass and velocity.
216 -- It is a vector quantity.
217 -- It is measured in kilogram-metres per second.
218 ---Category: Physical quantities.
220 alias KineticMoment is Real;
222 -- Defined as the product of momentum of a body
223 -- and the distance of its centre of gravity from an axis.
224 -- It is measured in kilogram-square-metres per second.
225 ---Category: Physical quantities.
227 alias MomentOfInertia is Real;
229 -- Defined as the product of the mass of a body
230 -- and the square of the distance of its centre of gravity
232 -- It is measured in kilogram-square-metres.
233 ---Category: Physical quantities.
237 -- Defined as the product of the mass of a body
238 -- and the acceleration that the force produces.
239 -- It is a vector quantity.
240 -- It is measured in newtons.
241 ---Category: Physical quantities.
243 alias MomentOfAForce is Real;
245 -- Defined as the product of a force and the
246 -- perpendicular distance to an axis.
247 -- It is measured in newtons x metres.
248 ---Category: Physical quantities.
250 alias Torque is Real;
252 -- Defined as the product of a force and the
253 -- perpendicular distance to an axis or as the
254 -- the product of a force couple.
255 -- It is measured in newtons x metres.
256 ---Category: Physical quantities.
258 alias Weight is Real;
260 -- Defined as the force of gravitation acting on a body
261 -- near to the surface of the Earth or other planet.
262 -- It is quantified as the product of the mass of the body
263 -- and the local value of the acceleration of free fall.
264 -- It is measured in newtons.
265 ---Category: Physical quantities.
267 alias Pressure is Real;
269 -- Defined as the force perpendicular to a
270 -- unit area. In a fluid it is defined as the product
271 -- of the depth, density, and free fall acceleration.
272 -- It is measured in pascals (newtons per square metre).
273 ---Category: Physical quantities.
275 alias Viscosity is Real;
277 -- Defined as the resistance to flow in a fluid.
278 -- It is quantified as the product of pressure
279 -- and time. For a liquid it generally decreases with
280 -- temperature; for a gas it increases.
281 -- It is measured in pascal-seconds.
282 ---Category: Physical quantities.
284 alias KinematicViscosity is Real;
286 -- Defined as the ratio of the dynamic viscosity
287 -- to the fluid density. Used in modifying the motion of a
288 -- perfect fluid to include terms due to a real fluid.
289 -- It is quantified as area per unit time.
290 -- It is measured in square metres per second.
291 ---Category: Physical quantities.
293 alias Energy is Real;
295 -- Defined as the capacity of a system to do work.
296 -- In mechanical terms this can be quantified as the
297 -- product of a force and a distance moved by its point of
299 -- In kinetic terms it is the product of half the mass
300 -- and the square of the speed .
301 -- In a rotating system it is the product of half the
302 -- moment of inertia and the square of the angular velocity.
303 -- In potential terms it is the product of a mass,
304 -- a height, and the free fall acceleration.
305 -- In molecular terms it is the sum of the kinetic and
306 -- potential energies of the molecules.
307 -- In electric terms it is the product of charge and
308 -- the electric potential traversed.
309 -- In relativistic terms it is the difference between
310 -- the observed mass and the rest mass of a body multiplied
311 -- by the square of the speed of light.
312 -- It is measured in joules (newton-metres).
313 ---Category: Physical quantities.
317 -- In mechanics, the product of a force and the distance
318 -- moved. In a rotating system, the product of the torque
319 -- and the angular displacement. In a pressure system,
320 -- the product of the pressure and the change in volume.
321 -- In electrical terms, the product of a charge and the
322 -- potential difference it traverses.
323 -- It is measured in joules (newton-metres).
324 ---Category: Physical quantities.
328 -- Defined as the rate of expending energy or doing work.
329 -- In mechanical terms it is the product of a force and
330 -- the distance it moves per unit time.
331 -- In electrical terms it is the product of the voltage
332 -- and the current. For AC the root-mean-square values
333 -- are multiplied by the cosine of the phase angle.
334 -- It is measured in watts (joules per second).
335 ---Category: Physical quantities.
337 alias SurfaceTension is Real;
339 -- Defined as the force required to hold unit length
340 -- of a plane liquid surface.
341 -- It is measured in newtons per metre.
342 ---Category: Physical quantities.
344 alias CoefficientOfExpansion is Real;
346 -- Defined as the proportional change in the length,
347 -- area, or volume of a solid per degree of temperature.
348 -- For a liquid the expansion of the container must be
349 -- taken into account.
350 -- For a gas there are coefficients for constant pressure
351 -- and constant volume changes.
352 -- It is measured in units of reciprocal degree kelvin.
353 ---Category: Physical quantities.
355 alias ThermalConductivity is Real;
357 -- Defined as the rate at which heat passes through an
358 -- area inside a body. Quantified as work per unit time
359 -- per unit length per unit of temperature.
360 -- It is measured in watts per metre per degee kelvin.
361 ---Category: Physical quantities.
363 alias SpecificHeatCapacity is Real;
365 -- Defined as the quantity of heat required to raise
366 -- unit mass by one degree temperature. For a gas
367 -- there are two values: one at constant pressure, the
368 -- other at constant volume. Their ratio is linked to the
369 -- speed of sound in the gas and to the number of
370 -- degrees of freedom of the molecules.
371 -- It is quantified as energy per unit mass per
372 -- degree of temperature.
373 -- It is measured in joules per kilogram per degree
375 ---Category: Physical quantities.
377 alias Entropy is Real;
379 -- Defined as a property which changes as a system undergoes
380 -- reversible change. The change in entropy is quantified as
381 -- the change in energy per degree of temperature. All real
382 -- changes are at least partially irreversible so entropy
383 -- is increased by change. Entropy can be viewed as a
384 -- measure of the molecular disorder of a system, or as the
385 -- unavailability of its internal energy to do work in a
387 -- A change in entropy is measured in joules per degree kelvin.
388 ---Category: Physical quantities.
390 alias Enthalpy is Real;
392 -- Defined as the sum of the internal energy of a system plus
393 -- the product of its pressure and volume. For a reversible
394 -- process at constant pressure the change in enthalpy is
395 -- equal to the quantity of heat absorbed (or lost).
396 -- It is measured in joules.
397 ---Category: Physical quantities.
399 alias LuminousIntensity is Real;
401 -- Defined as the luminous flux emitted per unit solid
402 -- angle in a given direction by a point source.
403 -- It is measured in candelas.
404 ---Category: Physical quantities.
406 alias LuminousFlux is Real;
408 -- Defined as the rate of flow of radiant energy as evaluated
409 -- by the luminous sensation it produces. This means it
410 -- depends on the sensitivity of the receptor or observer. It
411 -- is related to the radiant flux of the source by the
412 -- spectral luminous efficiency.
413 -- It is measured in lumens.
414 ---Category: Physical quantities.
416 alias Luminance is Real;
418 -- It is defined the luminous flux per unit area per unit
420 -- It is measured in candelas per square metre.
421 ---Category: Physical quantities.
423 alias Illuminance is Real;
425 -- Defined as the incident luminous flux per unit area.
426 -- It is measured in lux (lumen per square metre).
427 ---Category: Physical quantities.
429 alias LuminousExposition is Real;
431 -- Defined as the quantity of illuminance with time.
432 -- It is measured in lux-seconds.
433 ---Category: Physical quantities.
435 alias LuminousEfficacity is Real;
437 -- Defined as the ratio of luminous flux emitted by a
438 -- source to the power it consumes.
439 -- It is measured in lumens per watt.
440 ---Category: Physical quantities.
442 alias ElectricCharge is Real;
444 -- Defined as a property of elementary particles. It is
445 -- more commonly viewed as the product of electric current
447 -- It is measured in coulombs (ampere-second).
448 ---Category: Physical quantities.
450 alias ElectricCurrent is Real;
452 -- Defined as the amount of charge flowing per unit time.
453 -- It is measured in amperes (coulombs per second).
454 ---Category: Physical quantities.
456 alias ElectricFieldStrength is Real;
458 -- Defined as the force exerted on a unit charge at a
459 -- given point in space.
460 -- It is measured in volts per metre.
461 ---Category: Physical quantities.
463 alias ElectricPotential is Real;
465 -- Defined as the work done in bringing unit positive
466 -- charge from infinity to the point.
467 -- It is measured in volts.
468 -- Volts are in practice used to measure differences
469 -- in potential e.g. the electromotive force generated when
470 -- a conductor cuts a magnetic field.
471 ---Category: Physical quantities.
473 alias ElectricCapacitance is Real;
475 -- Defined for a capacitor as the ratio of the charge on
476 -- either conductor to the potential between them.
477 -- It is measured in farads (coulomb per volt).
478 ---Category: Physical quantities.
480 alias MagneticFlux is Real;
482 -- Defined as the product of a given area and the
483 -- average magnetic flux density normal to it.
484 -- It is measured in webers (tesla-square-metre).
485 ---Category: Physical quantities.
487 alias MagneticFluxDensity is Real;
489 -- Defined as the magnetic flux passing through unit area
490 -- of a magnetic field normal to the magnetic force.
491 -- It is a vector quantity, the product of the permeability
492 -- and the magnetic field strength and with a direction at any
493 -- given point the same as that of the magnetic field.
494 -- It is measured in teslas (webers per square metre).
495 ---Category: Physical quantities.
497 alias MagneticFieldStrength is Real;
499 -- Described as a vector quantity, it is the ratio of the
500 -- magnetic flux density to the permeability of the medium.
501 -- Its integral along a closed line is equal to the
502 -- magnetomotive force.
503 -- It is measured in amperes per metre.
504 ---Category: Physical quantities.
506 alias Reluctance is Real;
508 -- Defined as the ratio of the magnetomotive force applied
509 -- to a magnetic circuit to the magnetic flux in the circuit.
510 -- It is measured in reciprocal henrys.
511 -- Its reciprocal is permanence.
512 ---Category: Physical quantities.
514 alias Resistance is Real;
516 -- Defined as the ratio of the potential difference
517 -- across a conductor to the current flowing through it.
518 -- It is measured in ohms.
519 ---Category: Physical quantities.
521 alias Inductance is Real;
523 -- Defined as numerically equal to the electromotive force
524 -- induced when the current in a circuit changes at
526 -- It is measured in henrys (webers per ampere).
527 ---Category: Physical quantities.
529 alias Capacitance is Real;
531 -- Defined as a measure of the increase in voltage on
532 -- an isolated conductor by the addition of a charge.
533 -- for two isolated conductors, it is the ratio of the charge
534 -- on either conductor to the potential difference between
536 -- It is measured in farads (coulomb per volt).
537 -- In practice micro-, nano-, and pico-farads are used.
538 ---Category: Physical quantities.
540 alias Impedance is Real;
542 -- Defined as the total opposition to the flow of current
543 -- in a circuit. Includes the contributions of resistance,
544 -- inductance, and capacitance.
545 -- It is measured in Ohms.
546 ---Category: Physical quantities.
548 alias Admittance is Real;
550 -- Defined as the reciprocal of impedance.
551 -- It is measured in Siemens (reciprocal Ohms).
552 -- The square of the admittance is equal to the sum of the
553 -- squares of the conductance and the susceptance.
554 ---Category: Physical quantities.
556 alias Resistivity is Real;
558 -- Defined as the resistance of a conductor of unit
559 -- cross-section per unit length.
560 -- It is measured in Ohm-metres.
561 -- It is the reciprocal of the conductivity.
562 ---Category: Physical quantities.
564 alias Conductivity is Real;
566 -- Defined as the current density divided by the electrical
567 -- field strength. It is also the reciprocal of resistivity.
568 -- It is measured in Siemens per metre.
569 ---Category: Physical quantities.
571 alias MolarMass is Real;
573 -- Defined as the mass of a given substance contained in one
574 -- mole. One mole of any substance contains Avogadro's
575 -- Constant of molecules.
576 -- It is measured in kilograms per mole.
577 ---Category: Physical quantities.
579 alias MolarVolume is Real;
581 -- Defined as the volume occupied by one mole of substance.
582 -- One mole of any substance contains Avogadro's
583 -- Constant of molecules.
584 -- It is measured in cubic metres per mole.
585 ---Category: Physical quantities.
587 alias Concentration is Real;
589 -- Defined as the strength of a mixture or solution. It can
590 -- be measured as kilograms per litre of solvent or of
591 -- solution. For certain purposes percentage by weight or
592 -- volume can be used, and parts per million (ppm) is used
593 -- for trace elements.
594 ---Category: Physical quantities.
596 alias MolarConcentration is Real;
598 -- Defined as the concentration in moles per litre of
599 -- solution. It is also called molarity.
600 ---Category: Physical quantities.
602 alias Molarity is Real;
604 -- Defined as the concentration in moles per kilogram of
606 ---Category: Physical quantities.
608 alias SoundIntensity is Real;
610 -- Defined as the rate of flow of sound energy through
611 -- a unit area normal to the flow. It is quantified as the
612 -- square of the root-mean-square sound pressure, divided by
613 -- the density of the medium and by the speed of sound.
614 -- It is measured in watts per square metre.
615 ---Category: Physical quantities.
617 alias AcousticIntensity is Real;
619 -- Defined as a dimensionless comparison of sound pressure
620 -- levels. The conventional unit, the bel, is the base ten
621 -- logarithm of the ratio of the two pressures. In practice
622 -- the decibel (one tenth of a bel) is used.
623 ---Category: Physical quantities.
625 alias Activity is Real;
627 -- Defined as the number of atoms of a radioactive
628 -- substance which disintegrate per unit time. It is
629 -- measured in becquerels (one disintegration per second).
630 ---Category: Physical quantities.
632 alias AbsorbedDose is Real;
634 -- Defined as the energy absorbed per unit mass in an
635 -- irradiated medium.
636 -- It is measured in grays.
637 ---Category: Physical quantities.
639 alias DoseEquivalent is Real;
641 -- Defined as the product of the absorbed dose and a
642 -- quality factor related to the effect of a particular
643 -- type of radiation on biological tissue.
644 -- It is measured in sieverts.
645 ---Category: Physical quantities.
647 -- alias OpticalPower
649 -- Defined as the power of a lens. It is quantified
650 -- as the reciprocal of the focal length.
651 -- It is measured in dioptres (reciprocal metres).
652 ---Category: Physical quantities.
656 exception DateDefinitionError inherits DomainError;
657 exception PeriodDefinitionError inherits DomainError;
658 exception ColorDefinitionError inherits DomainError;
670 class Array1OfCoefficient instantiates
671 Array1 from TCollection (Coefficient from Quantity);
672 ---Category: Instantiated classes
674 class Array2OfColor instantiates
675 Array2 from TCollection (Color from Quantity);
676 ---Category: Instantiated classes
678 class Array1OfColor instantiates
679 Array1 from TCollection (Color from Quantity);
680 ---Category: Instantiated classes
682 class HArray1OfColor instantiates
683 HArray1 from TCollection (Color from Quantity,
684 Array1OfColor from Quantity);
685 ---Category: Instantiated classes
689 enumeration PhysicalQuantity is MASS,
720 COEFFICIENTOFEXPANSION,
722 SPECIFICHEATCAPACITY,
733 ELECTRICFIELDSTRENGTH,
738 MAGNETICFIELDSTRENGTH,
758 end PhysicalQuantity;
759 ---Purpose: List of all physical quantities(Afnor)
763 enumeration TypeOfColor is TOC_RGB,
767 ---Purpose: Identifies color definition systems
768 -- - Quantity_TOC_RGB: with this system a
769 -- color is defined by its quantities of red, green and blue (R-G-B values).
770 -- - Quantity_TOC_HLS: with this system a
771 -- color is defined by its hue angle and its
772 -- lightness and saturation values (H-L-S values).
773 -- A Quantity_Color object may define a color
774 -- from three values R-G-B or H-L-S according
775 -- to a given color definition system.
777 enumeration NameOfColor is NOC_BLACK,
1059 NOC_LIGHTGOLDENROD1,
1060 NOC_LIGHTGOLDENROD2,
1061 NOC_LIGHTGOLDENROD3,
1062 NOC_LIGHTGOLDENROD4,
1063 NOC_LIGHTGOLDENRODYELLOW,
1083 NOC_LIGHTSTEELBLUE1,
1084 NOC_LIGHTSTEELBLUE2,
1085 NOC_LIGHTSTEELBLUE3,
1086 NOC_LIGHTSTEELBLUE4,
1102 NOC_MEDIUMAQUAMARINE,
1114 NOC_MEDIUMSLATEBLUE,
1115 NOC_MEDIUMSPRINGGREEN,
1116 NOC_MEDIUMTURQUOISE,
1117 NOC_MEDIUMVIOLETRED,
1295 ---Purpose: Definition of names of known colours.