cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Help with Linear Interpolation with multiple tables.

ptc-5241139
1-Newbie

Help with Linear Interpolation with multiple tables.

Hi all.

I have an extremely tricky problem that I have no idea how to program into Mathcad as my experiance is limited to say the least.

I have two tables as shown below I have a number of scenarios I need to run to get the correct data.

1. Gc = 0.111 - Therefor can use Table A-2 only.

N = 0.002 - Can use the N0.003 side of the table.

M = 0.65 - Have to interpolate between 0.6 and 0.8.

Results required for - C1, C2, C3 and Kb. I have worked these out as C1 = 0.25, C2=7.75, C3=0.6, Kb=8.75

2. Gc = 0.111 - Therefor can use Table A-2 only.

N = 0.004 - Interpolate between the N0.003 side and 0.006 N 0.024 side of the table.

M = 0.65 - Have to interpolate between 0.6 and 0.8.

Results required for - C1, C2, C3 and Kb. I have worked these out as C1 = 0.242, C2=7.167, C3=0.6, Kb=9.17

3. Gc = 0.111 - Therefor can use Table A-2 only.

N = 0.01 - Can use the 0.006 N 0.024 side of the table.

M = 0.65 - Have to interpolate between 0.6 and 0.8.

Results required for - C1, C2, C3 and Kb. I have worked these out as C1 = 0.225, C2=6, C3=0.6, Kb=10

4. Gc = 0.155 - Therefor have to interpolate between Table A-2 and A-3.

N = 0.004 - Interpolate between the N0.003 side and 0.006 N 0.024 side of table A-2 and A-3.

M = 0.65 - Have to interpolate between 0.6 and 0.8 on table A-2 and A-3

Results required for - C1, C2, C3 and Kb.

I have worked these out as C1 = 0.176, C2=7.07, C3=0.56, Kb=9.00

I have included the excel spread sheet I used to get the results.

Hope someone can help.

Kind Regards

Chris.

Table A-2 Parameters for calculating minimum weight, L10/(2 + M)2, for pipe on clay, Gc = 0.111
Gc = 0.111
N 0.0030.006 N 0.024
MC1C2C3KbC1C2C3Kb
0.20.190.6100.170.610
0.40.180.6100.170.610
0.50.180.6100.170.610
0.60.280.6100.260.610
0.80.470.650.360.610
10.470.650.460.610
1.50.450.650.840.610
20.730.651.500.610
4.01.410.651.500.610
Table A-3 Parameters for calculating minimum weight, L10/(2 + M)2, for pipe on clay, Gc = 0.222
Gc = 0.222
N 0.0030.006 N 0.024
MC1C2C3KbC1C2C3Kb
0.20.180.5150.180.510
0.40.170.510-0.380.510
0.50.170.510-0.170.510
0.60.170.510070.510
0.80.170.550.160.55
10.170.550.160.55
1.50.170.550.530.55
20.170.550.920.55
40.170.551.700.55
100.170.551.700.55
1 ACCEPTED SOLUTION

Accepted Solutions

Have you attached the sheet or am I missing something? There is only an image on your reply.

No, you don't missed anything (apart from the worksheet;-). Unfortunately its quite common for me to forget to add the attachments. In the meantime you should have it (http://communities.ptc.com/message/219752#219752)

View solution in original post

9 REPLIES 9

The following scenarios are not defined:

N > 0.024 ?? suggestion: error, or same as for 0.006 N 0.024

Gc < 0.111 ?? suggestion: error / linear extrapolate / same as Gc=0.111

Gc > 0.222 ?? suggestion: error / linear extrapolate / same as Gc=0.222

Additionally its not clearly stated what the range for M should be if we had to interpolate/extrapolate for Gc.

If Gc=0.111 we have a vector M of 9 values (up to max. 4). If Gc=0.222 there is one additional elelement >=10 and so we have 10 elements in M.

What, if, for example, Gc=0155 and M=6? Your Excel sheet would wrongly extrapolate even if we where at the first table where all values for M greater than 4 should be treated as 4!

Hi thanks for your reply and questions.

1. For N>0.024 - The results are not required. I.e a different method is taken so a message "The maximum value for the acceleration parameter N is 0.024 for clay soil. This value is exceeded" would be raised.

2. Gc < 0.111 - linear extrapolate between 0 and 0.111

3. Gc > 0.222 - linear extrapolate up to a value of 2.78 when an error code - ""The analyses are only valid for Gc less than 2.78. This value is exceeded and therefore absolute stability is the recommended design methodology" would be raised.

4. For M=6, in the first table anything over 4 is treated as 4. However in the second table you would have to interpolate between 4 and 10. Likewise if M=12 the value would be treated as 4 in the first table and 10 in the second table.

The sheet I attached to my first post is an excerpt from another sheet (which I have pasted to this reply) I just wanted a guide and then I was going to give it a go for the complete sheet.

Table A-1 Parameters for calculating minimum weight, L10/(2 + M)2, for pipe on clay, Gc = 0.0556
Gc = 0.0556

