[Date Index]
[Thread Index]
[Author Index]
NDSolve and InterpolatingFunction
*To*: mathgroup at smc.vnet.net
*Subject*: [mg56095] NDSolve and InterpolatingFunction
*From*: Virgil Stokes <virgil.stokes at it.uu.se>
*Date*: Fri, 15 Apr 2005 04:47:41 -0400 (EDT)
*Sender*: owner-wri-mathgroup at wolfram.com
I am solving the following system of ODE's
g = 9.81 ; (* acceleration of gravity [m/s^2] *)
d = 0.063; (* diameter of ball [m] *)
m = 0.05; (* mass in kg *)
\[Rho] = 1.29; (* air density, [kg/m^3] *)
\[Alpha] = \[Rho] Pi d^2/(8 m)
h = 1; (* initial height [m] *)
v0 = 25; (* magnitude of ball velocity [m/s] *)
\[Theta] = 15 (* initial angle of release [15 degrees] *)
vars = {x[t], vx[t], z[t], vz[t]}
initc = {x[0] == 0, vx[0] == v0*Cos[\[Theta] Degree], z[0] == h,
vz[0] == v0*Sin[\[Theta] Degree]}
v[t] = Sqrt[vx[t]^2 + vz[t]^2];
eq1 = x'[t] == vx[t];
eq2 = vx'[t] == -0.508 \[Alpha] vx[t] v[t];
eq3 = z'[t] == vz[t];
eq4 = vz'[t] == -g - 0.508 \[Alpha] vz[t] v[t];
eqns = {eq1, eq2, eq3, eq4}
sol = NDSolve[Join[eqns, initc], vars, {t, 0, 25}]
which works fine; but how can I find (e.g. using Solve) the value of t
such that z[t] is 0; i.e, where, z[t] (in the
form of an InterpolatingFunction) is zero.
--V. Stokes
Prev by Date:
**Why can't I call Random[NormalDistribution[10.0,0.0]]?**
Next by Date:
**Re: Position different in 5.0 and 5.1?**
Previous by thread:
**Re: Why can't I call Random[NormalDistribution[10.0,0.0]]?**
Next by thread:
**Re: NDSolve and InterpolatingFunction**
| |