floripy.rbd package#
Submodules#
floripy.rbd.bodymodels module#
Class implementing a body.
- class floripy.rbd.bodymodels.BodyBase(bid)[source]#
Bases:
object- Attributes:
- bid
Methods
Update velocity and angular acceleration
update_bid(bid)Update the body id.
update_position(com, shifter)Update com and shifter.
Update velocity and angular velocity
get_acceleration
get_angular_acceleration
get_angular_velocity
get_com
get_linear_acceleration
get_linear_velocity
get_shifter
get_velocity
update_com
update_shifter
- property bid#
- class floripy.rbd.bodymodels.BodyZero(bid=None)[source]#
Bases:
BodyBase- Attributes:
- bid
Methods
Update velocity and angular acceleration
update_bid(bid)Update the body id.
update_position(com, shifter)Update com and shifter.
Update velocity and angular velocity
get_acceleration
get_angular_acceleration
get_angular_velocity
get_com
get_linear_acceleration
get_linear_velocity
get_shifter
get_velocity
update_com
update_shifter
- property bid#
- get_acceleration()#
- get_angular_acceleration()#
- get_angular_velocity()#
- get_com()#
- get_linear_acceleration()#
- get_linear_velocity()#
- get_shifter()#
- get_velocity()#
- update_acceleration(a)#
Update velocity and angular acceleration
- update_bid(bid)#
Update the body id.
- update_com(com)#
- update_shifter(shifter)#
- update_velocity(v)#
Update velocity and angular velocity
- class floripy.rbd.bodymodels.Sphere(bid, radius=None)[source]#
Bases:
BodyBase- Attributes:
- bid
Methods
Update velocity and angular acceleration
update_bid(bid)Update the body id.
update_position(com, shifter)Update com and shifter.
Update velocity and angular velocity
get_acceleration
get_angular_acceleration
get_angular_velocity
get_com
get_linear_acceleration
get_linear_velocity
get_radius
get_shifter
get_velocity
update_com
update_shifter
- property bid#
- get_acceleration()#
- get_angular_acceleration()#
- get_angular_velocity()#
- get_com()#
- get_linear_acceleration()#
- get_linear_velocity()#
- get_shifter()#
- get_velocity()#
- update_acceleration(a)#
Update velocity and angular acceleration
- update_bid(bid)#
Update the body id.
- update_com(com)#
- update_position(com, shifter)#
Update com and shifter.
- update_shifter(shifter)#
- update_velocity(v)#
Update velocity and angular velocity
- class floripy.rbd.bodymodels.Prolate(bid, a=None, c=None)[source]#
Bases:
BodyBase- Attributes:
- bid
Methods
Update velocity and angular acceleration
update_bid(bid)Update the body id.
update_position(com, shifter)Update com and shifter.
Update velocity and angular velocity
get_acceleration
get_angular_acceleration
get_angular_velocity
get_com
get_director
get_linear_acceleration
get_linear_velocity
get_prolate_a
get_prolate_c
get_shifter
get_velocity
update_com
update_shifter
- property bid#
- get_acceleration()#
- get_angular_acceleration()#
- get_angular_velocity()#
- get_com()#
- get_linear_acceleration()#
- get_linear_velocity()#
- get_shifter()#
- get_velocity()#
- update_acceleration(a)#
Update velocity and angular acceleration
- update_bid(bid)#
Update the body id.
- update_com(com)#
- update_position(com, shifter)#
Update com and shifter.
- update_shifter(shifter)#
- update_velocity(v)#
Update velocity and angular velocity
- class floripy.rbd.bodymodels.Oblate(bid, a=None, c=None)[source]#
Bases:
BodyBase- Attributes:
- bid
Methods
Update velocity and angular acceleration
update_bid(bid)Update the body id.
update_position(com, shifter)Update com and shifter.
Update velocity and angular velocity
get_acceleration
get_angular_acceleration
get_angular_velocity
get_com
get_director
get_linear_acceleration
get_linear_velocity
get_oblate_a
get_oblate_c
get_shifter
get_velocity
update_com
update_shifter
- property bid#
- get_acceleration()#
- get_angular_acceleration()#
- get_angular_velocity()#
- get_com()#
- get_linear_acceleration()#
- get_linear_velocity()#
- get_shifter()#
- get_velocity()#
- update_acceleration(a)#
Update velocity and angular acceleration
- update_bid(bid)#
Update the body id.
- update_com(com)#
- update_position(com, shifter)#
Update com and shifter.
- update_shifter(shifter)#
- update_velocity(v)#
Update velocity and angular velocity
- class floripy.rbd.bodymodels.Parallelogram(bid, vertices=None)[source]#
Bases:
BodyBase- Attributes:
- bid
- num_vertices
Methods
Update velocity and angular acceleration
update_bid(bid)Update the body id.
update_position(com, shifter)Update com and shifter.
Update velocity and angular velocity
get_acceleration
get_angular_acceleration
get_angular_velocity
get_com
get_ellipsoid_a
get_ellipsoid_b
get_ellipsoid_c
get_ellipsoid_shifter
get_linear_acceleration
get_linear_velocity
get_shifter
get_velocity
update_com
update_shifter
- property num_vertices#
- property bid#
- get_acceleration()#
- get_angular_acceleration()#
- get_angular_velocity()#
- get_com()#
- get_linear_acceleration()#
- get_linear_velocity()#
- get_shifter()#
- get_velocity()#
- update_acceleration(a)#
Update velocity and angular acceleration
- update_bid(bid)#
Update the body id.
- update_com(com)#
- update_position(com, shifter)#
Update com and shifter.
- update_shifter(shifter)#
- update_velocity(v)#
Update velocity and angular velocity
floripy.rbd.jointmodels module#
Classes for various joint models. Ref. Roy Featherstone, Rigid Body Dynamics, Table 4.1, p.79
- class floripy.rbd.jointmodels.JointBase(category, pf, sf, xi, r, zeta, prox_shifter, dist_shifter, mss, css, num_gencoord, num_genspeed)[source]#
Bases:
object- Attributes:
- connects
- num_constraints
- num_gencoord
- num_genspeed
- predecessor
- successor
Methods
get_css()Returns the joint constraint subspace.
get_jpvm()Returns the joint partial velocity matrix.
get_mss()Returns the joint motion subspace.
Return the 6x6 transform in world.
get_gencoord
get_gencoord_dot
- property num_genspeed#
- property num_gencoord#
- property num_constraints#
- property predecessor#
- property successor#
- property connects#
- class floripy.rbd.jointmodels.Revolute(**kwargs)[source]#
Bases:
JointBase- Attributes:
- connects
- num_constraints
- num_gencoord
- num_genspeed
- predecessor
- successor
Methods
get_css()Returns the joint constraint subspace.
get_jpvm()Returns the joint partial velocity matrix.
get_mss()Returns the joint motion subspace.
Return the 6x6 transform in world.
get_constraint_mat
get_gencoord
get_gencoord_dot
renormalize
selfupdate
update
- property connects#
- get_css()#
Returns the joint constraint subspace.
- get_gencoord()#
- get_jpvm()#
Returns the joint partial velocity matrix.
- get_mss()#
Returns the joint motion subspace.
- get_shifter66()#
Return the 6x6 transform in world.
- property num_constraints#
- property num_gencoord#
- property num_genspeed#
- property predecessor#
- property successor#
- class floripy.rbd.jointmodels.Free(**kwargs)[source]#
Bases:
JointBase- Attributes:
- connects
- num_constraints
- num_gencoord
- num_genspeed
- predecessor
- successor
Methods
get_css()Returns the joint constraint subspace.
get_jpvm()Returns the joint partial velocity matrix.
get_mss()Returns the joint motion subspace.
Return the 6x6 transform in world.
get_constraint_mat
get_gencoord
get_gencoord_dot
renormalize
selfupdate
update
- property connects#
- get_css()#
Returns the joint constraint subspace.
- get_gencoord()#
- get_jpvm()#
Returns the joint partial velocity matrix.
- get_mss()#
Returns the joint motion subspace.
- get_shifter66()#
Return the 6x6 transform in world.
- property num_constraints#
- property num_gencoord#
- property num_genspeed#
- property predecessor#
- property successor#
- class floripy.rbd.jointmodels.Spherical(**kwargs)[source]#
Bases:
JointBase- Attributes:
- connects
- num_constraints
- num_gencoord
- num_genspeed
- predecessor
- successor
Methods
get_css()Returns the joint constraint subspace.
get_jpvm()Returns the joint partial velocity matrix.
get_mss()Returns the joint motion subspace.
Return the 6x6 transform in world.
get_constraint_mat
get_gencoord
get_gencoord_dot
selfupdate
update
- property connects#
- get_css()#
Returns the joint constraint subspace.
- get_gencoord()#
- get_jpvm()#
Returns the joint partial velocity matrix.
- get_mss()#
Returns the joint motion subspace.
- get_shifter66()#
Return the 6x6 transform in world.
- property num_constraints#
- property num_gencoord#
- property num_genspeed#
- property predecessor#
- property successor#
- class floripy.rbd.jointmodels.Root(**kwargs)[source]#
Bases:
Free- Attributes:
- connects
- num_constraints
- num_gencoord
- num_genspeed
- predecessor
- successor
Methods
get_css()Returns the joint constraint subspace.
get_jpvm()Returns the joint partial velocity matrix.
get_mss()Returns the joint motion subspace.
Return the 6x6 transform in world.
get_constraint_mat
get_gencoord
get_gencoord_dot
is_rooted
renormalize
reroot
selfupdate
update
uproot
- property connects#
- get_constraint_mat()#
- get_css()#
Returns the joint constraint subspace.
- get_gencoord()#
- get_gencoord_dot(u)#
- get_jpvm()#
Returns the joint partial velocity matrix.
- get_mss()#
Returns the joint motion subspace.
- get_shifter66()#
Return the 6x6 transform in world.
- property num_constraints#
- property num_gencoord#
- property num_genspeed#
- property predecessor#
- renormalize()#
- property successor#
- class floripy.rbd.jointmodels.Fixed(**kwargs)[source]#
Bases:
JointBase- Attributes:
- connects
- num_constraints
- num_gencoord
- num_genspeed
- predecessor
- successor
Methods
get_css()Returns the joint constraint subspace.
get_jpvm()Returns the joint partial velocity matrix.
get_mss()Returns the joint motion subspace.
Return the 6x6 transform in world.
get_constraint_mat
get_gencoord
get_gencoord_dot
selfupdate
update
- property connects#
- get_css()#
Returns the joint constraint subspace.
- get_gencoord()#
- get_jpvm()#
Returns the joint partial velocity matrix.
- get_mss()#
Returns the joint motion subspace.
- get_shifter66()#
Return the 6x6 transform in world.
- property num_constraints#
- property num_gencoord#
- property num_genspeed#
- property predecessor#
- property successor#
floripy.rbd.mbs module#
- class floripy.rbd.mbs.Mbs(**kwargs)[source]#
Bases:
object- Attributes:
- num_bodies
- num_constraints
- num_gencoord
- num_genspeed
- num_joints
Methods
bid_iter()Returns a range over the body ids.
export_digraph(G, fn)Draws a digraph to a file.
Return director vector for all bodies.
Return the ellipsoid shifters for all bodies.
get_coms()Return com for all bodies.
Called by timestepper to set initial condition.
Return shifters for all bodies.
jid_iter()Returns a range over the joint ids for looping sequentially.
Returns a range over the loop joint ids for looping sequentially.
Renormalizes unit quaternions in the joints.
tofile(time)Write to output file.
Returns a range over the tree joint ids for looping sequentially.
close_files
constraints_violated
create_mbs
eval_position_constraints
eval_velocity_constraints
gencoord_correction
get_all_ellipsoid_a
get_all_ellipsoid_b
get_all_ellipsoid_c
get_all_oblate_a
get_all_oblate_c
get_all_prolate_a
get_all_prolate_c
get_all_radius
get_constraint_mat
get_gencoord_dot
get_partial_mat
get_torque_force
partition_gencoord
pullback
update
- property num_bodies#
- property num_joints#
- property num_gencoord#
- property num_genspeed#
- property num_constraints#
floripy.rbd.timestepper module#
Class implementing Kane’s method.
- class floripy.rbd.timestepper.Timestepper(model, hydrodynamics, flowfield, **kwargs)[source]#
Bases:
objectInterface to ODE integrator.
Methods
decomp_LTL(A[, overwrite, zero_upper, out])Compute the LTL decomposition of a positive definite matrix.
run