N 0.0030.006 N 0.024
MC1C2C3KbC1C2C3Kb
0.2090.6100.250.515
0.4080.6100.250.515
0.50.170.6100.440.515
0.60.170.6100.440.515
0.80.170.6100.730.515
10.450.650.730.515
1.50.450.651.120.515
20.730.651.600.515
4.01.410.651.900.515
Table A-2 Parameters for calculating minimum weight, L10/(2 + M)2, for pipe on clay, Gc = 0.111
Gc = 0.111

N 0.0030.006 N 0.024
MC1C2C3KbC1C2C3Kb
0.20.190.6100.170.610
0.40.180.6100.170.610
0.50.180.6100.170.610
0.60.280.6100.260.610
0.80.470.650.360.610
10.470.650.460.610
1.50.450.650.840.610
20.730.651.500.610
4.01.410.651.500.610
Table A-3 Parameters for calculating minimum weight, L10/(2 + M)2, for pipe on clay, Gc = 0.222
Gc = 0.222

N 0.0030.006 N 0.024
MC1C2C3KbC1C2C3Kb
0.20.180.5150.180.510
0.40.170.510-0.380.510
0.50.170.510-0.170.510
0.60.170.510070.510
0.80.170.550.160.55
10.170.550.160.55
1.50.170.550.530.55
20.170.550.920.55
40.170.551.700.55
100.170.551.700.55
Table A-4 Parameters for calculating minimum weight, L10/(2 + M)2, for pipe on clay, Gc = 0.556
Gc = 0.556

N 0.0030.006 N 0.024
MC1C2C3KbC1C2C3Kb
0.21.430.515080.510
0.40.560.550.360.55
0.50.560.550.360.55
0.60.560.550.360.55
0.81.140.550.470.55
11.340.5100.470.55
1.51.270.5100.860.510
21.270.5100.860.510
41.270.5100.860.510
101.460.5100.860.510
Table A-5 Parameters for calculating minimum weight, L10/(2 + M)2, for pipe on clay, Gc = 1.11
Gc = 1.11

N 0.0030.006 N 0.024
MC1C2C3KbC1C2C3Kb
0.22.110.5151.440.515
0.42.420.5151.170.515
0.52.420.5151.550.515
0.61.960.5151.650.515
0.82.280.5151.960.515
12.280.5152.260.515
1.52.480.515280.515
Table A-6 Parameters for calculating minimum weight,
L10/(2 + M)2, for pipe on clay, Gc = 2.78
Gc = 2.78

N 0.0030.006 N 0.024
MC1C2C3KbC1C2C3Kb
0.23.410.5202.730.520
0.43.410.5202.440.520
0.5340.5202.270.520
0.63.260.5151.990.515
0.82.4120.5151.9120.515
12.3120.5151.5140.515
1.52.3120.5151.5140.515
22.3120.5151.5140.515
4.02.3120.5151.5140.515

Hope this makes sense.

Thanks for looking at this problem.

Kind regards

Chris.

2. Gc < 0.111 - linear extrapolate between 0 and 0.111

?? Extrapolation wrt the values for G=0.0556 and 0.111, right

4. For M=6, in the first table anything over 4 is treated as 4. However in the second table you would have to interpolate between 4 and 10.

Thats clear, but the question was meant what should happen if we would have to interpolate between the two tables. Guess it would be the best to make all vector M's the same length duplicating the last row as often as necessary.

It would be necessary making all the tables the same size anyway to do a 3D interpolation.

So the data structure for every data (C1, C2, C3 and Kb) would be a 6*12*4 table.

6 ... Gc, 12...M (we need an extra value to copy for <= and >=), 4..N

Unfortunately Mathcad does not allow 3D matrices and so we will have to construct our own datastructure using nested arrays.

I have an older sheet using that kind of 3D interpolation lying around somewhere which I have yet to find. It should be possible to adopt it to your problem I guess. Will take some while, though.

OK, found the sheet.

As you can see below - the 3D interpolation routine isn't very difficult and large.

The most cumbersome part was the extraction of the data from the Excel sheet and casting it in a format suitable for further calculation. The Excel table may be optimized for manual lookup but sure not for automatic computation.

Nonetheless the attached sheet seems to do what you was asking for.

linterp3D.png

MinWeight.png

Hi there

Thanks again you are a great help. I will have a go and see how I get on.

Cheers, give yourself a big pat on the back.

Just realized that I forgot to attach the worksheet - the screenshot won't help that much, I fear.

Here it is.

Hi,

Just got your reply.

Thank you so much. I am learning a lot from you.

Where are you based, and what is your background?

Take care

Chris.

Hi there Werner Exinger.

Have you attached the sheet or am I missing something? There is only an image on your reply.

Thanks

Chris.

Have you attached the sheet or am I missing something? There is only an image on your reply.

No, you don't missed anything (apart from the worksheet;-). Unfortunately its quite common for me to forget to add the attachments. In the meantime you should have it (http://communities.ptc.com/message/219752#219752)

Top Tags