Plot g(r) of planet with two distinct density regions

In summary: So I'm thinking maybe there's a third term in there somewhere that keeps g from becoming 1.0. I'll have to investigate further.In summary, the gravitational field strength at a given radial distance is proportional to rho0*(4.0/3.0)*math.pi*(r[i])**3 and 1/r^2.
  • #1
oddjobmj
306
0

Homework Statement



Consider a simple model for the interior of the Earth: there is a spherical iron core with constant mass density ρ0 and radius a; outside the core is "rock" with constant density ρ1. Use these values for the densities: ρ0= 8.70×103 kg/m3 and ρ1= 4.10×103 kg/m3. The radius of the Earth is R = 6.40×106 m.

Hand in a plot g(r) from 0 to 2R.
The value at r=R must be 9.81 m/s2.

Homework Equations



g(r)=[itex]\frac{G*M(r)}{r^2}[/itex]

a=4.291*106 m

Total Mass=[itex]\frac{4πρ0}{3}[/itex]a^3+[itex]\frac{4πρ}{3}[/itex](R3-a3)

The Attempt at a Solution



Since the mass is a function of r the function will be affected by the density at the current radius. Is there a way to write a single function that will cover this or do I have to do it with a piecewise function where I use ρ0 between 0 < r < a, then ρ between a < r < R, then constant past R?
 
Physics news on Phys.org
  • #2
rho(r) is by definition piecewise in this problem.

You just need to find the function M(r) in terms of rho(r). M(r) is the mass enclosed by radius r.

Hopefully when you say "constant past R", you mean constant and zero past R.
 
  • Like
Likes 1 person
  • #3
Thank you, cepheid.

When I said constant past r I meant M(r) is constant past r. Yes, the density would be zero.
 
  • #4
Actually, the function for M(r) would be zero if the density were zero. That would lead to 0/r^2 which would basically mean my g(r) wouldn't change at all beyond that point. I don't believe that should be the case. So, at that point I need to simply calculate the total mass of the Earth and plug that in instead of the function for M(r).

Edit:
Can you tell what I did wrong here?

http://imgur.com/0Bp1aaM

Edit 2:

I think the second function should have (r3-a3) instead of (r-a)^3. All the lines are connected now and it looks as if it exhibits the characteristics one would expect from the system.
 
Last edited:
  • #5
oddjobmj said:
Actually, the function for M(r) would be zero if the density were zero.

No it wouldn't. Remember that M(r) is the total mass enclosed by the radius r. This is non-zero for r > R. It's just constant, as you pointed out. Hint: for r > a, both densities come into play in calculating M enclosed, not just one.
 
  • Like
Likes 1 person
  • #6
I'm sorry, I was unclear. You are correct. I didn't mean to imply that M(r) should actually equal zero. I just meant that if I happened to plug in zero for the density it would spit out zero. Instead I just set the mass at r>R to the total mass of the planet.
 
  • #7
Cool. Just out of curiosity, what does your new plot look like?
 
  • Like
Likes 1 person
  • #9
Cool. I got some very similar looking output (attached png).

Code:
#########################################################################
# g_earth.py -- simple model of Earth with const. density iron core for 
#               r < a, and const  density rock mantle for a < r < R.
#########################################################################

import numpy as np
import matplotlib.pyplot as plt
import math


R = 6.40e6      # metres
rho0 = 8.70e3   # kg/m^3
rho1 = 4.10e3   # kg/m^3
a = 4.291e6     # metres
G = 6.67384e-11 # m^3 kg^-1 s^-1

r = np.arange(1.0, 1.0e7, 1.0e3)

M = np.zeros(len(r))
g = np.zeros(len(r))

for i in xrange(len(r)):
    if (r[i] < a):
        M[i] = rho0*(4.0/3.0)*math.pi*(r[i])**3 
        g[i] = (G*M[i])/(r[i])**2
    elif (r[i] < R):
        M[i] = rho1*(4.0/3.0)*math.pi*((r[i])**3 - a**3)\
               + rho0*(4.0/3.0)*math.pi*(a**3)
        g[i] = (G*M[i])/(r[i])**2
    else:
        M[i] = rho1*(4.0/3.0)*math.pi*(R**3 - a**3)\
               + rho0*(4.0/3.0)*math.pi*(a**3)
        g[i] = (G*M[i])/(r[i])**2

plt.figure(1, figsize=(12,8), dpi=100)
plt.plot(r,g)
plt.title("Gravitational Field Strength as a Function of Radial Distance for Simple Earth Model")
plt.ylabel("g(r) [N/kg]")
plt.xlabel("r [m]")
plt.savefig("g_earth.png")
plt.show()
 

Attachments

  • g_earth.png
    g_earth.png
    6.4 KB · Views: 400
  • Like
Likes 1 person
  • #10
Ah, I didn't even think about breaking out IDLE... Also, I'll sleep better tonight knowing you came up with similar results. Thank you!
 
  • #11
Since g ~ M/r^2, we can predict what g(r) should look like in the three regimes.

For r < a, M(r) ~ r^3, therefore g ~ r^3/r^2. In other words, g ~ r so the linear relationship is totally expected. Here I use ~ to mean "scales as" or "is proportional to."

For r > R, M(r) = const., therefore g ~ 1/r^2, which looks about right on the plot

The middle phase is tricker.
 
  • Like
Likes 1 person

1. What is g(r) and how does it relate to the density of a planet?

g(r) is the radial distribution function, which represents the probability of finding a particle at a certain distance from another particle. In the case of a planet, g(r) can be used to study the distribution of mass, which is directly related to the density of the planet.

2. How can we determine the distinct density regions of a planet using g(r)?

By analyzing the shape of the g(r) curve, we can identify peaks and valleys which correspond to regions of high and low density respectively. This allows us to differentiate between different density regions within a planet.

3. What factors can influence the shape of the g(r) curve for a planet?

The shape of the g(r) curve can be affected by various factors such as the composition of the planet, its internal structure, and external forces such as gravitational pull or impact events.

4. How does the g(r) curve differ for a planet with two distinct density regions compared to a planet with a uniform density?

A planet with two distinct density regions will have a g(r) curve with multiple peaks and valleys, indicating the presence of different density regions. On the other hand, a planet with a uniform density will have a smooth g(r) curve with no significant variations.

5. Is there a relationship between the g(r) curve and the gravitational pull of a planet with two distinct density regions?

Yes, the g(r) curve can provide information about the distribution of mass within a planet, which in turn affects the gravitational pull. For a planet with two distinct density regions, the gravitational pull will vary depending on the density of each region.

Similar threads

  • Introductory Physics Homework Help
Replies
4
Views
575
Replies
1
Views
452
  • Introductory Physics Homework Help
Replies
8
Views
946
  • Introductory Physics Homework Help
Replies
3
Views
5K
  • Introductory Physics Homework Help
Replies
1
Views
3K
  • Introductory Physics Homework Help
Replies
3
Views
845
  • Introductory Physics Homework Help
Replies
13
Views
3K
  • Introductory Physics Homework Help
Replies
4
Views
2K
  • Introductory Physics Homework Help
2
Replies
62
Views
3K
  • Introductory Physics Homework Help
Replies
7
Views
2K
Back
Top