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

• e.start: the initial applied potential (defaults to 0.20 V)
• e.switch: the applied potential where we reverse the direction in which the potential is scanned (defaults to -0.30 V)
• e.form: the redox couple’s formal potential (defaults to 0.013 V)
• n: the number of electrons in the redox couple’s electron transfer (defaults to 1)
• ko: the standard heterogeneous rate constant for electron transfer (defaults to 1, which ensures electrochemical reversibility)
• alpha: the transfer coefficient, which accounts for the the symmetry of the redox reaction’s energy barrier (defaults to 0.50, which is fully symmetrical)
• d: the diffusion coefficient (defaults to 1 $$\times$$ 10-5 cm2/s; this value is assigned to both analyte’s oxidized and its reduced forms)
• area: the electrode’s surface area (defaults to 0.04 cm2)
• temp: the temperature in Kelvin (defaults to 293.15 K, or 20°C)
• scan.rate: the rate at which the applied potential is changed (defaults to 0.04 V/s)
• ox.bulk: the initial concentration of ox in bulk solution (defaults to 6.1 $$\times$$ 10-8 M)
• cred.bulk: the initial concentration of red in bulk solution (defaults to 0 M)
• t.units: the number of discrete units of time for which diffusion is modeled (defaults to 200)
• x.units: the number of discrete units of distance from the electrode’s surface for which diffusion is monitored (defaults to 50)

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:

• time: a vector that contains the discrete times used to define the diffusion grid
• distance: a vector that contains the discrete distances used to define the diffusion grid
• potential: a vector that contains the discrete applied potentials corresponding to the discrete times used in the simulation
• current: a vector that contains the calculated current at each discrete applied potential
• oxdata: a matrix that contains the concentrations of the oxidized species in the diffusion grid; each row in the matrix is a discrete time and each column in the matrix is a discrete distance
• reddata: a matrix that contains red concentrations of the reduced species in diffusion grid; each row in the matrix is a discrete time and each column in the matrix is a discrete distance

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.