Numerical integration of first order differential equation & fitting to experimental data












1












$begingroup$


We are working on phase transformation kinetics in Advanced High Strength steels and we are trying to fit our experimental data to the following differential for recristallization, by Kulakov et. al 2014. The variable model parameters are $b_0$, n, Q .



List item



We put this model into an Excel sheet and used both RK4 and Forward Euler, however this does not seem to yield the results.



Possible causes of problem:




  • Type-o's in the sheet. [Have been ruled out after 2 days I guess]

  • Incorrect use of constant $b_0$, I do not know what to do with the part withing square brackets of this variable: $1.1*10^{29}*[s^{-1.7}]$

  • Wrong application of numerical integration methods.


I used my textbook for the RK4 method and this little tutorial for the Forward Euler: http://bmi.bmt.tue.nl/sysbio/Education/Excel_Euler_simulation.pdf



If anyone can give me any tips ( or tell me how to upload my spreadsheet to let someone take a look ) please help me out. This is a rather big bump in the road towards finishing my bachelor thesis =]



Kind regards and thanks in advance!










share|cite|improve this question









$endgroup$












  • $begingroup$
    1. Perhaps this is a silly question, but I have to ask it: does your experimental data correspond to a recrystallization? 2. Your DE there has no $t$ on the RHS, so far as I can see. (Is the $T$ in the equation for $b$ really upper-case? Or is it lower-case? Mathematics is case-sensitive!) That means it's theoretically separable. Have you tried integrating it that way? It actually looks doable.
    $endgroup$
    – Adrian Keister
    Dec 14 '18 at 15:24










  • $begingroup$
    Could you write your computations in some code or pseudo-code form into a code environment? It is not clear from the image what variables are connected, the same, ...
    $endgroup$
    – LutzL
    Dec 14 '18 at 15:24






  • 1




    $begingroup$
    Is it $left(lnleft(dfrac{1}{1-X}right)right)^{(n-1)/n}$ or $lnleft(left(frac{1}{1-X}right)^{(n-1)/n}right)?$
    $endgroup$
    – Adrian Keister
    Dec 14 '18 at 15:41






  • 1




    $begingroup$
    @AdrianKeister : Looking at the original formula, it is more reasonable to assume that it is the first form.
    $endgroup$
    – LutzL
    Dec 14 '18 at 15:44








  • 1




    $begingroup$
    I think $s$ is the unit, seconds. This fits with $b^{1/n}$ having the unit $1/s$. In whatever way it makes sense to have fractional powers of units.
    $endgroup$
    – LutzL
    Dec 14 '18 at 15:56


















1












$begingroup$


We are working on phase transformation kinetics in Advanced High Strength steels and we are trying to fit our experimental data to the following differential for recristallization, by Kulakov et. al 2014. The variable model parameters are $b_0$, n, Q .



List item



We put this model into an Excel sheet and used both RK4 and Forward Euler, however this does not seem to yield the results.



Possible causes of problem:




  • Type-o's in the sheet. [Have been ruled out after 2 days I guess]

  • Incorrect use of constant $b_0$, I do not know what to do with the part withing square brackets of this variable: $1.1*10^{29}*[s^{-1.7}]$

  • Wrong application of numerical integration methods.


I used my textbook for the RK4 method and this little tutorial for the Forward Euler: http://bmi.bmt.tue.nl/sysbio/Education/Excel_Euler_simulation.pdf



If anyone can give me any tips ( or tell me how to upload my spreadsheet to let someone take a look ) please help me out. This is a rather big bump in the road towards finishing my bachelor thesis =]



Kind regards and thanks in advance!










share|cite|improve this question









$endgroup$












  • $begingroup$
    1. Perhaps this is a silly question, but I have to ask it: does your experimental data correspond to a recrystallization? 2. Your DE there has no $t$ on the RHS, so far as I can see. (Is the $T$ in the equation for $b$ really upper-case? Or is it lower-case? Mathematics is case-sensitive!) That means it's theoretically separable. Have you tried integrating it that way? It actually looks doable.
    $endgroup$
    – Adrian Keister
    Dec 14 '18 at 15:24










  • $begingroup$
    Could you write your computations in some code or pseudo-code form into a code environment? It is not clear from the image what variables are connected, the same, ...
    $endgroup$
    – LutzL
    Dec 14 '18 at 15:24






  • 1




    $begingroup$
    Is it $left(lnleft(dfrac{1}{1-X}right)right)^{(n-1)/n}$ or $lnleft(left(frac{1}{1-X}right)^{(n-1)/n}right)?$
    $endgroup$
    – Adrian Keister
    Dec 14 '18 at 15:41






  • 1




    $begingroup$
    @AdrianKeister : Looking at the original formula, it is more reasonable to assume that it is the first form.
    $endgroup$
    – LutzL
    Dec 14 '18 at 15:44








  • 1




    $begingroup$
    I think $s$ is the unit, seconds. This fits with $b^{1/n}$ having the unit $1/s$. In whatever way it makes sense to have fractional powers of units.
    $endgroup$
    – LutzL
    Dec 14 '18 at 15:56
















