Trax3 3.1.0
trax track library
Loading...
Searching...
No Matches
DimLimits.h
Go to the documentation of this file.
1// trax track library
2// AD 2025
3//
4// "It is computed that eleven thousand persons
5// have at several times suffered death,
6// rather than submit to break their eggs
7// at the smaller end."
8//
9// Jonathan Swift
10//
11// Copyright (c) 2025 Trend Redaktions- und Verlagsgesellschaft mbH
12// Copyright (c) 2019 Marc-Michael Horstmann
13//
14// Permission is hereby granted to any person obtaining a copy of this software
15// and associated source code (the "Software"), to use, view, and study the
16// Software for personal or internal business purposes, subject to the following
17// conditions:
18//
19// 1. Redistribution, modification, sublicensing, or commercial use of the
20// Software is NOT permitted without prior written consent from the copyright
21// holder.
22//
23// 2. The Software is provided "AS IS", without warranty of any kind, express
24// or implied.
25//
26// 3. All copies of the Software must retain this license notice.
27//
28// For further information, please contact: horstmann.marc@trendverlag.de
29
30#pragma once
31
47
48#include "DimensionedValues.h"
49
52namespace dim
53{
56 constexpr One epsilon__one = 10 * epsilon;
57 constexpr Angle epsilon__angle = 1_deg;
58 constexpr Length epsilon__length = 1_cm;
59 constexpr Mass epsilon__mass = 10_kg;
60 constexpr Time epsilon__time = 1_s;
62
67 constexpr Angle maximum__angle = epsilon__angle / epsilon__one;
68 constexpr Length maximum__length = epsilon__length / epsilon__one;
69 constexpr Mass maximum__mass = epsilon__mass / epsilon__one;
70 constexpr Time maximum__time = epsilon__time / epsilon__one;
72
73
76 constexpr Angle plausible_maximum__angle= 360_deg;
77 constexpr Length plausible_maximum_length= maximum__length;
78 constexpr Mass plausible_maximum__mass = maximum__mass;
79 constexpr Time plausible_maximum__time = 1_h;
81
82 static_assert( plausible_maximum__angle <= maximum__angle, "plausible_maximum__angle must be smaller or equal then maximum__angle" );
83 static_assert( plausible_maximum_length <= maximum__length, "plausible_maximum_length must be smaller or equal then maximum__length" );
84 static_assert( plausible_maximum__mass <= maximum__mass, "plausible_maximum__mass must be smaller or equal then maximum__mass" );
85 static_assert( plausible_maximum__time <= maximum__time, "plausible_maximum__time must be smaller or equal then maximum__time" );
86
87
90 constexpr AnglePerLength epsilon__anglePerLength = epsilon__angle / plausible_maximum_length;
91 constexpr AngularVelocity epsilon__angularVelocity = epsilon__angle / plausible_maximum__time;
92 constexpr Area epsilon__area = epsilon__length * epsilon__length;
93 constexpr Volume epsilon__volume = epsilon__area * epsilon__length;
94 constexpr Density epsilon__density = 0.001_gIcm3;
95 constexpr Frequency epsilon__frequency = 1 / plausible_maximum__time;
96 constexpr Velocity epsilon__velocity = 1_cmIs;
97 constexpr Acceleration epsilon__acceleration = 0.001_mIs2;
98 constexpr Force epsilon__force = 0.1_N;
99 constexpr Pressure epsilon__pressure = 1_Pa;
100 constexpr Momentum epsilon__momentum = epsilon__mass * epsilon__velocity;
101 constexpr AngularMomentum epsilon__angularMomentum = epsilon__momentum * epsilon__length;
102 constexpr Torque epsilon__torque = 1_Nm;
103 constexpr Energy epsilon__energy = 1_J;
104 constexpr Power epsilon__power = 1_W;
106
107} // namespace dim
The namespace provides classes and methods for the dim library.
Definition DimensionedValues.h:178
Value< Dimension< 2, 0, 0 > > Area
Area.
Definition DimensionedValues.h:325
Value< Dimension< 0, 0, -1 > > AngularVelocity
Angular velocity.
Definition DimensionedValues.h:323
Value< Dimension< 2, 1, -1 > > AngularMomentum
Angular momentum.
Definition DimensionedValues.h:336
constexpr Real _Pa(Pressure p) noexcept
Dimensionated Values conversion functions.
Definition DimensionedValues.h:1599
constexpr Real _s(Time t) noexcept
Dimensionated Values conversion functions.
Definition DimensionedValues.h:1535
Value< Dimension< 0, 0, -1 > > Frequency
Frequency.
Definition DimensionedValues.h:330
Value< Dimension< 1, 0, -1 > > Velocity
Velocity.
Definition DimensionedValues.h:331
Value< Dimension< 0, 0, 0 > > One
Dimensionless value.
Definition DimensionedValues.h:319
Value< Dimension< 1, 0, 0 > > Length
Length.
Definition DimensionedValues.h:324
Value< Dimension< 0, 1, 0 > > Mass
Mass.
Definition DimensionedValues.h:327
Value< Dimension< 0, 0, 1 > > Time
Time.
Definition DimensionedValues.h:329
Value< Dimension<-1, 1, -2 > > Pressure
Pressure.
Definition DimensionedValues.h:334
constexpr Real _cmIs(Velocity v) noexcept
Dimensionated Values conversion functions.
Definition DimensionedValues.h:1387
constexpr Real _N(Force f) noexcept
Dimensionated Values conversion functions.
Definition DimensionedValues.h:1551
Value< Dimension< 1, 0, -2 > > Acceleration
Acceleration.
Definition DimensionedValues.h:332
constexpr Time _h(Real t) noexcept
Dimensionated Values conversion functions.
Definition DimensionedValues.h:1539
Value< Dimension< 1, 1, -2 > > Force
Force.
Definition DimensionedValues.h:333
constexpr Real _kg(Mass m) noexcept
Dimensionated Values conversion functions.
Definition DimensionedValues.h:1443
Value< Dimension< 3, 0, 0 > > Volume
Volume.
Definition DimensionedValues.h:326
Value< Dimension<-1, 0, 0 > > AnglePerLength
Angle per length.
Definition DimensionedValues.h:321
Value< Dimension<-3, 1, 0 > > Density
Density.
Definition DimensionedValues.h:328
Value< Dimension< 2, 1, -2 > > Torque
Torque.
Definition DimensionedValues.h:337
Value< Dimension< 2, 1, -3 > > Power
Power.
Definition DimensionedValues.h:339
constexpr Real epsilon
Marginal difference in calculations.
Definition DimensionedValues.h:344
constexpr Real _deg(Angle a) noexcept
Dimensionated Values conversion functions.
Definition DimensionedValues.h:1194
constexpr Real _W(Power p) noexcept
Dimensionated Values conversion functions.
Definition DimensionedValues.h:1671
Value< Dimension< 0, 0, 0 > > Angle
Angle in radians.
Definition DimensionedValues.h:320
Value< Dimension< 1, 1, -1 > > Momentum
Momentum.
Definition DimensionedValues.h:335
constexpr Real _mIs2(Acceleration a) noexcept
Dimensionated Values conversion functions.
Definition DimensionedValues.h:1427
Value< Dimension< 2, 1, -2 > > Energy
Energy.
Definition DimensionedValues.h:338
constexpr Real _cm(Length l) noexcept
Dimensionated Values conversion functions.
Definition DimensionedValues.h:1226
constexpr Real _gIcm3(Density d) noexcept
Dimensionated Values conversion functions.
Definition DimensionedValues.h:1499
constexpr Real _Nm(Torque t) noexcept
Dimensionated Values conversion functions.
Definition DimensionedValues.h:1655