MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: setting variables from within NDSolve


dantimatter wrote:
> hello all,
> 
> i have an equation that i'm trying to incorporate into NDSolve.  it's
> a piecewise function:
> 
> D[foo[t], t] == Piecewise[{{slope,
>    foo[t] < max && (foo[t] > min || bar[t] < threshold)}}, -foo[t-t0]]
> 
> the problem is that i want to set t0 at the time that the condition
> changes from true to false.  is there a way that i can set this
> variable from within NDSolve on the condition change only, and not
> while the system remains in the true or false state?
> 
> thanks,
> dan
> 

*EvenLocator* might do what you are looking for: "It is often useful to 
be able to detect and precisely locate a change in a differential 
system. For example, with the detection of a singularity or state 
change, the appropriate action can be taken, such as restarting the 
integration." See

"Built-in Functions / Advanced Documentation / Differential Equations / 
NDSolve / ODE Integration Methods / Controller methods /  EventLocator"

http://documents.wolfram.com/mathematica/Built-inFunctions/AdvancedDocumentation/DifferentialEquations/NDSolve/ODEIntegrationMethods/ControllerMethods/EventLocation.html

HTH,
Jean-Marc


  • Prev by Date: Re: fastest way to add up a billion numbers
  • Next by Date: Re: Conversion to html problems
  • Previous by thread: Re: Rigid body equations
  • Next by thread: accessing a kernel on a network