Use Simulation Time in Equations
You can access global simulation time from the equation section using the
time
function. time
returns the simulation time in
seconds.
The following example illustrates y
= sin
(ωt
), where t
is simulation
time:
component
parameters
w = { 1, '1/s' } % omega
end
outputs
y = 0;
end
equations
y == sin( w * time );
end
end