LTspice has a way to model electromechanical switches, which I have occasionally tried to use to simulate dc-dc converters without all the hassle of setting up mosfets and appropriate driver circuits.
The essentials of current-mode-control modeling. What are modified average models? Verifying new LTspice models for different, previously unsupported power-supply topologies. When a power-supply ...