Skip to contents

Implicit methods of OrdinaryDiffEqNewmark for second order problems u'' = f1(u', u, p, t) given as SecondOrderODEProblem() or DynamicalODEProblem() (state c(v, u)). NewmarkBeta() is the classical Newmark-beta method, second order for gamma = 1/2 and first order otherwise. GeneralizedAlpha() is the generalized alpha method of Chung and Hulbert, set by the spectral radius at infinity rho_inf, by the HHT parameter alpha_hht or by its four parameters; as upstream, the step starts from the acceleration of the accepted state, so it is second order only when gamma (1 - alpha_f) = (1 - alpha_m) / 2. Both methods are adaptive with the Zienkiewicz-Xie error estimate; parameters for which that estimate vanishes stop unless adaptive = FALSE. With adaptive = FALSE the starting acceleration is evaluated at the end time t + dt of the step, as upstream does with fixed steps, so on problems with explicit time dependence the fixed step methods are first order.

Usage

NewmarkBeta(beta = 0.25, gamma = 0.5, nlsolve = NewtonRaphson())

GeneralizedAlpha(
  alpha_m = NULL,
  alpha_f = NULL,
  beta = NULL,
  gamma = NULL,
  rho_inf = NULL,
  alpha_hht = NULL,
  nlsolve = NewtonRaphson()
)

Arguments

beta, gamma

The Newmark parameters, 0 <= beta <= 1/2 and 0 <= gamma <= 1.

nlsolve

Nonlinear solver for the implicit stage, a NewtonRaphson() by default.

alpha_m, alpha_f

The generalized alpha weights of the acceleration and of the state.

rho_inf

Spectral radius at infinity in [0, 1]; sets the four parameters (Chung and Hulbert).

alpha_hht

HHT alpha in [-1/3, 0]; sets alpha_m = 0.

Value

An algorithm object.

Examples

prob <- SecondOrderODEProblem(function(v, u, p, t) -u, 0, 1, c(0, 1))
sol <- solve(prob, NewmarkBeta(), dt = 0.05, adaptive = FALSE)
sol$u[[length(sol$t)]] - c(-sin(1), cos(1))
#> [1] 0.000112539 0.000175229
solve(prob, GeneralizedAlpha(rho_inf = 0.8), dt = 0.1, adaptive = FALSE)$stats$nf
#> [1] 11