Atmospheric Density from: Alt, Temp, Pressure & Humidity

In summary, this one's not homework, this one's just a noob begging for any help he can get, but i figured this would probably be the best place to ask. The user is attempting to calculate atmospheric density based on altitude, temperature, barometric pressure, and humidity. However, they are having difficulty understanding what they are doing and are getting lost in equations. They hope that someone more knowledgeable can help them get back on track.
  • #1
OOPz
2
0
This ones not homework, this ones just a noob begging for any help he can get, but i figured this would probably be the best place to ask.

What I am doing is building a free/open source rifle 'game' for Blender3d's game engine (python scripting) with moderately accurate ballistics (several approximations, but i should be within 5..10cm at 1km (i.e. functionally, no error)), but iv got out of my league trying to work out the atmospheric density (and there was me thinking that calculating the trajectory would be the hard bit ;)).
(in truth its an art project but iv decided to try to get the bullet physics as close as is practical, some approximation is fine, ditto lookup tables)

Im trying to determine a single equation for approximating Atmospheric density based on the Altitude, Temperature, Barometric pressure and Humidity

im starting with something (apparently) simple
DensityOfAir=(AbsolutePressure(air)/(SpecificGasConstant(air)*(Temp(air)+273.15)))+(AbsolutePressure(water)/(SpecificGasConstant(water)*(Temp(water)+273.15)))

i.e. the density will be the total of the two component pressures/sgc*t

instead of calculating the values of specific gas constants (SpecificGasConstant=IdealGasConstant/MolarMassOfGas) i think i can get away with just using:
SGC,dry air = 287.05 J/(kg·K)
SGC,water vapor = 461.495 J/(kg·K)
(these are sea level, standard atmosphere values, but i doubt it will make much difference, please correct me if I am wrong)

so, all i need now is to use the humidity to work out the pressures of air/water vapor... right?
which is where my head starts to hurt.

I think it has something to do with the saturation vapor pressure
SatVapPres = 6.11*10.0**(7.5*Temp/(237.7+Temp))?
and
WaterVapPres = (RelHumid(%)*SatVapPres)/100.0)

but, i simply don't understand what I am doing anymore, thus have no clue if I am doing it right or not :/

I keep running into lapse rates and other confusing things, and its not helped by wiki pages which don't tell you what the variables are, or the way that many of the equations I am finding online simply don't agree with each other and/or don't tell me what units they use (no point plugging Celsius into something expecting Fahrenheit) ;)

im getting very close to just plugging in "AverageDensity(sealevel) = 1.2(kg/m**3)" and walking away :/I fully understand if nobody wants to help, i do a lot of support myself and hate this sort of question, but... with a bit of luck, someone who knows the subject already will be able to point me in the right direction, tell me what i can ignore, what i can use a constant value for etc. and get me moving again. i hope that 10minutes of your time can save me another 2 days of confused wiki trawling ;)

thanks in advance
OOPz

(btw, if you really want, i can provide an extensive collection of equations iv been trying to use, but tbh, i don't think that will really help anybody)
 
Physics news on Phys.org
  • #2
Welcome to PF.

As an observation I'd think that the issues of water vapor and density to figure your viscosity are not nearly as important as the profile of your projectile for instance. Even though your speed is greater than the critical speed and your drag is dominated by turbulence and the v2 term, the linear regime and the first order term just in v may even be more important than say humidity, even at high speeds.

You might find this lecture of interest:
https://www.youtube.com/watch?v=9lvNofoUYwI
 
  • #3
Absolutely, the ballistic coefficient, mass, cross section etc of the round in question are considerably more important to the profile of the trajectory, but, as it turns out, that bit of the calculation is comparatively simple.

DragForce = 0.5*(AirDensity*(Velocity(bullet)**2)*Drag Coefficient(bullet)*pi*(Radius(bullet)**2))

(calculating ballistic coefficients would most likely make the ballistic calc considerably harder than the air density calc, but... thankfully, bullet manufactures print that on the box ;) (not really 'quite' that simple in truth, but... pretty much))

The density of the air makes quite a lot of difference to the zero range, like, maybe 1 or 2 meters up/down at 1km (more than enough to totally miss your target).
as i am also factoring in the likes of the Coriolis effect (roughly 30cm at 1km) gyroscopic drift (roughly 10cm at 1km), a relatively huge factor such as the air density MUST be factored in, even if i do end up with a single, static environment model (i really REALLY want the user to be able to turn up/down temp/humidity etc (but i can't really justify spending a whole week just to get the air right).. later i intend to plug in visual weather effects based on these values too, so, for example, as the temp passes the due point the scene will mist up and the visibility will drop)

watching the video now (in bed ;))... if there's anything helpful there i will have a more in depth look in the morning, when my brain works better,

thanks
 
Last edited:

1. What is atmospheric density?

Atmospheric density refers to the mass of air per unit volume in a given area of the Earth's atmosphere. It is a measure of how tightly packed the air molecules are in a specific location.

2. How does altitude affect atmospheric density?

The higher the altitude, the lower the atmospheric density. This is because as altitude increases, there is less air above pushing down on the air below, leading to a decrease in air pressure and a decrease in the number of air molecules per unit volume.

3. How does temperature affect atmospheric density?

As temperature increases, atmospheric density decreases. This is because warm air is less dense than cold air, and therefore, warm air will rise while cold air sinks. This creates a difference in density at different altitudes.

4. How does pressure affect atmospheric density?

Pressure and atmospheric density are directly related. An increase in pressure will lead to an increase in atmospheric density, and a decrease in pressure will result in a decrease in atmospheric density. This is because higher pressure means more air molecules are packed into a smaller space, while lower pressure means fewer air molecules per unit volume.

5. How does humidity affect atmospheric density?

Humidity, or the amount of water vapor in the air, has a minimal effect on atmospheric density. Water vapor molecules are lighter than air molecules, so they contribute less to the overall mass of air. However, in extremely humid conditions, the added water vapor can displace some air molecules, leading to a slight decrease in atmospheric density.

Similar threads

  • Introductory Physics Homework Help
Replies
5
Views
944
  • Introductory Physics Homework Help
Replies
3
Views
992
  • Introductory Physics Homework Help
Replies
25
Views
2K
  • Introductory Physics Homework Help
Replies
2
Views
1K
  • Introductory Physics Homework Help
Replies
10
Views
1K
  • Introductory Physics Homework Help
Replies
24
Views
1K
  • Introductory Physics Homework Help
Replies
10
Views
1K
  • Introductory Physics Homework Help
Replies
1
Views
1K
  • Introductory Physics Homework Help
Replies
4
Views
1K
  • Introductory Physics Homework Help
Replies
23
Views
2K
Back
Top