1












1








1





$begingroup$


We are working on phase transformation kinetics in Advanced High Strength steels and we are trying to fit our experimental data to the following differential for recristallization, by Kulakov et. al 2014. The variable model parameters are $b_0$, n, Q .



List item



We put this model into an Excel sheet and used both RK4 and Forward Euler, however this does not seem to yield the results.



Possible causes of problem:




  • Type-o's in the sheet. [Have been ruled out after 2 days I guess]

  • Incorrect use of constant $b_0$, I do not know what to do with the part withing square brackets of this variable: $1.1*10^{29}*[s^{-1.7}]$

  • Wrong application of numerical integration methods.


I used my textbook for the RK4 method and this little tutorial for the Forward Euler: http://bmi.bmt.tue.nl/sysbio/Education/Excel_Euler_simulation.pdf



If anyone can give me any tips ( or tell me how to upload my spreadsheet to let someone take a look ) please help me out. This is a rather big bump in the road towards finishing my bachelor thesis =]



Kind regards and thanks in advance!










share|cite|improve this question









$endgroup$




We are working on phase transformation kinetics in Advanced High Strength steels and we are trying to fit our experimental data to the following differential for recristallization, by Kulakov et. al 2014. The variable model parameters are $b_0$, n, Q .



List item



We put this model into an Excel sheet and used both RK4 and Forward Euler, however this does not seem to yield the results.



Possible causes of problem:




  • Type-o's in the sheet. [Have been ruled out after 2 days I guess]

  • Incorrect use of constant $b_0$, I do not know what to do with the part withing square brackets of this variable: $1.1*10^{29}*[s^{-1.7}]$

  • Wrong application of numerical integration methods.


I used my textbook for the RK4 method and this little tutorial for the Forward Euler: http://bmi.bmt.tue.nl/sysbio/Education/Excel_Euler_simulation.pdf



If anyone can give me any tips ( or tell me how to upload my spreadsheet to let someone take a look ) please help me out. This is a rather big bump in the road towards finishing my bachelor thesis =]



Kind regards and thanks in advance!







ordinary-differential-equations numerical-methods data-analysis






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Dec 14 '18 at 15:14









SimonisSimonis

233




233












  • $begingroup$
    1. Perhaps this is a silly question, but I have to ask it: does your experimental data correspond to a recrystallization? 2. Your DE there has no $t$ on the RHS, so far as I can see. (Is the $T$ in the equation for $b$ really upper-case? Or is it lower-case? Mathematics is case-sensitive!) That means it's theoretically separable. Have you tried integrating it that way? It actually looks doable.
    $endgroup$
    – Adrian Keister
    Dec 14 '18 at 15:24










  • $begingroup$
    Could you write your computations in some code or pseudo-code form into a code environment? It is not clear from the image what variables are connected, the same, ...
    $endgroup$
    – LutzL
    Dec 14 '18 at 15:24






  • 1




    $begingroup$
    Is it $left(lnleft(dfrac{1}{1-X}right)right)^{(n-1)/n}$ or $lnleft(left(frac{1}{1-X}right)^{(n-1)/n}right)?$
    $endgroup$
    – Adrian Keister
    Dec 14 '18 at 15:41






  • 1




    $begingroup$
    @AdrianKeister : Looking at the original formula, it is more reasonable to assume that it is the first form.
    $endgroup$
    – LutzL
    Dec 14 '18 at 15:44








  • 1




    $begingroup$
    I think $s$ is the unit, seconds. This fits with $b^{1/n}$ having the unit $1/s$. In whatever way it makes sense to have fractional powers of units.
    $endgroup$
    – LutzL
    Dec 14 '18 at 15:56




















  • $begingroup$
    1. Perhaps this is a silly question, but I have to ask it: does your experimental data correspond to a recrystallization? 2. Your DE there has no $t$ on the RHS, so far as I can see. (Is the $T$ in the equation for $b$ really upper-case? Or is it lower-case? Mathematics is case-sensitive!) That means it's theoretically separable. Have you tried integrating it that way? It actually looks doable.
    $endgroup$
    – Adrian Keister
    Dec 14 '18 at 15:24










  • $begingroup$
    Could you write your computations in some code or pseudo-code form into a code environment? It is not clear from the image what variables are connected, the same, ...
    $endgroup$
    – LutzL
    Dec 14 '18 at 15:24






  • 1




    $begingroup$
    Is it $left(lnleft(dfrac{1}{1-X}right)right)^{(n-1)/n}$ or $lnleft(left(frac{1}{1-X}right)^{(n-1)/n}right)?$
    $endgroup$
    – Adrian Keister
    Dec 14 '18 at 15:41






  • 1




    $begingroup$
    @AdrianKeister : Looking at the original formula, it is more reasonable to assume that it is the first form.
    $endgroup$
    – LutzL
    Dec 14 '18 at 15:44








  • 1




    $begingroup$
    I think $s$ is the unit, seconds. This fits with $b^{1/n}$ having the unit $1/s$. In whatever way it makes sense to have fractional powers of units.
    $endgroup$
    – LutzL
    Dec 14 '18 at 15:56


















