The Density of the Sun
Q. The Sun has a mass of about 2.0 × 10³⁰ kgkg and a radius of about 7.0 × 10⁸ mm. What is its average density, in kilograms per cubic metre?
Inputs
Outputs
density?
How it's solved
Solved with Dimensions
Given
- kg
- m
Find .
Working
- volume of a sphere
- m³
- mass per volume
- kg/m³
- kg/m³to 2 significant figures
Conclusion
More than water, far less than rock. The Sun is gas, but gas squeezed hard by its own weight.
The web of concepts
given read from the words equation asked
The Ruby that solves it
The question and its solution are small Ruby files. The engine runs them.
1require_relative "../physics"23question :density_of_the_sun do4 kind :numerical5 describes "The Sun has a mass of about %{mass} and a radius of about %{radius}. %{density}, in kilograms per cubic metre?"6 given mass: "2.0e30 kg"7 given radius: "7.0e8 m"8 asks density: "What is its average density"9end1require_relative "../questions/density_of_the_sun"2require_relative "../science/units_and_measurement/dimensions"34solve :density_of_the_sun, using: Dimensions do5 take mass: :m, radius: :r6 take density: :rho7 answer find_value(:density, figures: 2)89 conclusion "More than water, far less than rock. The Sun is gas, but gas squeezed hard by its " \10 "own weight."11endplayground.rb
1require_relative "../solutions/density_of_the_sun"23play_with :density_of_the_sun do4 title "The Density of the Sun"5endThe laws it drew on
| quantity | written | units | within | from |
|---|---|---|---|---|
| speed of light | m/s | — | Units | |
| avogadro constant | mol⁻¹ | — | Units | |
| length | m | 0 … ∞ | Units | |
| mass | kg | — | Units | |
| time | s | 0 … ∞ | Units | |
| electric current | A | — | Units | |
| temperature | K | — | Units | |
| amount of substance | mol | — | Units | |
| luminous intensity | cd | — | Units | |
| arc length | m | — | Units | |
| radius | m | 0 … ∞ | Units | |
| plane angle | — | — | Units | |
| area | m² | — | Units | |
| solid angle | — | — | Units | |
| light time | s | — | Units | |
| light distance | m | — | Units | |
| number of entities | — | — | Units | |
| baseline | m | — | Units | |
| distance away | m | — | Units | |
| parallax angle | — | — | Units | |
| pi | — | 0 … ∞ | Dimensions | |
| gravitational constant | N m² kg⁻² | — | Dimensions | |
| volume | m³ | — | Dimensions | |
| speed | m/s | — | Dimensions | |
| acceleration | m/s² | — | Dimensions | |
| force | N | — | Dimensions | |
| density | kg/m³ | — | Dimensions | |
| work | J | — | Dimensions | |
| surface area | m² | — | Dimensions | |
| height | m | — | Dimensions | |
| breadth | m | — | Dimensions | |
| cylinder surface area | m² | — | Dimensions | |
| volume of a slab | m³ | — | Dimensions | |
| relative density | — | — | Dimensions | |
| density of water | kg/m³ | — | Dimensions | |
| linear magnification | — | — | Dimensions | |
| image length | m | — | Dimensions | |
| object length | m | — | Dimensions | |
| image area | m² | — | Dimensions | |
| object area | m² | — | Dimensions | |
| volume of them all | m³ | — | Dimensions | |
| molar volume | m³ | — | Dimensions | |
| room to spare | — | — | Dimensions |