Skip to content

Dynamic particle injection and dynamic meshes #207

Discussion options

You must be logged in to vote

Hi @anthropoy!

The class wp.sim.ModelBuilder() is there to help initializing a simulation model, but nothing stops you from manually updating the model's particles/meshes afterwards, even though it's currently a process that is a bit more involved.

Take a look at the wp.sim.Model and wp.sim.State classes to have an idea of the relevant arrays that could be updated for your needs.

For example, here are some fields of interest for the particles:

  • wp.sim.State.particle_q.
  • wp.sim.State.particle_qd.
  • wp.sim.Model.particle_mass.
  • wp.sim.Model.particle_inv_mass.
  • wp.sim.Model.particle_flags.
  • wp.sim.Model.particle_radius.

Likewise, meshes can have their point positions updated to reflect transforma…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by anthropoy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants