[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] RK4 Help required
From: |
Simpson, Kenneth |
Subject: |
Re: [Help-gsl] RK4 Help required |
Date: |
Thu, 10 May 2007 09:45:17 -0700 |
If the charges are electrical charges, typically one looks
at the resultant force on one of charges due to the other
charges.
Hence, for a particular i, say i=1, one sums the forces on i
due to other j charges, namely, j=2,3,4.
And if you're looking for x(t) for the charges, you need to
write the the 2nd order force equation as two coupled 1st order
equations:
dv/dt=Columb's Law
dx/dt=v
-- Ken
cigdem ozkan wrote:
> Hi again,
> I am posting a smaller version of my question rearding rk4 since I didnt get
> a reply and I am really anxious for some feedback.
>
> I have the following fuction:
> dxi/dt = k*qi*(xi-xj)/sqrt((xi-xj)2+(yi-yj)2+(zi-zj)2)
> where qi is the charge of the i-th particle, xi, yi, zi are the coordinates
> of the i-th particle and xj, yj,zj are the coordinates of the j-th particle.
> Input for the initial values: q[4] = { 1.0, 1.0, -1.0, 1.0 } charge x0[4] =
> { 1.0, 2.3, 3.2, 4.0 } init posn x
> y0[4] = { 1.0, 2.4, 3.0, 4.0 } init posn y
> z0[4] = { 1.0, 2.5, 3.3, 4.2 } init posn z
> QUESTION:
> Since there are two values for each coordinate (i and j), how can I write the
> function in an acceptable form for RK4? I would appreciate any feedback
> concerning RK4.
> Thanks for your time,
> C.
>
> ---------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check outnew cars at Yahoo! Autos.
> _______________________________________________
> Help-gsl mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-gsl
>
>
>