Code covered by the BSD License  

Highlights from
Biohydrodynamics Toolbox

image thumbnail
from Biohydrodynamics Toolbox by Alexandre Munnier
Tool to simulate easily the motion of moving solids or swimming robots in a potential fluid flow.

bht_gravity_center page
bht_gravity_center page
Biohydrodynamics Toolbox    

bht_gravity_center


Return the positions, velocities and momenta of inertia of the articulated bodies, given those of the solids they are made up.

Syntax

[Q,dQ,JJ] = bht_gravity_center(array_fishes_solids,Ms,mm,dT,q,dq)

Description

The function is ran by bht_traject_compute. BhT provides several ways of locating the bodies. They are described in the page Articulated body's degrees of freedom. By default, all of the computations are done with the coordinates and the orientations of the bodies' first links. Then, the postions and orientations of all of the solids can be computed and, at last, those of the bodies.
The function bht_gravity_center returns:
    • Q: the coordinates of the bodies' centers of mass and the bodies' orientations.
    • dQ: the related bodies' velocities (i.e. velocities of the bodies' centers of mass and angular velocities).
    • JJ: a row vector whose elements are the bodies' momenta of inertia.
The computation of all of these quantities is based on the solids' data and the structures of the bodies, namely:
  • q and dq: the coordinates, orientations and velocities of the solids.
  • array_fishes_solids: a row vector whose elements give the number of solids composing the bodies
  • Ms: the solids' mass matrix, containing the masses and momenta of inertia of the solids.
  • mm: a row vector whose elements are the bodies' masses. 
  • dT: the time step used to compute the bodies' orientations by means of Newton's second law (balance of angular momentum) by integrating the bodies' angular momenta.

See also

Articulated body's degrees of freedom
bht_traject_compute
2008 - A. Munnier and B. Pincon (Insitut Elie Cartan and INRIA Lorraine, Projet CORIDA, Nancy, France).         

Contact us at files@mathworks.com