I need some help with numerical analysis: I have 2 PDEs and I need to use the Runge-Kutta method of the 4th order. I'm not asking for the algorithm, I just need a bit of guidance for how to start. here are the PDEs: (d^2r)/(dt^2) = -k/m*(r-L)-g*cos(phi)+r*[(dphi/dt)^2] and (d^2phi)/(dt^2) = g/r*sin(phi)-[2*(dphi/dt)*(dr/dt)]/r while g,m,k,L are given
what makes these equations PDEs? they seem like ODEs to me...
@oldrin.bataku there are deriv wrt phi ANDr
for RK4 solving PDEs you typically have to discretize the domain yeah?
U(r,phi) while you use the derivative of phi and r in the same equation
no, @CutieSwag ...
I don't even see U in this system. are you sure this isn't just a typical coupled pair of ODEs?
I think I need to do an order reduction for the equations and then write the algorithm in a way that all 4 are connected, if that makes any sense
break it into a coupled system of four equations:$$\frac{d\phi}{dt}=u\\\frac{dr}{dt}=v\\\frac{d^2r}{dt^2}=\dots\text{using }u,v\dots\\\frac{d^2\phi}{dt^2}=\dots\text{using }u,v\dots$$or something to that effect
ok that might work, I need to think of it a bit, to see if it might help me to write the equations like this, but I also have to go to class. if you think of any thing else I'll be more than happy to listen
$$\frac{d\phi}{dt}=u\\\frac{dr}{dt}=v\\\frac{d^2\phi}{dt^2}=\frac1r\left(g\sin\phi-2uv\right)\\\frac{d^2r}{dt^2}=-\frac{k}m(r-L)-g\cos\phi+ru^2$$or something like that
then you evolve them each step independently
oh and I got what you were saying about the ODE , I think you are right. the derivative of all of them it t
so in that case treat \(\dfrac{du}{dt}=\dfrac{d^2\phi}{dt^2},\dfrac{dv}{dt}=\dfrac{d^2r}{dt^2}\)
as in singular derivative
right that's what I figured
ty :)
so now it's a coupled system of differential equations... sorry if I can't help much with the mechanical computation I usually throw it in mathematica
you'd be given the initial conditions:$$r(0)=r_0,\phi(0)=\phi_0,u(0)=\frac{d\phi}{dt}\Biggr|_{t=0},v(0)=\frac{dr}{dt}\Biggr|_{t=0}$$and you'd compute \(u(t),v(t),r(t),\phi(t)\) each step as a coupled system of 4 first-order ODEs
yeah that was the idea, and the computing is easy once you know how to put the equations into the method. thats why I ask only for a bit of guidance for how to start.
glad I could help :p
question: I use \[\frac{ dr }{ rt }=v\] in order to get a vector of the Vs or Rs? Vs, right??
Join our real-time social learning platform and learn together with your friends!