Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #9869

NDSolve in 3D

From Niles <niels.martinsen@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject NDSolve in 3D
Date 2012-04-29 06:12 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jnim4q$alk$1@smc.vnet.net> (permalink)

Show all headers | View raw


Hi

I am trying to solve Newtons equation for a particle in (x, y, z), and here is what I have:

sol = NDSolve[{
    x''[t] == acceleration[x'[t], y[t], z[t]],
    y''[t] == acceleration[y'[t], x[t], z[t]],
    z''[t] == 0,
    x[0] == 0, x'[0] == 0, y[0] == 0, y'[0] == 0, z[0] == 0, 
    z'[0] == 250},
    {x[t], y[t], z[t]}, {t, 0, 1}];

There is only a force acting in the (x, y)-direction, and the z-component is just constant (not accelerating). When I plot the solution using

ParametricPlot[{x[t], x'[t]} /. sol, {t, 0, 0.001}, 
 PlotRange -> {{0, 0.35}, {0, 5}}, AspectRatio -> 0.75] 

the plot is empty. Is my syntax in NDSolve correct?


Best,
Niles.

Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

NDSolve in 3D Niles <niels.martinsen@gmail.com> - 2012-04-29 06:12 +0000
  Re: NDSolve in 3D Nicholas <physnick@gmail.com> - 2012-05-04 10:27 +0000

csiph-web