scalation.dynamics

Members list

Type members

Classlikes

object DormandPrince extends Integrator

The DormandPrince object provides a state-of-the-art numerical ODE solver. Given an unknown, time-dependent function y(t) governed by an Ordinary Differential Equation (ODE) of the form d/dt y(t) = y'(t) = f(t, y) y(t0) = y0 compute y(t) using a (4,5)-order Dormand-Prince Integrator (DOPRI) or ode45. Note: the integrateV method for a system of separable ODEs is mixed in from the Integrator trait.

The DormandPrince object provides a state-of-the-art numerical ODE solver. Given an unknown, time-dependent function y(t) governed by an Ordinary Differential Equation (ODE) of the form d/dt y(t) = y'(t) = f(t, y) y(t0) = y0 compute y(t) using a (4,5)-order Dormand-Prince Integrator (DOPRI) or ode45. Note: the integrateV method for a system of separable ODEs is mixed in from the Integrator trait.

Attributes

See also
Supertypes
trait Integrator
class Object
trait Matchable
class Any
Self type
class DynamicEq(f: Double => VectorD, d: Int)

The DynamicEq class may be used for determining trajectories x_t from a system of dynamic equations. x_t = f(t) f(t) is the vector function of time.

The DynamicEq class may be used for determining trajectories x_t from a system of dynamic equations. x_t = f(t) f(t) is the vector function of time.

Value parameters

d

the number of dimensions

f

the vector-valued function of time

Attributes

Supertypes
class Object
trait Matchable
class Any
class FirstOrderPDE(v: (Double, Double) => Double, dt: Double, dx: Double, xm: Double, ic: FunctionS2S, bc: (Double, Double))

The FirstOrderPDE class is used to solve First Order Partial Differential Equations like the Advection Equation. Let 'u(x, t)' = concentration in a fluid with velocity 'v' at position '0 <= x <= xm' and time 't' > 0. Numerically solve the

The FirstOrderPDE class is used to solve First Order Partial Differential Equations like the Advection Equation. Let 'u(x, t)' = concentration in a fluid with velocity 'v' at position '0 <= x <= xm' and time 't' > 0. Numerically solve the

Advection Equation: u_t + v(x, t) * u_x = 0 with initial conditions u(x, 0) = ic(x) boundary conditions (u(0, t), u(xm, t)) = bc

Value parameters

bc

the boundary conditions as a 2-tuple for end-points 0 and 'xm'

dt

delta 't'

dx

delta 'x'

ic

the initial conditions as a function of position 'x'

v

the velocity field function v(x, t)

xm

the length of the column

Attributes

Supertypes
class Object
trait Matchable
class Any
trait Integrator

The Integrator trait provides a template for writing numerical integrators (e.g., Runge-Kutta (RK4) or Dormand-Prince (DOPRI)) to produce trajectories for first-order Ordinary Differential Equations (ODE)s. The ODE is of the form: d/dt y(t) = f(t, y) with initial condition y0 = y(t0) If f is a linear function of the form a(t) * y(t) + b(t), then the ODE is linear, if a(t) = a (i.e., a constant) the ODE has constant coefficients and if b(t) = 0 the ODE is homogeneous. Note this package provides a solver (not an integrator) as an option for linear, constant coefficient, homogeneous, first-order ODE.

The Integrator trait provides a template for writing numerical integrators (e.g., Runge-Kutta (RK4) or Dormand-Prince (DOPRI)) to produce trajectories for first-order Ordinary Differential Equations (ODE)s. The ODE is of the form: d/dt y(t) = f(t, y) with initial condition y0 = y(t0) If f is a linear function of the form a(t) * y(t) + b(t), then the ODE is linear, if a(t) = a (i.e., a constant) the ODE has constant coefficients and if b(t) = 0 the ODE is homogeneous. Note this package provides a solver (not an integrator) as an option for linear, constant coefficient, homogeneous, first-order ODE.

Attributes

See also

scalation.dynamics.LinearDiffEq.scala

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object DormandPrince
object ModRosenbrock
object Radau
object RungeKutta
class RungeKutta2
class RungeKutta3
Show all
class LinearDiffEq(a: MatrixD, y0: VectorD)

