Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Guidance sought with numerical ODE solution

  1. Apr 27, 2010 #1
    The following image is from an old heat transfer book - my problem is quite similar. Note that for this discussion, only equation 4-6 need be considered.
    [PLAIN]http://www.pairofdocs.net/images/eq.jpg [Broken]

    Consider the case when the liquid is being added to the tank at a constant rate, and without loss of generality, assume that the temperature of the liquid is higher than that of the container.

    Equation 4.6 can be simplified for the purpose of my question to this:

    [tex]K = -m\dot{T_{1}}[/tex]

    We know from physics that the temperature of the liquid will never be lower than the temperature of the container. However, if the value for m is sufficiently small, then [tex]\dot{T_{1}}[/tex] times the time step for the numerical integrator (dt) will yield a result such that:


    and this is clearly not possible. How can this happen? Quite simply by using a RK routine which automatically adjusts the step size. (And, needless to say, when this happens, the routine blows up.)

    It occurred to me that one work-around is to not allow the value of m be reduced to less than some value, perhaps

    [tex]m=\frac{K dt}{T_{1}-T_{2}}[/tex]

    Does this seem reasonable? Can you suggest another approach to solving this problem?
    Last edited by a moderator: May 4, 2017
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted