Causes for Particle Explosions in Vellum Fluid

   368   0   1
User Avatar
Member
4 posts
Joined: Oct. 2024
Offline
I'm simulating cloth and water using the Vellum solver. When water touches the cloth, I modify the water's @mass and @pscale, but the simulation explodes at certain frames(img2).
Could you tell me the cause?

・The “Assume Uniform Radius” checkbox is unchecked
・There are sufficient Substep counts
・@mass, @pscale, and water absorption are updating as expected

Node connections are as shown in images 3-5.

Unfortunately, I cannot provide detailed code or the hip file, but the implementation flow is as follows:

1. In ”AttributeWrangle1”, for particles touching the cloth (obtained via `inpointgroup(0, “cloth”, @ptnum)`), store the absorbed mass using a formula into the `@mass_loss` attribute.

2. In "AttributeWrangle2", update @pscale and @mass based on @mass_loss as follows:

if (inpointgroup(0, fluid, @ptnum)) {
    float loss = f@mass_loss;

    float new_m = max(old_m - loss, 1e-7);
    float old_m = max(@mass, 1e-7); 
        
    float ratio = clamp(new_m / old_m, 0.0, 1.0);
    @pscale *= pow(ratio, 1.0/3.0); 

    @mass = new_m;

}


Please tell me how to update @mass and @pscale without causing the simulation to explode.

Attachments:
Frame5_Noproblem.png (1.8 MB)
Frame11_Explode.png (1.9 MB)
Node1.png (129.6 KB)
Node2.png (205.0 KB)
Node3.png (178.9 KB)

  • Quick Links