guys can this b donee using runge-kutta method?

Discussion in 'Programmer's Corner' started by trish panette, May 19, 2011.

  1. trish panette

    Thread Starter New Member

    May 16, 2011
    2
    0
    i was given a question to be solved numerically on fortran..i have used the forward difference technique..can this question be solved runge-kutta method or euler?How?...hey how can i find the maximum current and charge in fortran?

    i have attached the question....question 271 is mine..
     
  2. K7GUH

    Member

    Jan 28, 2011
    191
    23
    If you can transform the problem into the form i = f(i) you can use fixed point iteration. My textbooks are either long gone or hiding in a box somewhere. Of course, I can't find the box. (;->
     
  3. steveb

    Senior Member

    Jul 3, 2008
    2,433
    469
    Yes, you can use either Runge=Kutta or Euler method for this problem.

    The way to do it is to express both first order differential equations in the form;

    di/dt=f(i,q,v)
    dq/dt=i

    and then apply the method.

    You can find the maximums either by plotting the functions and searching for the peaks; or, you can try the old calculus method of setting the derivatives with respect to the variable t, equal to zero, and solving. The first method should work, but I'm not sure about the second method.
     
    Last edited: May 20, 2011
  4. trish panette

    Thread Starter New Member

    May 16, 2011
    2
    0
    yea but...got any idea of how to plot this ?

    the commands etc
     
  5. steveb

    Senior Member

    Jul 3, 2008
    2,433
    469
    Yes, I do, but it's been about 20 years since I've had too manually program these types of numerical techniques. I currently use Matlab/Simulink to do this kind of stuff automatically.

    Describing this out on a forum is actually not so easy. The descriptions can probably be found online and certainly are available in various books on numerical methods.
     
    Last edited: May 21, 2011
Loading...