This function handles Newton's second law, which is the dynamical
law that relates the accelerations of whale and ship to the forces
upon each. It is used by strike()
, as the latter integrates
the acceleration equations to step forward in time through
the simulation of a whale-strike event. Thus, dynamics()
is a core function of this package. The code is very simple,
because the forces are determined by other functions, as
described in the “Details” section.
dynamics(t, y, parms)
time (s).
model state, a vector containing ship position xs
(m),
ship speed vs
(m/s), whale position xw
(m),
and whale speed vw
(m/s).
A named list holding model parameters, created by
parameters()
.
Given a present state (defined by the positions and
velocities of ship and whale) at the present time,
apply Newton's second law to find the time derivatives
of that state. Forces are determined with
whaleCompressionForce()
,
whaleSkinForce()
,
shipWaterForce()
,
whaleWaterForce()
, while engine force
(assumed constant over the course of a collision) is
computed from initial shipWaterForce()
. Whale and
ship masses are set by parameters()
, which also sets up
areas, drag coefficients, etc.
See whalestrike()
for a list of references.