mirror of
https://github.com/ParticulateFlow/LPP.git
synced 2025-12-08 06:37:46 +00:00
add from __future__ import print statement -> print() function xrange -> range map() -> list(map()) range() -> list(range()) StandardError -> Exception
19 lines
442 B
Python
19 lines
442 B
Python
# movie of flow around obstacle
|
|
|
|
from __future__ import absolute_import
|
|
|
|
d = dump("dump.flow")
|
|
d.map(1,"id",2,"type",3,"x",4,"y",5,"z",6,"vx",7,"vy")
|
|
d.set("$ke = sqrt($vx*$vx + $vy*$vy)")
|
|
d.spread("vx",100,"color")
|
|
d.atype = "color"
|
|
|
|
r = raster(d)
|
|
r.acol(list(range(100)),["red","red","red","red","yellow","green","blue","purple","purple","purple","purple"])
|
|
r.arad(list(range(100)),0.5)
|
|
r.rotate(0,-90)
|
|
r.zoom(1.5)
|
|
r.file = "flow"
|
|
|
|
r.all()
|