Falstad does not have an optotriac part. I've opened a feature request issue on the CircuitJS GitHub to ask for one to be added, but is there a reasonable way to emulate an optotriac given the components and building blocks that are currently available in the simulator, in the meantime?
My intuition is that I could probably use a VCVS block attached to the triac gate, to "force" a particular voltage delta between the gate and one of the main terminals, but I'm not familiar enough with (opto)triac behaviour and models to have a good handle on what a good transfer function would look like and what other considerations I need to make.
I tried replicating a couple of old optotransistor-based triac drivers, but they behave quite differently to optotriac designs, and an optotriac is what I would end up using in a physical circuit anyway.
I'm not looking for deep physical accuracy - the behaviour only needs to be approximated closely enough to play around with some simple leading/trailing edge 50Hz 230Vrms mains dimmer circuits with ZCD. I could do this in LTspice, and I will end up using LTspice to more rigorously simulate anything I intend to actually build, but I much prefer the interactivity of Falstad for quick experimentation and prototyping. So, if there's a quick-and-dirty approach to approximating an optotriac, then it'd be strongly preferable.
Is my VCVS approach workable? Is there a better way?