1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Density of an ideal gas as a function of height

  1. Jan 16, 2017 #1
    1. The problem statement, all variables and given/known data
    If air has a density of ρ0 on the surface, calculate its density as a function of the height y for two scenarios:
    (a) the temperature is constant at T0;
    (b) the temperature decreases linearly T(y) = T0 − ay.
    Express your results using the given variables together the gravitational acceleration g, gas constant R and air molar mass M.

    I think I am making an incorrect assumption or just going about this incorrectly. Let me know if you guys see the mistake. I am just focusing on part a as of now.
    2. Relevant equations

    1) F = ma
    2) pV = nRT = (m/M)RT

    3. The attempt at a solution

    1) First, using the ideal gas law, we know:
    2) Since M, R, and T are constant if we can figure out how pressure is changing with respect to height (y) then we can find how density is as well.

    3) Assuming a "slab" of air with a height of dy and a cross-sectional area of A at surface level we can apply Newton's second law:
    Fp_up - Fp_down - mg = ma
    4) Fp_up = pressure acting up on slab Fp_down = pressure acting down on slab and a = 0. This gives:
    Fp_up = Fp_down + mg
    5) Since p = (F/A) ⇒ F = pA:
    pA = (p + dp)A + ρ(Ady)g
    6) I think this is where my mistake is but since we're considering a slab at surface level ρ in the above equation would be equal to ρ0

    7) Form here I was able to solve the differential equation in step #5 and get:
    p(y) = P00gy
    8) I then substituted this in for p in the equation in step #1 and in turn got ρ as a function of y.
  2. jcsd
  3. Jan 16, 2017 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    Note that ##\rho## changes with height as pressure changes with height. What does this tell you about the differential equation?
  4. Jan 16, 2017 #3
    That is has two different functions in it. What I ended up doing was using ρ=(pM)/(RT) to find dp/dy and then substitute that into the step 5 equation which gives me a linear first order differential equation consisting only of ρ'(y) and ρ(y). I did a similar approach in part b.

    1) Using ρ=(pM)/(RT) I could find dp/dy=(R/M)(T'(y)ρ(y) + T(y)ρ'(y)).
    2) I then substituted this into the equation:
    3) SInce we know T(y) we can express it as a first order differential equation with variable coefficients. I used an integrating factor that does not work out very nicely. Is there something I missed or is this just unavoidable?
  5. Jan 16, 2017 #4


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    Please show that in detail.
    But I suggest it will be easier working with an equation for p.
    At 5) you have dp=ρg dy, and at 1), pM=ρRT. Eliminating ρ, what do they give you?
  6. Jan 16, 2017 #5
    1) I used equation one, pM=ρRT, and solved for p yielding p=(RT/M)ρ.
    2) From here I found:
    dp/dy=(RT/M)ρ'(y). ​
    3) Using:
    pA=(p+dp)A+ρ(Ady)g ⇒ dp=-ρgdy ⇒ dp/dy=-gρ​
    4) I replaced dp/dy with (RT/M)ρ' and got (RT/M)ρ'=-gp.
    5) Since this is a linear first order homogeneous diff eq, ρ'+(gM/RT)ρ=0, I used the characteristic polynomial, r+(gM/RT)=0.
    6) I ended up getting this:
  7. Jan 16, 2017 #6


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    Ok, that was a little convoluted but you got to the right place.
    (I would have written dp=-ρg dy, pM=ρRT, so dp/p=-(gM/RT)dy, p=Ce-(gM/RT)y etc.)
    So what about the case where T is linear with height?
  8. Jan 16, 2017 #7
    For this part I used dp/dy=-gρ because the forces were not dependent upon temperature. I also used p=(ρRT/M) to get dp/dy=(R/M)(T'(y)ρ(y)+T(y)ρ'(y)) since both temperature and density are dependent upon height. We know T(y)=To-ay so T'(y)=-a. Combinding dp/dy=(R/M)(T'(y)ρ(y)+T(y)ρ'(y)) and dp/dy=-gρ I was able to come up with this differential equation (sorry for it being a little messy):
  9. Jan 17, 2017 #8


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    Should that be R(T0-ay)?
    Anyway, can you solve that? For a hint see my last step in post #6.
  10. Jan 17, 2017 #9

    Charles Link

    User Avatar
    Homework Helper

    @Ian Baughman I think you might find it useful to know that fluids and gases experience a force per unit volume given by ## \vec{f}_v=-\nabla P ##. The gravitational field supplies a force per unit volume of ## \vec{f}_g=-\delta g \hat{z} ## where ## \delta ## is the mass density of the fluid or gas. In order to have equilibrium, the net forces must be equal to zero: ## -\nabla P-\delta g \hat{z}=0 ##. From this you can get a differential equation for the pressure as a function of height. You are already on the right track, but I thought you might find this of some use.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted

Similar Discussions: Density of an ideal gas as a function of height
  1. Ideal Gas Density! (Replies: 9)

  2. Density of ideal gas (Replies: 3)