Function File: x = nlnewmark(m, c, q, f, dt, x0 = 0, x'0 = 0, alpha = 1/2, beta = 1/4, flags = "")
Computes the solution of non-linear second-order differential equations of the form
m x'' + c x' + q(x, x', x'') = fwhere x' denotes the first time derivative of x and q is a non-linear function.
If the function is called without the assigning a return value then x is plotted versus time.
Inputs
- m
- The mass of the body.
- c
- Viscous damping of the system.
- q
- The name of a function that returns the value of the resisting force for a given displacement. The form of Q must be:
F = Q( x)where F is the restoring force for the state vector x = [u, u', u”]; displacement (u), velocity (u'), and acceleration.
- f
- The forcing function as a time sampled or impulse vector (see Special Cases).
- dt
- The time step – assumed to be constant
- x0
- Initial displacement, default is zero
- x'0
- Initial velocity, default is zero
- alpha
- Alpha Coefficient – Controls "artificial damping" of the system. Unless you have a really good reason, this should be 1/2 which is the default.
- beta
- Beta Coefficient – This coefficient is used to estimate the form of the system acceleration between time steps. Values between 1/4 and 1/6 are common. The default is 1/4 which is unconditionally stable.
- flags
- A string value which defines special cases. The cases are defined by unique characters as explained in Special Cases below.
Outputs
- x
- Matrix of size (3,
length(
f)
) with time series of displacement (x(1,:)), velocity (x(2,:)), and acceleration (x(3,:))Special Cases
The flags variable is used to define special cases of analysis as follows.
"i" - Impulse forcing function. The forcing function, f is a vector of impulses instead of a sampled time history. "n" - The stiffness is non-linear. In this case, k is a string which contains the name of a function defining the non-linear stiffness.