Template:Dimanalysis: Difference between revisions
another trial |
|||
Line 1: | Line 1: | ||
{{#switch: {{{brackets}}} |
{{#switch: {{{brackets}}} |
||
|square={{ |
|square={{#ifexpr: {{{length|}}} | {{#ifeq: {{{length|}}} | 1 | [L] | [L]<sup>{{{length|}}}</sup> }} | }}{{#ifexpr: {{{time|}}} | {{#ifeq: {{{time|}}} | 1 | [T] | [T]<sup>{{{time|}}}</sup> }} | }}{{#ifexpr: {{{mass|}}} | {{#ifeq: {{{mass|}}} | 1 | [M] | [M]<sup>{{{mass|}}}</sup> }} | }}{{#ifexpr: {{{temp|}}} | {{#ifeq: {{{temp|}}} | 1 | [Θ] | [Θ]<sup>{{{temp|}}}</sup> }} | }}{{#ifexpr: {{{mole|}}} | {{#ifeq: {{{mole|}}} | 1 | [N] | [N]<sup>{{{mole|}}}</sup> }} | }}{{#ifexpr: {{{current|}}} | {{#ifeq: {{{current|}}} | 1 | [I] | [I]<sup>{{{current|}}}</sup> }} | }}{{#ifexpr: {{{lum|}}} | {{#ifeq: {{{lum|}}} | 1 | [J] | [J]<sup>{{{lum|}}}</sup> }} | }} |
||
|square={{#ifexpr: {{{length|}}} | {{#ifeq: {{{length|}}} | 1 | (L) | (L)<sup>{{{length|}}}</sup> }} | }}{{#ifexpr: {{{time|}}} | {{#ifeq: {{{time|}}} | 1 | (T) | (T)<sup>{{{time|}}}</sup> }} | }}{{#ifexpr: {{{mass|}}} | {{#ifeq: {{{mass|}}} | 1 | (M) | (M)<sup>{{{mass|}}}</sup> }} | }}{{#ifexpr: {{{temp|}}} | {{#ifeq: {{{temp|}}} | 1 | (Θ) | (Θ)<sup>{{{temp|}}}</sup> }} | }}{{#ifexpr: {{{mole|}}} | {{#ifeq: {{{mole|}}} | 1 | (N) | (N)<sup>{{{mole|}}}</sup> }} | }}{{#ifexpr: {{{current|}}} | {{#ifeq: {{{current|}}} | 1 | (I) | (I)<sup>{{{current|}}}</sup> }} | }}{{#ifexpr: {{{lum|}}} | {{#ifeq: {{{lum|}}} | 1 | (J) | (J)<sup>{{{lum|}}}</sup> }} | }} |
|square={{#ifexpr: {{{length|}}} | {{#ifeq: {{{length|}}} | 1 | (L) | (L)<sup>{{{length|}}}</sup> }} | }}{{#ifexpr: {{{time|}}} | {{#ifeq: {{{time|}}} | 1 | (T) | (T)<sup>{{{time|}}}</sup> }} | }}{{#ifexpr: {{{mass|}}} | {{#ifeq: {{{mass|}}} | 1 | (M) | (M)<sup>{{{mass|}}}</sup> }} | }}{{#ifexpr: {{{temp|}}} | {{#ifeq: {{{temp|}}} | 1 | (Θ) | (Θ)<sup>{{{temp|}}}</sup> }} | }}{{#ifexpr: {{{mole|}}} | {{#ifeq: {{{mole|}}} | 1 | (N) | (N)<sup>{{{mole|}}}</sup> }} | }}{{#ifexpr: {{{current|}}} | {{#ifeq: {{{current|}}} | 1 | (I) | (I)<sup>{{{current|}}}</sup> }} | }}{{#ifexpr: {{{lum|}}} | {{#ifeq: {{{lum|}}} | 1 | (J) | (J)<sup>{{{lum|}}}</sup> }} | }} |
||
| {{#ifexpr: {{{length|}}} | {{#ifeq: {{{length|}}} | 1 | L | L<sup>{{{length|}}}</sup> }} | }}{{#ifexpr: {{{time|}}} | {{#ifeq: {{{time|}}} | 1 | T | T<sup>{{{time|}}}</sup> }} | }}{{#ifexpr: {{{mass|}}} | {{#ifeq: {{{mass|}}} | 1 | M | M<sup>{{{mass|}}}</sup> }} | }}{{#ifexpr: {{{temp|}}} | {{#ifeq: {{{temp|}}} | 1 | Θ | Θ<sup>{{{temp|}}}</sup> }} | }}{{#ifexpr: {{{mole|}}} | {{#ifeq: {{{mole|}}} | 1 | N | N<sup>{{{mole|}}}</sup> }} | }}{{#ifexpr: {{{current|}}} | {{#ifeq: {{{current|}}} | 1 | I | I<sup>{{{current|}}}</sup> }} | }}{{#ifexpr: {{{lum|}}} | {{#ifeq: {{{lum|}}} | 1 | J | J<sup>{{{lum|}}}</sup> }} | }} }}<noinclude>{{documentation}}</noinclude> |
| {{#ifexpr: {{{length|}}} | {{#ifeq: {{{length|}}} | 1 | L | L<sup>{{{length|}}}</sup> }} | }}{{#ifexpr: {{{time|}}} | {{#ifeq: {{{time|}}} | 1 | T | T<sup>{{{time|}}}</sup> }} | }}{{#ifexpr: {{{mass|}}} | {{#ifeq: {{{mass|}}} | 1 | M | M<sup>{{{mass|}}}</sup> }} | }}{{#ifexpr: {{{temp|}}} | {{#ifeq: {{{temp|}}} | 1 | Θ | Θ<sup>{{{temp|}}}</sup> }} | }}{{#ifexpr: {{{mole|}}} | {{#ifeq: {{{mole|}}} | 1 | N | N<sup>{{{mole|}}}</sup> }} | }}{{#ifexpr: {{{current|}}} | {{#ifeq: {{{current|}}} | 1 | I | I<sup>{{{current|}}}</sup> }} | }}{{#ifexpr: {{{lum|}}} | {{#ifeq: {{{lum|}}} | 1 | J | J<sup>{{{lum|}}}</sup> }} | }} }}<noinclude>{{documentation}}</noinclude> |
Revision as of 07:21, 16 July 2013
Usage
This template is intended to provide a uniform notation and format for expressing dimensions of physical quantities (spacing, ordering of symbols etc.) throughout articles.
The International System of Quantities defines a convention for formatting of the dimensions of quantities.[1] The default format (without the |bold=
parameter or further applied formatting) adheres to this.
Parameters
The parameters are the base quantities, coded according to:
Parameter Base quantity Symbol |time=
time T |length=
length L |mass=
mass M |current=
electric current I |temp=
thermodynamic temperature Θ |amount=
amount of substance N |lum=
luminous intensity J
and the value of each parameter is the exponent of the dimension of the base quantity:
- blank defaults to exponent 0 (so irrelevant dimensions do not need to be typed)
- exponent 0 means the base quantity dimension will not show up (as in usual notation)
- exponent 1 does not show the exponent (as is usual for exponential notation)
- exponent not 0 or 1 shows the base quantity dimension to that exponent, including negatives (use "−" for minus, not a hyphen "-")
An optional parameter is:
|bold=
: set this toyes
for bold dimension symbols; the default is no bold. The ISQ and SI give the convention of a roman sans-serif type, so bold would not conform: use it sparingly.
Examples
[[Momentum]] of a massive object: {{dimanalysis|time=−1|length=1|mass=1|lum=0}}
- Momentum of a massive object: LT−1M
[[Magnetization]] of a material: {{dimanalysis|bold=yes|length=−1|mass=1|current=1}}
- Magnetization of a material: L−1MI
[[Concentration]] of a chemical: {{dimanalysis|length=−3|mass=1|amount=1}}
- Concentration of a chemical: L−3M
[[Empty product]]: {{dimanalysis|time=0|length=0|mass=}}
[[Random]]: {{dimanalysis|bold=yes|time=90|length=10|mass=|temp=1|amount=−3|current=3/2|lum=6}}
- Random: L10T90ΘI3/2J6
References
- ^ JCGM 200:2012 International vocabulary of metrology – Basic and general concepts and associated terms (VIM): "The conventional symbolic representation of the dimension of a base quantity is a single upper case letter in roman (upright) sans-serif type. The conventional symbolic representation of the dimension of a derived quantity is the product of powers of the dimensions of the base quantities according to the definition of the derived quantity."