Microelectrode Geometries (softpotato.analytical.microelectrodes)¶
The softpotato.analytical.microelectrodes module provides steady-state and transient current expressions for ultramicroelectrode (UME) geometries.
microelectrodes
¶
Analytical and empirical equations for microelectrodes and ultramicroelectrodes (UMEs).
This module provides closed-form steady-state limiting currents, asymptotic expansions, and full-time transient chronoamperometric models for common microelectrode geometries: inlaid microdiscs, spherical microelectrodes, hemispherical microelectrodes, and inlaid microbands.
Functions:
| Name | Description |
|---|---|
microdisc_limiting_current |
Saito steady-state diffusion-limited current for an inlaid circular microdisc. |
microdisc_transient |
Shoup & Szabo chronoamperometric transient for an inlaid circular microdisc. |
mahon_oldham_transient |
Mahon & Oldham high-precision chronoamperometric transient for an inlaid microdisc. |
microhemisphere_limiting_current |
Steady-state diffusion-limited current for a hemispherical microelectrode on an insulator. |
microsphere_limiting_current |
Steady-state diffusion-limited current for a spherical microelectrode in bulk solution. |
microband_limiting_current |
Quasi-steady-state diffusion-limited current for an inlaid microband electrode. |
Conventions & Units
All equations are dimensionally consistent in either standard SI or standard electrochemical CGS units:
- SI: \(t\) in \(\text{s}\), \(D\) in \(\text{m}^2\cdot\text{s}^{-1}\), \(c^*\) in \(\text{mol}\cdot\text{m}^{-3}\), lengths/radii in \(\text{m}\), \(F\) in \(\text{C}\cdot\text{mol}^{-1}\) \(\implies I\) in \(\text{A}\).
- CGS: \(t\) in \(\text{s}\), \(D\) in \(\text{cm}^2\cdot\text{s}^{-1}\), \(c^*\) in \(\text{mol}\cdot\text{cm}^{-3}\), lengths/radii in \(\text{cm}\), \(F\) in \(\text{C}\cdot\text{mol}^{-1}\) \(\implies I\) in \(\text{A}\).
Standard IUPAC sign conventions are applied: - Cathodic (reduction) currents are negative (\(I < 0\)). - Anodic (oxidation) currents are positive (\(I > 0\)).
References
- Y. Saito, "A theoretical study on the diffusion current at the stationary spherical and disc electrodes", Rev. Polarogr., 15 (1968) 177–187.
- J. Newman, "Resistance for flow of current to a disk", J. Electrochem. Soc., 113 (1966) 501–502.
- D. Shoup, A. Szabo, "Chronoamperometric current at finite disk electrodes", J. Electroanal. Chem., 140 (1982) 237–245.
- P. J. Mahon, K. B. Oldham, "A analytical expression for the transient current at a microdisk electrode", Anal. Chem., 77 (2005) 6100–6101.
- A. J. Bard, L. R. Faulkner, H. S. White, Electrochemical Methods: Fundamentals and Applications, 3rd ed., John Wiley & Sons, 2022.
microdisc_limiting_current
¶
microdisc_limiting_current(radius: float | ArrayLike, n: float = 1, D: float = 1e-05, c_bulk: float = 0.001, F: float = FARADAY) -> float | np.ndarray
Compute steady-state diffusion-limited current at an inlaid circular microdisc.
Calculates the exact steady-state Faradaic current at an inlaid circular microdisc electrode of radius \(a\) flush with an infinite insulating coplanar plane, derived by Saito (1968) and Newman (1966):
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
radius
|
float or array - like
|
Radius of the microdisc electrode \(a\) in meters or cm (\(a > 0\)). |
required |
n
|
int or float
|
Number of electrons transferred per molecule (\(n > 0\)). |
1
|
D
|
float
|
Diffusion coefficient \(D\) in \(\text{m}^2/\text{s}\) or \(\text{cm}^2/\text{s}\) (\(D > 0\)). |
1e-5
|
c_bulk
|
float
|
Bulk concentration of electroactive species \(c^*\) in \(\text{mol}/\text{m}^3\) or \(\text{mol}/\text{cm}^3\) (\(c^* \ge 0\)). |
1e-3
|
F
|
float
|
Faraday constant in \(\text{C}/\text{mol}\) (\(F > 0\)). |
FARADAY
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Steady-state limiting current \(I_{\text{lim}}\) in Amperes (\(\text{A}\)). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
References
- Y. Saito, "A theoretical study on the diffusion current at the stationary spherical and disc electrodes", Rev. Polarogr., 15 (1968) 177–187.
- J. Newman, "Resistance for flow of current to a disk", J. Electrochem. Soc., 113 (1966) 501–502.
Examples:
>>> import numpy as np
>>> from softpotato.analytical.microelectrodes import microdisc_limiting_current
>>> # 10 um radius microdisc, 1 mM bulk concentration, D = 1e-5 cm^2/s
>>> i_ss = microdisc_limiting_current(10e-4, n=1, D=1e-5, c_bulk=1e-6)
>>> round(i_ss * 1e9, 4)
3.8594
Source code in src/softpotato/analytical/microelectrodes.py
microhemisphere_limiting_current
¶
microhemisphere_limiting_current(radius: float | ArrayLike, n: float = 1, D: float = 1e-05, c_bulk: float = 0.001, F: float = FARADAY) -> float | np.ndarray
Compute steady-state diffusion-limited current at a hemispherical microelectrode.
Calculates the exact steady-state Faradaic current at a hemispherical microelectrode of radius \(r\) mounted on an insulating substrate:
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
radius
|
float or array - like
|
Radius of the hemispherical electrode \(r\) in meters or cm (\(r > 0\)). |
required |
n
|
int or float
|
Number of electrons transferred per molecule (\(n > 0\)). |
1
|
D
|
float
|
Diffusion coefficient \(D\) in \(\text{m}^2/\text{s}\) or \(\text{cm}^2/\text{s}\) (\(D > 0\)). |
1e-5
|
c_bulk
|
float
|
Bulk concentration of electroactive species \(c^*\) in \(\text{mol}/\text{m}^3\) or \(\text{mol}/\text{cm}^3\) (\(c^* \ge 0\)). |
1e-3
|
F
|
float
|
Faraday constant in \(\text{C}/\text{mol}\) (\(F > 0\)). |
FARADAY
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Steady-state limiting current \(I_{\text{lim}}\) in Amperes (\(\text{A}\)). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Examples:
>>> import math
>>> from softpotato.analytical.microelectrodes import microhemisphere_limiting_current
>>> i_ss = microhemisphere_limiting_current(1e-5, n=1, D=1e-9, c_bulk=1.0)
>>> expected = 2 * math.pi * 96485.332 * 1e-9 * 1.0 * 1e-5
>>> bool(math.isclose(i_ss, expected, rel_tol=1e-5))
True
Source code in src/softpotato/analytical/microelectrodes.py
microsphere_limiting_current
¶
microsphere_limiting_current(radius: float | ArrayLike, n: float = 1, D: float = 1e-05, c_bulk: float = 0.001, F: float = FARADAY) -> float | np.ndarray
Compute steady-state diffusion-limited current at a spherical microelectrode.
Calculates the exact steady-state Faradaic current at a spherical microelectrode of radius \(r\) suspended in semi-infinite bulk solution:
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
radius
|
float or array - like
|
Radius of the spherical electrode \(r\) in meters or cm (\(r > 0\)). |
required |
n
|
int or float
|
Number of electrons transferred per molecule (\(n > 0\)). |
1
|
D
|
float
|
Diffusion coefficient \(D\) in \(\text{m}^2/\text{s}\) or \(\text{cm}^2/\text{s}\) (\(D > 0\)). |
1e-5
|
c_bulk
|
float
|
Bulk concentration of electroactive species \(c^*\) in \(\text{mol}/\text{m}^3\) or \(\text{mol}/\text{cm}^3\) (\(c^* \ge 0\)). |
1e-3
|
F
|
float
|
Faraday constant in \(\text{C}/\text{mol}\) (\(F > 0\)). |
FARADAY
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Steady-state limiting current \(I_{\text{lim}}\) in Amperes (\(\text{A}\)). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Examples:
>>> import math
>>> from softpotato.analytical.microelectrodes import microsphere_limiting_current
>>> i_ss = microsphere_limiting_current(1e-5, n=1, D=1e-9, c_bulk=1.0)
>>> expected = 4 * math.pi * 96485.332 * 1e-9 * 1.0 * 1e-5
>>> bool(math.isclose(i_ss, expected, rel_tol=1e-5))
True
Source code in src/softpotato/analytical/microelectrodes.py
microdisc_transient
¶
microdisc_transient(t: float | ArrayLike, radius: float, n: float = 1, D: float = 1e-05, c_bulk: float = 0.001, F: float = FARADAY) -> float | np.ndarray
Compute chronoamperometric current transient at an inlaid microdisc (Shoup & Szabo).
Calculates the Faradaic diffusion-limited current response at an inlaid circular microdisc of radius \(a\) following an instantaneous potential step, using the Shoup and Szabo (1982) empirical model:
where \(\tau = \dfrac{4 D t}{a^2}\) is the dimensionless time parameter, and \(f(\tau)\) is given by:
Asymptotic Limits
- Short times (\(\tau \to 0\)): \(f(\tau) \approx 0.8862 \tau^{-1/2}\), reproducing the planar Cottrell current across disk area \(A = \pi a^2\):
$$ I(t) \to \frac{n F (\pi a^2) \sqrt{D} c^*}{\sqrt{\pi t}} $$
- Long times (\(\tau \to \infty\)): \(f(\tau) \to 0.7854 + 0.2146 = 1.0000\), reproducing Saito's steady-state limiting current:
$$ I(t) \to 4 n F D c^* a $$
The maximum relative error of this approximation is less than \(0.6\%\) across the entire range \(0 < \tau < \infty\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t
|
float or array - like
|
Time elapsed since the potential step in seconds (\(t \ge 0\)). |
required |
radius
|
float
|
Radius of the inlaid microdisc \(a\) in meters or cm (\(a > 0\)). |
required |
n
|
int or float
|
Number of electrons transferred per molecule (\(n > 0\)). |
1
|
D
|
float
|
Diffusion coefficient \(D\) in \(\text{m}^2/\text{s}\) or \(\text{cm}^2/\text{s}\) (\(D > 0\)). |
1e-5
|
c_bulk
|
float
|
Bulk concentration of electroactive species \(c^*\) in \(\text{mol}/\text{m}^3\) or \(\text{mol}/\text{cm}^3\) (\(c^* \ge 0\)). |
1e-3
|
F
|
float
|
Faraday constant in \(\text{C}/\text{mol}\) (\(F > 0\)). |
FARADAY
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Faradaic current \(I(t)\) in Amperes (\(\text{A}\)). At \(t = 0\),
returns |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
References
- D. Shoup, A. Szabo, "Chronoamperometric current at finite disk electrodes", J. Electroanal. Chem., 140 (1982) 237–245.
Examples:
>>> import numpy as np
>>> from softpotato.analytical.microelectrodes import (
... microdisc_limiting_current,
... microdisc_transient,
... )
>>> # Steady-state convergence at long times (a = 10 um)
>>> a = 1e-5
>>> i_trans = microdisc_transient(1e4, radius=a, n=1, D=1e-9, c_bulk=1.0)
>>> i_steady = microdisc_limiting_current(radius=a, n=1, D=1e-9, c_bulk=1.0)
>>> bool(np.isclose(i_trans, i_steady, rtol=1e-3))
True
Source code in src/softpotato/analytical/microelectrodes.py
290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 | |
mahon_oldham_transient
¶
mahon_oldham_transient(t: float | ArrayLike, radius: float, n: float = 1, D: float = 1e-05, c_bulk: float = 0.001, branch: Literal['auto', 'short_time', 'long_time'] = 'auto', F: float = FARADAY) -> float | np.ndarray
Compute high-precision chronoamperometric transient at a microdisc (Mahon & Oldham).
Calculates the Faradaic diffusion-controlled current at an inlaid circular microdisc electrode of radius \(a\) across all time regimes using the Mahon and Oldham (2005) analytical piecewise model:
where \(\sigma = \dfrac{D t}{a^2}\) is dimensionless time, and \(f(\sigma)\) is:
Precision & Error Bounds
- Maximum relative error is below \(0.02\%\) for all intermediate and transition times.
- As \(\sigma \to 0\) (short times), \(f(\sigma) \to \dfrac{1}{\sqrt{\pi \sigma}}\), matching exact planar Cottrell behavior: \(I(t) \to \dfrac{n F (\pi a^2) \sqrt{D} c^*}{\sqrt{\pi t}}\).
- As \(\sigma \to \infty\) (long times), \(f(\sigma) \to \dfrac{4}{\pi}\), matching exact Saito steady-state limiting current: \(I(t) \to 4 n F D c^* a\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t
|
float or array - like
|
Time elapsed since the potential step in seconds (\(t \ge 0\)). |
required |
radius
|
float
|
Radius of the inlaid microdisc \(a\) in meters or cm (\(a > 0\)). |
required |
n
|
int or float
|
Number of electrons transferred per molecule (\(n > 0\)). |
1
|
D
|
float
|
Diffusion coefficient \(D\) in \(\text{m}^2/\text{s}\) or \(\text{cm}^2/\text{s}\) (\(D > 0\)). |
1e-5
|
c_bulk
|
float
|
Bulk concentration of electroactive species \(c^*\) in \(\text{mol}/\text{m}^3\) or \(\text{mol}/\text{cm}^3\) (\(c^* \ge 0\)). |
1e-3
|
branch
|
('auto', 'short_time', 'long_time')
|
Branch formula to evaluate:
|
'auto'
|
F
|
float
|
Faraday constant in \(\text{C}/\text{mol}\) (\(F > 0\)). |
FARADAY
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Faradaic current \(I(t)\) in Amperes (\(\text{A}\)). At \(t = 0\),
returns |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
References
- P. J. Mahon, K. B. Oldham, "A analytical expression for the transient current at a microdisk electrode", Anal. Chem., 77 (2005) 6100–6101.
Examples:
>>> import numpy as np
>>> from softpotato.analytical.microelectrodes import (
... mahon_oldham_transient,
... microdisc_limiting_current,
... )
>>> # Steady-state convergence at long times (a = 10 um)
>>> a = 1e-5
>>> i_trans = mahon_oldham_transient(1e4, radius=a, n=1, D=1e-9, c_bulk=1.0)
>>> i_steady = microdisc_limiting_current(radius=a, n=1, D=1e-9, c_bulk=1.0)
>>> bool(np.isclose(i_trans, i_steady, rtol=1e-4))
True
Source code in src/softpotato/analytical/microelectrodes.py
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 | |
microband_limiting_current
¶
microband_limiting_current(t: float | ArrayLike, width: float, length: float = 1.0, n: float = 1, D: float = 1e-05, c_bulk: float = 0.001, F: float = FARADAY) -> float | np.ndarray
Compute quasi-steady-state diffusion-limited current at an inlaid microband.
Calculates the Faradaic diffusion-limited current at an inlaid microband electrode of width \(w\) and length \(l\) (\(l \gg w\)) in the quasi-steady-state regime:
Validity Domain
Because diffusion to a band electrode is two-dimensional without a true time-independent steady state, the current decays logarithmically with time. The logarithmic approximation is physically meaningful for long dimensionless times:
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t
|
float or array - like
|
Time in seconds (\(t > \dfrac{w^2}{0.64 D}\)). |
required |
width
|
float
|
Width of the microband \(w\) in meters or cm (\(w > 0\)). |
required |
length
|
float
|
Length of the microband \(l\) in meters or cm (\(l > 0\)). |
1.0
|
n
|
int or float
|
Number of electrons transferred per molecule (\(n > 0\)). |
1
|
D
|
float
|
Diffusion coefficient \(D\) in \(\text{m}^2/\text{s}\) or \(\text{cm}^2/\text{s}\) (\(D > 0\)). |
1e-5
|
c_bulk
|
float
|
Bulk concentration of electroactive species \(c^*\) in \(\text{mol}/\text{m}^3\) or \(\text{mol}/\text{cm}^3\) (\(c^* \ge 0\)). |
1e-3
|
F
|
float
|
Faraday constant in \(\text{C}/\text{mol}\) (\(F > 0\)). |
FARADAY
|
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Quasi-steady-state limiting current \(I_{\text{lim}}(t)\) in Amperes (\(\text{A}\)). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
References
- A. Szabo, D. K. Cope, D. E. Tallman, P. M. Kovach, R. M. Wightman, "Chronoamperometric current at hemicylinder and band microelectrodes: Theory and experiment", J. Electroanal. Chem., 217 (1987) 417–423.
- K. Aoki, K. Tokuda, H. Matsuda, "Derivation of an approximate equation for chronoamperometric curves at microband electrodes and its experimental verification", J. Electroanal. Chem., 230 (1987) 61–67.
Examples:
>>> import math
>>> from softpotato.analytical.microelectrodes import microband_limiting_current
>>> # w = 10 um, length = 1 mm, D = 1e-9 m^2/s, t = 1.0 s
>>> i_band = microband_limiting_current(1.0, width=1e-5, length=1e-3, n=1, D=1e-9, c_bulk=1.0)
>>> i_band > 0
True
Source code in src/softpotato/analytical/microelectrodes.py
554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 | |