4 Linear Interpolations... I think.

jwell1515

New Member
Joined
Sep 20, 2012
Messages
1
Here are 4 tables of iterated values for bottom hole pressures in CO2 injection wells. I’d like to be able to input a Surface Pressure (Psurf), TD (total depth), average fluid temperature Tavg, and CO2% and have excel go find the best approximation of the bottom hole pressure from the tables. Basically it needs to do 4 interpolations. I am totally stumped. Any help at all would be much appreciated. I've pasted the four data sets the best I can.

Thanks

John

[TABLE="width: 503"]
<colgroup><col><col><col span="7"></colgroup><tbody>[TR]
[TD][/TD]
[TD]CO2[/TD]
[TD="align: right"]100[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]TD=4925[/TD]
[TD]Tavg=70[/TD]
[TD]Tavg=75[/TD]
[TD]Tavg=80[/TD]
[TD]Tavg=85[/TD]
[TD]Tavg=90[/TD]
[TD]Tavg=95[/TD]
[TD]Tavg=100[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]1800[/TD]
[TD]3672[/TD]
[TD]3635[/TD]
[TD]3595[/TD]
[TD]3553[/TD]
[TD]3509[/TD]
[TD]3461[/TD]
[TD]3409[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]1850[/TD]
[TD]3729[/TD]
[TD]3692[/TD]
[TD]3654[/TD]
[TD]3612[/TD]
[TD]3569[/TD]
[TD]3522[/TD]
[TD="align: right"]3471[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]1900[/TD]
[TD]3786[/TD]
[TD]3750[/TD]
[TD]3712[/TD]
[TD]3671[/TD]
[TD]3629[/TD]
[TD]3583[/TD]
[TD="align: right"]3533[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]1950[/TD]
[TD]3843[/TD]
[TD]3807[/TD]
[TD]3771[/TD]
[TD]3731[/TD]
[TD]3690[/TD]
[TD]3645[/TD]
[TD="align: right"]3596[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]2000[/TD]
[TD]3899[/TD]
[TD]3865[/TD]
[TD]3828[/TD]
[TD]3788[/TD]
[TD]3748[/TD]
[TD]3705[/TD]
[TD="align: right"]3658[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]2050[/TD]
[TD]3955[/TD]
[TD]3921[/TD]
[TD]3886[/TD]
[TD]3847[/TD]
[TD]3807[/TD]
[TD]3765[/TD]
[TD="align: right"]3720[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]2100[/TD]
[TD]4011[/TD]
[TD]3978[/TD]
[TD]3943[/TD]
[TD]3905[/TD]
[TD]3866[/TD]
[TD]3825[/TD]
[TD="align: right"]3782[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]2150[/TD]
[TD]4067[/TD]
[TD]4035[/TD]
[TD]4001[/TD]
[TD]3964[/TD]
[TD]3926[/TD]
[TD]3887[/TD]
[TD="align: right"]3845[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]2200[/TD]
[TD]4123[/TD]
[TD]4091[/TD]
[TD]4058[/TD]
[TD]4022[/TD]
[TD]3985[/TD]
[TD]3947[/TD]
[TD="align: right"]3907[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]2250[/TD]
[TD]4179[/TD]
[TD]4147[/TD]
[TD]4115[/TD]
[TD]4080[/TD]
[TD]4044[/TD]
[TD]4007[/TD]
[TD="align: right"]3979[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]2300[/TD]
[TD]4234[/TD]
[TD]4203[/TD]
[TD]4171[/TD]
[TD]4137[/TD]
[TD]4102[/TD]
[TD]4066[/TD]
[TD]4029
[/TD]
[/TR]
</tbody>[/TABLE]


[TABLE="width: 499"]
<colgroup><col><col><col span="7"></colgroup><tbody>[TR]
[TD][/TD]
[TD]CO2[/TD]
[TD="align: right"]98[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Depth[/TD]
[TD]TD=4925[/TD]
[TD]Tavg=70[/TD]
[TD]Tavg=75[/TD]
[TD]Tavg=80[/TD]
[TD]Tavg=85[/TD]
[TD]Tavg=90[/TD]
[TD]Tavg=95[/TD]
[TD]Tavg=100[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]1800[/TD]
[TD]3647[/TD]
[TD]3614[/TD]
[TD]3578[/TD]
[TD]3542[/TD]
[TD]3503[/TD]
[TD]3461[/TD]
[TD]3417[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]1850[/TD]
[TD]3703[/TD]
[TD]3670[/TD]
[TD]3634[/TD]
[TD]3598[/TD]
[TD]3559[/TD]
[TD="align: right"]3518[/TD]
[TD="align: right"]3474[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]1900[/TD]
[TD]3759[/TD]
[TD]3727[/TD]
[TD]3691[/TD]
[TD]3656[/TD]
[TD]3618[/TD]
[TD="align: right"]3577[/TD]
[TD="align: right"]3534[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]1950[/TD]
[TD]3815[/TD]
[TD]3783[/TD]
[TD]3748[/TD]
[TD]3713[/TD]
[TD]3675[/TD]
[TD="align: right"]3635[/TD]
[TD="align: right"]3594[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]2000[/TD]
[TD]3871[/TD]
[TD]3840[/TD]
[TD]3805[/TD]
[TD]3771[/TD]
[TD]3734[/TD]
[TD="align: right"]3695[/TD]
[TD="align: right"]3655[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]2050[/TD]
[TD]3927[/TD]
[TD]3896[/TD]
[TD]3862[/TD]
[TD]3828[/TD]
[TD]3792[/TD]
[TD="align: right"]3754[/TD]
[TD="align: right"]3715[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]2100[/TD]
[TD]3982[/TD]
[TD]3952[/TD]
[TD]3919[/TD]
[TD]3886[/TD]
[TD]3850[/TD]
[TD="align: right"]3813[/TD]
[TD="align: right"]3775[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]2150[/TD]
[TD]4038[/TD]
[TD]4009[/TD]
[TD]3976[/TD]
[TD]3944[/TD]
[TD]3909[/TD]
[TD="align: right"]3873[/TD]
[TD="align: right"]3836[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]2200[/TD]
[TD]4093[/TD]
[TD]4064[/TD]
[TD]4032[/TD]
[TD]4000[/TD]
[TD]3966[/TD]
[TD="align: right"]3931[/TD]
[TD="align: right"]3895[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]2250[/TD]
[TD]4147[/TD]
[TD]4119[/TD]
[TD]4088[/TD]
[TD]4057[/TD]
[TD]4024[/TD]
[TD="align: right"]3990[/TD]
[TD="align: right"]3955[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]2300[/TD]
[TD]4203[/TD]
[TD]4175[/TD]
[TD]4145[/TD]
[TD]4115[/TD]
[TD]4083[/TD]
[TD]4051[/TD]
[TD]4017[/TD]
[/TR]
</tbody>[/TABLE]

[TABLE="width: 503"]
<colgroup><col><col><col span="7"></colgroup><tbody>[TR]
[TD][/TD]
[TD]CO2[/TD]
[TD]100[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]TD=4975[/TD]
[TD]Tavg=70[/TD]
[TD]Tavg=75[/TD]
[TD]Tavg=80[/TD]
[TD]Tavg=85[/TD]
[TD]Tavg=90[/TD]
[TD]Tavg=95[/TD]
[TD]Tavg=100[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]1800[/TD]
[TD]3691[/TD]
[TD]3653[/TD]
[TD]3613[/TD]
[TD]3571[/TD]
[TD]3527[/TD]
[TD]3479[/TD]
[TD]3426[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]1850[/TD]
[TD]3747[/TD]
[TD]3710[/TD]
[TD]3672[/TD]
[TD]3630[/TD]
[TD]3587[/TD]
[TD]3540[/TD]
[TD="align: right"]3489[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]1900[/TD]
[TD]3804[/TD]
[TD]3768[/TD]
[TD]3730[/TD]
[TD]3689[/TD]
[TD]3647[/TD]
[TD]3601[/TD]
[TD="align: right"]3551[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]1950[/TD]
[TD]3861[/TD]
[TD]3825[/TD]
[TD]3789[/TD]
[TD]3749[/TD]
[TD]3708[/TD]
[TD]3663[/TD]
[TD="align: right"]3614[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]2000[/TD]
[TD]3917[/TD]
[TD]3883[/TD]
[TD]3846[/TD]
[TD]3806[/TD]
[TD]3766[/TD]
[TD]3723[/TD]
[TD="align: right"]3676[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]2050[/TD]
[TD]3973[/TD]
[TD]3939[/TD]
[TD]3904[/TD]
[TD]3865[/TD]
[TD]3825[/TD]
[TD]3783[/TD]
[TD="align: right"]3738[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]2100[/TD]
[TD]4029[/TD]
[TD]3996[/TD]
[TD]3961[/TD]
[TD]3923[/TD]
[TD]3884[/TD]
[TD]3843[/TD]
[TD="align: right"]3800[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]2150[/TD]
[TD]4085[/TD]
[TD]4053[/TD]
[TD]4019[/TD]
[TD]3982[/TD]
[TD]3944[/TD]
[TD]3905[/TD]
[TD="align: right"]3863[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]2200[/TD]
[TD]4141[/TD]
[TD]4109[/TD]
[TD]4076[/TD]
[TD]4040[/TD]
[TD]4003[/TD]
[TD]3965[/TD]
[TD="align: right"]3925[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]2250[/TD]
[TD]4197[/TD]
[TD]4165[/TD]
[TD]4133[/TD]
[TD]4098[/TD]
[TD]4062[/TD]
[TD]4025[/TD]
[TD="align: right"]3997[/TD]
[/TR]
[TR]
[TD]Psurf[/TD]
[TD]2300[/TD]
[TD]4254[/TD]
[TD]4221[/TD]
[TD]4189[/TD]
[TD]4155[/TD]
[TD]4120[/TD]
[TD]4084[/TD]
[TD]4046[/TD]
[/TR]
</tbody>[/TABLE]

[TABLE="width: 446"]
<colgroup><col><col span="7"></colgroup><tbody>[TR]
[TD]CO2[/TD]
[TD]98[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]TD=4975[/TD]
[TD]Tavg=70[/TD]
[TD]Tavg=75[/TD]
[TD]Tavg=80[/TD]
[TD]Tavg=85[/TD]
[TD]Tavg=90[/TD]
[TD]Tavg=95[/TD]
[TD]Tavg=100[/TD]
[/TR]
[TR]
[TD]1800[/TD]
[TD]3666[/TD]
[TD]3632[/TD]
[TD]3596[/TD]
[TD]3560[/TD]
[TD]3521[/TD]
[TD]3479[/TD]
[TD]3434[/TD]
[/TR]
[TR]
[TD]1850[/TD]
[TD]3721[/TD]
[TD]3688[/TD]
[TD]3652[/TD]
[TD]3616[/TD]
[TD]3577[/TD]
[TD]3536[/TD]
[TD="align: right"]3492[/TD]
[/TR]
[TR]
[TD]1900[/TD]
[TD]3777[/TD]
[TD]3745[/TD]
[TD]3709[/TD]
[TD]3674[/TD]
[TD]3636[/TD]
[TD]3595[/TD]
[TD="align: right"]3552[/TD]
[/TR]
[TR]
[TD]1950[/TD]
[TD]3833[/TD]
[TD]3801[/TD]
[TD]3766[/TD]
[TD]3731[/TD]
[TD]3693[/TD]
[TD]3653[/TD]
[TD="align: right"]3612[/TD]
[/TR]
[TR]
[TD]2000[/TD]
[TD]3889[/TD]
[TD]3858[/TD]
[TD]3823[/TD]
[TD]3789[/TD]
[TD]3752[/TD]
[TD]3713[/TD]
[TD="align: right"]3673[/TD]
[/TR]
[TR]
[TD]2050[/TD]
[TD]3945[/TD]
[TD]3914[/TD]
[TD]3880[/TD]
[TD]3846[/TD]
[TD]3810[/TD]
[TD]3772[/TD]
[TD="align: right"]3733[/TD]
[/TR]
[TR]
[TD]2100[/TD]
[TD]4000[/TD]
[TD]3970[/TD]
[TD]3937[/TD]
[TD]3904[/TD]
[TD]3868[/TD]
[TD]3831[/TD]
[TD="align: right"]3793[/TD]
[/TR]
[TR]
[TD]2150[/TD]
[TD]4056[/TD]
[TD]4027[/TD]
[TD]3994[/TD]
[TD]3962[/TD]
[TD]3927[/TD]
[TD]3891[/TD]
[TD="align: right"]3854[/TD]
[/TR]
[TR]
[TD]2200[/TD]
[TD]4111[/TD]
[TD]4082[/TD]
[TD]4050[/TD]
[TD]4018[/TD]
[TD]3984[/TD]
[TD]3949[/TD]
[TD="align: right"]3913[/TD]
[/TR]
[TR]
[TD]2250[/TD]
[TD]4165[/TD]
[TD]4137[/TD]
[TD]4106[/TD]
[TD]4075[/TD]
[TD]4042[/TD]
[TD]4008[/TD]
[TD="align: right"]3973[/TD]
[/TR]
[TR]
[TD]2300[/TD]
[TD]4222[/TD]
[TD]4193[/TD]
[TD]4163[/TD]
[TD]4133[/TD]
[TD]4101[/TD]
[TD]4069[/TD]
[TD]4035[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Here are 4 tables of iterated values for bottom hole pressures in CO2 injection wells. I’d like to be able to input a Surface Pressure (Psurf), TD (total depth), average fluid temperature Tavg, and CO2% and have excel go find the best approximation of the bottom hole pressure from the tables. Basically it needs to do 4 interpolations. I am totally stumped. Any help at all would be much appreciated. I've pasted the four data sets the best I can.

What you want is multiple linear regression:
LINEST - Excel - Office.com

However, when I do it out for your data, it doesn't come up with a reasonable answer. So there's something wrong. Basically, a vast majority of the final value seems to be determined by the PSurf more than anything else. If you had more values to fill in (rather than just 2 values for CO2 and TD) then we may get a better result.

You could read through this article which will give you more info:
Trendline coefficients
 
Upvote 0
COuld you provide an example of the input Values... and the result, from the table that you are looking to achieve
 
Upvote 0
I understand what he's looking for, I just can't figure out the math.

For instance, he is looking for the bottom pressure at 99 CO2 with TD of 4925, Psurf of 1800, And Tavg of 80.

He has two values in the table:
100 CO2, TD 4925, Psurf 1800, Tavg 80 = 3595
98 CO2, TD 4925, Psurf 1800, Tavg 80 = 3578

So he wants a value in between those two figures (3595 and 3578)

Or he has two values:
98 CO2, TD 4975, Psurf 1800, Tavg 80 = 3596
98 CO2, TD 4925, Psurf 1800, Tavg 80 = 3578

He wants to find the same for TD 4950, which again should be in between the values.

If it's just one variable to extrapolate, it isn't so bad. But he has 4:
1) CO2
2) TD
3) Psurf
4) Tavg

