# 3.3: Two Layer Planet Structure Jupyter Notebook

- Page ID
- 11669

Instructions

- To use this page, read the text between each of the python code windows, then press RUN to execute the code in the box.
- It is necessary to run each of the boxes in order.
- Don't click restart in the cells unless you come back to the top of the page and start over.
- If you modify the code, this modification will not remain after you leave or refresh this page.
- You must run simulations/cells that require user input to completion. Make sure you see the Message informing you a cell is complete before continuing to the next cell. Here's why you must do this:
- These cells may not be re-run until the simulation is completed, otherwise no output will be generated.
- All following cells will not run until the user input cell is completed.

- For Dropdown Menus: You do not need to rerun the cells with the menu to change your selection. However, you must rerun all of the following cells to implement the change.

Be patient, some times it can take 1-2 minutes for the juypter kernel to start.

An interactive model to explore the layered structure of far-away planetary interiors from the limited information available to us, assuming there are two distinct layers.

** Key Questions:** Consider these as you work your way through this page.

Initial Reference Model

- How are the initial density and core size related? For example, does a smaller starting density produce a large or small core radius when compared to a larger starting density?

Density Variation Example

- Find a density value that creates a non-physical (NaN: not-a-number) density for the core of your chosen planet? Why does this happen?
- Find a density value where the model shows a core that is larger than the planet itself? Why does this happen?

Radius Variation Example

- Find a radius value that creates a non-physical (NaN) density for the core of your chosen planet? Why does this happen?
- Find a radius value where the model shows a core is larger than the planet itself? Why does this happen?

Mass Variation Example

- Is there an upper bound on what the mass can be in the model? That is, is there a high value that breaks the model like the previous examples; ignore whether it is realistic or not.
- Find a mass value that creates a non-physical (NaN) density for the core of your chosen planet? Why does this happen?
- Find a mass value where the model shows a core that is larger than the planet itself? Why does this happen?

First let's call the necessary functions, and define a dictionary called planets holding the relevant parameters of different planets.

### Reference Planet

Now to start your own model. Select a planet from the prompt once you run this cell.

Now, choose which density type you would like to use. The surface density can be measured, and the compositional density is the density of the assumed material that the mantle of the planet is made out of.

This cell will gather all the required parameters for your choices, and prompt you for your density value if you selected 'other' in the previous cell.

This cell defines the parameters beta, a, and b as defined in 3.2: Layered Structure of a Planet. beta depends on the planet's mass and radius. a and b depend on beta, alpha (which is 5/2 times the Moment of Inertia), and the density rho. a is the fraction between the core and total radius, and b is the proportionality constant to calculate the core density from the original density. Therefore, once you calculate \(a\), you can get the core radius by multiplying \(a\) by the total radius (however, for simplicity this model only plots a and not a * R). The density of the core is found by multiplying b by the original density, which is done in the plotting function below.

### Density Variation Example

Take note of the appearance of the above model. This is generally what the model looks like when it is physically possible for the input parameters to yield a solution. That's why you were limited in your choice for the range for densities if you chose the other option above. In the next series of examples, we are going to consider how the initial mass, radius, and density affect the model, and if certain values of these parameters will create an impossible planet. First, let's change the initial density of the planet. See how changing the density changes the model, and why certain density choices are impossible. You can tell if a choice is impossible if the graph does not look nice and neat like the previous one; you may also encounter non-physical values in the form of nan values (nan/NaN stands for not-a-number) or the radius of the core could end up being larger than the radius of the planet itself.

### Radius Variation Example

Now let's set the density to a constant value, we will use the compositional density of the planet you selected. This time, let's change the radius and see what happens. Like before, take note of when and why the model gives a nan or a core radius larger than the planet itself. Note that the given range of radii are given to accommodate all three planets, it may be easier to find the nan and large cores near the radius of the initial planet.

### Mass Variation Example

Finally, lets set the radius to its original length and change the mass of your planet. Like before, take note of when and why the model gives a nan or a core radius larger than the planet itself.

** Key Questions:** Consider these as you work your way through this page.

Initial Reference Model

- How are the initial density and core size related? For example, does a smaller starting density produce a large or small core radius when compared to a larger starting density?

Density Variation Example

- Find a density value that creates a nan density for the core of your chosen planet? Why does this happen?
- Find a density value where the model shows a core is larger than the planet itself? Why does this happen?

Radius Variation Example

- Find a radius value that creates a nan density for the core of your chosen planet? Why does this happen?
- Find a radius value where the model shows a core is larger than the planet itself? Why does this happen?

Mass Variation Example

- Is there an upper bound on what the mass can be in the model? ie is there a high value that breaks the model like the previous examples; ignore whether it is realistic or not.
- Find a mass value that creates a nan density for the core of your chosen planet? Why does this happen?
- Find a mass value where the model shows a core is larger than the planet itself? Why does this happen?