$begingroup$
1. Perhaps this is a silly question, but I have to ask it: does your experimental data correspond to a recrystallization? 2. Your DE there has no $t$ on the RHS, so far as I can see. (Is the $T$ in the equation for $b$ really upper-case? Or is it lower-case? Mathematics is case-sensitive!) That means it's theoretically separable. Have you tried integrating it that way? It actually looks doable.
$endgroup$
– Adrian Keister
Dec 14 '18 at 15:24




$begingroup$
1. Perhaps this is a silly question, but I have to ask it: does your experimental data correspond to a recrystallization? 2. Your DE there has no $t$ on the RHS, so far as I can see. (Is the $T$ in the equation for $b$ really upper-case? Or is it lower-case? Mathematics is case-sensitive!) That means it's theoretically separable. Have you tried integrating it that way? It actually looks doable.
$endgroup$
– Adrian Keister
Dec 14 '18 at 15:24












$begingroup$
Could you write your computations in some code or pseudo-code form into a code environment? It is not clear from the image what variables are connected, the same, ...
$endgroup$
– LutzL
Dec 14 '18 at 15:24




$begingroup$
Could you write your computations in some code or pseudo-code form into a code environment? It is not clear from the image what variables are connected, the same, ...
$endgroup$
– LutzL
Dec 14 '18 at 15:24




1




1




$begingroup$
Is it $left(lnleft(dfrac{1}{1-X}right)right)^{(n-1)/n}$ or $lnleft(left(frac{1}{1-X}right)^{(n-1)/n}right)?$
$endgroup$
– Adrian Keister
Dec 14 '18 at 15:41




$begingroup$
Is it $left(lnleft(dfrac{1}{1-X}right)right)^{(n-1)/n}$ or $lnleft(left(frac{1}{1-X}right)^{(n-1)/n}right)?$
$endgroup$
– Adrian Keister
Dec 14 '18 at 15:41




1




1




$begingroup$
@AdrianKeister : Looking at the original formula, it is more reasonable to assume that it is the first form.
$endgroup$
– LutzL
Dec 14 '18 at 15:44






$begingroup$
@AdrianKeister : Looking at the original formula, it is more reasonable to assume that it is the first form.
$endgroup$
– LutzL
Dec 14 '18 at 15:44






1




1




$begingroup$
I think $s$ is the unit, seconds. This fits with $b^{1/n}$ having the unit $1/s$. In whatever way it makes sense to have fractional powers of units.
$endgroup$
– LutzL
Dec 14 '18 at 15:56






$begingroup$
I think $s$ is the unit, seconds. This fits with $b^{1/n}$ having the unit $1/s$. In whatever way it makes sense to have fractional powers of units.
$endgroup$
– LutzL
Dec 14 '18 at 15:56












1 Answer
1






active

oldest

votes


















1












$begingroup$

Assuming the model is correct for your experimental data, it integrates directly:
begin{align*}
frac{df}{dt}&=left[n(1-f)lnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n} \
-frac{df}{f-1}&=left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n},dt \
-(ln|f-1|-ln|f_0-1|)&=left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n}(t-t_0) \
lnleft(frac{|f-1|}{|f_0-1|}right)&=-left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n}(t-t_0) \
frac{|f-1|}{|f_0-1|}&=expleft{-left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n}(t-t_0)right} \
|f-1|&=|f_0-1|expleft{-left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n}(t-t_0)right}.
end{align*}



Other comments: your $n, b_0,$ and $Q$ are by no means independent. Depending on whether you're dealing with Ferrite-pearlite, Ferrite-bainite-pearlite, or Martensite, you'll have a relationship among those parameters that restricts the degrees of freedom considerably. It appears to me that you really only have one parameter: $Q$. So you can set up Excel's Solver routine to minimize the sum of squares of the errors between your experimental data and your model values by changing $Q$.






share|cite|improve this answer











