+ Reply to Thread
Results 1 to 10 of 10

4 Linear Interpolations... I think.

  1. #1
    Registered User
    Join Date
    09-20-2012
    Location
    houston, tx
    MS-Off Ver
    Excel 2011 for MAc
    Posts
    5

    4 Linear Interpolations... I think.

    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.

    Thanks

    John
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    01-17-2012
    Location
    Canada
    MS-Off Ver
    Excel 365
    Posts
    221

    Re: 4 Linear Interpolations... I think.

    Pressure Tables.xlsx

    Hi John,

    I had to restructure the tables a little but I think it achieves the same thing. Does this help?

    Note: Use the drop down lists to update the conditional formatting/result formula accordingly.
    Regards,

    jeversf

  3. #3
    Registered User
    Join Date
    09-20-2012
    Location
    houston, tx
    MS-Off Ver
    Excel 2011 for MAc
    Posts
    5

    Re: 4 Linear Interpolations... I think.

    That is helpful, but not exactly what I wanted.

    What I would like to be able to do is say something like: Psurf= 2063 pis, TD=4962, CO2 cut=99.34%, and Temp=84 degrees. And have excel approximate that bottom hole pressure. That's where the interpolation comes in

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: 4 Linear Interpolations... I think.

    This interpolates each of the four tables (using a UDF -- you'll need to enable macros), and then calculates a weight for each value.
    Attached Files Attached Files
    Last edited by shg; 09-20-2012 at 08:11 PM.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: 4 Linear Interpolations... I think.

    My first thought: Are you married to Excel? IMO, this would be easier in QuattroPro because it has a built in 2D linear interpolation function, which makes each intermediate interpolation easier. I got a rough quattro pro spreadsheet for this put together, but the forum won't let me upload it (and they just might ban me for trying, who knows ).

    The strategy I used though goes something like this:
    1) Input surface pressure. Interpolate each column of data at that surface pressure. Now you should get one row from each of the four tables
    2) Input TD. Interpolate z against TD from the tables obtained in 1. Now you have 1 table with hole pressure at different CO2 compositions, at all the Tave.
    3) Input CO2 fraction: Interpolate all the Tave columns against CO2
    4) Fiinal interpolation to get hole pressure at the desire Tave.

  6. #6
    Registered User
    Join Date
    09-20-2012
    Location
    houston, tx
    MS-Off Ver
    Excel 2011 for MAc
    Posts
    5

    Re: 4 Linear Interpolations... I think.

    Quote Originally Posted by shg View Post
    This interpolates each of the four tables (using a UDF -- you'll need to enable macros), and then calculates a weight for each value.
    This is awesome. IS there a website or book where I can learn how to do this? Thank you so much!

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: 4 Linear Interpolations... I think.

    You're welcome.

    Learn how to do which?
    Last edited by shg; 09-20-2012 at 08:15 PM.

  8. #8
    Registered User
    Join Date
    09-20-2012
    Location
    houston, tx
    MS-Off Ver
    Excel 2011 for MAc
    Posts
    5

    Re: 4 Linear Interpolations... I think.

    Thanks for the tip, however I do not have access to QuattroPro. I will ask around my office and see if anyone has it installed on their computer. Thanks

  9. #9
    Registered User
    Join Date
    09-20-2012
    Location
    houston, tx
    MS-Off Ver
    Excel 2011 for MAc
    Posts
    5

    Re: 4 Linear Interpolations... I think.

    build user defined functions and write VBA macros to solve a spreadsheet like this one.

  10. #10
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: 4 Linear Interpolations... I think.

    Hiker95 maintains a pretty good list of suggestions at http://www.mrexcel.com/forum/excel-q...ml#post3250542

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1