Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations The Obturator on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to interpolate in table G

Status
Not open for further replies.

McJe

Structural
Apr 17, 2009
33
Hello,

I'm trying to understand how to interpolate values from table G (Do/t - L/Do to A-value)

I have the tabular version in an excel sheet,
and I'm trying to calculate value A from input Do - t - L

The code-part is not a problem, but the way to interpolate brings up questions. The excel sheet is fully functional, but the interpolation is not OK.

I tried several methods, but none give the exact value as I can get from programs like Compress. I think they use the same table to start from?

I tried linear interpolation:
y = y1 + (x - x1) * (y2 - y1) / (x2 - x1)

Next I tried logarithmic interpolation:
y = y1 + (log(x) - log(x1)) * (y2 - y1) / (log(x2) - log(x1))

But none of them give similar results to Compress.
Does anybody know what I'm doing wrog?
What formulas are used to get the good values?

Are the interpolation formulas used for table G, also the same I can use to interpolate the B-values?
 
Replies continue below

Recommended for you

Table G is a log-log chart. You have to consider the log of both axes of the chart.
 
Fig.G is clearly logarithmic in all its three coordinates, so you should interpolate the tabular values in a fully logarithmic way.
Long time ago I've written a procedure for doing that but don't recall any detail. Anyway this should be the procedure:
-determine the two tabulated values of D/T above and below your value
-for each of the two values interpolate on L/D to get A, using for both L/D and A their logarithms
-now you have two values of A corresponding to the two tabulated values of D/T that you again interpolate using the logarithms of both D/T and A

prex
: Online engineering calculations
: Magnetic brakes for fun rides
: Air bearing pads
 
I think my formula for logarithmic interpolation is wrong...

But ASME isn't very clear about how to interpolate.

In UG-28 (c) (1) - step 3 ASME tells only to interpolate, not what kind of interpolation.

In UG-29 (a) - step 2A ASME tells us to use 'linear interpolation or any other rational interpolation method'.


Another issue I was thinking about:
I think there is no connection between a logarithmic graph and the need to interpolate logarythmic if the tables aren't logarythmic.
The graph is only a way of presenting. I can also present a table with linear X-values (1-2-3-4-...) on a logarithmic graph, and a table with logarithmic X-values (1-10-100-1000-...) on a linear graph.
If the table isn't presented with logarithmic values, I think it is not really necessary to use logarithmic interpolation.


Nevertheless, I'm not getting quit the same values as Compress with both of my formulas.
 
As Tom said, Compress uses double logarithmic interpolation.

I did my check before. Here is what I have done:

First you find one Do/t listed in Table G (of course closest to your design Do/t), with two listed L/Do, do a double logarithmic interpolation to get a A value based on the L/Do you are designing for;

Repeat above step with another listed Do/t to get another A value;

Then do a double logarithmic interpolation based on the two Do/t and the two A values to get the final A value for the Do/t you design for.

It should be very close to Compress result.

I agree the code is not clear on this. Example L3.1 is unclear about how they got the interpolation. The A value in the example is too rough which seems to be between linear interpolation and double logarithmic.

My observation is that linear interpolcation is unconservative compared to double logarithmic interpolation.
 
McJe, your second formula is for single logarithmic interpolation, you should use double logarithmic as repeatedly noted above.
You are correct in that a specific method is not enforced by code and that different methods may be used on any set of data. However one method will be better than another one for a specific set of data. If the quantities handled span many orders of magnitude, generally a logarithmic interpolation on those quantities will give more closely approximated results.

prex
: Online engineering calculations
: Magnetic brakes for fun rides
: Air bearing pads
 
Two further comments,

(1) It's probably not worth getting all het up about using hyperprecision for interpolating these values (but on the other hand, it's always nice to know how things work and how softwares get their look up values). ASME itself rounds things off to a limited number of significant digits when interpolating for allowable tensile stress. See the new wording in General Note (b) to Table 1A. See my related discussion here for a surprising example.

(2) As for 'no connection between need to interpolate logarithmically on a logarithmic graph', etc. Interesting question. But being given a tabulated list of values how does one know what the shape of the curve is in-between those values in order to interpolate? It's not known if the line ("the curve") between those points is straight, curved, 3rd order, etc. Interpolated results may be off considerably. Trying to remember back to university days, I think that a logarithmic function generates a straight line on a log plot. That makes for easy interpolation. Table G isn’t completely linear but the point remains.
 
To follow up with Tom's comments,

(1)My observation is the difference between the linear and logarithmic interpolation is not trivial in terms of final external pressure rating. It is easily over 10%. If someone designs a vessel with a spreadsheet using linear interpolation and sets the stiffener ring spacing right there to meet the external pressure requirement, then another engineer uses Compress to check the design, he will see the vessel as under-designed. I am not saying it is not meeting the code; but it will certainly create problems between the designer and the reviewer.

(2)There are books discussing the mechanics behind the curves. Factor A is inversely propotional to L/Do and (Do/t)^1.5. So it makes perfectly sense they are drawn on a log-log graph.
 
McJe,

I agree with the other posters. For your logarithmic interpolation, your formula should be like this...

y = 10^[log(y1) + (log(x) - log(x1)) * (log(y2) - log(y1)) / (log(x2) - log(x1))]
 
Well, I may catch some flak over this[ :) ], but:

When doing these kind of calculations by hand I usually do not interpolate at all, I pull the values off the charts as the Code permits, rounding towards the conservative.

Normally the differences are between various interpolation methods are small. Yes, these differences may not be so small as to prevent some disagreements between designer and reviewer, however the method can be justified.

(As a side rant, why does EXCEL not have a native interpolation function?)

If I was putting together a program or spreadsheet which I expected to use heavily I would probably go to more trouble, but for the occasional calculation or to check work, not likely.

Regards,

Mike



 
Thank you all for your interesting comments!

The double logarythmic interpolation does very good work approaching the Compress values.

Native interpolation would be a very interestiong option for Excel, but in the mean time I wrote a little function to interpolate on different ways (linear, log, double log) out of tables that does the trick.

As I'm doing some research for a new calculation program we want to buy (PVElite, Compress, ...), I'm evaluating them, and sometimes I find strange differences. Therefore, I have to do some manual calculations (in Excel of course). It's a petty Compress does not allow a full version to test, but the evaluation of the demo gives very good results. I didn't find any 'errors' yet.
PVElite shows some strange results now and then, and some of them are allowed by the code, but some are errors in our eyes.


Thank you all for the information,
Jeroen.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor