function dwdt = artery_deriv ( t, w )

%*****************************************************************************80
%
%% artery_deriv() evaluates the right hand side of the artery PDE.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    21 December 2020
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Alfio Quarteroni, Riccardo Sacco, Fausto Saleri,
%    Numerical Mathematics,
%    Second Edition,
%    Texts in Applied Mathematics, Volume 37,
%    Springer, 2007,
%    ISBN: 978-3-540-34658-6
%
%  Input:
%
%    real T, the current time.
%
%    real W(NX*2), the current solution at time T.
%
%  Output:
%
%    real DWDT(NX*2), the right hand side of the PDE at time T.
%
  [ a, alpha, b, beta, dp, gamma, l, nx, omega, t0, w0, x ] = artery_parameters ( );
  
  u = w(   1:  nx);
  v = w(nx+1:2*nx);

  dudt = v;
  dvdt = - alpha * u - beta * v + gamma * x * dp * ( a + b * cos ( omega * t ) );

  dwdt = [ dudt; dvdt ];

  return
end
