The function cvSim takes the following form

cvSim(e.start = 0.20, e.switch = -0.30, e.form = 0.013, 
      n = 1, ko = 1, alpha = 0.50, d = 1e-5, area = 0.04, 
      temp = 293.15, scan.rate = 0.04, cox.bulk = 6.1e-8, 
      cred.bulk = 0, t.units = 200, x.units = 50)

where the function’s inputs and default values are

At present, this function allows for simulating the CV for ox –> red only, which requires an e.switch that is more negative than e.start, and does not allow for consideration of chemical reactions that might take place either before or after the redox reaction.

Because the method used to simulate the CV fails if

\[\textrm{x.units} \le \sqrt{18 \times \textrm{t.unit}}\]

any change to x.units or to t.units must be made with care; in general, the default values are sufficient.

For further details on the simulation, see J. H. Brown, J. Chem. Educ., 2015, 92, 1490-1496 (DOI).

The command cvSim() runs the function using the default values for all inputs. If you wish to change the value for one or more inputs, place the value(s) inside the parentheses; thus, for example, cvSim(scan.rate = 0.20, ko = 0.5) changes the scan rate and the rate constant from their default values. When the function is assigned to an object (object.name = cvSim()) it returns to the object a list that contains the following vectors and matrices:

You can view items returned by the function using the following general command: object.name$item.name. The following code, for example, creates the object testCV and then prints out the potentials.

# create the object testCV changing some of the default values
testCV = cvSim(e.start = 0.3, e.switch = -0.3, e.form = 0)
# examine the  potentials
testCV$potential
##   [1]  3.000000e-01  2.940000e-01  2.880000e-01  2.820000e-01  2.760000e-01
##   [6]  2.700000e-01  2.640000e-01  2.580000e-01  2.520000e-01  2.460000e-01
##  [11]  2.400000e-01  2.340000e-01  2.280000e-01  2.220000e-01  2.160000e-01
##  [16]  2.100000e-01  2.040000e-01  1.980000e-01  1.920000e-01  1.860000e-01
##  [21]  1.800000e-01  1.740000e-01  1.680000e-01  1.620000e-01  1.560000e-01
##  [26]  1.500000e-01  1.440000e-01  1.380000e-01  1.320000e-01  1.260000e-01
##  [31]  1.200000e-01  1.140000e-01  1.080000e-01  1.020000e-01  9.600000e-02
##  [36]  9.000000e-02  8.400000e-02  7.800000e-02  7.200000e-02  6.600000e-02
##  [41]  6.000000e-02  5.400000e-02  4.800000e-02  4.200000e-02  3.600000e-02
##  [46]  3.000000e-02  2.400000e-02  1.800000e-02  1.200000e-02  6.000000e-03
##  [51] -2.064321e-16 -6.000000e-03 -1.200000e-02 -1.800000e-02 -2.400000e-02
##  [56] -3.000000e-02 -3.600000e-02 -4.200000e-02 -4.800000e-02 -5.400000e-02
##  [61] -6.000000e-02 -6.600000e-02 -7.200000e-02 -7.800000e-02 -8.400000e-02
##  [66] -9.000000e-02 -9.600000e-02 -1.020000e-01 -1.080000e-01 -1.140000e-01
##  [71] -1.200000e-01 -1.260000e-01 -1.320000e-01 -1.380000e-01 -1.440000e-01
##  [76] -1.500000e-01 -1.560000e-01 -1.620000e-01 -1.680000e-01 -1.740000e-01
##  [81] -1.800000e-01 -1.860000e-01 -1.920000e-01 -1.980000e-01 -2.040000e-01
##  [86] -2.100000e-01 -2.160000e-01 -2.220000e-01 -2.280000e-01 -2.340000e-01
##  [91] -2.400000e-01 -2.460000e-01 -2.520000e-01 -2.580000e-01 -2.640000e-01
##  [96] -2.700000e-01 -2.760000e-01 -2.820000e-01 -2.880000e-01 -2.940000e-01
## [101] -3.000000e-01 -2.940000e-01 -2.880000e-01 -2.820000e-01 -2.760000e-01
## [106] -2.700000e-01 -2.640000e-01 -2.580000e-01 -2.520000e-01 -2.460000e-01
## [111] -2.400000e-01 -2.340000e-01 -2.280000e-01 -2.220000e-01 -2.160000e-01
## [116] -2.100000e-01 -2.040000e-01 -1.980000e-01 -1.920000e-01 -1.860000e-01
## [121] -1.800000e-01 -1.740000e-01 -1.680000e-01 -1.620000e-01 -1.560000e-01
## [126] -1.500000e-01 -1.440000e-01 -1.380000e-01 -1.320000e-01 -1.260000e-01
## [131] -1.200000e-01 -1.140000e-01 -1.080000e-01 -1.020000e-01 -9.600000e-02
## [136] -9.000000e-02 -8.400000e-02 -7.800000e-02 -7.200000e-02 -6.600000e-02
## [141] -6.000000e-02 -5.400000e-02 -4.800000e-02 -4.200000e-02 -3.600000e-02
## [146] -3.000000e-02 -2.400000e-02 -1.800000e-02 -1.200000e-02 -6.000000e-03
## [151] -1.821460e-16  6.000000e-03  1.200000e-02  1.800000e-02  2.400000e-02
## [156]  3.000000e-02  3.600000e-02  4.200000e-02  4.800000e-02  5.400000e-02
## [161]  6.000000e-02  6.600000e-02  7.200000e-02  7.800000e-02  8.400000e-02
## [166]  9.000000e-02  9.600000e-02  1.020000e-01  1.080000e-01  1.140000e-01
## [171]  1.200000e-01  1.260000e-01  1.320000e-01  1.380000e-01  1.440000e-01
## [176]  1.500000e-01  1.560000e-01  1.620000e-01  1.680000e-01  1.740000e-01
## [181]  1.800000e-01  1.860000e-01  1.920000e-01  1.980000e-01  2.040000e-01
## [186]  2.100000e-01  2.160000e-01  2.220000e-01  2.280000e-01  2.340000e-01
## [191]  2.400000e-01  2.460000e-01  2.520000e-01  2.580000e-01  2.640000e-01
## [196]  2.700000e-01  2.760000e-01  2.820000e-01  2.880000e-01  2.940000e-01
## [201]  3.000000e-01

See the document Plotting Functions for functions that provide different ways to examine visually the result of the simulation and the document Table CV for functions that provide ways to examine the data produced by the simulation.