List of MBSymba commands


> restart: libname := libname, "C:/MBSymba": with(MBSymba_r6):

Reference frames

> Describe(Translate); Describe(translate);

# Transformation matrix corresponding to the translation <x,y,z> ** OR **

# Translate the {POINT,VECTOR,BODY,FORCE,TORQUE} object <obj>.

Translate( x::scalar, y::scalar, z::scalar,

obj::{BODY, FORCE, POINT, TORQUE, VECTOR} := NULL, $ ) :: frame

# Transformation matrix corresponding to the translation <x,y,z> ** OR **

# Translate the {POINT,VECTOR,BODY,FORCE,TORQUE} object <obj>.

translate( x::scalar, y::scalar, z::scalar,

obj::{BODY, FORCE, POINT, TORQUE, VECTOR} := NULL, $ ) :: frame

> Describe(Rotate); Describe(rotate);

# Transformation matrix corresponding to the rotation <angle> around the given

# <axis> ** OR ** Rotate the {POINT,VECTOR,BODY,FORCE,TORQUE} object <obj>.

Rotate( axis::{VECTOR, symbol}, angle::scalar,

obj::{BODY, FORCE, POINT, TORQUE, VECTOR} := NULL, $ ) :: frame

# Transformation matrix corresponding to the rotation <angle> around the given

# <axis> ** OR ** Rotate the {POINT,VECTOR,BODY,FORCE,TORQUE} object <obj>.

rotate( axis::{VECTOR, symbol}, angle::scalar,

obj::{BODY, FORCE, POINT, TORQUE, VECTOR} := NULL, $ ) :: frame

> Describe(inv_frame);

# Inverse transformation matrix of <TT>.

inv_frame( TT::frame, $ ) :: frame

> Describe(set_frame_name);

# Assign to a <frame> a conventional name that will be used while showing the

# object.

set_frame_name( x::{frame, name}, nm::name )

Points and vectors

> Describe(make_POINT);

# Make a POINT with coordinates <x,y,z> in the reference frame <TT>.

make_POINT( TT::frame, x::scalar, y::scalar, z::scalar, $ ) :: POINT

> Describe(origin);

# Extract the origin of frame <TT>

origin( TT::frame, $ ) :: POINT

> Describe(make_VECTOR);

# Make a VECTOR with components <u,v,w> in the reference frame <TT>.

make_VECTOR( TT::frame, u::scalar, v::scalar, w::scalar, $ ) :: VECTOR

> Describe(join_points);

# Create a VECTOR from point P to point Q.

join_points( P::POINT, Q::POINT, $ ) :: VECTOR

> Describe(project);

# project an <object> into to the reference <frame>.

project( object::{FORCE, POINT, TORQUE, VECTOR}, TT::frame, $ )

Velocities and accelerations

> Describe(velocity);

# Velocity of a POINT (or a VECTOR) with respect the frame <TT>. By default

# <TT> is the <ground> frame, therefore the ABSOLUTE velocity is computed.

velocity( P::{POINT, VECTOR}, TT::frame := ground, $ )

> Describe(acceleration); You may also apply twice the velocity operator

# Acceleration of a POINT (or a VECTOR) with respect to the frame <TT>. By

# default <TT> is the <ground> frame, therefore the ABSOLUTE velocity is

# computed.

acceleration( P::{POINT, VECTOR}, TT::frame := ground, $ )

> Describe(angular_velocity);

# Absolute angular velocity of the frame <TT>.

angular_velocity( TT::frame, $ )

> Describe(eulerian_velocity);

# Eulerian velocity of a point <P> with respect the frame <TT>, i.e. absolute

# velocity of <P> when its coordinates are frozen with respect to the frame

# <TT>.

eulerian_velocity( P::POINT, TT::frame := P[frame], $ )

> Describe(eulerian_acceleration);

# Eulerian acceleration of a point <P> with respect the frame <TT>, i.e.

# absolute acceleration of <P> when its coordinates are frozen with respect to

# the frame <TT>.

eulerian_acceleration( P::POINT, TT::frame := P[frame], $ )

Bodies

> Describe(make_BODY);

# Create a BODY rigidly attached to the <[frame]> having center of mass

# origin(<frame>) and mass <m>, with optional parameters are principal inertia

# moments <Ix,Iy,Iz> and composite inertia moments <Cyz,Cxz,Cxy>. The first

# argument <T> may be optionally a <POINT> that should be the body CoM.

make_BODY( T::{POINT, frame}, m::scalar, Ix::scalar := 0, Iy::scalar := 0,

Iz::scalar := 0, Cyz::scalar := 0, Cxz::scalar := 0,

Cxy::scalar := 0, $ )