And TREND() won't solve for 4 variables.

So he has to do linear regression.

If you run standard multiple linear regression on his data, you get the following results:

Excel 2010
ABCDEFGHIJK
1CO2TDPsurfTDBottom Hole Pressure
29849251800703647-7.124681.1636490.360268.980519-609.579
398492518507037030.1252170.0079190.0500871.25217277.8755
498492519007037590.98799221.97549#N/A#N/A#N/A
598492519507038156232.72303#N/A#N/A#N/A
6984925200070387112039677146325.5#N/A#N/A#N/A
79849252050703927
89849252100703982
99849252150704038
109849252200704093CO2TDPsurfTD
119849252250704147984925180070
129849252300704203
139849751800703666Result:5700.28
149849751850703721
159849751900703777
169849751950703833
179849752000703889
189849752050703945
199849752100704000
209849752150704056
219849752200704111
229849752250704165
239849752300704222
2410049251800703672
2510049251850703729
2610049251900703786
2710049251950703843
2810049252000703899
2910049252050703955
3010049252100704011
3110049252150704067
3210049252200704123
3310049252250704179
3410049252300704234
3510049751800703691
3610049751850703747
3710049751900703804
3810049751950703861
3910049752000703917
4010049752050703973
4110049752100704029
4210049752150704085
4310049752200704141
4410049752250704197
4510049752300704254
469849251800753614
479849251850753670
489849251900753727
499849251950753783
509849252000753840
519849252050753896
529849252100753952
539849252150754009
549849252200754064
559849252250754119
569849252300754175
579849751800753632
589849751850753688
599849751900753745
609849751950753801
619849752000753858
629849752050753914
639849752100753970
649849752150754027
659849752200754082
669849752250754137
679849752300754193
6810049251800753635
6910049251850753692
7010049251900753750
7110049251950753807
7210049252000753865
7310049252050753921
7410049252100753978
7510049252150754035
7610049252200754091
7710049252250754147
7810049252300754203
7910049751800753653
8010049751850753710
8110049751900753768
8210049751950753825
8310049752000753883
8410049752050753939
8510049752100753996
8610049752150754053
8710049752200754109
8810049752250754165
8910049752300754221
909849251800803578
919849251850803634
929849251900803691
939849251950803748
949849252000803805
959849252050803862
969849252100803919
979849252150803976
989849252200804032
999849252250804088
1009849252300804145
Sheet4
Cell Formulas
RangeFormula
H13=G11*G2+H11*H2+I2*I11+J2*J11+K2
G2:K6{=LINEST(E2:E309,A2:D309,TRUE,TRUE)}
Press CTRL+SHIFT+ENTER to enter array formulas.


(I can only paste 100 lines, the table continues for all other values too).

Obviously 5700 is totally off, since the range of values in the table is 3409-4254, and the value for the particular combination I put in is 3647 (first value in the table). But I don't know why it's off, because multiple linear regression is an art not a science and I don't understand the data or relationship (it looks like 99.9% of the value should be modified by the Psurf alone).
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top