Note: You are currently viewing documentation for Moodle 3.3. Up-to-date documentation for the latest stable version of Moodle is probably available here: System of units.

System of units: Difference between revisions

From MoodleDocs
(Redirected page to Formulas: Systems of units)
 
(29 intermediate revisions by the same user not shown)
Line 1: Line 1:
[https://docs.moodle.org/33/en/Formulas_question_type < Formulas question type]
#REDIRECT [[Formulas:_Systems_of_units]]
 
==Setting units==
<div style="background-color:#d3ffd3;
            border:1px solid #abdaac;
            color:#4f691a;
            padding:5px 15px 15px;
            margin: 15px 0 20px;
            ">
Units are defined on the '''Formulas question''' page, in the following three places:
 
* For each part, in the '''Unit''' field.
* For each part, in the '''Other rules''' field.
* Under '''Extra options''', in the '''[Global] - Basic conversion rule''' field.
</div>
 
===Unit field===
 
Specify a single or a combined unit.
 
<div style="border:1px solid #bce8f1;border-radius:4px;padding: 0px 15px 0px; margin-bottom:25px;">
'''Example'''
<pre style="font-size:113%;">kg</pre><br>
<pre style="font-size:113%;">N</pre><br>
<pre style="font-size:113%;">m/s^2</pre><br>
</div>
 
You can also specify single and combined units separated by <span style="font-family:monospace;font-size:113%;">=</span>.
 
<div style="border:1px solid #bce8f1;border-radius:4px;padding: 0px 15px 0px; margin-bottom:25px;">
'''Example'''
 
In order to accept N and kg m/s<sup>2</sup> as valid units, define '''Unit''' as follows:
<pre style="font-size:113%;">N = kg m/s^2</pre>
With this setting, the following units will be considered correct:
<pre style="font-size:113%;">
N
kg m/s^2
kg m /s^2
m kg /s^2
m kg s^(-2)
s^(-2) kg m
s^(-2) m kg
</pre>
 
<span style="font-family:monospace;font-size:113%;">/s^2</span> must be placed at the end of the unit. Hence, the following units are considered as incorrect: <span style="font-family:monospace;font-size:113%;">/s^2 kg m</span>   and   <span style="font-family:monospace;font-size:113%;">kg /s^2 m</span>.
</div>
 
<div style="border:1px solid #bce8f1;border-radius:4px;padding: 0px 15px 0px; margin-bottom:25px;">
'''Example'''
 
In order to accept W, J/s and m<sup>2</sup> kg  s<sup>-3</sup> as valid units, specify:
 
<pre style="font-size:113%;">W = J/s = m^2 kg s^(-3)</pre>
</div>
 
===Other rules field===
 
Specify prefixes that are not defined in the '''[Global] - Basic conversion rule'''.
 
<div style="border:1px solid #bce8f1;border-radius:4px;padding: 0px 15px 0px; margin-bottom:25px;">
'''Example'''
 
Indicate that meganewton (MN) is an acceptable unit by specifying the following:
 
<pre style="font-size:113%;">N: M;</pre>
 
==Writing unit symbols==
In the '''Formulas question''', the writing of the units differs slightly from that in the '''SI''' because units are entered very simply on the computer. The rules for entering units in the '''Formulas question''' are described below.
* The multiplication of unit symbols is indicated by a space, as prescribed in Section 5.1 of '''SI'''. ''The half-high (centred) dot (⋅) is not supported''. For example, input 50 kN m (≡ 50 kN⋅m), as follows:<br>
      <pre style="font-size:113%;">50 kN m</pre>
* Division of unit symbols is indicated by a solidus (oblique stroke, <span style="font-family:monospace;font-size:113%;">/</span>) or by negative exponents.For example, input 10 m/s, or 10 m s<sup>-1</sup>, as follows:<br>
      <pre style="font-size:113%;">10 m/s</pre>    or    <pre style="font-size:113%;">10 m s^(-1)</pre>
* Exponentiation is indicated by the circumflex accent (<span style="font-family:monospace;font-size:113%;">^</span>, UTF-8 <span style="font-family:monospace;font-size:113%;"><span style="font-size:165%;">﹠</span>#94;</span> or ASCII code 94 (alt+94)).For example, input 4.7 m<sup>2</sup>, as follows:<br>
      <pre style="font-size:113%;">4.7 m^2</pre>
* Parentheses are required when there is a risk of misinterpretation. For example, '''do not input 8 kN m^-2''' but rather:
      <pre style="font-size:113%;">8 kN m^(-2)</pre>
* Permutations of the unit symbols are allowed. For example, the following two entries are considered identical:
      <pre style="font-size:113%;">3 m kg s^(-2)</pre>    or    <pre style="font-size:113%;">3 kg m/s^2</pre>
 
<div style="background-color:#faffbd;
            border:1px solid #d9d9d9;
            color:#000000;
            padding:5px 15px 5px;
            margin: 15px 0 15px;
            ">Unit symbols are case sensitive. For example, kilonewton is written kN, not KN, kn or Kn.</div>
 
==Units==
 
The '''International System of Units''' (SI, from the French ''Système international (d'unités)'') is the most widely used system of measurement. It has now been adopted accross the world, except in Liberia, Myanmar and the United States. The US is the only industrialized nation that does not mainly use the SI in its commercial and standards activities<sup>Wikipedia, International System of Units</sup>. [https://www.bipm.org/en/publications/si-brochure/ The SI is available here, free of charge. (The English version follows the French version.)]
 
In the SI, units are classified as follows (with reference to the table in the SI):
 
<div style="border:1px solid #bce8f1;border-radius:4px;padding:0px 15px 0px;">
* Base units (Table 1)
* Coherent derived units (Table 2)
* Coherent derived units with special names and symbols (Table 3)
Note that coherent derived units can include coherent derived units with special names and symbols (Table 4)
* Non-SI units accepted for use with the SI (Table 6)
* Non-SI units whose values in SI units must be obtained experimentally (Table 7)
* Other non-SI units (Table 8)
* Non-SI units associated with the CGS and the CGS-Gaussian system of units (Table 9)
* Other non-SI units not recommended of use (including the British imperial system and the United States customary system of units)
</div>
 
Conversion factors for the later units are available from the US National Institute of Standards and Technology (NIST):
* [https://www.nist.gov/physical-measurement-laboratory/nist-guide-si-appendix-b8 listed alphabetically]
* [https://www.nist.gov/pml/nist-guide-si-appendix-b9-factors-units-listed-kind-quantity-or-field-science listed by kind of quantity or field of science]
 
===SI base units===
There are seven base units in the SI:
 
{| class="nicetable"
|-
! Name
! Symbol
! Formulas question<br>input
|-
| metre
| m
| m
|-
| kilogram
| kg
| kg
|-
| second
| s
| s
|-
| ampere
| A
| A
|-
| kelvin
| K
| K
|-
| mole
| mol
| mol
|-
| candela
| cd
| cd
|}
 
===Coherent derived units===
Coherent derived units are products of powers of base units, without a numerical factor. Some examples of coherent derived units are as follows:
 
{| class="nicetable"
|-
! Name
! Symbol
! colspan="2" | Formulas question<br><span style="font-weight:normal">Input from either column is acceptable</span>
|-
| square meter
| m<sup>2</sup>
| m^2
|
|-
| cubic meter
| m<sup>3</sup>
| m^2
|
|-
| meter per second
| m/s
| m/s
| m s^(-1)
|-
| meter per second squared
| m/s<sup>2</sup>
| m/s^2
| m s^(-2)
|-
| reciprocal metre
| m<sup>-1</sup>
| m^(-1)
|
|-
| kilogram per cubic metre
| kg/m<sup>3</sup>
| kg/m^3
| kg m^(-3)
|-
| kilogram per square metre
| kg/m<sup>2</sup>
| kg/m^2
| kg m^(-2)
|-
| cubic metre per kilogram
| m<sup>3</sup>/kg
| m^3/kg
| m^3 kg^(-1)
|-
| ampere per square metre
| A/m<sup>2</sup>
| A/m^2
| A m^(-2)
|-
| etc.
|
|
|
|}
 
===Coherent derived units with special names and symbols===
Some coherent derived units have special names and symbols:
 
{| class="nicetable"
|-
! Name
! Symbol
! colspan="3" | Formulas question<br><span style="font-weight:normal">Input from either column is acceptable</span>
|-
| radian
| rad
| rad
|
|
|-
| steradian
| sr
| sr
|
|
|-
| hertz
| Hz
| Hz
|
| s^(-1)
|-
| newton
| N
| N
|
| m kg s^(-2)
|-
| pascal
| Pa
| Pa
| N/m^2
| m^(-1) kg s^(-2)
|-
| joule
| J
| J
| N m
| m^2 kg s^(-2)
|-
| watt
| W
| W
| J/s
| m^2 kg s^(-3)
|-
| coulomb
| C
| C
|
| s A
|-
| volt
| V
| V
| W/A
| m^2 kg s^(-3) A^(-1)
|-
| farad
| F
| F
|
|
|-
| ohm
| Ω
|
|
|
|-
| siemens
| S
| S
|
|
|-
| weber
| Wb
| Wb
|
|
|-
| tesla
| T
| T
|
|
|-
| henry
| H
| H
|
|
|-
| degree Celcius
| ℃
| ℃
|
|
|-
| lumen
| lm
| lm
|
|
|-
| lux
| lx
| lx
|
|
|-
| becquerel
| Bq
|
|
|
|-
| gray
| Gy
|
|
|
|-
| sievert
| Sv
|
|
|
|-
| katal
| kat
|
|
|
|}
 
The base and coherent derived units of the SI form a coherent set, designated the set of coherent SI units. There are also units outside the SI.
 
===Non-SI units accepted for use with the SI===
Non-SI units accepted for use with the SI are:
 
{| class="nicetable"
|-
! Name
! Symbol
! Formulas question<br>input
|-
| minute
| min
| min
|-
| hour
| h
| h
|-
| day
| d
| d
|-
| degree (plan angle)
| °
|
|-
| minute (plan angle)
| ′
|
|-
| second (plan angle)
| ″
|
|-
| hectare
| ha
| ha
|-
| litre
| L, l
| L or l
|-
| tonne
| t
| t
|}
 
==SI Prefixes==
The '''SI''' and '''Formulas question''' prefixes are given in the table below. The only difference between the two systems is that the prefix micro is written μ in the '''SI''' but entered as u in the '''Formulas question'''.
 
{| class="nicetable"
|-
! Factor
! Name
! SI symbol
! Formulas question<br>input
!         
! Factor
! Name
! SI symbol
! Formulas question<br>input
|-
| 10<sup>1</sup>
| deca
| da
| da
|
| 10<sup>-1</sup>
| deci
| d
| d
|-
| 10<sup>2</sup>
| hecto
| h
| h
|
| 10<sup>-2</sup>
| centi
| c
| c
|-
| 10<sup>3</sup>
| kilo
| k
| k
|
| 10<sup>-3</sup>
| milli
| m
| m
|-
| 10<sup>6</sup>
| mega
| M
| M
|
| 10<sup>-6</sup>
| micro
| μ
| u
|-
| 10<sup>9</sup>
| giga
| G
| G
|
| 10<sup>-9</sup>
| nano
| n
| n
|-
| 10<sup>12</sup>
| tera
| T
| T
|
| 10<sup>-12</sup>
| pico
| p
| p
|-
| 10<sup>15</sup>
| peta
| P
| P
|
| 10<sup>-15</sup>
| femto
| f
| f
|-
| 10<sup>18</sup>
| exa
| E
| E
|
| 10<sup>-18</sup>
| atto
| a
| a
|-
| 10<sup>21</sup>
| zetta
| Z
| Z
|
| 10<sup>-21</sup>
| zepto
| z
| z
|-
| 10<sup>24</sup>
| yotta
| Y
| Y
|
| 10<sup>-24</sup>
| yocto
| y
| y
|}
 
----
 
==Formulas question system of units==
The system of units of the '''Formulas question''' type complies with the '''SI'''. '''Formula question''' units can be any of all the units mentioned above, i.e. SI units and non-SI units.
 
<div style="background-color:#d3ffd3;
            border:1px solid #abdaac;
            color:#4f691a;
            padding:5px 15px 10px;
            margin: 15px 0 20px;
            ">'''Formulas question''' units can be either single or combined.
</div>
 
{| class="nicetable"
|-
! rowspan="2" | Formulas question<br>unit
! rowspan="2" |Type
! colspan="3" | <div style="text-align:center">Examples</div>
|-
! Name of unit
! SI symbol
! Formulas question<br>input
|-
| rowspan="21" | Single (i.e. individual) unit
| rowspan="3" | SI base unit
| meter
| m
|m
|-
| kilogram
| kg
| kg
|-
| second
| s
| s
|-
| rowspan="3" | Coherent derived SI units with special names and symbols
| hertz
| Hz
| Hz
|-
| newton
| N
| N
|-
| pascal
| Pa
| Pa
|-
| rowspan="3" | Non-SI units accepted for use with the SI
| minute
| min
| min
|-
| hour
| h
| h
|-
| day
| d
| d
|-
| rowspan="3" | Non-SI units whose values in SI units must be obtained experimentally
| electronvolt
| eV
| eV
|-
| dalton
| Da
| Da
|-
| unified atomic mass unit
| u
| u
|-
| rowspan="3" | Other non-SI units
| bar
| bar
| bar
|-
| millimetre of mercury
| mmHg
| mmHg
|-
| ångström
| Å
| Å (Ascii 143)
|-
| rowspan="3" | Non-SI units associated with the CGS and the CGS-Gaussian system of units
| erg
| erg
| erg
|-
| dyne
| dyn
| dyn
|-
| poise
| P
| P
|-
| rowspan="3" | Other non-SI units not recommended for use
| barrel of oil
| bbl
| bbl
|-
| inch
| inch
| in
|-
| foot
| ft
| ft
|-
| rowspan="13" | Combined unit (any combination of single units)
| rowspan="13" | All types
| square meter
| m<sup>2</sup>
| m^2
|-
| meter per second
| m/s
| m/s
|-
| meter per second squared
| m/s<sup>2</sup>
| m/s^2
|-
| hertz expressed in terms of SI base units
| s<sup>-1</sup>
| s^(-1)
|-
| newton expressed in terms of SI base units
| m kg s<sup>-2</sup>
| m kg s^(-2)
|-
| pascal expressed in terms of SI base units
| m<sup>-1</sup> kg s<sup>-2</sup>
| m^(-1) kg s^(-2)
|-
| pascal second
| Pa s
| Pa s
|-
| radian per second squared
| rad/s<sup>2</sup>
| rad/s^2
|-
| watt per square metre steradian
| W/(m<sup>2</sup> sr)
| W/(m^2 sr)
|-
| poise expressed in terms of CGS units
| dyn s cm<sup>-2</sup>
| dyn s cm^(-2)
|-
| foot pound
| ft lb
| ft lb
|-
| pound per inch squared
| lb/in<sup>2</sup>
| lb/in^2
|-
| Btu per hour
| Btu/h
| Btu/h
|}
 
==Physics units==
Physics units are defined as '''Common SI units''' in the file '''conversion_rules.php'''. Prefixes are assigned to each unit by specifying the unit followed by a list of the prefixes. In the downloaded file,  '''Common SI units''' prefixes are as follows:
 
<pre style="font-size:113%;">
m: k d c m u n p f;
s: m u n p f;
g: k m u n p f;
mol: m u n p;
N: k m u n p f;
A: m u n p f;
J: k M G T P m u n p f;
eV: k M G T P m u;
W: k M G T P m u n p f;
Pa: k M G T P;
Hz: k M G T P E;
C: k m u n p f;
V: k M G m u n p f;
ohm: m k M G T P;
F: m u n p f;
T: k m u n p;
H: k m u n p;
</pre>
 
As these units concern mainly physicists, they might be renamed '''Physics Units''' in future versions of the plugin.
 
Note that, for example, <span style="font-family:monospace;font-size:113%;">m: k c d m u n p f;</span> is equivalent to:
 
<pre style="font-size:113%;">1 m = 1e-3 km = 1e1 dm = 1e2 cm = 1e3 mm = 1e6 um = 1e9 nm = 1e12 pm = 1e15 fm;</pre>.
 
Under '''Extra Options''' on the '''Formulas question''' page, for '''[Global - Basic conversion rules]''', select '''Common SI unit''' in order to use these prefixes. With this setting, the following answers are equivalent:
 
<pre style="font-size:113%;">
5 s
5000 ms
5e9 ns
</pre>        
<pre style="font-size:113%;">
0.2 m/s
200 mm/s
 
</pre>        
<pre style="font-size:113%;">
1 m^2
10000 cm^2
1e-6 km^2
</pre>
 
Select '''None''' if the '''Common SI unit''' contradicts your custom rules.
 
==Other prefixes==
In a particular context, not all prefixes are used with units. For example, in construction engineering, kilonewtons (kN) et meganewtons (MN) are used, but not millinewtons (mN).
 
The file '''conversion_rules.php''' can be edited and default '''Common SI units''' prefixes modified. Other rules can also be defined in the file '''conversion_rules.php'''.
 
Prefixes can also be added to units in the '''Other rules''' fields of each '''Part _''', on the '''Formulas question''' page. For example, adding <span style="font-family:monospace;font-size:113%;"> N: M;</span> allows using MN.
 
==Conversion==
The conversion of single units can be specified by equating their values. For example:
 
<pre style="font-size:113%;">
1 m = 100 cm = 1000 mm;
1 cm = 0.3937 inch;
</pre>
 
With the above conversion rule, the following answers are equivalent:
<pre style="font-size:113%;">
10 inch
25.4 cm
254 mm
0.254 m
</pre>
 
Conversion rules can be defined together with prefixes in the file '''conversion_rules.php'''. In the downloaded file, the only conversion rule defined under '''Common SI units''' is the following:
 
<pre style="font-size:113%;">
J = 6.24150947e+18 eV;
</pre>
 
As with prefixes, conversion rules can also be defined in the '''Other rules''' field of each '''Part _''', on the '''Formulas question''' page.
 
==Marking==
 
The system of units allows to test students' knowledge of units. Alternative equivalent units are allowed.
 
You can specify mark fraction deduction for a wrong unit. The wrong unit here means that the unit that is not convertible to the correct unit, under conversion rules. Suppose a student get 2 marks for this subquestion answer. If the unit penalty = 0.2 and she give wrong unit, then the student can get 2(1-0.2) = 1.6 mark for this submission. (See Grading scheme).
 
If a teacher does not specify any unit for the subquestion, then the unit box will not be displayed and there is no need for students to enter it. However, if the student enters anything after their answer, it is usually considered to be incorrect so the mark of unit will be deduced. Hence, in the above case, it is better to set 1 for mark deduction.
 
Nevertheless, if you do not want to penalize the student entering arbitrary string at the end of answer, set 0 for mark deduction. i.e. their unit does not count toward their grade, but you still allow student use any convertible unit. Note that you have assumed a default answer that does not require unit.
 
 
[https://docs.moodle.org/33/en/Formulas_question_type < Formulas question type]

Latest revision as of 01:45, 22 January 2018