Skip to content

[R-sig-dyn-mod] a question on ODE.1D, nspec

4 messages · Dabing Chen, Daniel Reed, Thomas Petzoldt

#
Hi Dabing:

When you set nspec to 2, ode.1D expects an array of length 2*N (i.e., 1:N for the first species, (N+1):(2*N) for the second species). However, your vector is only of length N+1. In other words, ode.1D expects both species to be spatially resolved. I wonder if you just used ode() instead, if that would resolve your issue? Or alternatively would it make sense to spatially resolve your plasma variable?

Cheers,
Daniel

_______________________________
Daniel C. Reed, PhD.
Postdoctoral Fellow,
Dept. of Earth & Environmental Sciences,
University of Michigan,
Ann Arbor, MI, USA.
email: reeddc at umich.edu
web: www.danielreed.org
On Jun 26, 2013, at 3:53 PM, Dabing Chen <dabing.c at gmail.com> wrote:

            
#
On 6/26/2013 10:47 PM, Dabing Chen wrote:
Some of the solvers used by ode.1D ... ode.3D make use of the regular 
structure of such problems specified by nspec resp. dimens, so that an 
adequate Jacobian matrix can be constructed instead of using the full 
Jacobian. This makes simulations faster, especially for large systems.

See ?lsodes for more details.

Another advantage are the specific plotting functions for results of ode.1D.


Thomas