Can't solve Coulomb Force differential equation in Mathematica -



Can't solve Coulomb Force differential equation in Mathematica -

i'm trying solve problem: have find trajectory of electron in graphene lattice using mathematica. i've tried solve coulomb forcefulness equation ndsolve , plot result each direction, obtain white plot. help me please? give thanks in advance. here's code x direction:

coordx = {0.6327, 1.88058, 3.03927, 4.28716, 5.44584, 6.69373, 7.85241, 9.10029, 1.9728, 3.22069, 4.37937, 5.62726, 6.78594, 8.03382, 9.19251, 10.4404, 3.3129, 4.56079, 5.71947, 6.96736, 8.12604, 9.37393, 10.53261, 11.7805, 4.653, 5.90089, 7.05956, 8.30746, 9.46614, 10.71403, 11.87271, 13.1206}; me = 9.01*10^-31; pi = 3.14159; epsilon0 = 8.854*10^-12; q = -1.6*10^-19; q = 1.6*10^-19; step = 0.01; forzax[p_, r_] := sum[(q*q)/(4 pi*epsilon0*norm[r - p[[i]]]^2), {i, length[p]}] forzax[coordx, {x[t]}]; ndsolve[{x''[t] == forzax[coordx, {x[t]}]/me , x[0] == 0, x'[0] == 0}, {x[t]}, {t, 0, 1500}] show[parametricplot[evaluate[{x[t]} /. %], {t, 0, 1500}, plotrange -> all]]

i don't know you're trying plot, these few modifications seem plot function.

sol = ndsolve[{x''[t] == forzax[coordx, {x[t]}]/me, x[0] == 0, x'[0] == 0}, {x}, {t, 0, 1500}]; f = sol[[1, 1, 2]]; plot[f[t], {t, 0, 1500}, plotrange -> all]

wolfram-mathematica

Comments

Popular posts from this blog

php - Edges appear in image after resizing -

ios8 - iOS custom keyboard - preserve state between appearances -

Delphi change the assembly code of a running process -