6.2 How to use automated stopping
This section demonstrates how to use the automated stopping functionality in \(\mathtt{\require{color}{\color[rgb]{0.000000000000000,0.500000000000000,0.500000000000000} ZimT}}\). There are three cases we would like to demonstrate.
The first, and simplest, case is where we have brief change in voltage and/or light intensity and would like simulate how the system reaches its original steady-state. Figure 6.2(a) illustrates such an example. The first time step is the reference state, so we set \(\mathtt{\require{color}{\color[rgb]{0.000000000000000,0.500000000000000,0.500000000000000} Track}}\) to 1 for the initial time step, followed by some perturbation of the system which can take one or more time steps. We compare all other time steps to this reference, so they all have \(\mathtt{\require{color}{\color[rgb]{0.000000000000000,0.500000000000000,0.500000000000000} Track}}\) set to 2, so for example:
* A simple example of how to use autostop (and track) * to return to a known steady-state t Vext G_frac Track comments 0 0 1 1 the original reference state 1e-3 0.01 1 0 we perturb the system 2e-3 0 1 2 and now we monitor 3e-3 0 1 2 4e-3 0 1 2 . . . . . . . . . . . . 1 0 1 2
In this example, we use \(\mathtt{\require{color}{\color[rgb]{0.000000000000000,0.500000000000000,0.500000000000000} Track}}\) = 2 as this compares a state with the reference state (\(\mathtt{\require{color}{\color[rgb]{0.000000000000000,0.500000000000000,0.500000000000000} t}}\) = 0 in this example) without changing the reference.
In a slightly different example, we again perturb the system but it is a step not a spike, see Fig. 6.2(b). This is different in that we do not know the steady-state that should be used as the reference. An example \(\mathtt{\require{color}{\color[rgb]{0.000000000000000,0.500000000000000,0.500000000000000} tVGFile}}\) would be
* A simple example of how to use autostop (and track) * when we have a step: t Vext G_frac Track comments 0 0 1 0 1e-3 0.01 1 1 the step 2e-3 0.01 1 3 3e-3 0.01 1 3 4e-3 0.01 1 3 . . . . . . . . . . . . 1 0.01 1 3
In this case, we set \(\mathtt{\require{color}{\color[rgb]{0.000000000000000,0.500000000000000,0.500000000000000} Track}}\) to 3 as this both compares the current state with the reference state and updates the reference state. The latter is crucial as we do not know the final steady-state.
The third example is more complex in that we show how to simulate a pulsed or repeating signal, see Fig. 6.2(c). This could be an impedance spectroscopy simulation, for example. The simulation always starts in steady-state (at time is zero). If we then apply a sinusoidal voltage perturbation, the first few cycles will be impacted by the initial condition (steady-state). We could, in order to rid ourselves of this transitory effect, simulate for a large number of cycles and then use only the last cycle to compute the impedance. However, there is no way of knowing how many cycles would be enough, so this is not advised and wasteful. Using \(\mathtt{\require{color}{\color[rgb]{0.000000000000000,0.500000000000000,0.500000000000000} Track}}\) set to 3 makes this much more robust. A \(\mathtt{\require{color}{\color[rgb]{0.000000000000000,0.500000000000000,0.500000000000000} tVGFile}}\) could look like
* A simple example of how to use autostop (and track) * when we simulated impedance at 100 Hz. t Vext G_frac Track comments 0 0 1 1 org. reference point 1e-3 0.00588 1 0 2e-3 0.00951 1 0 . . 0.01 0 1 3 first complete cycle 0.011 0.00588 1 0 . . 0.02 0 1 3 second complete cycle . . 1 0 1 3 100 completed cycles
We take the initial (\(\mathtt{\require{color}{\color[rgb]{0.000000000000000,0.500000000000000,0.500000000000000} t}}\) = 0) as the first reference point (so \(\mathtt{\require{color}{\color[rgb]{0.000000000000000,0.500000000000000,0.500000000000000} Track}}\) = 1). Every time a cycle has completed (so \(\mathtt{\require{color}{\color[rgb]{0.000000000000000,0.500000000000000,0.500000000000000} Vext}}\) = 0 and the slope is positive), we put \(\mathtt{\require{color}{\color[rgb]{0.000000000000000,0.500000000000000,0.500000000000000} Track}}\) = 3. This means that we keep on comparing consecutive cycles. \(\mathtt{\require{color}{\color[rgb]{0.000000000000000,0.500000000000000,0.500000000000000} ZimT}}\) will stop once the reference points are the same.