The LinearDiffEq class may be used for solving a system of linear differential equations that are ordinary and first-order with constant coefficients of the form d/dt y(t) = a * y(t) y(t) is the vector function of time and a is the coefficient matrix. The initial value vector y0 = y(0) must also be given. Note, higher-order differential equations may be converted to first-order by introducing additional variables. The above equation is the homogeneous case. Caveats: the following cases are not currently handled: (1) The non-homogeneous equation: d/dt y(t) = a * y(t) + f(t). (2) Complex or repeated eigenvalues.

The LinearDiffEq class may be used for solving a system of linear differential equations that are ordinary and first-order with constant coefficients of the form d/dt y(t) = a * y(t) y(t) is the vector function of time and a is the coefficient matrix. The initial value vector y0 = y(0) must also be given. Note, higher-order differential equations may be converted to first-order by introducing additional variables. The above equation is the homogeneous case. Caveats: the following cases are not currently handled: (1) The non-homogeneous equation: d/dt y(t) = a * y(t) + f(t). (2) Complex or repeated eigenvalues.

Value parameters

a

the coefficient matrix

y0

the initial value vector

Attributes

Supertypes
class Object
trait Matchable
class Any
object ModRosenbrock extends Integrator

The ModRosenbroc object provides a numerical ODE solver for stiff systems. Given an unknown, time-dependent function y(t) governed by an Ordinary Differential Equation (ODE) of the form d/dt y(t) = f(t, y) compute y(t) using a (2,3)-order Modified Rosenbrock ODE Integrator (Modified Rosenbrock) or ode.23s Note: the integrateV method for a system of separable ODEs is mixed in from the Integrator trait.

The ModRosenbroc object provides a numerical ODE solver for stiff systems. Given an unknown, time-dependent function y(t) governed by an Ordinary Differential Equation (ODE) of the form d/dt y(t) = f(t, y) compute y(t) using a (2,3)-order Modified Rosenbrock ODE Integrator (Modified Rosenbrock) or ode.23s Note: the integrateV method for a system of separable ODEs is mixed in from the Integrator trait.

Attributes

See also
Supertypes
trait Integrator
class Object
trait Matchable
class Any
Self type
class ParabolicPDE(k: Double, dt: Double, dx: Double, xm: Double, ic: FunctionS2S, bc: (Double, Double))

The `ParabolicPDE' class is used to solve parabolic partial differential equations like the Heat Equation. Let 'u(x, t)' = temperature of a rod at position '0 <= x <= xm' and time 't' > 0. Numerically solve the

The `ParabolicPDE' class is used to solve parabolic partial differential equations like the Heat Equation. Let 'u(x, t)' = temperature of a rod at position '0 <= x <= xm' and time 't' > 0. Numerically solve the

Heat Equation: u_t = k * u_xx with initial conditions u(x, 0) = ic(x) boundary conditions (u(0, t), u(xm, t)) = bc

Value parameters

bc

the boundary conditions as a 2-tuple for end-points 0 and 'xm'

dt

delta 't'

dx

delta 'x'

ic

the initial conditions as a function of position 'x'

k

the thermal conductivity

xm

the length of the rod

Attributes

Supertypes
class Object
trait Matchable
class Any
object Radau extends Integrator

The Radau object implements Radau IIA, which is a simple Ordinary Differential Equation ODE solver for moderately stiff systems. Solve for y given

The Radau object implements Radau IIA, which is a simple Ordinary Differential Equation ODE solver for moderately stiff systems. Solve for y given

d/dt  y = f(t, y).

Attributes

Supertypes
trait Integrator
class Object
trait Matchable
class Any
Self type
Radau.type
object RungeKutta extends Integrator

The RungeKutta object provides an implementation of a classical Runge-Kutta numerical ODE solver. Given an unknown, time-dependent function y(t) governed by an Ordinary Differential Equation (ODE) of the form: d/dt y(t) = y'(t) = f(t, y) y(t0) = y0 Compute y(t) using a 4th-order Runge-Kutta Integrator (RK4). Note: the 'integrateV' method for a system of separable ODEs is mixed in from the Integrator trait.

The RungeKutta object provides an implementation of a classical Runge-Kutta numerical ODE solver. Given an unknown, time-dependent function y(t) governed by an Ordinary Differential Equation (ODE) of the form: d/dt y(t) = y'(t) = f(t, y) y(t0) = y0 Compute y(t) using a 4th-order Runge-Kutta Integrator (RK4). Note: the 'integrateV' method for a system of separable ODEs is mixed in from the Integrator trait.

Attributes

Supertypes
trait Integrator
class Object
trait Matchable
class Any
Self type
RungeKutta.type
case class RungeKutta2(name: String, a: MatrixD, b: VectorD, c: VectorD) extends Integrator

The RungeKutta2 class provides implementations of several Runge-Kutta numerical ODE solvers. Given an unknown, time-dependent function y(t) governed by an Ordinary Differential Equation (ODE) of the form: d/dt y(t) = y'(t) = f(t, y) y(t0) = y0 Note: the integrateV method for a system of separable ODEs is mixed in from the Integrator trait. The ODE method is defined by its Butcher Tablaeu (a, b, c).

The RungeKutta2 class provides implementations of several Runge-Kutta numerical ODE solvers. Given an unknown, time-dependent function y(t) governed by an Ordinary Differential Equation (ODE) of the form: d/dt y(t) = y'(t) = f(t, y) y(t0) = y0 Note: the integrateV method for a system of separable ODEs is mixed in from the Integrator trait. The ODE method is defined by its Butcher Tablaeu (a, b, c).

Value parameters

a

the lower triangular matrix of constants multiplying the stage derivatives

b

the vector of constants for computing the weighted average of stage derivatives

c

the vector of constants for shifting time

name

the name the ODE solver

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait Integrator
class Object
trait Matchable
class Any
Show all
object RungeKutta2

The RungeKutta2 object provides several Explicit, Fixed Stepsize Runge-Kutta ODE solvers. The ODE method is defined by its Butcher Tablaeu (a, b, c).

The RungeKutta2 object provides several Explicit, Fixed Stepsize Runge-Kutta ODE solvers. The ODE method is defined by its Butcher Tablaeu (a, b, c).

Attributes

See also

en.wikipedia.org/wiki/List_of_Runge%E2%80%93Kutta_methods

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
class RungeKutta3(val name: String, a: MatrixD, b: VectorD, b_: VectorD, c: VectorD) extends Integrator

The RungeKutta3 class provides implementations of several Runge-Kutta numerical ODE solvers. Given an unknown, time-dependent function y(t) governed by an Ordinary Differential Equation (ODE) of the form: d/dt y(t) = y'(t) = f(t, y) y(t0) = y0 Note: the integrateV method for a system of separable ODEs is mixed in from the Integrator trait. The ODE method is defined by its Extended Butcher Tablaeu (a, b, b_, c).

The RungeKutta3 class provides implementations of several Runge-Kutta numerical ODE solvers. Given an unknown, time-dependent function y(t) governed by an Ordinary Differential Equation (ODE) of the form: d/dt y(t) = y'(t) = f(t, y) y(t0) = y0 Note: the integrateV method for a system of separable ODEs is mixed in from the Integrator trait. The ODE method is defined by its Extended Butcher Tablaeu (a, b, b_, c).

Value parameters

a

the lower triangular matrix of constants multiplying the stage derivatives

b

the vector of constants for computing the weighted average of stage derivatives

b_

same for the embedded solver

c

the vector of constants for shifting time

name

the name the ODE solver

Attributes

Companion
object
Supertypes
trait Integrator
class Object
trait Matchable
class Any
object RungeKutta3

The RungeKutta3 object provides several Explicit, Fixed Stepsize Runge-Kutta ODE solvers. The ODE method is defined by its Extended Butcher Tablaeu (a, b, b_, c).

The RungeKutta3 object provides several Explicit, Fixed Stepsize Runge-Kutta ODE solvers. The ODE method is defined by its Extended Butcher Tablaeu (a, b, b_, c).

Attributes

See also

en.wikipedia.org/wiki/List_of_Runge%E2%80%93Kutta_methods

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
final class ballFlight

Attributes

Supertypes
class Object
trait Matchable
class Any
final class dormandPrinceTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class dormandPrinceTest2

Attributes

Supertypes
class Object
trait Matchable
class Any
final class dormandPrinceTest3

Attributes

Supertypes
class Object
trait Matchable
class Any
final class dormandPrinceTest4

Attributes

Supertypes
class Object
trait Matchable
class Any
final class dynamicEqTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class firstOrderPDETest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class firstOrderPDETest2

Attributes

Supertypes
class Object
trait Matchable
class Any
final class firstOrderPDETest3

Attributes

Supertypes
class Object
trait Matchable
class Any
final class linearDiffEqTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class modRosenbrockTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class modRosenbrockTest2

Attributes

Supertypes
class Object
trait Matchable
class Any
final class parabolicPDETest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class radauTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class reactions

Attributes

Supertypes
class Object
trait Matchable
class Any
final class rungeKutta2Test

Attributes

Supertypes
class Object
trait Matchable
class Any
final class rungeKutta2Test2

Attributes

Supertypes
class Object
trait Matchable
class Any
final class rungeKutta3Test

Attributes

Supertypes
class Object
trait Matchable
class Any
final class rungeKutta3Test2

Attributes

Supertypes
class Object
trait Matchable
class Any
final class rungeKutta3Test3

Attributes

Supertypes
class Object
trait Matchable
class Any
final class rungeKuttaTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class rungeKuttaTest2

Attributes

Supertypes
class Object
trait Matchable
class Any

Types

type Derivative = (Double, Double) => Double

Function type for derivative functions: f (t, y) where y is a scalar

Function type for derivative functions: f (t, y) where y is a scalar

Attributes

type DerivativeV = (Double, VectorD) => Double

Function type for derivative functions: f (t, y) where y is a vector

Function type for derivative functions: f (t, y) where y is a vector

Attributes

Value members

Concrete methods

def ballFlight(): Unit

The ballFlight main function is used to illustrate the RungeKutta 'RK' and DormandPrince 'DP' ODE solvers by applying them to Newton's Second Law of Motion, 'f = ma = -gm'. The flight of a golf ball is simulated from impact until the ball hits the ground. Note, a more realistic simulation would take additional forces into account: drag, lift and spin.

The ballFlight main function is used to illustrate the RungeKutta 'RK' and DormandPrince 'DP' ODE solvers by applying them to Newton's Second Law of Motion, 'f = ma = -gm'. The flight of a golf ball is simulated from impact until the ball hits the ground. Note, a more realistic simulation would take additional forces into account: drag, lift and spin.

Attributes

See also

home2.fvcc.edu/~dhicketh/DiffEqns/Spring11projects/Brett_Burglund_Ryan_Street/

Diff%20Q/pdfscreen/projectoutline.pdf

claymore.engineer.gvsu.edu/~lait/312/golfball.pdf The accuracies of 'RK' and 'DP' versus the exact solution (EX) are compared.

runMain scalation.dynamics.ballFlight

def dormandPrinceTest(): Unit

The dormandPrinceTest main function is used to test the DormandPrince object. This test is for non-stiff equations. Compare this ode45 with RungeKutta.

The dormandPrinceTest main function is used to test the DormandPrince object. This test is for non-stiff equations. Compare this ode45 with RungeKutta.

runMain scalation.dynamics.dormandPrinceTest

Attributes

def dormandPrinceTest2(): Unit

The dormandPrinceTest2 main function is used to test the DormandPrince class. Test the integrateVV methods for systems of ODEs problems.

The dormandPrinceTest2 main function is used to test the DormandPrince class. Test the integrateVV methods for systems of ODEs problems.

Attributes

See also

web.uvic.ca/~tbazett/diffyqs/sec_introtosys.html

runMain scalation.dynamics.dormandPrinceTest2

def dormandPrinceTest3(): Unit

The dormandPrinceTest3 main function is used to test the DormandPrince object. This test is for a system of non-stiff equations. Compare this ode45 with Runge-Kutta and ode23.

