delete particles with active capillary law
Hi,
I need to delete some particles inside my model and I dont know what is the best and physical/numerical correct way to do this.
If I say O.bodies.erase(id) it erases the body and the interactions will be erased in the next time step by InteractionLoop. But when I have capillary law active, I have to use neverErase flag as True to avoid a segmentation fault. So there are three options how to do this and I want to know what is the best option:
OPTION 1: only erase bodies
Because neverErase flag is True, interaction will still be active and can influence results, right? So if I later simulate increasing water level by deleting liquid bridges this remaining interactions from non-existant bodies can lead to instability, right?
O.bodies.erase(id)
OPTION 2: erase interactions manually first and erase bodies afterwards
To avoid the influence of interactions from non-existant bodies, one can erase the interactions before erasing the associated bodies. This normally leads to a segmentation fault. One can del with the segmantation fault by simply run 1 step after every erased body.
for i in O.bodies[
O.interaction
O.bodies.erase(id)
O.run(1,True)
OPTION 3: deactivate capillary law, set neverErase=False, erase all interactions, delete bodies, set neverErase=True, activate capillary law again
I did not test this option, so I dont know if it works.
Law2_ScGeom_
Law2_ScGeom_
O.interactions.
O.bodies.erase(id)
Law2_ScGeom_
Law2_ScGeom_
So what do you think is the best option in this case?
Christian
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Christian Jakob
- Solved:
- Last query:
- Last reply: