Skip to content

novaphy.solvers.VBDConfig

Configuration object consumed by novaphy.solvers.SolverVBD. It is also available as novaphy.solvers.SolverVBD.Config.

The time step is not stored here: pass dt to solver.step(state_in, state_out, control, contacts, dt). Gravity belongs to the Model, not this configuration object.

Core attributes

Attribute Description
iterations VBD / AVBD solve iterations per call to step().
friction_epsilon Regularization used by friction constraints.
integrate_with_external_rigid_solver Preserve externally integrated rigid-body state while VBD advances particles.
backend VbdBackend: CPU, CUDA, or DLAN.

Particle and soft-body attributes

Attribute Description
particle_enable_self_contact Enable particle self-contact.
particle_self_contact_radius Particle radius used by self-contact.
particle_self_contact_margin Detection margin for particle self-contact.
particle_self_contact_mu Particle self-contact friction override; the negative default uses model material data.
particle_contact_sleep_speed Low-speed threshold used by particle contact handling.
particle_conservative_bound_relaxation Relaxation applied to conservative motion bounds.
particle_vertex_contact_buffer_size Per-particle vertex-contact buffer capacity.
particle_edge_contact_buffer_size Per-particle edge-contact buffer capacity.
particle_collision_detection_interval Interval control for particle collision detection.
particle_enable_tile_solve Enable the tiled particle solve path.
particle_edge_parallel_epsilon Parallelism tolerance for edge contact tests.
particle_topological_contact_filter_threshold Topological-neighborhood depth excluded from self-contact.
particle_rest_shape_contact_exclusion_radius Rest-shape neighborhood excluded from self-contact.
particle_external_vertex_contact_filtering_map Caller-provided vertex contact exclusions.
particle_external_edge_contact_filtering_map Caller-provided edge contact exclusions.

Rigid AVBD and contact attributes

Attribute Description
rigid_avbd_alpha Shared AVBD penalty update factor.
rigid_avbd_joint_alpha Joint-specific alpha override; the negative default uses rigid_avbd_alpha.
rigid_avbd_contact_alpha Contact-specific alpha override; the negative default uses rigid_avbd_alpha.
rigid_avbd_beta Shared AVBD beta value.
rigid_avbd_linear_beta Linear beta override; the negative default uses rigid_avbd_beta.
rigid_avbd_angular_beta Angular beta override; the negative default uses rigid_avbd_beta.
rigid_avbd_gamma AVBD multiplier decay factor.
rigid_contact_hard Select hard rigid contact constraints.
rigid_contact_history Enable persistent rigid contact history.
rigid_contact_stick_motion_eps Motion threshold for sticking contact history.
rigid_contact_stick_freeze_translation_eps Translation threshold for freezing a sticking contact.
rigid_contact_stick_freeze_angular_eps Angular threshold for freezing a sticking contact.
rigid_contact_k_start Initial rigid contact penalty.
rigid_body_contact_buffer_size Per-rigid-body contact buffer capacity.
rigid_body_particle_contact_buffer_size Per-rigid-body particle-contact buffer capacity.

Rigid joint attributes

Attribute Description
rigid_joint_linear_ke Linear joint stiffness.
rigid_joint_angular_ke Angular joint stiffness.
rigid_joint_linear_k_start Initial linear joint penalty.
rigid_joint_angular_k_start Initial angular joint penalty.
rigid_joint_linear_kd Linear joint damping.
rigid_joint_angular_kd Angular joint damping.

Example

import novaphy

builder = novaphy.ModelBuilder()
# ... add bodies, joints, shapes, or particles ...
builder.color()
model = builder.finalize()

cfg = novaphy.solvers.SolverVBD.Config()
cfg.iterations = 4
solver = novaphy.solvers.SolverVBD(model, cfg)

state = model.state()
control = model.control()
pipeline = novaphy.CollisionPipeline(model)
contacts = pipeline.contacts()
dt = 1.0 / 60.0

for _ in range(120):
    state.clear_forces()
    pipeline.collide(state, contacts)
    solver.step(state, state, control, contacts, dt)

Call novaphy.has_vbd_cuda() or novaphy.has_vbd_dlan() before selecting an optional backend.

See Also