The dormandPrinceTest3 main function is used to test the DormandPrince object. This test is for a system of non-stiff equations. Compare this ode45 with Runge-Kutta and ode23.

Attributes

See also

http://www.mathworks.com/help/techdoc/ref/ode23.html (Example 1) Runge-Kutta-2 at tt = 12.0: p = VectorD(-0.759943, -0.647107, 0.852941) Runge-Kutta-3 at tt = 12.0: p = VectorD(-0.760170, -0.646877, 0.852844) Runge-Kutta-4 at tt = 12.0: p = VectorD(-0.744718, -0.739402, 0.867864) Runge-Kutta-5 at tt = 12.0: p = VectorD(-0.760170, -0.646877, 0.852844) Dormand-Prince at tt = 12.0: p = VectorD(-0.705398, -0.708812, 0.863847)

runMain scalation.dynamics.dormandPrinceTest3

def dormandPrinceTest4(): Unit

The dormandPrinceTest4 main function is used to test the DormandPrince object. This test is for stiff equations. Compare ode45 with ode23s.

The dormandPrinceTest4 main function is used to test the DormandPrince object. This test is for stiff equations. Compare ode45 with ode23s.

runMain scalation.dynamics.dormandPrinceTest4

Attributes

def dynamicEqTest(): Unit

The dynamicEqTest function to test the DynamicEq class using example at in Introduction to Computational Data Science using ScalaTion, section 15.1.

The dynamicEqTest function to test the DynamicEq class using example at in Introduction to Computational Data Science using ScalaTion, section 15.1.

runMain scalation.dynamics.dynamicEqTest

Attributes

def firstOrderPDETest(): Unit

The firstOrderPDETest main function is used to test the FirstOrderPDE class. Numerically solve the Advection Equation: 'du/dt + v(x, t) * du/dx = 0'

The firstOrderPDETest main function is used to test the FirstOrderPDE class. Numerically solve the Advection Equation: 'du/dt + v(x, t) * du/dx = 0'

runMain scalation.dynamics.firstOrderPDETest

Attributes

def firstOrderPDETest2(): Unit

The firstOrderPDETest2 main function is used to test the FirstOrderPDE class. Numerically solve the Advection Equation: 'du/dt + v(x, t) * du/dx = 0'

The firstOrderPDETest2 main function is used to test the FirstOrderPDE class. Numerically solve the Advection Equation: 'du/dt + v(x, t) * du/dx = 0'

runMain scalation.dynamics.firstOrderPDETest2

Attributes

def firstOrderPDETest3(): Unit

The firstOrderPDETest3 main function is used to test the FirstOrderPDE class. Numerically solve the Advection Equation: 'du/dt + v(x, t) * du/dx = 0'

The firstOrderPDETest3 main function is used to test the FirstOrderPDE class. Numerically solve the Advection Equation: 'du/dt + v(x, t) * du/dx = 0'

Attributes

See also

www.public.asu.edu/~hhuang38/pde_slides_numerical.pdf

runMain scalation.dynamics.firstOrderPDETest3

def linearDiffEqTest(): Unit

The linearDiffEqTest object to test the LinearDiffEq class using example at

The linearDiffEqTest object to test the LinearDiffEq class using example at

Attributes

See also

biomed.tamu.edu/faculty/wu/BMEN_452/Eigenvalue%20Problems.doc The eigenvalues should be (-3, -1) The constant matrix should be [ (.375, .625), (-.75, 1.25) ]

runMain scalation.dynamics.linearDiffEqTest

def modRosenbrockTest(): Unit

The modRosenbrockTest main function is used to test the ModRosenbrock object. This test is for non-stiff equations. Compare ode23s with ode45.

The modRosenbrockTest main function is used to test the ModRosenbrock object. This test is for non-stiff equations. Compare ode23s with ode45.

runMain scalation.dynamics.modRosenbrockTest

Attributes

def modRosenbrockTest2(): Unit

The modRosenbrockTest2 main function is used to test the ModRosenbrock object. This test is for stiff equations. Compare ode23s with ode45.

The modRosenbrockTest2 main function is used to test the ModRosenbrock object. This test is for stiff equations. Compare ode23s with ode45.

