rigid_body Derived Type

type, public :: rigid_body

Defines a rigid body.


Contents


Components

Type Visibility Attributes Name Initial
real(kind=real64), public :: cg(3)

The x-y-z location of the CG relative to the body coordinate frame.

real(kind=real64), public :: inertia(3,3)

The 3-by-3 inertia tensor as measured about the CG of the body.

real(kind=real64), public :: mass

The mass of the body.


Constructor

public interface rigid_body

  • private pure function rb_init(m, inertia, cg) result(rst)

    Initializes a rigid_body object.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in), optional :: m

    The mass of the body. If no mass is specified, a value of 1 is used.

    real(kind=real64), intent(in), optional :: inertia(3,3)

    The 3-by-3 inertia tensor. If not supplied, an identity matrix is used.

    real(kind=real64), intent(in), optional :: cg(3)

    The x-y-z location of the CG relative to the body coordinate frame. If not supplied, the CG is set to (0, 0, 0).

    Return Value type(rigid_body)

    The rigid_body object.