Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python A useful model for the Earth's atmosphere is the constant temperature hydrostatic model, in which the pressure P decays with height z like P

python
A useful model for the Earth's atmosphere is the constant temperature hydrostatic model, in which the pressure P decays with height z like
P=P0exp(-zH)
where H=kBTmg
is the density scale height. This model follows from the model for an ideal gas. To determine the atmospheric pressure at different altitudes we just need to measure the pressure at sea level, P0, and set a temperature T(in the Kelvin temperature scale). Note, 0C=273.15K. The other parameters are well - known constants: kB is the Boltzmann constant, g is the acceleration due to gravity and m is the average molecular mass of air.
We would like to see what this model predicts for atmospheric pressure as a function of altitude. In particular, there are two things we would like to determine: the air pressure at the top of Mount Everest, and the maximum altitude humans can survive at, if the minimum pressure at which we can live is 0.47P0. We shall then compare the predictions of our simple model with the experimental data.
To begin with we need to import the NumPy and Matplotlib.pyplot libraries. Use the import command and use the aliases np and plt for the two libraries.
Given that kB=1.3810-23kgm2s-2K-1,g=9.8ms-2, and m~=291.6710-27kg, determine H. Note, you haven't been given a value for T.
This is the first step in the modelling process. Your choice will matter.
#Code for H here
Using the value P0=101.3kPa, determine the pressure at the summit of Mount Everest (which has a height of 8848m) in kPa. To calculate this we need
to use the exponential function. NumPy has all the common mathematical functions defined, so we just need to call it using the standard Python format library.method, so in this case np.exp()
#Code for P here
The experimentally measured value of the atmospheric pressure at the top of Mount Everest is ~=30kPa. Comment on the success of the model in
predicting this, and identify any reasons you can see for a discrepancy.
Add your comments here:
Our goal now is to visualise the pressure as a function of altitude. To do this we first need to obtain the appropriate data from the model. NumPy has a
number of functions for creating vectors, so we can use these to first set up a height vector, and from this calculate the associated pressures. The functions linspace() and arange() are both useful for our purposes. set up a vector of heights from 0 to 30,000 metres, in steps of 1 metre, and then a vector of associated pressures.
# Put your vectors here
We now need to visualise the dependence of P on z. To do this we will use routines from the Matplotlib library. A typical process for a quick display is to
use the routine plot followed by show. In this case we will also add axes labels using x label and ylabel before showing the plot.
# Plot Pressure vs height using Matplotlib routines
# Remember to reference all commands using the Matplotlib alias
Before we leave the model of atmospheric pressure, what is the prediction of maximum altitude at which humans can survive, if humans can tolerate a pressure of 0.47P0? There are a few ways we could solve this, but here we will try to answer using an interactive plot. We then need to obtain our pressure versus altitude diagram again, and at the same time, plot the line corresponding to the minimum pressure. The NumPy command ones is useful for creating a vector of constant values. We want the vector to be the same length as the other P vector, and for this the Python function len() is useful.
# %matplotlib notebook Command to start matplotlib plots in interactive mode, along with plt.ion()
# Use len() and np.ones() to set up constant data
%matplotlib notebook
plt.ion()
The maximum habitable altitude has been observed to be approximately 6000m. Is the model prediction reasonable?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sql All In One For Dummies 7 Books In One

Authors: Allen G Taylor ,Richard Blum

4th Edition

1394242298, 978-1394242290

More Books

Students also viewed these Databases questions