+ Reply to Thread
Results 1 to 3 of 3

Non-linear optimization

  1. #1
    Registered User
    Join Date
    11-09-2011
    Location
    Ft Collins, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    4

    Non-linear optimization

    Hello all,

    I am working on an academic research project that includes data that studies gas diffusivity rates into soil. To give a very simplified picture, gas is injected into a sealed chamber that is partially submerged into the soil. Then measurements are taken over time to see how much the concentration changes as time goes on. The more the concentration goes down, the higher the soil diffusivity rate is. Unfortunately, this does not follow a linear trend. In fact, it follows this rather difficult formula

    C/C0 = EXP(D*T/H^2)*ERFC(D*T/H^2)

    Where:
    C is Concentration at Time T
    C0 is initial concentration (at T = 0)
    D is the diffusivity rate
    H is the height of the chamber
    EXP() is the natural exponential function and
    ERFC() is the error function complement function.

    Using SOLVER it is not all that difficult to solve for the most likely value of of the diffusivity rate for given values of C, C0, T, and H. This is what I have set up (with real data) in the "SF6" attachment. I told solver to minimize the Square the shows the sum of square error (H6) by changing the value for the diffusivity rate (E5).

    The problem is that I need to do this several hundred times, and therefore I need a way of automating this process. I am having trouble visualizing how I would do this, however. What the data looks like when I pull it out of the database is shown in the "RawData" attachment. I am trying to come up with a diffusivity rate for each of the chambers (of which only a small subset is shown). How would I begin to take the data that is shown in "RawData" attachment, change it so it looks like the SF6 attachment, use Solver to come up with an optimized solution, and then repeat several hundred times?

    Any help is greatly appreciated.
    -Evan
    Attached Files Attached Files
    Last edited by EvanRosenlieb; 11-09-2011 at 06:19 PM.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Non-linear optimization

    Hi

    Copy the data from raw data and put it into sheet2 of the SF6 workbook. Open a general module in SF6 and put in the following code.

    Please Login or Register  to view this content.
    This will bring in the relevant data to the solver worksheet, perform the solver action, and output the result to the first entry line in the source data.

    Hopefully that will give you a way forward.

    rylo

  3. #3
    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: Non-linear optimization

    See attached. Enable macros and press the SolveIt button.

    EDIT: Nice job, Rylo!
    Attached Files Attached Files
    Last edited by shg; 11-09-2011 at 07:07 PM.
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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