Excel Numerical Integration for Piston Movement Calculation

In summary: I'm worried that squaring the dt value will increase the error quite alot, 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?Numerical solution of initial value problems is well beyond the scope of this forum. Many books and journal articles have been written (and continue to be written) on this topic.
  • #1
a.mlw.walker
148
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
  • #2
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?
 
  • #3
yeah. p is a function of time. Does this change much?
 
Last edited:
  • #5
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 alot, 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?
 
  • #7
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
 
  • #8
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
 

1. What is numerical integration?

Numerical integration is a method for approximating the definite integral of a function by dividing the integration interval into smaller intervals, evaluating the function at specific points within each interval, and summing these values. It is used when the integral cannot be solved analytically.

2. How is numerical integration different from analytical integration?

Numerical integration involves approximating the integral by using numerical methods and calculations, while analytical integration involves finding the exact solution to the integral using mathematical formulas and techniques.

3. What are some common numerical integration methods?

Some common numerical integration methods include the trapezoidal rule, Simpson's rule, and Gaussian quadrature. Each of these methods has different levels of accuracy and is more suitable for certain types of functions.

4. What factors can affect the accuracy of numerical integration?

The accuracy of numerical integration can be affected by the number of intervals used, the method chosen, and the complexity of the function being integrated. It is important to choose an appropriate method and number of intervals to ensure a more accurate result.

5. In what fields is numerical integration commonly used?

Numerical integration is commonly used in fields such as physics, engineering, and economics, where calculating integrals is necessary but the functions involved may be too complex to solve analytically. It is also used in computer programming and data analysis for numerical integration of large datasets.

Similar threads

Replies
21
Views
1K
  • Thermodynamics
Replies
8
Views
382
Replies
3
Views
873
Replies
5
Views
502
Replies
0
Views
616
Replies
5
Views
866
  • Classical Physics
Replies
7
Views
908
  • Other Physics Topics
Replies
31
Views
799
  • Classical Physics
Replies
3
Views
873
Replies
2
Views
233
Back
Top