> Describe(CoM);

# Extract the Center of Mass of BODY <BB>.

CoM( BB::BODY, $ ) :: POINT

> Describe(linear_momentum);

# Linear momentum of body <BB>.

linear_momentum( BB::BODY, $ ) :: VECTOR

> Describe(angular_momentum);

# Compute the Angular Momentum of BODY <BB> with respect to the POINT <OO>. If

# not specified, POINT <OO> is assumed to be the Center of Mass of <BB>.

angular_momentum( BB::BODY, OO::POINT := CoM(BB), $ ) :: VECTOR

> Describe(kinetic_energy);

# Compute the kinetic energy of a multibody system. Set the optional flag

# <nat_coords> = true for a constant mass matrix even while using natural

# (dependent) coordinates.

kinetic_energy( bodies::{set, BODY, list}, nat_coords::boolean := false )

Forces and torques

> Describe(make_FORCE);

# Make a FORCE from a VECTOR <FF> applied in <PP> that acts on the body <BA>

# and (optionally) reacts on the body <BR>.

make_FORCE( FF::VECTOR, PP::POINT, BA::{BODY, mframe},

BR::{BODY, mframe} := master_frame, $ )

> Describe(make_TORQUE);

# Make a TORQUE from a VECTOR <FF> that acts on the body <BA> and (optionally)

# reacts on the body <BR>.

make_TORQUE( FF::VECTOR, BA::{BODY, mframe},

BR::{BODY, mframe} := master_frame, $ )

> Describe(power);

# Power of a FORCE or a TORQUE

power( FT::{FORCE, TORQUE}, $ )

> Describe(generalized_force);

# Generalized forces of set of FORCEs and TORQUEs <FT> with respect coordinates

# <q>

generalized_force( FT::{set, FORCE, TORQUE, list}, qq )

> Describe(gravitational_energy);

# Compute the gravitational energy of a multibody system by evaluating the

# force field associated to the <_gravity> acceleration.

gravitational_energy( bodies::{set, BODY, list} )

Constraints

> Describe(make_CONSTRAINT);

# This procedure make a user-defined constraint.

make_CONSTRAINT( phi::{list, scalar}, vars::{list, scalar}, $ )

> Describe(spherical_JOINT);

# Create a spherical joint (3dof locked) between two points (kinematic

# constraint). When bodies are included, also the action-reaction

# forces/torques are considered (mechanical constraint).

spherical_JOINT( P1::POINT, P2::POINT, B1::BODY := NULL,

B2::{BODY, mframe} := master_frame, suffix := "" )

> Describe(cylindrical_JOINT);

# Create a cylindrical joint (4dof locked) between two points, given the

# sliding axis <u2> and the normal plane <v1,w1> (kinematic constraint). When

# bodies are included, also the action-reaction forces/torques are considered

# (mechanical constraint).

cylindrical_JOINT( P1::POINT, v1::VECTOR, w1::VECTOR, P2::POINT, u2::VECTOR,

B1::BODY := NULL, B2::{BODY, mframe} := master_frame,

suffix := "" )

> Describe(revolute_JOINT);

# Create a revolute joint (5dof locked) between two points (kinematic

# constraint), given the sliding axis <u2> and the normal plane <v1,w1> . When

# bodies are included, also the action-reaction forces/torques are considered

# (mechanical constraint).

revolute_JOINT( P1::POINT, v1::VECTOR, w1::VECTOR, P2::POINT, u2::VECTOR,

B1::BODY := NULL, B2::{BODY, mframe} := master_frame,

suffix := "" )

> Describe(planar_JOINT);

# Create a planar joint (3dof locked) between two points, given the plane

# <v1,w1> and the normal <u2> to the plane (kinematic constraint). When bodies

# are included, also the action-reaction forces/torques are considered

# (mechanical constraint).

planar_JOINT( P1::POINT, v1::VECTOR, w1::VECTOR, P2::POINT, u2::VECTOR,

B1::BODY := NULL, B2::{BODY, mframe} := master_frame,

suffix := "" )

> Describe(prismatic_JOINT);

# Create a prismatic joint (5dof locked) between two points on the sliding

# axis, given two normal planes <v1,w1> and <v2,w2> (kinematic constraint).

# When bodies are included, also the action-reaction forces/torques are

# considered (mechanical constraint).

prismatic_JOINT( P1::POINT, v1::VECTOR, w1::VECTOR, P2::POINT, v2::VECTOR,

w2::VECTOR, B1::BODY := NULL,

B2::{BODY, mframe} := master_frame, suffix := "" )

