% -*- texinfo -*- % @deftypefn {Function File} {@var{x} =} nlnewmark(@var{m}, @var{c}, @var{q}, @var{f}, @var{dt}, @var{x0} = 0, @var{x'0} = 0, @var{alpha} = 1/2, @var{beta} = 1/4, @var{flags} = "") % Computes the solution of non-linear second-order differential equations of the form % % @example % @var{m} @var{x}'' + @var{c} @var{x}' + @var{q}(@var{x}, @var{x}', @var{x}'') = @var{f} % @end example % % where @var{x}' denotes the first time derivative of @var{x} and @var{q} is % a non-linear function. % % If the function is called without the assigning a return value % then @var{x} is plotted versus time. % % @strong{Inputs} % % @table @var % @item m % The mass of the body. % @item c % Viscous damping of the system. % @item q % The name of a function % that returns the value of the resisting force for a given % displacement. The form of Q must be: % % @example % @var{F} = Q( @var{x}) % @end example % % where @var{F} is the restoring force for the state vector @var{x} % = [@var{u}, @var{u'}, @var{u''}]; displacement % (@var{u}), velocity (@var{u'}), and acceleration. % @item f % The forcing function as a time sampled or impulse vector % (see @strong{Special Cases}). % @item dt % The time step -- assumed to be constant % @item x0 % Initial displacement, default is zero % @item x'0 % Initial velocity, default is zero % @item 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. % @item 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. % @item flags % A string value which defines special cases. The cases are defined by % unique characters as explained in @strong{Special Cases} below. % @end table % % @strong{Outputs} % % @table @var % @item x % Matrix of size (3, @code{length(@var{f})}) with time series of displacement % (@var{x}(1,:)), velocity (@var{x}(2,:)), and acceleration (@var{x}(3,:)) % @end table % % @strong{Special Cases} % % The @var{flags} variable is used to define special cases of analysis as % follows. % % 'i' - Impulse forcing function. The forcing function, @var{f} is a % vector of impulses instead of a sampled time history. % 'n' - The stiffness is non-linear. In this case, @var{k} is a string % which contains the name of a function defining the non-linear % stiffness. % % @end deftypefn