The 3D version of this simulator paints the whole bilayer shell with one interpolated colour and plugs a formula straight into the release rate. This 2D companion instead simulates the phase transition itself: a 48×48 toroidal lattice patch of the bilayer, where every site is either gel (ordered) or fluid (disordered) and is resampled by asynchronous Glauber dynamics with a Boltzmann-sigmoid field plus nearest-neighbour coupling J (the literal lattice analogue of "cooperativity"):
P(flip → fluid) = 1 / (1 + exp(−h)), h = (T − Tm)/w + J·(nFluidNeighbours − 2)/2
Averaging every site gives an emergent, empirically-measured permeability (not a formula lookup) that still tracks the same sigmoid centred at Tm — but the neighbour coupling J visibly sharpens it and spawns real coexisting gel/fluid domains, exactly the "packing defects at grain boundaries" the theory describes. First-order release kinetics is unchanged:
k = k_max · permeability(lattice)
dN/dt = −k·N(t)
The lattice's columns are mapped onto angles around the liposome cross-section below. Encapsulated drug particles that come up for release exit preferentially through whichever angular sector currently has the highest local fluid-fraction + grain-boundary density — i.e. through the actual simulated packing defects, not a uniform sphere surface. Watch domains nucleate, grow and dissolve as you sweep temperature through Tm, and the strip chart track drug remaining and permeability together over time.
- Lipid buttons — pick a phospholipid, which sets Tm and re-anchors the lattice's field.
- Temperature — the bath/tissue temperature the bilayer patch currently sits in.
- Cooperativity (w) — base sigmoid width; the lattice's own neighbour coupling J adds further sharpening on top, same as real bilayers with more cooperating chains.
- Simulation speed — scales both elapsed simulated release time and lattice relaxation rate per real second.