f_nematic, live
An active nematic liquid crystal: rodlike molecules stir the fluid they sit in, so pairs of defects nucleate, glide and annihilate in a pattern that never settles.
The cell below steps the NumPy mirror that f_nematic's tests are written against, in your browser. It is the NumPy mirror, not the Max patch, and it is not claimed to match the patch bit for bit.
Downloads about 15 MB the first time (Python and NumPy).
activityis the active stress: below about 0.3 the pattern relaxes away; higher values give more, faster-moving defects.alignis flow alignment; with a nonzero value its sign matters (more or fewer defects).frictionis the flow damping: low gives long swirls, high a calmer, more ordered texture.rateis the time step per solver step, capped by activity for stability.steps per frameruns several solver steps per displayed frame so the pattern does not crawl.lookrotates the crossed polarizer of the schlieren image.viewshows the classic schlieren picture, or the module's tensor outlets as hue maps.sourceswitches between the live solver and an analytic field of orbiting +/-1/2 defect pairs (deterministic).- Reseed starts again from fresh noise; the pattern takes several seconds to order.