$endgroup$













    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "69"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3039480%2fnumerical-integration-of-first-order-differential-equation-fitting-to-experime%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1












    $begingroup$

    Assuming the model is correct for your experimental data, it integrates directly:
    begin{align*}
    frac{df}{dt}&=left[n(1-f)lnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n} \
    -frac{df}{f-1}&=left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n},dt \
    -(ln|f-1|-ln|f_0-1|)&=left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n}(t-t_0) \
    lnleft(frac{|f-1|}{|f_0-1|}right)&=-left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n}(t-t_0) \
    frac{|f-1|}{|f_0-1|}&=expleft{-left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n}(t-t_0)right} \
    |f-1|&=|f_0-1|expleft{-left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n}(t-t_0)right}.
    end{align*}



    Other comments: your $n, b_0,$ and $Q$ are by no means independent. Depending on whether you're dealing with Ferrite-pearlite, Ferrite-bainite-pearlite, or Martensite, you'll have a relationship among those parameters that restricts the degrees of freedom considerably. It appears to me that you really only have one parameter: $Q$. So you can set up Excel's Solver routine to minimize the sum of squares of the errors between your experimental data and your model values by changing $Q$.






    share|cite|improve this answer











    $endgroup$


















      1












      $begingroup$

      Assuming the model is correct for your experimental data, it integrates directly:
      begin{align*}
      frac{df}{dt}&=left[n(1-f)lnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n} \
      -frac{df}{f-1}&=left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n},dt \
      -(ln|f-1|-ln|f_0-1|)&=left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n}(t-t_0) \
      lnleft(frac{|f-1|}{|f_0-1|}right)&=-left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n}(t-t_0) \
      frac{|f-1|}{|f_0-1|}&=expleft{-left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n}(t-t_0)right} \
      |f-1|&=|f_0-1|expleft{-left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n}(t-t_0)right}.
      end{align*}



      Other comments: your $n, b_0,$ and $Q$ are by no means independent. Depending on whether you're dealing with Ferrite-pearlite, Ferrite-bainite-pearlite, or Martensite, you'll have a relationship among those parameters that restricts the degrees of freedom considerably. It appears to me that you really only have one parameter: $Q$. So you can set up Excel's Solver routine to minimize the sum of squares of the errors between your experimental data and your model values by changing $Q$.






      share|cite|improve this answer











      $endgroup$
















        1












        1








        1





        $begingroup$

        Assuming the model is correct for your experimental data, it integrates directly:
        begin{align*}
        frac{df}{dt}&=left[n(1-f)lnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n} \
        -frac{df}{f-1}&=left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n},dt \
        -(ln|f-1|-ln|f_0-1|)&=left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n}(t-t_0) \
        lnleft(frac{|f-1|}{|f_0-1|}right)&=-left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n}(t-t_0) \
        frac{|f-1|}{|f_0-1|}&=expleft{-left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n}(t-t_0)right} \
        |f-1|&=|f_0-1|expleft{-left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n}(t-t_0)right}.
        end{align*}



        Other comments: your $n, b_0,$ and $Q$ are by no means independent. Depending on whether you're dealing with Ferrite-pearlite, Ferrite-bainite-pearlite, or Martensite, you'll have a relationship among those parameters that restricts the degrees of freedom considerably. It appears to me that you really only have one parameter: $Q$. So you can set up Excel's Solver routine to minimize the sum of squares of the errors between your experimental data and your model values by changing $Q$.






        share|cite|improve this answer











        $endgroup$



        Assuming the model is correct for your experimental data, it integrates directly:
        begin{align*}
        frac{df}{dt}&=left[n(1-f)lnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n} \
        -frac{df}{f-1}&=left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n},dt \
        -(ln|f-1|-ln|f_0-1|)&=left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n}(t-t_0) \
        lnleft(frac{|f-1|}{|f_0-1|}right)&=-left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n}(t-t_0) \
        frac{|f-1|}{|f_0-1|}&=expleft{-left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n}(t-t_0)right} \
        |f-1|&=|f_0-1|expleft{-left[nlnleft(frac{1}{1-X}right)^{(n-1)/n}right]b^{1/n}(t-t_0)right}.
        end{align*}



        Other comments: your $n, b_0,$ and $Q$ are by no means independent. Depending on whether you're dealing with Ferrite-pearlite, Ferrite-bainite-pearlite, or Martensite, you'll have a relationship among those parameters that restricts the degrees of freedom considerably. It appears to me that you really only have one parameter: $Q$. So you can set up Excel's Solver routine to minimize the sum of squares of the errors between your experimental data and your model values by changing $Q$.







        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Dec 14 '18 at 16:26

























        answered Dec 14 '18 at 15:55









        Adrian KeisterAdrian Keister

        5,27371933




        5,27371933






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3039480%2fnumerical-integration-of-first-order-differential-equation-fitting-to-experime%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Plaza Victoria

            In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

            How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...