ex_crank: Slider Crank Mechanical Problem, Index 2 DAE

crankR Documentation

Slider Crank Mechanical Problem, Index 2 DAE

Description

The crank problem is a constrained mechanical system including both rigid and elastic bodies

It is a differential algebraic equation of index 2, 24 equations.

Usage

crank (times=seq(0, 0.1, by = 0.001), yini = NULL, dyini = NULL, 
       parms = list(), printmescd = TRUE, method = mebdfi, 
       atol = 1e-6, rtol = 1e-6, maxsteps = 1e+06, 
       options = list(), ...) 

Arguments

yini

the initial (state) values for the DE system. If y has a name attribute, the names will be used to label the output matrix.

dyini

the initial derivatives of the state variables of the DE system.

times

time sequence for which output is wanted; the first value of times must be the initial time.

parms

list of parameters that overrule the default parameter values

method

the solver to use; only mebdfi available for now

maxsteps

maximal number of steps per output interval taken by the solver

atol

absolute error tolerance, either a scalar or a vector, one value for each y.

rtol

relative error tolerance, either a scalar or a vector, one value for each y,

printmescd

if TRUE the mixed error significant digits computed using the reference solution at time 0.1 are printed

options

a list which specifies the initial conditions used ini, whether the problem is stiff, and the damping. The default is list(ini=1,stiff=0,damp=0)

...

additional arguments passed to the solver .

Details

The default parameters are: M1 = 0.36, M2 = 0.151104, M3 = 0.075552, L1 = 0.15, L2 = 0.30, J1 = 0.002727, J2 = 0.0045339259, EE = 0.20e12, NUE = 0.30, BB = 0.0080, HH = 0.0080, RHO = 7870.0, GRAV = 0.0, OMEGA = 150.0

There are two default initial conditions - set with options(ini=x)

Value

A matrix of class deSolve with up to as many rows as elements in times and as many columns as elements in yini, plus an additional column (the first) for the time value.

There will be one row for each element in times unless the solver returns with an unrecoverable error. If yini has a names attribute, it will be used to label the columns of the output value.

Author(s)

Karline Soetaert <karline.soetaert@nioz.nl>

Francesca Mazzia <mazzia@dm.uniba.it>

References

url : archimede.dm.uniba.it/~testset

Simeon, B.: Modelling a flexible slider crank mechanism by a mixed system of DAEs and PDEs, Math. Modelling of Systems 2, 1-18 (1996);

Examples

out <- crank()
plot(out, lwd = 2, which = 1:9)

# compare  with reference solution (only  the first seven components)
refsol <- reference("crank")
max(abs(out[nrow(out),2:8] - refsol[1:7])/refsol[1:7])     

deTestSet documentation built on July 9, 2023, 6:10 p.m.