6.2 System Simulation 277
in ANSI C, and has been compiled and executed on several UNIX based op-
erating systems including Linux, Solaris, Mac OSX, OpenBSD and FreeBSD.
The input to this translator takes advantage of the fact that the modeling
approach developed in this book leads to a set of highly structured equations.
The ASCII input file uses keywords to enter the system variables, scalar
energy functions, constraints, etc. A list of the keywords recognized by the
program are shown in Table 6.1. These keywords are used as follows.
DisplacementVariables FlowVariables EffortVariables
DynamicVariables KineticCoEnergy PotentialEnergy
DissipationFunction GeneralizedEfforts DisplacementConstraints
FlowConstraints EffortConstraints DynamicConstraints
InitialDisplacements InitialFlows InitialEfforts
InitialDynamic InitialTime FinalTime
OutputPoints
Table 6.1 ldaetrans keywords
• DisplacementVariables: This keyword is used to input the displace-
ment variables in the model. For example, the displacement variables
q = [q
1
, q
2
, q
3
]
T
are entered using the statement
DisplacementVariables = [q1,q2,q3];
Note that, all vector inputs to the program are enclosed in square brackets,
and the elements of the vector are separated by commas. In addition, all
input lines to the program end with a semicolon.
Similar input statements are used to enter the flow variables f, the effort
variables e, and the dynamic variables s, via the keywords FlowVariables,
EffortVariables and DynamicVariables, respectively.
• KineticCoEnergy: This keyword is used to enter the kinetic coenergy for
the system. For example, T
∗
=
1
2
mf
2
1
can be entered using the statement
KineticCoEnergy = (m*f1*f1)/2;
Similar statements are used to enter the potential energy V , and the dis-
sipation function D via the keywords PotentialEnergy and
DissipationFunction, respectively.
• GeneralizedEfforts: The efforts e
s
= [e
s
1
, e
s
2
, ···, e
s
n
]
T
are entered
using this keyword. For example, consider a system with displacements
q = [q
1
, q
2
, q
3
]
T
, and the virtual work due to the applied efforts is δW =
τ δq
1
+ F δq
3
. In this case e
s
= [τ, 0, F ]
T
, and can be described using the
statement
GeneralizedEfforts = [tau,0,F];
Note that the efforts e
s
are distinct from the efforts associated with the
effort constraints Γ , i.e., the effort variables e. Also, in a strict sense these