Class StructuralNode
source code
record.RecordBase --+
|
record.Record --+
|
common.BasicObject --+
|
Node --+
|
StructuralNode
- Known Subclasses:
-
interface.nodes.StructuralNode
The structural node of MBDyn. The type can be 'static' or 'dynamic' as
defined in MBDyn. Usually a structural node is defined relative to a ReferenceFrame; its position, rotation matrix, velocity
and angular velocity are then defined. A structural node inherits from
its reference frame property. It is important to understand that a
structural node introduces degrees of freedom in the problem, that's why
it needs to be attached to joints for getting constraints and describing
a model that can be solved.
Example of use:
import numpy as N
ref = ReferenceFrame()
ref.set_position(10., 0., 0.)
node1 = StructuralNode()
node1.set_relative_from(ref)
node1.set_velocity(1., 0., 0.)
node1.set_angular_velocity(0., 0., 1.)
angle = N.pi/4.
node2 = StructuralNode()
node2.set_relative_from(ref)
node2.set_type("static")
node2.set_position(10., 0., 0.)
node2.set_rotation_matrix(one=(1., 0., 0.),
two=(0., N.cos(angle), N.sin(angle)))
The node1
is at 10 m from the origin,
with an initial velocity of 1 m/s along x and an initial angular velocity of 1
rad/s along z. The node2
does not
have any momentum but is at 20 m from the origin and
its rotation matrix is turned of π/4 along the x axis. Those nodes can then be added to the Simulation.
|
|
|
set_default(self)
The default node is dynamic, with a null position offset, a
identity rotation matric, a null velocity offset and a null angular
velocity relative to its reference frame |
source code
|
|
|
|
|
|
|
set_position(self,
*args,
**kargs)
Set the position of the node (offset relative to its reference
frame) |
source code
|
|
|
set_rotation_matrix(self,
*args,
**kargs)
Set the orientation matrix of the node (relative to its reference
frame) |
source code
|
|
|
set_velocity(self,
*args,
**kargs)
Set the velocity of the node (relative to its reference frame) |
source code
|
|
|
set_angular_velocity(self,
*args,
**kargs)
Set the angular velocity of the node (relative to its reference
frame) |
source code
|
|
|
|
Inherited from Node :
collect_parameters ,
set_parameters ,
set_relative_from ,
set_type
Inherited from common.BasicObject :
get_lines ,
set_comment ,
set_label ,
set_name ,
set_simulation_ref
Inherited from record.Record :
common_init_results ,
save ,
set_own_parameters ,
will_save ,
will_save_nothing ,
will_save_only
Inherited from record.RecordBase :
collect_own_parameters ,
set_own_para
|
The default node is dynamic, with a null position offset, a identity
rotation matric, a null velocity offset and a null angular velocity
relative to its reference frame
- Overrides:
Node.set_default
|
Get the instance created by MBDyn when parsing the input file. This
instance, access by 'mbdyn_inst' can then be used to communicate with
MBDyn.
- Overrides:
common.BasicObject.get_mbdyn_instance
|
Create the needed objects to save the results during the
simulation.
- Overrides:
Node.init_results
|
Append a MBDyn step to the results. This method is not used any more
due to the bindings module.
|