Template:Solar radius calculator/sandbox
Appearance
This is the template sandbox page for Template:Solar radius calculator (diff). |
This template is primarily used by {{list of largest stars row}} to simplify its code and allow for easier updating should values require changing. It calculates the radius of a star in comparison to the Solar radius R☉.
Parameters
[edit]This template has one named and up to two unnamed parameters; the named parameter type
determines the calculation, while the unnamed parameter(s) are the values to be input into the equation. If the unit R☉ is desired, use |unit=yes
and optional |link=y
.
|type= |
1 |
2
|
---|---|---|
Rcm |
Radius in cm | |
Rm |
Radius in m | |
AD |
angular diameter in milliarcseconds (mas) | distance in kiloparsecs |
logLT |
log of the luminosity | temperature in K |
LT |
luminosity | temperature in K |
Examples
[edit]- Rcm
{{Solar radius calculator|type=Rcm|1.21e14}}
→ 1,739- AD
{{Solar radius calculator|type=AD|11.3|1.2}}
→ 1,458- LT using logL
{{Solar radius calculator|type=logLT|5.64|3300}}
→ 2,021- LT using L and unit
{{Solar radius calculator|type=logLT|5.64|3300|unit=y}}
→ 2,021 R☉
Values and calculations
[edit]All radii, once calculated, are divided by 6.957×108 to convert from m to R☉.
- AD
- radius determined from angular diameter and distance
- D is multiplied by 3.0857×1019 to convert from kpc to m
- L/Teff
- radius calculated from bolometric luminosity and effective temperature per the Stefan–Boltzmann law
- If is provided, is used
- L is multiplied by 3.828×1026 to convert from solar luminosity to watts