Weird barometric formula experiment results in Excel

In summary: Google Sheets and not in Excel actually. I selected the option "aggregate" before, but now it's like this (image). The pressure unit in this data is millibar, and the height - is in meters. The trendline is polynomial with the second degree. The second image is exponential (Error).You need to put pressure on the y-axis (the vertical axis), and the height on the x-axis as mentioned by @DrClaude in post 3.The trendline is polynomial with the second degree
  • #1
NODARman
57
13
Homework Statement
.
Relevant Equations
.
Hi,
as I know the barometric formula is an exponential equation, but when I did the experiment with a barometer at different heights and inserted these results in Excel for curve fitting, it showed a weird thing, I think. So exponential equation did show that R^2=0.942 and the second-degree polynomial R^2=0.997 (the third was even .999, but that's cheating because you can solve any equation with high degrees, but anyway...).

Is that because the max height was only 15 meters and the delta pressure millibars (and not thousands of meters)?

P.S. the experiment was conducted in the "perfect-ish" environment, in the building, with the same humidity, temperature, etc.

1672939219359.png

1672939273656.png


Data:


Pressure
Height
968.8
0
968.6
1.705
968
5.115
967.9
8.525
967.6
11.935
967
15.345
 
Physics news on Phys.org
  • #2
HI,

What about the result, i.e. the slope. Does it match the value you expect ? E.g if you try ##e^{-x}\approx 1-x## ?

##\ ##
 
  • Like
Likes NODARman and Charles Link
  • #3
Shouldn't you be plotting/fitting pressure as a function of height, no the other way around?
 
  • Like
Likes malawi_glenn, NODARman, BvU and 1 other person
  • #4
When you have the x-axis decreasing going left to right, and it should be the y-axis, it really is misleading. You can expect to find ## P(h)=P_o e^{-\alpha h} ##, (## h=## height above sea level), I believe even for the small changes in height that you have here.

Let ## h=h_o+h' ##, then ## P(h)=P(h_o+h')=P_o e^{-\alpha h_o} e^{-\alpha h'} ##, which is what you would call a new ## P_{experiment}(h')=P_o' e^{- \alpha h'} ##, but perhaps you already recognized that=You do get an exponential with ## h ' ## regardless of the altitude ##h_o ## that you start with to call your origin.
 
Last edited:
  • Like
Likes NODARman
  • #5
Hi @NODARman (if you are still reading this).

Even ignoring the other comments about your graphs, I believe you have drawn the graphs completely wrongly! For example consider the first three pressures:
P₁ = 968.8 mmHg
P₂ = 968.6 mmHg
P₃ = 968.0 mmHg
Pressure difference between P₁ and P₂ = -0.2mmHg
Pressure difference between P₂ and P₃ = -0.6mmHg

The 'gap' between the positions of P₂ and P₃ should be three times the gap between the positions of P₁ and P₂.

It appears that you have simply drawn ‘equally spaced’ the (unequally spaced) pressures on the x-axis.

Your table and graphs don’t specify units, which is bad practice. E.g. you could be measuring heights in feet – there’s no way to tell.

The pressure-changes are small so experimental uncertainties (both random and systematic) might be relatively large - large enough to make good fitting to a given equation impossible. If you include error bars, it will help you to see how well the measurements match a given equation.
 
  • Like
Likes NODARman, berkeman, BvU and 1 other person
  • #6
Steve4Physics said:
I believe you have drawn the graphs completely wrong
Looks as if Excel ( ?:) ) considers these values to be labels instead of numbers

##\ ##
 
  • Like
  • Informative
Likes NODARman, SammyS, Charles Link and 1 other person
  • #7
Steve4Physics said:
Hi @NODARman (if you are still reading this).

Even ignoring the other comments about your graphs, I believe you have drawn the graphs completely wrongly! For example consider the first three pressures:
P₁ = 968.8 mmHg
P₂ = 968.6 mmHg
P₃ = 968.0 mmHg
Pressure difference between P₁ and P₂ = -0.2mmHg
Pressure difference between P₂ and P₃ = -0.6mmHg

The 'gap' between the positions of P₂ and P₃ should be three times the gap between the positions of P₁ and P₂.

It appears that you have simply drawn ‘equally spaced’ the (unequally spaced) pressures on the x-axis.

Your table and graphs don’t specify units, which is bad practice. E.g. you could be measuring heights in feet – there’s no way to tell.

The pressure-changes are small so experimental uncertainties (both random and systematic) might be relatively large - large enough to make good fitting to a given equation impossible. If you include error bars, it will help you to see how well the measurements match a given equation.
Yeah, I'm still here, just trying to understand things. So, I remade the graph in Google Sheets and not in Excel actually. I selected the option "aggregate" before, but now it's like this (image). The pressure unit in this data is millibar, and the height - is in meters. The trendline is polynomial with the second degree. The second image is exponential (Error).
1673046515285.png

1673046637848.png
 
  • #8
You need to put pressure on the y-axis (the vertical axis), and the height on the x-axis as mentioned by @DrClaude in post 3.
 
  • Like
Likes NODARman
  • #9
NODARman said:
The trendline is polynomial with the second degree
No reason at all for more than a straight line approach (post #2)
Leave out the blue lline: it has no role or purpose whatsoever.

1673047217648.png


And you vary ##h## and measure ##p##, so the axes should be swapped (post #3 and #8).

It is time you work out an expression for the slope of line ##p(h)## : the theoretical relation, for the case ##h## small (post #2).
 
  • Like
  • Informative
Likes NODARman and Charles Link
  • #10
Just realized that pressure difference is so minimal at high numbers on the graph it seems like a horizontal line.
1673047568251.png
 
  • #11
It does appear your sensor is sufficiently sensitive and accurate to measure the small pressure drop that theory predicts. See the link in post 2 for details=I get a theoretical ## \Delta P/ \Delta h \approx -.12 ## mbar/m using MW=.030 kg/mole and ## R=(1.987 )(4.184) ## joules/mole K, in good agreement with the graph by @BvU post 9.
 
  • Informative
Likes NODARman
  • #12
Note the molecular weight MW ## \approx 30 ## has units of grams/mole, but we needed to convert to MKS. Nitrogen (diatomic) is 28, oxygen (diatomic) is 32.
 
  • Like
Likes NODARman
  • #13
Note that theoretical ## P=P_o e^{-\alpha h} ## where ## \alpha=(MW)( g)/(RT) ##. Using a Taylor series for the exponential, ## P \approx P_o(1-\alpha h) ##, so that ## \Delta P/\Delta h=-P_o \alpha \approx -.12 ##.
(Note ## g=9.8 ## in MKS units, and ## T \approx 300 ## K).

From what I can gather, you are still on a learning curve with your mathematics, so I wrote it out for you here.

Suggestion though is to check my arithmetic.

The Taylor Series for ## e^x=1+x+\frac{x^2}{2}+...##. For small ## x ##, ## e^x = 1+x ## to a very good approximation.

One additional comment is it looks like you have a very good set of data.

Edit: I also did one other calculation with the data: Using pressure gradient as a force per unit volume, to balance the gravitational force per unit volume, you get ## \frac{dP}{dh}=-\delta g ## where from a google of it ## \delta=1.29 ## kg/m^3 and ##g=9.8 ## gives ## \frac{dP}{dh}=-(1.29)(9.8) ## Nt/m^3.
(Note: ## \delta=\frac{(MW)n}{V}=\frac{(MW)P}{RT} ##, but you can get ## \delta ## with a google, rather than by putting in numbers for ## P, R, MW, ## and ## T ##. This is all consistent with the above, and we see that ## \delta g=P \alpha ##. additional note:The paper in the "link" in post 2 also uses ## k_B ## in some of its calculations, where ##R=N_a k_B ##, where ##N_a ## is avagadro's number. Thereby, instead of a molar mass, MW, they use the mass of a single molecule.)

The conversion factor here is a little tricky:
##1.0 ## bar =##1.0 \cdot 10^5 ## Nt/m^2 so that ##1.0 ## Nt/m^2=##(1.0/1.0 \cdot 10^5)## bar
and
## 1.0 ## bar= ##10^3 ## mbar
so that ## \frac{dP}{dh}=-(1.29)(9.8)10^3/(1.0 \cdot 10^5) \approx -.12 ## mbar/m.
 
Last edited:
  • Like
Likes NODARman
  • #14
Just a couple additional comments: This was a very interesting experiment, and it shows a result that if we think about it a little, it makes complete sense=if you consider a helium balloon, the reason it floats in air can be attributed to archimedes, where the buoyant force, which is the weight of the displaced air, weighs more than the material of the balloon along with the helium inside. This is one way of looking at it, but what also occurs, and this goes hand-in hand with archimedes, is that the pressure pushing upward on the lower half of the balloon is just a little bit larger than the pressure pushing downward on the upper half of the balloon. In this experiment, the barometer was sensitive enough to be able to measure the small pressure changes that occur over these small changes in altitude.
 
  • Like
Likes NODARman and Steve4Physics
  • #15
NODARman said:
Just realized that pressure difference is so minimal at high numbers on the graph it seems like a horizontal line.
View attachment 319902
The vertical axis does not have to start at 0. With the right range you will see the change in pressure on the graph.
 
  • Like
Likes Charles Link
  • #16
For this experiment, the OP @NODARman could also have googled the expected result=a google shows a pressure decrease of 26 mm mercury for every thousand feet of altitude, which does agree with the graph of post 9, once the correct conversion factors are employed.
 
  • Like
Likes NODARman
  • #17
I did refitting the curve and found out that data has so few drops with fluctuations at the very small height it seems linear. Polynomial equations can solve anything but since the barometric formula is exponential, then it has also an exponential trend line. Everything looks fine now. I'll post a reply with the correct graph soon.
Thanks for helping me.
 
  • Like
Likes BvU and Charles Link
  • #18
So, as I said the pressure difference is so minimal it is almost the perfect line trendline, of course. Also as some of you said, I've corrected the axis, applied the curve, and saw the result I was searching for.
Thank you, Messrs!

PicsArt_01-15-10.58.48.jpg
 
  • Like
Likes Charles Link
  • #19
Suggestion is to do a little extra work, and read the "link" that @BvU provided in post 2. In addition, you might find the gas law ## PV=nRT ##, ## \delta=MW n/V ##, and the force per unit volume=-##\nabla P=\delta g ## calculations of posts 11 and 13 of interest. While the primary goal may be to get the curve that fits the data, there is some very interesting physics in this experiment.

It's also got some very good mathematics, and the Taylor series for ## e^x ##, (and ## e^{-x} ##) is something that gets used in many, many places throughout physics. There is also some calculus with the solution of ## dP/P=-C \, dz ##.

It's well worth a little extra work, and the experiment is one of the better ones for learning a little extra.
 
Last edited:
  • Like
Likes NODARman
  • #20
Charles Link said:
Suggestion is to do a little extra work, and read the "link" that @BvU provided in post 2. In addition, you might find the gas law ## PV=nRT ##, ## \delta=MW n/V ##, and the force per unit volume=-##\nabla P=\delta g ## calculations of posts 11 and 13 of interest. While the primary goal may be to get the curve that fits the data, there is some very interesting physics in this experiment. It's also got some very good mathematics, and the Taylor series for ## e^x ##, (and ## e^{-x} ##), is something that gets used in many, many places throughout physics.
Yes, I was checking out for more. This topic doesn't deserve to be just a graph and fitting.
 
  • Like
Likes Charles Link
  • #21
NODARman said:
So, as I said the pressure difference is so minimal it is almost the perfect line trendline, of course. Also as some of you said, I've corrected the axis, applied the curve, and saw the result I was searching for.
Thank you, Messrs!

View attachment 320429

Don't forget to label your x-axis, include the units somewhere. Also check the coefficient in the exponent; I would increase the number of displayed digits there.
 
  • Like
  • Informative
Likes BvU, Charles Link and NODARman
  • #22
and a minor detail, but one that can be important if you want to know the subject thoroughly, is the difference between pressure in atmospheres and pressure in bars. I had to google this one also, (it's a detail I had forgotten), and found one bar is ## 1.0 \cdot 10^5 ## Newtons/m^2, while one atmosphere is ## 101,325 ## Newtons/m^2, and the Newton/m^2 is what is called a Pascal. (a bar is nearly the same as an atmosphere, with a slight difference).

Meanwhile an additional google shows that one atmosphere is 760 mm of mercury=sort of exact, with the qualifier that the temperature needs to be specified, ( T=0 C), and the gravity can differ slightly from place to place at the earth's surface. It's extra detail, but important to be able to convert from atmospheres and/or mm Hg (Hg=mercury) to millibars.

One more calculation of interest: Using density of mercury to be 13.6 gm/cm^3, with g=980 (c.g.s.), and given a 76 cm column of mercury, we find 1.0 atm =(13.6)(980)(76) dynes/cm^2=## 1.013 \cdot 10^5 ## Newtons/m^2, all consistent with the above.
 
Last edited:
  • Informative
Likes NODARman
  • #23
and another comment or two: The precision of the pressure readings is interesting=I have to ask if a microscope was used to achieve the accuracy of what looks like ## \pm .1 ## millibars? It could certainly make for optimal accuracy if a microscope was employed to read the barometer.

Meanwhile, for this experiment, the error bars for the relative reading are likely to be much smaller than for the absolute reading of the pressure. For the relative reading, a ## \Delta ## of ## \pm .1 ## millibars is reasonable.
 
Last edited:
  • Like
Likes NODARman

FAQ: Weird barometric formula experiment results in Excel

1. Why are my barometric formula results in Excel not matching expected values?

There could be several reasons for discrepancies in your barometric formula results. Common issues include incorrect input values (e.g., temperature, pressure at sea level), errors in the formula implementation, or incorrect unit conversions. Double-check all your inputs and ensure that the formula is correctly applied.

2. How do I correctly implement the barometric formula in Excel?

To implement the barometric formula in Excel, you need to use the formula: P = P0 * exp(-Mgh/RT), where P is the pressure at height h, P0 is the sea-level standard atmospheric pressure, M is the molar mass of Earth's air, g is the acceleration due to gravity, R is the universal gas constant, and T is the temperature in Kelvin. Ensure all constants and variables are correctly inputted and that you use the EXP() function for the exponential calculation.

3. What units should I use for the barometric formula in Excel?

Consistency in units is crucial for accurate results. Typically, pressure (P and P0) is measured in Pascals (Pa), height (h) in meters (m), molar mass (M) in kilograms per mole (kg/mol), acceleration due to gravity (g) in meters per second squared (m/s²), the gas constant (R) in Joules per mole per Kelvin (J/(mol·K)), and temperature (T) in Kelvin (K). Ensure all your inputs use these units.

4. How can I troubleshoot unusual or unexpected results in my Excel barometric formula calculations?

Start by verifying all input values and constants. Ensure that your formula syntax in Excel is correct and that you are using the correct Excel functions (e.g., EXP() for the exponential). Double-check unit conversions and confirm that your temperature is in Kelvin. If the issue persists, try simplifying the formula step-by-step to isolate where the error might be occurring.

5. Can Excel handle the precision required for barometric formula calculations?

Excel can handle the precision required for most barometric formula calculations, but it's essential to format cells appropriately and be aware of potential floating-point arithmetic issues. Ensure that your cells are formatted to display enough decimal places to capture the precision needed for your calculations. If extremely high precision is required, consider using specialized software or programming languages designed for scientific computations.

Back
Top