runMain scalation.dynamics.modRosenbrockTest2

Attributes

def parabolicPDETest(): Unit

The parabolicPDETest main function is used to test the ParabolicPDE class. Numerically solve the Heat Equation: 'du/dt = k * d^2u/dx^2'.

The parabolicPDETest main function is used to test the ParabolicPDE class. Numerically solve the Heat Equation: 'du/dt = k * d^2u/dx^2'.

Attributes

See also

personales.unican.es/gutierjm/cursos/cornell/9_PDEs.pdf

runMain scalation.dynamanics.parabolicPDETest

def radauTest(): Unit

The radauTest main function is used to test the Radau object.

The radauTest main function is used to test the Radau object.

Attributes

def reactions(): Unit

The reactions main function simulates a simple chemical pathway for making H2O. Compares ode44 and ode45. FIX - add ode23s

The reactions main function simulates a simple chemical pathway for making H2O. Compares ode44 and ode45. FIX - add ode23s

Attributes

See also

the KINSOLVER Paper: www.cs.uga.edu/~thiab/paper25.pdf

runMain scalation.dynamics.reactions

def rungeKutta2Test(): Unit

The rungeKutta2Test main function is used to test the RungeKutta2 class. Test the integrate and integrateV methods for one dimensional and separable ODE problems.

The rungeKutta2Test main function is used to test the RungeKutta2 class. Test the integrate and integrateV methods for one dimensional and separable ODE problems.

runMain scalation.dynamics.rungeKutta2Test

Attributes

def rungeKutta2Test2(): Unit

The rungeKutta2Test2 main function is used to test the RungeKutta2 class. Test the integrateVV methods for systems of ODEs problems.

The rungeKutta2Test2 main function is used to test the RungeKutta2 class. Test the integrateVV methods for systems of ODEs problems.

Attributes

See also

www.mathworks.com/help/techdoc/ref/ode23.html (Example 1)

runMain scalation.dynamics.rungeKutta2Test2

def rungeKutta3Test(): Unit

The rungeKutta3Test main function is used to test the RungeKutta3 class. Test the integrate and integrateV methods for one dimensional and separable ODE problems.

The rungeKutta3Test main function is used to test the RungeKutta3 class. Test the integrate and integrateV methods for one dimensional and separable ODE problems.

runMain scalation.dynamics.rungeKutta3Test

Attributes

def rungeKutta3Test2(): Unit

The rungeKutta3Test2 main function is used to test the RungeKutta3 class. Test the integrateVV methods for systems of ODEs problems.

The rungeKutta3Test2 main function is used to test the RungeKutta3 class. Test the integrateVV methods for systems of ODEs problems.

Attributes

See also

web.uvic.ca/~tbazett/diffyqs/sec_introtosys.html

runMain scalation.dynamics.rungeKutta3Test2

def rungeKutta3Test3(): Unit

The rungeKutta3Test3 main function is used to test the RungeKutta3 class. Test the integrateVV methods for systems of ODEs problems.

The rungeKutta3Test3 main function is used to test the RungeKutta3 class. Test the integrateVV methods for systems of ODEs problems.

Attributes

See also

www.mathworks.com/help/techdoc/ref/ode23.html (Example 1)

runMain scalation.dynamics.rungeKutta3Test3

def rungeKuttaTest(): Unit

The rungeKuttaTest main function is used to test the RungeKutta object. Test the integrate and integrateV methods for one dimensional and separable ODE problems.

The rungeKuttaTest main function is used to test the RungeKutta object. Test the integrate and integrateV methods for one dimensional and separable ODE problems.

runMain scalation.dynamics.rungeKuttaTest

Attributes

def rungeKuttaTest2(): Unit

The rungeKutta2Test main function is used to test the RungeKutta object. Test the integrateVV methods for systems of ODEs problems.

The rungeKutta2Test main function is used to test the RungeKutta object. Test the integrateVV methods for systems of ODEs problems.

Attributes

See also

http://www.mathworks.com/help/techdoc/ref/ode23.html (Example 1)

runMain scalation.dynamics.rungeKuttaTest2