ADD_MASS_PROPERTY

The ADD_MASS_PROPERTY utility subroutine accepts the mass properties for two parts or sets of parts and returns the mass properties for the aggregate set.
It is primarily intended for use with the BODY_MASS_PROPERTY utility subroutine to compute the aggregate mass properties for a group of parts.

Use

Called By

Any user-written subroutine

Prerequisite

None

Calling Sequence

CALL ADD_MASS_PROPERTY (cm1, mass1, ip1, cm2, mass2, ip2)

Input Arguments

 
cm1
A double-precision array of length 3 containing the center of mass of the first part or set of parts expressed in the GCS.
mass1
A double-precision variable containing the mass of the first part or set of parts.
ip1
A double-precision array of length 6 giving the 6 independent terms in the inertia tensor for the first part or set of parts. (Ixx, Iyy, Izz, Ixy, Ixz, Iyz) These inertia terms much be computed about the center of mass of the part and oriented in GCS.
cm2
A double-precision array of length 3 containing the center of mass of the second part or set of parts expressed in the GCS.
mass2
A double-precision variable containing the mass of the second set.
ip2
A double-precision array of length 6 giving the 6 independent terms in the inertia tensor for the second part or set of parts. (Ixx, Iyy, Izz, Ixy, Ixz, Iyz) These inertia terms much be computed about the center of mass of the part and oriented in GCS.

Output Arguments

 
cm2
A double-precision array of length 3 containing the center of mass of the combined system of parts expressed in GCS.
mass2
A double-precision variable containing the mass of the combined system of parts.
Ip2
A double-precision array of length 6 containing the 6 independent components of in the inertia tensor for the combined system of parts. (Ixx, Iyy, Izz, Ixy, Ixz, Iyz) These inertia terms are expressed about the combined center of mass and are oriented in GCS.

Extended Definition

The ADD_MASS_PROPERTY utility subroutine provides a convenient way for user-written subroutines to compute the current mass properties of sets of parts.

Cautions

The user is responsible for employing consistent units when adding mass properties.

Example

 
C=======================================+===========================
SUBROUTINE REQSUB (ID, TIME, PAR, NPAR, IFLAG, RESULT)
C+-----------------------------------------------------------------*
C
C This REQSUB gets the mass properties of part 2, and constructs the
C aggregate mass properties of the set of parts 3-9 (constructed to be
C equivalent, in aggregate, to part 2) and returns the first four terms
C of the inertia tensor for each, 2 and 3-9, for comparison.
C
IMPLICIT NONE
C
C Inputs:
C
INTEGER ID, NPAR, IBODY
DOUBLE PRECISION PAR(*), TIME
INTEGER          IFLAG
C
C Outputs:
C
DOUBLE PRECISION RESULT(8)
C
C Local Variables:
C
DOUBLE PRECISION CM(3), MASS, IP(6)
DOUBLE PRECISION SUMCM(3), SUMMASS, SUMIP(6)
C
C+-----------------------------------------------------------------*
C
C
C Output 8 variables.
C - The first four elements of the IP of the reference body
C - The first four elements of the IP of the equivalent set of bodies.
C
C Get the properties of the reference body
C
CALL BODY_MASS_PROPERTY ('Part', 2, CM, MASS, IP)
C
RESULT(1) = IP(1)
RESULT(2) = IP(2)
RESULT(3) = IP(3)
RESULT(4) = IP(4)
C
C Get the aggregate properties of the equivalent set of bodies.
C
SUMMASS = 0
SUMCM(1) = 0
SUMCM(2) = 0
SUMCM(3) = 0
SUMIP(1) = 0
SUMIP(2) = 0
SUMIP(3) = 0
SUMIP(4) = 0
SUMIP(5) = 0
SUMIP(6) = 0
DO IBODY=3, 9
CALL BODY_MASS_PROPERTY ('Part', IBODY, CM, MASS, IP)
CALL ADD_MASS_PROPERTY (CM, MASS, IP, SUMCM, SUMMASS, SUMIP)
ENDDO
RESULT (5) = SUMIP(1)
RESULT (6) = SUMIP(2)
RESULT (7) = SUMIP(3)
RESULT (8) = SUMIP(4)
RETURN
END