Simulation Clock

Shipping
sim_clock

Simulation time source: emits the current sim time t for driving f(t) systems

Signature

Outputs

  • timeSignalThe current simulation time t (seeded by the solver each minor step).

Description

Simulation Clock is the time source of the dynamic-simulation engine: its single output time carries the current simulation time . It has no inputs and no state. Inside a compound whose execution_mode = Simulation, the sim engine owns this block and seeds the output each solver minor-step — exactly the way it seeds an integrator's state .

This lets you drive systems with an explicit forcing function directly — a driven oscillator, resonance sweep, or any time-dependent term — instead of the awkward integrator-of-1 trick (integrating a constant to synthesize time).

Outside a Simulation compound is undefined (there is no solver time loop), so the block degrades to a benign leaf source emitting a single-sample , keeping the node renderable and runnable everywhere.

Mathematics

Examples

Driven (forced) oscillator

Feed sim_clock.time into a formula computing , add it to the spring–damper restoring term, and wire the sum into the velocity integrator's derivative. Sweeping near the natural frequency reproduces resonance — driven directly by , no integrator-of-1 needed.

Applications

  • Supplying an explicit time axis to time-dependent forcing functions (driven oscillators, resonance, scheduled inputs).
  • Building any f(t) term inside a Simulation compound without synthesizing time from a constant integrator.
  • Time-stamping or gating derived quantities against the true solver time within a simulation.

Neat

The clock is seeded by the solver identically to an integrator's state, so it is a true time source rather than a post-hoc sample counter — its t tracks adaptive step sizes exactly.

Like the other sim blocks it is marked a time source by membership in the sim allow-list (is_clock_block), not by being a special node type, so it stays a plain renderable leaf everywhere else.

Known issues

Outside a `execution_mode = Simulation` compound there is no solver time loop, so the output is a constant single-sample t = 0.

See also

simulationclocktimesim-timeforcingstateless