ODEnetwork {ODEnetwork} | R Documentation |
Constructor of the class ODEnetwork
Description
Creates a list of class ODEnetwork
.
The coordinate type can be set to cartesian (position and
velocity) or to polar coordinates (angle and magnitude).
Usage
ODEnetwork(masses, dampers, springs, cartesian = TRUE, distances = NA)
Arguments
masses |
[vector ] of length n
The masses of the mechanical oscillators.
|
dampers |
[matrix ] quadratic of size n
The dampers of the mechanical oscillators on the main diagonal.
Connecting dampers between oscillators on the upper triangle.
(Will be copied automatically to create a symmetric matrix.)
|
springs |
[matrix ] quadratic of size n
The springs are defined in the network like matrix of dampers.
|
cartesian |
[boolean(1) ]
If TRUE , state1 and state2 are position and velocity,
otherwise angle and magnitude.
Default is TRUE .
|
distances |
[matrix ] quadratic of size n
Describes the length of each spring.
Elements on the main diagonal describe spring length connecting the masses to the ground.
All upper triangle elements describe spring distance between two masses i < j.
Default is NA , which is equivalent to a zero matrix.
(Value will be copied automatically to lower triangle creating a symmetric matrix.)
|
Value
a list of class [ODEnetwork
].
Examples
mM <- c(40, 10, 10)
mD <- diag(c(1, 5, 0))
mD[1, 2] <- 1
mD[2, 3] <- 1
mK <- diag(c(50, 50, 0))
mK[1, 2] <- 10
mK[2, 3] <- 10
odenet <- ODEnetwork(mM, mD, mK)
[Package
ODEnetwork version 1.3.2
Index]