scijs/ode-euler

Name: ode-euler

Owner: scijs

Description: Integrate a system of ODEs using the Euler method

Created: 2015-07-24 15:29:58.0

Updated: 2017-05-02 03:14:59.0

Pushed: 2015-08-01 17:46:02.0

Homepage: null

Size: 168

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

ode-euler Build Status npm version Dependency Status

Integrate a system of ODEs using the Euler method

Introduction

This module integrates a system of ordinary differential equations of the form

undefined

undefined

where undefined is a vector of length undefined. Given time step undefined, the Euler method integrates the ODE with update

undefined

Install
m install ode-euler
Example
euler = require('ode-euler')

deriv = function(dydt, y, t) {
dt[0] = -y[1]
dt[1] =  y[0]


y0 = [1,0]
n = 1000
t0 = 0
dt = 2.0 * Math.PI / n

integrator = euler( y0, deriv, t0, dt )

ntegrate 1000 steps:
grator.steps(n)

ntegrate all the way around a circle:
> integrator.y = [ 1.0199349143076457, -0.00008432969374211775 ]
API
require('ode-euler')( y0, deriv, t0, dt )

Arguments:

Returns: Initialized integrator object.

Properties:

Methods:

Credits

(c) 2015 Ricky Reusser. MIT License


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.