×

Algoryx's video: 22 - Melt and destroy Granular

@22 - Melt and destroy (Granular)
Download model: https://www.algoryx.se/download/momentum/tutorials/tutorial22.zip https://www.ansys.com https://www.algoryx.se A tutorial on how to mix granular materials and model reactions between them, in Algoryx Momentum Granular. The particles can exchange physical properties such as moisture, density, volume and more. The script: # Disclaimer: This script has not been tested. Use at your own risk. from Momentum import v1 sim = v1.getSimulation() # Triggered at start of Recording of a simulation (including continuing) def OnStart(time): global sand, solvent, liquid sand = sim.getMaterial("Sand") solvent = sim.getMaterial("Solvent") liquid = sim.getMaterial("Liquid") # Triggered every time step during recording of a simulation def OnStep(time): gContacts = sim.getGranularContacts() for c in gContacts: b1 = c.getGranularBody1; b2 = c.getGranularBody2 if b1().getMaterial() == sand and b2().getMaterial() == solvent: b1().setMaterial(liquid); b1().setColor(v1.Vec4(1,0,1,1)) b2().destroy() elif b1().getMaterial() == solvent and b2().getMaterial() == sand: b1().destroy(); b2().setMaterial(liquid); b2().setColor(v1.Vec4(1,0,1,1)) # Triggered when a recording is stopped def OnStop(time): pass

8

2
Algoryx
Subscribers
6.9K
Total Post
213
Total Views
64.7K
Avg. Views
899.2
View Profile
This video was published on 2019-05-07 20:58:22 GMT by @Algoryx on Youtube. Algoryx has total 6.9K subscribers on Youtube and has a total of 213 video.This video has received 8 Likes which are lower than the average likes that Algoryx gets . @Algoryx receives an average views of 899.2 per video on Youtube.This video has received 2 comments which are higher than the average comments that Algoryx gets . Overall the views for this video was lower than the average for the profile.Algoryx # # # # has been used frequently in this Post.

Other post by @Algoryx