Excel Numerical Integration for Piston Movement Calculation

Click For Summary

Discussion Overview

The discussion revolves around the numerical integration of pressure data to calculate the distance moved by a piston in a chamber, focusing on the relationship between pressure, force, acceleration, and displacement. Participants explore the implications of using time-dependent pressure in their calculations and the potential errors associated with numerical methods.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant outlines the relationship between pressure, force, and acceleration, suggesting that integrating acceleration leads to velocity and then displacement, but expresses uncertainty about the correctness of this method.
  • Another participant questions the integration process, noting that if pressure is a function of time, the integration results may not hold as presented, particularly highlighting the difference between constant and variable pressure.
  • A later reply emphasizes the concern about squaring the time step in numerical integration, suggesting that this could significantly increase error, especially if acceleration is not constant.
  • One participant proposes a numerical approach, suggesting that using tabulated pressure data directly for numerical integration may be more effective than attempting analytical integration.
  • Another participant mentions the importance of considering atmospheric pressure and other forces acting on the piston, indicating that these factors could affect the results.

Areas of Agreement / Disagreement

Participants express differing views on the validity of the integration method and the implications of using a time-dependent pressure function. There is no consensus on the best approach to take for numerical integration, and concerns about error propagation remain unresolved.

Contextual Notes

Participants highlight the potential instability of numerical models based on time step size, indicating that the choice of time step is critical for accuracy. The discussion does not resolve the mathematical steps or assumptions involved in the integration process.

Who May Find This Useful

This discussion may be useful for individuals interested in numerical methods for solving initial value problems, particularly in the context of fluid dynamics and piston mechanics.

a.mlw.walker
Messages
144
Reaction score
0
Hi,

I have an excel spreadsheet that calculates the pressure inside a piston chamber, that is a function of time. I want to calculate the distance the piston moves, this is my situation.

P=F/A, therefore force on piston = PA
F = M(piston).a
so ma = PA, a = P(t)A/m

its all numerical in excel so i have a column of all the accelerations at the different pressures/time steps. By integrating a for velocity, I would just end up with v = PA/m
and integrating that I would end up with s = PAt/m.

Is this correct, it seems that something is not right in this method to get the distance moved by the piston from a numerical analysis?
 
Physics news on Phys.org
a.mlw.walker said:
Hi,

I have an excel spreadsheet that calculates the pressure inside a piston chamber, that is a function of time. I want to calculate the distance the piston moves, this is my situation.

P=F/A, therefore force on piston = PA
F = M(piston).a
so ma = PA, a = P(t)A/m

its all numerical in excel so i have a column of all the accelerations at the different pressures/time steps. By integrating a for velocity, I would just end up with v = PA/m
You just said, above, that a= P(t)A/m. How does integrating that give the same thing again?

and integrating that I would end up with s = PAt/m.
Your notation indicates that P is a function of t, not a constant. The integral of PA/m is PAt/m only if P is a constant.

And, if P were a constant, you would have v= PAt/m, s= PAt^2/(2m).

Is this correct, it seems that something is not right in this method to get the distance moved by the piston from a numerical analysis?
 
yeah. p is a function of time. Does this change much?
 
Last edited:
Yes.
 
ok, so dv/dt = P(t)A/m

I know the value of P, but not the function of it, so

dv = P(t)Adt/m
v = ds/dt = v + dv

ds = P(t)A.dt^2/m

s = s + ds

I am worried that squaring the dt value will increase the error quite a lot, so was going to use constant acceleration equations, but the acceleration isn't constant, so is there an alternative, or is it alright to square the time step?
 
I don't get it. You say you have the pressures tabulated already? Why are you trying to integrate the function analytically still? Numerically is probably the way to go, i.e. you have an initial acceleration as you solved for, with a function for acceleration.

Take that function, use a step size of however small your data collecting step size was (or just pick one and interpolate, or base it off the total time scale of the data). You've got a column of accelerations now say, so take one value, multiply it by your step size, and that gives you a velocity at that time. Take that velocity, multiply it by the same step size, and that's your displacement at that time interval.

One thing to take note of is that since you're dealing with pressures and trying to do a position study, be sure to draw a free body diagram (I know, it sounds corny) and account for all the forces on the piston. A key thing to note is that atmospheric pressure may be acting over the top surface i.e. artificially inflating the values for acceleration that you think you're getting.

Hope this helps,

Chet
 
D_H has probably got closer to what i mean. With explicit numerical analysis, there is an issue with the size of the time step. I'm not trying to integrate analytically:

dv = P(t)Adt/m
v = ds/dt = v + dv

is not the analytical way of looking at a problem.

The issue is with squaring a time step. With explicit numerical analysis, the size of the time step decides whether the model is stable, so you choose a small time step. But if i need to square that time step will that increase errors, even if the time step is of the correct order of magnitude
 

Similar threads

Replies
21
Views
2K
  • · Replies 4 ·
Replies
4
Views
999
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 45 ·
2
Replies
45
Views
7K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K