> Describe(rod_JOINT);

# Create a rod joint (1dof locked) between two points given the rod length

# <l12> (kinematic constraint). When bodies are included, also the

# action-reaction forces/torques are considered (mechanical constraint).

rod_JOINT( P1::POINT, P2::POINT, l12::scalar, B1::BODY := NULL,

B2::{BODY, mframe} := master_frame, suffix := "" )

> Describe(angle_JOINT);

# Create an angle joint (1dof locked) between two vectors given the <angle>

# (kinematic constraint). When bodies are included, also the action-reaction

# forces/torques are considered (mechanical constraint).

angle_JOINT( w1::VECTOR, v2::VECTOR, angle::scalar, B1::BODY := NULL,

B2::{BODY, mframe} := master_frame, suffix := "" )

Generation of the equation of motions

> Describe(newton_equations);

# Compute the Newton's equations of the multibody system <MBS>, which may

# include bodies and forces.

newton_equations( MBS::{set, list}, verbose::boolean := false, $ ) :: VECTOR

> Describe(euler_equations);

# Euler's equations of the multibody system <MBS> with respect the (optional)

# point <AA>.

euler_equations( MBS::{set, OBJECT, list}, AA::POINT := NULL,

verbose::boolean := false, $ )

> Describe(lagrange);

# Lagrange equations d/dt(dL/dqdot)- dL/dq

lagrange( L::scalar, q::function, t::name )

> Describe(lagrange_equations);

# derive the Lagrange equations of the multibody system <mbs> with respect to

# the <_coords> list. <mbs> may include objects of type BODY, FORCE, TORQUE and

# CONSTRAINT.

lagrange_equations( mbs::{set, list}, _coords::list )

Utilities

> Describe(show);

show( A::{OBJECT, frame} )

> Describe(comp_XYZ);

comp_XYZ( PP::{FORCE, POINT, TORQUE, VECTOR} )

> Describe(comp_X); Describe(comp_Y); Describe(comp_Z);

# Extract the X component of <PP>.

comp_X( PP::{FORCE, POINT, TORQUE, VECTOR}, TT::frame := PP[frame], $ )

:: scalar

# Extract the Y component of <PP>.

comp_Y( PP::{FORCE, POINT, TORQUE, VECTOR}, TT::frame := PP[frame], $ )

:: scalar

# Extract the Z component of <PP>.

comp_Z( PP::{FORCE, POINT, TORQUE, VECTOR}, TT::frame := PP[frame], $ )

:: scalar

> Describe(uvec);

# Extract the unit vector of <frame> along the given <axis>.

uvec( axis::symbol, TT::frame, $ ) :: vector

> Describe(uvec_X); Describe(uvec_Y); Describe(uvec_Z);

# Extract the X unit vector of frame <TT>

uvec_X( TT::frame, $ ) :: VECTOR

# Extract the Y unit vector of frame <TT>

uvec_Y( TT::frame, $ ) :: VECTOR

# Extract the Z unit vector of frame <TT>

uvec_Z( TT::frame, $ ) :: VECTOR

> Describe(dot_prod);

# Dot product between VECTOR <u> and object <v> (may be either a VECTOR, a

# FORCE, or a TORQUE).

dot_prod( u::VECTOR, v::{FORCE, TORQUE, VECTOR}, $ )

> Describe(norm2);

norm2( u )

> Describe(cross_prod);

# Cross product <u> (a VECTOR) by <v> (either a VECTOR or a FORCE).

cross_prod( u::VECTOR, v::{FORCE, VECTOR}, $ )

> Describe(first_order);

# Convert the 2nd order set of DAE mechanical equations <eqns> into a 1st order

# set of DAE. if the optional argument <flag> is present, the redudant

# variables and equations will be eliminated.

first_order( eqns, vars::{set, list}, t, flag )

> Describe(down_order);

# Reduce the order of dependent variables <vars> into differential equation

# <eqns>, while <t> is the independent variable.

down_order( eqns, vars::{set, list}, t )

> Describe(frame_YRP);

# Create a <frame> with standard Yaw, Roll, and Pitch rotations, with given

# suffix <s>. The otpional parameter <full> is used for including X-Y-Z

# displacements too.

frame_YRP( s::{integer, name}, full::name := NULL, $ ) :: frame

> Describe(dof_YRP);

# Create a Yaw,Roll,Pitch variables list with given suffix <s>. The otpional

# parameter <full> is used for including X-Y-Z displacements in the variables

# list.

dof_YRP( s::{integer, name}, full::name := NULL, $ ) :: list

Comments are closed.