Input
– Input Variables¶
-
class
trep.
Input
(system[, name=None])¶ Parameters: - system – An instance of
System
to add the variable to. - name – A string that uniquely identifies the input variable.
An
Input
instance represents a single variable in the input vector, \(u\), of a mechanical system. Inputs are used byForce
to apply non-conservative forcing to the system (e.g, a torque or body wrench)Input variables are created automatically by implementations of
Force
when needed, so you do not need to create them directly unless defining a new force type. In that case, they should be created usingForce._create_input()
.If a name is provided, it can be used to identify and retrieve input variables.
The current value of a single input variable can be accessed directly (
u
) or throughSystem
to access all input variables at once (System.u
).Warning
Currently
trep
does not enforce unique names for input variables. It is recommended to provide a unique name for everyInput
so they can be unambiguously retrieved bySystem.get_input()
.- system – An instance of