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

Adding a threshold in numerical codes

  1. May 16, 2010 #1
    Hi,
    I noticed such a strange behavior in my code every time I add a threshold: little oscillation around the threshold value itself.

    For example
    [tex] f(x) = g(x), x > x_c[/tex]
    [tex] f(x) = 0, x <= x_c[/tex]
    [tex]\frac{dx}{dt}=f(x)[/tex]

    I solve the last equation and I find this oscillation. Can they be removed?
     
  2. jcsd
  3. May 16, 2010 #2

    mathman

    User Avatar
    Science Advisor
    Gold Member

    It sounds like it is a numerical problem. Computer codes are often subject to such difficulties.
     
  4. May 17, 2010 #3
    Yes, I definitely believe it's a numerical problem. I have no improvement if I solve the equation in a thicker grid.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Adding a threshold in numerical codes
  1. Numerical Integration (Replies: 10)

  2. Numerical Integration (Replies: 1)

  3. Numerical integration (Replies: 2)

  4. Numerical Analysis (Replies: 2)

Loading...