162
Didrik René Småbråten Mathematical Modeling of Electrochemical and Photoelectrochemical Impedance TMT4500 Materialteknologi, fordypningsprosjekt Trondheim, Fall 2013 Supervisor: Svein Sunde Norwegian University of Science and Technology Faculty of Engineering Science and Technology Department of Materials Science and Engineering

Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

  • Upload
    others

  • View
    9

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Didrik René Småbråten

Mathematical Modeling of Electrochemicaland Photoelectrochemical Impedance

TMT4500 Materialteknologi, fordypningsprosjekt

Trondheim, Fall 2013

Supervisor: Svein Sunde

Norwegian University of Science and Technology

Faculty of Engineering Science and Technology

Department of Materials Science and Engineering

Page 2: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

i

Acknowledgment

First of all I would like to thank my supervisor Professor Svein Sunde for brilliant guidance and dis-

cussions this fall. It has been a true honor to work with such a competent scientist. Ph.D. Morten

Tjelta and Ph.D. Lars-Erik Owe are acknowledged for deriving the analytical models for photoelectro-

chemical impedance spectra of semiconducting films modeled numerical throughout this project.

I would also like to thank my fellow classmates at the M.Sc. program in Chemical Engineering and

at the Department of Materials Science and Engineering, especially the "Pippi"-gang for countless

hours of academic and non-academic moments.

Ph.D. candidate Siri Marie Skaftun also needs to be thanked for company during most needed, and

well earned, lunch breaks this fall.

Page 3: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

ii

Preface

This report gives a summary of the course TMT4500 Materialteknologi, fordypningsprosjekt during

my master thesis at the Department of Materials Science and Engineering at the Norwegian Univer-

sity of Science and Technology (NTNU), fall 2013.

The project is a numerical modeling study of electrochemical and photoelectrochemical impedance

spectra of semiconducting thin film materials. The analytical models have been developed by Profes-

sor Svein Sunde, Ph.D. Morten Tjelta, and Ph.D. Lars-Erik Owe, and verified throughout the project

work.

Didrik René Småbråten

Trondheim, December 17, 2013

Page 4: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

iii

Summary

Newman’s BAND subroutine solves initial, boundary-condition coupled linear differential equations.

The subroutine is supplied coefficient matrices based on the differential equations and boundary

conditions to solve the coupled differential equations. Traditionally, the coefficient matrices sup-

plied are real numbers. In this project, we have verified that the subroutine is suitable for complex

numbers, thus the compatibility to calculate impedance spectra.

A mathematical model for the electrochemical and photoelectrochemical impedance for a thin

film electrode has been established. The analytical model is based on the dilute solution theory and

binary electrolyte speciation. The numerical method is finite difference method, and uses Newman’s

BAND subroutine to solve a modified diffusion equation, where a sink term corresponding to a non-

faradaic reaction across the electrode (e.g. recombination or trapping) and a source term due to

photon absorption have been added. The concentration profile from the solved diffusion equation

was used to calculate the impedances in the thin film electrode.

The sensitivity of the method was investigated, and two main contributors to deviation were iden-

tified. The first is related to the frequency region of the calculated concentrations, where a deviation

at high frequencies was found at low number of steps. This deviation was solved by choosing a higher

number of steps until proper convergence. The second contribution is related to the parameteri-

zation of the diffusion equation, where large deviations and non-convergence of the model were

observed. The BAND subroutine uses dimensionless lengths, and the parameterization to dimen-

sionless lengths caused large deviations at low frequencies. These deviations were solved by alter the

dimensionless length parameterization to obtain proper convergence.

The numerical model of the photoelectrochemical impedance at zero light intensity deviates from

the electrochemical model. Three suggestions to solve this deviation was suggested. First, under no

illumination, a steady-state concentration profile was observed for the photoelectrochemical model,

but assumed constant for the electrochemical model. One source of this concentration gradient could

be a non-faradaic reaction that may affect the steady-state concentration. Second, the expression of

the steady-state concentration gradient neglects the contribution of carriers under no faradaic cur-

rent from e.g. thermal excitation. An additive term to the given expression should be included. Third,

the faradaic steady-state current is dependent of the light intensity, and under no illumination this

should be zero. However, the suggested model disregard this dependency, and an expression to take

this into consideration has been suggested.

General mathematical models for the infinite, transmissive and reflective Warburg diffusion impedances,

and transmissive and reflective Gerischer impedances were also derived, to trace deviations of the

numerical models and explain the behavior of the mixed ionic thin film electrode.

Page 5: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

TABLE OF CONTENTS iv

Table of contents

Acknowledgment i

Preface ii

Summary iii

Table of contents v

1 Introduction 1

1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.2 The photoelectrochemical system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.3 Impedance spectroscopy and modeling with Newman’s BAND subroutine . . . . . . . . 5

2 Theory 7

2.1 Impedance and impedance spectroscopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.2 Mathematical treatment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.3 Analysis of impedance spectra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.4 Photoelectrochemical film electrode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

3 Numerical method 24

3.1 Finite difference method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

3.2 Simulation parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

3.3 Coefficients for the BAND routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

4 Results 32

4.1 Warburg diffusion impedance spectra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

4.2 Gerischer impedance spectra for thin film electrodes . . . . . . . . . . . . . . . . . . . . . 39

4.3 Electrochemical impedance spectra for semiconducting thin films . . . . . . . . . . . . . 47

4.4 Photoelectrochemical impedance spectra for semiconducting thin films . . . . . . . . . 53

5 Discussion 62

5.1 Parameterization sensitivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

5.2 Impedance spectra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

6 Conclusion 67

References 70

Page 6: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

TABLE OF CONTENTS v

A Proof that the impedance can be derived by setting s = jω in the Laplace-transform t-space

equations 73

B Full derivation of Warburg impedance 76

B.1 Warburg infinite diffusion impedance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

B.2 Warburg transmissive diffusion impedance . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

B.3 Warburg reflective diffusion impedance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

C Full derivation of Gerischer impedance 82

C.1 Transmissive Gerischer impedance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

C.2 Reflective Gerischer impedance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

D Electrochemical impedance for a semiconducting film electrode 88

D.1 The photoelectrochemical film electrode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

D.2 Electrochemical impedance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

E Finite difference method 103

E.1 Coupled, linear, difference equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

E.2 Solution of coupled, linear difference equations . . . . . . . . . . . . . . . . . . . . . . . . 104

F Program codes for the Matlab environment 106

F.1 Finite difference method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

F.2 Warburg impedance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

F.3 Gerischer impedance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

F.4 Electrochemical impedance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

F.5 Photoelectrochemical impedance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

Page 7: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

1 INTRODUCTION 1

1 Introduction

1.1 Background

The earth’s population has since the 19th century grown exponentially from around one billion, to

over seven billions today. Prognoses say that this increase will continue until it flattens at 10 billions

[1]. This, combined with an increase in the standard of livings and industrialization of the "third

world" will lead to an increase in the worlds energy demand. The historical and predicted energy

demand is given in Figure 1.1.

Figure 1.1: The historical and predicted energy demand for different energy sources, from [2].

Researchers agree that the emission of greenhouse gases may contribute to global warming. Green-

house gases involve gases that absorb more heat than they emit, which results in an increase in the

temperature of the gas. CO2, methane and nitrous gases are amongst the greenhouse gases that have

the largest manmade concentration contribution. The largest source to CO2 emission is energy pro-

duced from fossil fuels, where the emission has increased with 145% the last 30 years [3]. The future

energy demand needs to be met by increasing the energy produced by emission-free, "green", energy

sources.

The Earth’s entire annual energy demand is supplied by solar irradiation in about 1.5 hours [4].

This energy is free and green, and solar energy is one promising energy source to meet the future

energy demand. However, utilizing and harvesting this energy is difficult, and there is a constant

research in this field. Solar cells, or photovoltaic cells, convert light energy to usable energy, in form

Page 8: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

1 INTRODUCTION 2

of electricity, which can be fed directly to the energy mixture. Photovoltaics are also the most green

alternative to produce hydrogen used as fuel in hydrogen fuel cells.

1.2 The photoelectrochemical system

1.2.1 Photoelectrochemistry and electrochemical photovoltaic cells

If a semiconductor electrode is brought in contact with an electrolyte, a potential barrier may be

created at the surface of the electrode [5]. When the interface is illuminated and the semiconduct-

ing electrode is connected to a conducting counter-electrode, a photocurrent may flow between the

electrodes. The most important process of creating a photocurrent is the generation of electron-hole

pairs in the bulk of the semiconductor when the incident light has a greater energy than the semicon-

ductor band gap [5]. In the presence of a depletion layer, the majority carriers will be transported into

the interior of the electrode and minority carriers will be transported to the surface [6]. If transfer to

a redox couple in the electrolyte whose energy lies within the band-gap can take place, a photocur-

rent is seen. This process is described below for a TiO2 semiconducting electrode and a Pt electrode

immersed in an acidic Fe3+/Fe2+ electrolyte.

An n-type TiO2 semiconductor [5] is immersed in an acidic Fe3+/Fe2+ electrolyte, containing an

oxidized and reduced state of Fe, known as a redox couple. Under illumination, minority carrier holes

generated in the semiconductor move to the electrolyte interface where they are oxidized in a redox

reaction with the electrolyte

Fe2++h+ → Fe3+ (1.1)

When the semiconductor is connected to the Pt counter electrode immersed in the same electrolyte,

electrons are reduced at the counter electrode interface by

Fe3++e− → Fe2+ (1.2)

The redox potential of the electrolyte is 0.77 V, and the conduction band lies close to zero. Thus, the

fermi level of TiO2 under no illumination lies close to 0.77 V, and there will be zero photovoltage.

Under illumination exceeding an energy of 0.77 eV, a photocurrent will flow through the system, with

the semiconductor serving as the anode and the counter electrode as the cathode [5]. A schematic of

this cell is given in Figure 1.2.

The magnitude of the photocurrent will, in general, depend on the electrode material, incident

light energy, electrode potential and electrolyte composition [5]. Photoelectrochemical cells can be

used to produce electricity or to produce hydrogen, as described below.

Page 9: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

1 INTRODUCTION 3

Figure 1.2: Example of a electrochemical photovoltaic cell consisting of a TiO2 semiconductor anode,a Pt counter electrode cathode, and an Fe3+/Fe2+ redox couple electrolyte.

1.2.2 Dye-sensitized solar cells (DSSC)

Commercially available photovoltaic solar cells up to now are based on inorganic materials, which

require high costs and highly energy consuming preparation methods. Several of the conventional

materials are toxic and have low natural abundance. The use of organic materials have been pro-

posed to solve these issues. However, conventional organic photovoltaic cells consisting of two elec-

trodes in a heterojunction have a significally lower efficiency compared to the commercial inorganic

photovoltaic cells [7]. The organic materials should have both good light harvesting properties and

good carriers transport properties which is difficult to achieve. Dye-sensitized solar cells (DSSC) are

promising organic-bases photoelectrochemical cells that may solve these problems for organic pho-

tovoltaics. DSSCs separates the two requirements as the light harvesting is done semiconductor-dye

interface and charge transport is done by the semiconductor and the electrolyte [7].

A schematic of a DSSC is given in Figure 1.3. A porous TiO2 semiconductor film is mounted on a

transparent conductive oxide (TCO), and a sensitizer material consisting of a ruthenium complex is

adsorbed onto the TiO2 particle surface. The semiconductor is in contact with an electrolyte consist-

ing of a triiodide/iodine redox couple. A Pt counter electrode is in contact with the electrolyte and

connected in an outer circuit with the semiconductor through the conducting glass [7].

Under illumination, the dye S absorbs photons to an excited sensitizer state S∗. S∗ injects an

Page 10: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

1 INTRODUCTION 4

Figure 1.3: Schematic representation of the dye-sensitized solar cell. A ruthenium-complex sensi-tizer are adsorbed on the TiO2 semiconductor particles mounted on a transparent conducting ox-ide (TCO). The Pt counter electrode is connected to the semiconductor through an outer circuit andthrough the triiodide/iodine redox couple electrolyte.

electron in the conduction band of TiO2, leading to an oxidized sensitizer state S+. The electron is

transferred to the counter electrode, where it ejected by reducing the triiodide/iodine redox couple.

The reduced redox couple then regenerates the oxidized dye. These operating principles are summa-

rized in the chemical reactions [7]

S(ads) +hν→ S∗(ads) (1.3)

S∗(ads) → S+

(ads) +e−(inj, TiO2) (1.4)

I−3 +2e−(Pt) → 3I− (1.5)

S+(ads) +

3

2I− → S(ads) +

1

2I−3 (1.6)

1.2.3 Photoelectrochemical water splitting

Photoelectrochemical water splitting is a photoelectrolysis cell that utilizes illumination to produce

hydrogen by water electrolysis [6]. For an n-type semiconductor, an oxidation reaction occurs at the

semiconductor interface, and a reduction reaction occurs at the counter electrode. For the case of

Page 11: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

1 INTRODUCTION 5

water splitting, the reaction at the semiconductor is [6]

H2O+2p+ → 1

2O2 +2H+ (1.7)

and at the counter electrode

2H++2e− → H2 (1.8)

which give the net process reaction

2H2O → 2H2 +O2 (1.9)

This net process reaction has an energy of 1.23 eV [8], which places a lower limit for the band gap

of the semiconductor. A schematic figure of a photoelectrochemical water splitting cell with a TiO2

semiconductor electrode, a Pt counter electrode and a KOH electrolyte [5] is given in Figure 1.4. Here,

H2O is the redox couple.

Figure 1.4: Example of a photoelectrochemical water splitting cell consisting of a TiO2 semiconductoranode, a Pt counter electrode cathode, and an KOH electrolyte.

1.3 Impedance spectroscopy and modeling with Newman’s BAND subroutine

Designing and improving the materials used in photovoltaic cells are essential to optimize the perfor-

mance of these cells. When the material is designed and synthesized, the material needs to be charac-

Page 12: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

1 INTRODUCTION 6

terized to determine wether certain material property requirements are fulfilled. Experimental data

have to be compared to theoretical models to presume something about the behavior of the system,

and models are needed in order to describe these theoretical systems. Impedance spectroscopy is

one characterization technique to investigate electrical properties of (amongst others) electrochem-

ical and photoelectrochemical cells, and will be modeled in this project. In impedance measures,

a harmonically modulating electric stimulus is applied to the system, and the modulating response

is measured. Because of this harmonic oscillation, the impedance can be represented as a complex

number, described below. The mathematical treatment of impedance spectra involves solving partial

differential equations.

In general, there are two modeling approaches. The preferred approach is analytical modeling,

where different models, expressions and equations are combined to form one single expression for

the wanted property. However, in complex systems, the analytical approach can be difficult, or even

impossible. At this point, numerical modeling is required, where approximate numerical solutions

are used to calculate the wanted property for a specific system. By applying the numerical approach

to simple systems with well-known analytical expressions for the wanted property, the numerical re-

sults can be compared to the analytical results. Thus, the method may either be verified and used for

calculating the complex problem for proper convergence, or be falsified and disregarded for inappro-

priate convergence.

John S. Newman gives in "Electrochemical Systems" [9] a routine for solving a set of n coupled,

linear, second-order differential equations numerically. The routine is suitable for calculating initial,

boundary-value problems, which are common to define several electrochemical and material prop-

erties. A program code for a subroutine BAND(J) is given to solve these boundary-value problems,

where coefficient matrices defined by the differential equations and boundary-values are supplied to

the subroutine. Traditionally, this routine coefficients consisting real numbers. The purpose of this

study is to investigate if the BAND routine may be supplied complex numbers to solve differential

equations. Since impedance can be expressed as a complex number described below, we investigate

the suitability of Newman’s BAND subroutine to calculate impedance spectra for electrochemical and

photoelectrochemical systems. The investigation is done by first establishing an analytical expression

for the impedance spectrum of a electrochemical or photoelectrochemical system, then apply New-

man’s BAND subroutine to the system to calculate numerically the impedance spectrum, and finally

compare the numerical results with the analytical model.

Page 13: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

2 THEORY 7

2 Theory

2.1 Impedance and impedance spectroscopy

2.1.1 Impedance spectroscopy and the importance of interfaces

The interface of a material is important in the study of material properties. Physical properties – crys-

tallographic, mechanical and electrical – change rapidly at an interface and polarization reduce the

conductivity of the system [10]. Each interface in the system will polarize differently when subjected

to an applied potential difference. The rate of polarization change when the applied voltage is re-

versed is characteristic for the interface type; slow for chemical reactions at the electrode–electrolyte

surface, substantially faster in the aqueous electrolyte [10].

Impedance spectroscopy (IS) is a characterization method where electrical properties and inter-

facial transfer processes in a system can be determined. In impedance spectroscopy measurements, a

harmonically modulated electrical stimulus is applied to the electrodes and the modulating response

is measured. For instance, a modulating voltage is applied to the electrochemical system, and the

resulting modulating current is measured. We define the impedance, Z , as the ratio of the stimulus

and the response. When a faradaic reaction is present, we define the faradaic impedance Z f by

Z f (t ) = V (t )

I (t )(2.1)

where V (t ) and I (t ) are the modulating voltage stimulus and alternating current response, respec-

tively.

The electrical response is a result of several microscopic processes throughout the system. Amongst

the processes, and usually the most important in the characterization of the electrical properties of

the system, are charge transport through the electrode and electrolyte phases, and charge transfer

across heterogeneous interfaces. For a semiconductor under illumination, a contribution from the

generation of photocurrent when electrons are excited gives a contribution to the electrical response.

Application of modulating potential forces these processes to oscillate with the applied frequency. If

a reversible couple is present at the electrode surface, the concentrations of both the reduced and

oxidized species will also oscillate not only at the surface but away of the electrode [5]. The motion of

charge across the system is thus affected by the ohmic resistance in the different phases, and the rate

of the charge transfer at the interfaces [10].

Impedance spectroscopy measurements are well suited to characterize the electrical behavior of

the system, including characterization of the motion of charge control and measuring material prop-

erties like diffusion coefficients, rate constants, mobilities, transport numbers and conductivities. It

may be used to investigate the dynamics of charge species of any kind of solid or liquid material:

Page 14: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

2 THEORY 8

ionic, semiconducting, mixed ionic-electronic and so on [10].

2.1.2 Impedance spectroscopy measurements

There are several impedance spectroscopy techniques, where single-frequency impedance spectroscopy

is the most common. One single frequency of the electrical stimuli is chosen, and the phase shift and

amplitude of the electrical response is measured. This process is then repeated across a frequency

range, typically between 1 mHz to 1MHz [10], and a series of data is collected.

In electrical impedance spectroscopy (EIS) a harmonically modulated voltage V (t ) = V0 sin(ωt )

with angular frequencyω is applied, and an AC current I (t ) = I0 sin(ωt+φ) results. A phase difference

φ between the stimuli and response may be observed [11]. I0 and V0 are the steady state current and

voltage, respectively. The EIS signal is the electrical impedance

Z ( jω) = V (t )

I (t )(2.2)

The equivalent circuit for the electrical impedance spectroscopy setup is given in Figure 2.1,

where Φ0 is the incident light intensity. EIS measurements can be performed under any bias illu-

mination, either for one wave length, one sun, or several suns, depending on the wanted conditions

Figure 2.1: Equivalent sketch of an EIS measurement. Φ0 is the incident light intensity, ω the angularfrequency, φ the phase shift, and I0 and U0 are the steady state current and voltage, respectively.

The experimental setup of EIS at the department of materials science at NTNU is showed in Figure

2.2. Here, the ZAHNER IM6x electrochemical workstation potentiostat applies a harmonically mod-

Page 15: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

2 THEORY 9

ulated stimulus, and the modulated response is measured. The light intensity source is connected to

a monochromator, where one single wavelength may be chosen if wanted.

Figure 2.2: EIS experimental setup at department of materials science at NTNU, located in Chemistrybuilding 2 (K2).

2.2 Mathematical treatment

2.2.1 The Laplace transform

The relation between the system response and system properties are usually very complex in the

time domain [10]. One method to greatly simplify the mathematical treatment of the system is to

use Laplace transform from the time domain to the frequency domain. It can be shown that the

impedance can be derived by setting s = jω in the Laplace-transformed time region equations, where

j =p−1. This proof is given in Appendix A, established by Professor Svein Sunde. Thus, the electrical

impedance in Eq. (2.1) can be expressed by the Laplace-transform of the voltage and the current by

Z ( jω) = LV

( jω)

L

I

( jω)(2.3)

where V and I are the modulated frequency-dependent voltage and current, respectively. This math-

ematical treatment of the impedance is used in this study.

Page 16: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

2 THEORY 10

2.2.2 Representation of impedance spectra

The phase shift and amplitude of the impedance can be used to represent the impedance as a com-

plex number

Z = Re(Z )+ j Im(Z ) = |Z |cosθ+ j |Z |sinθ (2.4)

This relation can be represented in an impedance plane plot (often named Nyquist plot [5]), where

the impedances at different frequencies are plotted as a planar vector in the real and imaginary plane

given by Eq. (2.4). As an example, an impedance plane plot for a Ni/Ti-doped YSZ solid-oxide fuel cell

(SOFC) is given in Figure 2.3.

Figure 2.3: Impedance plane plot representation of the impedance for a Ni/Ti-doped YSZ SOFC as afunction of PH2 , from [12].

These plots give a good representation of the phase shift and amplitude of the impedance. How-

ever, it can be quite ambiguous to determine at which frequency each point in the plot is measured.

The impedance plane plot often does not give the frequency at each measured point explicit. This can

be shown explicit by plotting the magnitude of the impedance versus the frequency in a Bode plot [5,

p. 285]. A Bode plot of the electrical impedance spectrum of a TiO2 dye-sensitized solar cell (DSSC) is

given in Figure 2.4 [11].

Page 17: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

2 THEORY 11

Figure 2.4: Bode representation of the electrical impedance spectrum for a DSSC with different con-centration of Pt at the counter electrode.

2.3 Analysis of impedance spectra

2.3.1 Electrode half-cell and the Warburg diffusion impedance

We consider a half-cell consisting of an electrode electrode immersed in an electrolyte with the gen-

eral electrochemical process at the surface

Ox+e− → Red (2.5)

The potential drop E across the interface will be a function of the current density flowing , i , and the

concentrations of Ox and Red at the surface, c sO and c s

R

E = E(i ,c sO ,c s

R ) (2.6)

We shall assume that the concentration of supporting electrolyte is sufficient to ensure that all the

potential drop at the interface is accommodated in the Helmholtz layer, so that the species transport

takes place only by diffusion [5]. The material balance is given by Fick’s second law of diffusion [9]

∂c

∂t= D

∂2c

∂x2 (2.7)

Here we have introduced the concentration c = cO

νO= cR

νRdescribed below.

We assume a harmonic perturbation is applied in the driving force for the diffusion for t > 0, so

Page 18: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

2 THEORY 12

that the concentration may be written [13]

c(t ) = c(0)+ c(t ) (2.8)

where c(0) corresponds to the expected steady state concentration, and is time-independent [5].The

diffusion equation becomes∂c

∂t= D

(d 2c(0)

d x2 + d 2c

d x2

)(2.9)

Since the steady state concentration c(0) is time-independent, by doing the Laplace transform it

follows from Eq. (2.9) that L c(0)(s) = 0 [13]. The Laplace transformed diffusion equation becomes

L

∂c

∂t

(s) = D L

d 2c

d x2

(s) (2.10)

By using the definition of the Laplace transform of the n − th derivative of a function [14]

L

f (n) (s) = snL

f

(s)− sn−1 f (0)− ...− f (n−1)(0) (2.11)

we get

s L c (s) = Dd 2 L c (s)

∂x2 (2.12)

This frequency region diffusion equation has the general solution

L c (s) = A exp

(√s

Dx

)+B exp

(−

√s

Dx

)(2.13)

We assume a leaking interface at x = 0 with a transmissive boundary condition described in [10]

and by Glarum et. al [15], where the current at the interface is proportional to the derivative of the

modulating concentration with respect to the length. The diffusion layer is set to be infinitely long,

and the modulating concentration is zero in the bulk electrolyte. The boundary conditions are thus

Li

(s)

nF= D

d L c (s)

d x

∣∣∣∣∣x=0

; limx→∞L c (s) → 0 (2.14)

This gives the specific solution

L c (s) =−Li

(s)

nF

1pDs

exp

(−

√s

Dx

)(2.15)

The harmonically perturbed voltage applied is given by invoking the linearity conditions

E = E(0)+ E(t ) = E(0)+ dE

dcc(t ; x = 0) (2.16)

Page 19: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

2 THEORY 13

By rearranging and doing the Laplace transform, we get

LE

(s) = dE

dcL c (s; x = 0) =−dE

dc

Li

(s)

nF

1pDs

(2.17)

We let s → jω as described in Section 2.2.1, and use the definition of the electrical impedance given in

Eq. (2.3). This gives the infinite Warburg diffusion impedance, ZW,inf( jω), at the electrode interface

ZW,inf( jω) = LE

( jω)

Li

( jω)=−dE

dc

1

nF

1√D · jω

(2.18)

By similar approach, it can be showed that by choosing a finite length for the diffusion layer, we

get the expression for the transmissive Warburg diffusion impedance

ZW,trans( jω) = LE

( jω)

Li

( jω)=−dE

dc

1

nF

1√D · jω

tanh

√jω

DL

(2.19)

We can also assume a blocking interface with a reflective boundary condition at the electrode

surface described by Ho et al. [16] and Franceschetti et al. [17]. The boundary conditions are given by

Li

(s)

nF= D

d L c (s)

d x

∣∣∣∣∣x=0

; 0 = d L c (s)

d x

∣∣∣∣x=L

(2.20)

which has the specific solution at the interface

L c (s) = Li

(s)

nF

1pDs

coth

√jω

DL

(2.21)

By assuming a harmonically perturbed voltage applied as described above, the reflective Warburg

diffusion impedance at the electrode interface becomes

ZW,refl( jω) =−dE

dc

1

nF

1√D · jω

coth

√jω

DL

(2.22)

A full derivation of this model is given in Appendix B

The current flow in the system is given by an electron-transfer resistance across the interface, RC T ,

and a Warburg impedance across the diffusion layer, ZW , in series. In practice, this is connected in

parallel with the double layer capacitance, CD , and in series with the electrolyte resistance, RE [5]. An

equivalent circuit of this half-cell system is given in Figure 2.5.

Page 20: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

2 THEORY 14

Figure 2.5: Equivalent circuit for the electrode half-cell. RC T is the charge transfer resistance, ZW isthe Warburg impedance, CD is the double layer capacitance, and RE is the electrolyte resistance.

2.3.2 Diffusion limited process

The infinite Warburg diffusion impedance is only diffusion controlled. In an impedance plane plot,

the infinite Warburg diffusion impedance is a straight line for all frequencies. In general, a system is

diffusion controlled for a specific frequency region if the impedance plane plot is a straight line with

an inclination angle −φ=α= 45 for all frequencies within the region. Physically, the system shows a

infinite-Warburg-like diffusion impedance behavior in this frequency region.

2.3.3 Electron-transfer limited process

We assume that the Warburg diffusion impedance becomes sufficiently small compared to the charge

transfer so that the equivalent circuit in Figure 2.5 is reduced to that of Figure 2.6a [5]. In this limiting

case, the system is only electron-transfer limited. It can be shown [5] that the impedance plane plot

gives a perfect semi-circle. The length of the real part of the semi-circle equals the charge trans-

fer resistance, and the center of the semi-circle is located at a frequency of ω = 1/RC T CD . Thus,

the double-layer capacitance can be investigated for this plot. A schematic impedance plane plot

of an electron-transfer limited process is given in Figure 2.6b. The system effectively charges and

discharges the electrical double layer in this frequency region.

2.3.4 Gerischer impedance

A non-faradaic side reaction that affects the concentrations may occur simultaneously with the het-

erogeneous charge transfer [18, 12]. We introduce a sink term −kc to the material balance, where the

effective rate constant k also includes any linearization of the heterogeneous kinetics at the interface

Page 21: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

2 THEORY 15

(a) (b)

Figure 2.6: (a) Equivalent circuit for a rate limiting process, and (b) impedance plane plot for a ratelimiting process. RC T is the charge transfer resistance, CD the double layer capacitance, and RE theelectrolyte resistance.

[9]. The modified Fick’s law in one dimension is written

∂c

∂t= D

∂2c

∂x2 −kc (2.23)

Laplace transforming from the time domain to the frequency domain gives

L

∂c

∂t

(s) =L

D∂2c

∂x2

(s)−L kc (s) (2.24)

By assuming a harmonic perturbation applied, we get the Laplace transform

s L c (s) = D∂2 L c (s)

∂x2 −k L c (s) (2.25)

where we again have used the relation c(0) = 0 [13].

This frequency region diffusion equation has the general solution

L c (s) = A exp

√s +k

Dx

+B exp

−√

s +k

Dx

(2.26)

For a leaking electrode, we assume a transmissive boundary condition [15, 10] at the inspected

interface, as described above. That is

Li

(s)

nF= D

d L dc (s)

d x

∣∣∣∣∣x=0

; limx→L

L c (s) → 0 (2.27)

Page 22: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

2 THEORY 16

This gives the specific solution at the interface

L c (s) = −Li

(s)

nF

1pD(s +k)

tanh

√s +k

DL

(2.28)

We assume a harmonically perturbed voltage applied as described above, and the transmissive Gerischer

impedance becomes

ZG ,trans( jω) =−dE

dc

1

nF

1√D( jω+k)

tanh

√jω+k

DL

(2.29)

A blocking electrode with a reflective boundary condition [16, 17]

Li f

(s)

nF= D

d L c (s)

d x

∣∣∣∣∣x=0

; 0 = d c (s)

d x

∣∣∣∣∣x=L

(2.30)

has the specific solution at the interface

L c (s) = Li

(s)

nF

1pD(s +k)

coth

√s +k

DL

(2.31)

This gives the reflective Gerischer impedance with a harmonically perturbed voltage applied

ZG ,refl( jω) =−dE

dc

1

nF

1√D( jω+k)

coth

√jω+k

DL

(2.32)

A full derivation of this model is given in Appendix C.

2.4 Photoelectrochemical film electrode

We assume thin film electrode consisting mounted on a metal bracket support. A schematic of the

electrode system is given in Figure 2.7.

Figure 2.7: Schematics of the modeled thin film electrode system.

Page 23: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

2 THEORY 17

The charge balance for the charge-neutral bulk is [6]

n −Nd − (p −Na) = 0 (2.33)

where n, p, Nd , and Na are electron, hole, donor, and acceptor concentrations, respectively.

We introduce the nomenclature

c+ = p −Na (2.34)

c− = n −Nd (2.35)

which gives the charge balance

z+ν+c++ z−ν−c− = 0 (2.36)

2.4.1 Solution of the diffusion equation for mixed conducting thin film electrode

We employ the dilute-solution approximation in which the flux density vector of species i in the film,

N i , is described by [9]

N i =−zi ui F ci∇Φ1 −Di∇ci (2.37)

where zi is the charge number, ui the mobility, ci the concentration, and Di the diffusion coefficient

of species i .

The material balance∂ci

∂t=−∇N i +Ri (2.38)

becomes, by combination of Eqs. (2.34), (2.35), and (2.36) [9]

∂c

∂t= D∇2c +Rc (2.39)

where

D = z+u+D−− z−u−D+z+u+− z−u−

, Rc = z+u+R−− z−u−R+z+u+− z−u−

(2.40)

and the concentration of the electrolyte

c = c+ν+

= c−ν−

(2.41)

ν+ and ν− are the numbers of cations and anions produced by the dissociation of one molecule of

electrolyte, respectively.

A harmonic perturbation is assumed applied in the driving force for current flow for t > 0. The

concentration may be written

c = c(r ,0)+ c(r , t ) (2.42)

Page 24: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

2 THEORY 18

The Laplace transform of the time derivative can be written as [14]

L

∂c

∂t

= s L c−

=0︷︸︸︷c(0) = s L c = sc(s) (2.43)

Combination of Eqs. (2.43) and (2.39) gives, for a one-dimensional electrode system

sc(s) = D∂2c(s)

∂x2 +LRc

(2.44)

We introduce a sink term corresponding to recombination or trapping of charge carriers [15]. The

rate constant k includes all rate constants and any other pre-factors stemming from linearization of

R+ and R−. We also add a source term due to photon absorption [19]. The diffusion equation becomes

sc(s) = D∂2c(s)

∂x2 −kc(s)+L

I0αexp−αx (2.45)

The current in the electrolyte is given by [9]

i = F∑

izi Ni (2.46)

and the net flux density is ∑i

Ni = i

F∑

i zi(2.47)

We see that N i is the integrated form of Eq. (2.38). We get

− i

z+ν+F= (z+u+− z−u−)F c∇Φ1 + (D+−D−)∇c = N+ (2.48)

We assume that electronic species are blocked at the solution interface x = 0, in the present example

the positive species, and we get the species fluxes [9]

N+x = 0 =−z+u+Fν+c∂Φ

∂x−D+ν+

∂c

∂x(2.49)

N−x = ix

z−F=−z−u−Fν−c

∂Φ

∂x−D−ν−

∂c

∂x(2.50)

where Ni x is the flux of species i in x-direction. The flux of negative carriers in the x-direction is

related to the faradaic current as

i f =−z−F N−x (2.51)

because a vacancy flux in the x-direction represents oxidation of the oxide. Thus, ix =−i f . By elimi-

Page 25: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

2 THEORY 19

nation of the potential in Eqs. (2.50) and (2.49), we get

i f

z−ν−F=−z−u−D+− z+u+D−

z+u+∂c

∂x(2.52)

We introduce the transport number of the positive species [9]

t+ = 1− t− = z+u+z+u+− z−u−

(2.53)

Laplace-transforming gives the boundary condition at the electrolyte interface x = 0

Li f

z−ν−F

= D

1− t−∂L c

∂x

∣∣∣∣x=0

(2.54)

For the substrate interface we get similar species fluxes [9]

N+x = ix

z+F=−z+u+ν+c

∂Φ

∂x−D+ν+

∂c

∂x(2.55)

N−x = 0 =−z−u−Fν−c∂Φ

∂x−D−ν−

∂c

∂x(2.56)

which give the boundary condition at x = L

Li f

z+ν+F

= D

1− t+∂L c

∂x

∣∣∣∣x=L

(2.57)

Boundary conditions (2.54) and (2.57) are used to solve the diffusion equation (2.45), which give the

specific solution

L c =− Li f

F

√D( jω+k)sinh

(√jω+k

D L

)

·K1(ω)cosh

√jω+k

D(x −L)

−K2(ω)cosh

√jω+k

Dx

− L

I0

α

Dα2 −k − jωe−αx

(2.58)

where

K1(ω) = 1− t−z−ν−

− F D L

I0α2

Li f

(Dα2 −k − jω)

(2.59)

K2(ω) = 1− t+z+ν+

− F D L

I0α2

Li f

(Dα2 −k − jω)

e−αL (2.60)

Page 26: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

2 THEORY 20

2.4.2 Electrochemical impedance for a mixed conductivity thin film electrode

We assume no illumination. That is

L

I0

(s) = 0; I0(x,0) = 0 (2.61)

The faradaic current at the electrode–electrolyte interface, i f , is assumed to be a function of the

proton concentration in the oxide film and the potential difference between electrode and electrolyte,

Φ1 −Φ2, given by the expression

i f (t ) =(∂i f

∂c

)Φ1−Φ2, x=0

c(x = 0)+[

∂i f

∂(Φ1 −Φ2)

]c, x=0

[Φ1(0)−Φ2(0)

]= A0c(0)+B0

[Φ1(0)−Φ2(0)

] (2.62)

with A0 =(∂i f

∂c

)Φ1−Φ2, x=0

and B0 =[

∂i f

∂(Φ1 −Φ2)

]c, x=0

.

The local admittance at the electrode–electrolyte interface for the combined faradaic reaction and

diffusion, Y0, is found by combining Eqs. (2.58) and (2.62) evaluated at x = 0

Y0 =L

i f

L

Φ1(0)−Φ2(0)

= B0

1− A0Z ′D

(2.63)

with

Z ′D =− 1

F√

D( jω+k)sinh

(√jω+k

D L

)

·1− t−

z−ν−cosh

√jω+k

DL

− 1− t+z+ν+

(2.64)

By similar approach, the local admittance at the metal–oxide boundary, YL , is given by

YL = Li f

L

Φm(L)−Φ1(L)

= BL

1− AL Z ′′D

(2.65)

with

Z ′′D =− 1

F√

D( jω+k)sinh

(√jω+k

D L

)

·1− t−

z−ν−− 1− t+

z+ν+cosh

√jω+k

DL

(2.66)

whereΦM (L) is the potential of the metal support at x = L.

To relate the potential difference LΦ1(0)−Φ2(0)

to the potential measured with respect to a

Page 27: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

2 THEORY 21

reference electrode, we assume the iridium oxide system and write the proton-transfer reaction as

HxH*)V′

H +H+(aq) (2.67)

where HxH is an intercalated hydrogen, and the interface to the electrode support connecting the elec-

trode

0*) h++e− (2.68)

The electrochemical potential of electrons in the collecting leads is given through (in the dilute solu-

tion limit [9])

µe =µh =µ0h +RT lnc(L)+FΦ1(L) (2.69)

when Eq. (2.68) is assumed to be in equilibrium. The measured potential is related to the electro-

chemical potential in a reference electrode as −FV =µe −µrefe .

We assume that µrefe can be measured by a reference electrode so that its value is representative of

Φ2(0) plus a constant. The amplitude and phase of the measured electrode potential is thus derived

by taking the time dependent part of the linearized Eq. (2.69)

F LV

(s) = RT

ceL c(L) (s)+F L

Φ1(L)

(s)−F L Φ(0)(s) (2.70)

The potential Φ1 can in turn be related to the concentration c and i f through [9]

Li f

(s)

z+ν+F= (z+u+− z−u−)F

(ce∂L

Φ1

(s)

∂x+ c

∂Φ1e

∂x

)+ (D+−D−)

∂L c (s)

∂x(2.71)

where "e" refers to steady state, and we have neglected terms beyond first order (c∇Φ1 ≈ ce∂Φ1∂x +

c∂Φ1e

∂x).

We expect the steady-state concentration ce to be independent of the position [20]. For zero cur-

rent the relation [9]

F∂Φ1e

∂x=− D+−D−

(z+u+− z−u−)

∂ lnce

∂x(2.72)

implies that ∂Φ1e /∂x = 0. Using this result in Eq. (2.71) and integrating from x = 0 through x = L gives

LΦ1(L)

(s) =L

Φ1(0)

(s)− D+−D−

F ce (z+u+− z−u−)[L c(L) (s)−L c(0)(s)]+ L

i f

L

κ(2.73)

with κ= F 2 ∑i z2

i ui ci being the film conductivity.

Page 28: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

2 THEORY 22

Combination of Eqs (2.70) and (2.73) gives

F LV

(s) = RT

ceL c(L) (s)

+F LΦ1(0)

(s)− D+−D−

ce (z+u+− z−u−)[L c(L) (s)−L c(0)(s)]−FΦ2(0)+ F L

i f

(s)L

κ

= F LΦ1(0)−FΦ2(0)

(s)

+[

RT

ce− D+−D−

ce (z+u+z−u−)

]L c(L) (s)+ D+−D−

ce (z+u+− z−u−)L c(0)(s)+ F L

i f

(s)L

κ

= F LΦ1(0)−FΦ2(0)

(s)

+[

(z+−1)D+− (z−−1)D−ce (z+u+− z−u−)

]L c(L) (s)+ D+−D−

ce (z+u+− z−u−)L c(0)(s)+ F L

i f

(s)L

κ(2.74)

where we have used the Nernst-Einstein relation Di = RTui [9, p. 253]. Inserting the expressions for

L c(0)(s) and L c(L) (s) in Eq. (2.58), and that for the potential difference F LΦ1(0)−FΦ2(0)

(s)

implied by Eq. (2.63), the faradaic impedance for the electrode, Z f ( jω), may be written

Z f =L

V

L

i f

= Z0 +Zφ+ZΩ (2.75)

where Z0 = Y −10 from Eq. (2.63), ZΩ = L/κ and

Zφ = D+−D−F ce (z+u+− z−u−)

Z ′D +

[(z+−1)D+− (z−−1)D−

F ce (z+u+− z−u−)

]Z ′′

D (2.76)

A full derivation of the electrochemical impedance spectrum model is given in Appendix D.

2.4.3 Photoelectrochemical impedance for a mixed conductivity thin film electrode

We assume a constant bias illumination, thus no intensity modulated illumination. That is

L

I0

(s) = 0; I0(x,0) 6= 0 (2.77)

In this case it can no longer be assumed that the steady-state concentration ce is independent of x.

In fact, the steady-state concentration ce (x) is given by Eq. (2.58) with ω= 0 and all time-dependent

Page 29: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

2 THEORY 23

quantities replaced by steady-state ones,

ce =− i f

Fp

Dk sinh

(√kD L

)

·K1 cosh

√k

D(x −L)

−K2 cosh

√k

Dx

− I0α

Dα2 −ke−αx

(2.78)

with

K1 = 1− t−z−ν−

− F D I0α2

i f (Dα2 −k)(2.79)

K2 = 1− t+z+ν+

− F D I0α2

i f (Dα2 −k)e−αL (2.80)

The steady-state equivalent of Eq. (2.72) with no linearization is

F∂Φ1e

∂x=− D+−D−

z+u+− z−u−∂ lnce

∂x+ i f

z+ν+F ce (z+u+− z−u−)(2.81)

and gives the steady-state potential gradient ∂Φ1e /∂x to be used in Eqs. (2.71) and (2.73)

F LΦ1(L)

(s) = F L

Φ1(0)

−∫ L

0

[ −Li f

(s)

ce z+ν+F (z+u+− z−u−)+F

L c (s)

ce

∂Φ1e

∂x+ D+−D−

ce (z+u+− z−u−)

∂L c (s)

∂x

]d x

(2.82)

or

F LΦ1(L)

(s) = F L

Φ1(0)

−∫ L

0

[ −Li f

(s)

ce z+ν+F (z+u+− z−u−)

(1− L c (s)

ce

)+

D+−D−ce (z+u+− z−u−)

(∂L c (s)

∂x− L c(s)

ce

∂ce

∂x

)]d x

(2.83)

Here we assume Li f

(s) to be independent of x due to charge conservation [5].

Page 30: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

3 NUMERICAL METHOD 24

3 Numerical method

The impedance is derived from the partial differential equation of the harmonically modulating con-

centration gradient. It can be seen from Eq. (2.45) that the system consists of a set of coupled linear

differential equations (here only one differential equation for the iridium oxide system and binary

electrolyte speciation).

The system is a typical initial boundary value problem set – that is, with boundary conditions at

the extrema of x-values, x = 0 and x = L (or x =∞).

3.1 Finite difference method

In general, a set of n coupled linear, second-order differential equations can be represented by [9]

n∑k=1

ai ,k (x)d 2ck

d x2 +bi ,k (x)dck

d x+di ,k (x)ck = gi (x) (3.1)

where ck (x) are the n unknown functions, i denotes the equation number, and each of the equations

can involve all of the unknowns ck through the sum.

For central difference approximations of the derivatives with a mesh distance h,

d 2ck

d x2 = ck (x j +h)+ ck (x j −h)−2ck (x j )

h2 +O(h2) (3.2)

dck

d x= ck (x j +h)− ck (x j −h)

2h+O(h2) (3.3)

we obtain the difference equations

n∑k=1

Ai ,k ( j )Ck ( j −1)+Bi ,k ( j )Ck ( j )+Di ,kCk ( j +1) =Gi ( j ) (3.4)

where j denotes a certain point number in the mesh, and the coefficients are given by [9]

Ck ( j ) = ck (x) (3.5)

Ai ,k ( j ) = ai ,k (x j )− h

2bi ,k (x j ) (3.6)

Bi ,k ( j ) =−2ai ,k (x j )+h2di ,k (x j ) (3.7)

Di ,k ( j ) = ai ,k (x j )+ h

2bi ,k (x j ) (3.8)

Gi ( j ) = h2gi (x j ) (3.9)

Page 31: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

3 NUMERICAL METHOD 25

At j = 1, the equations are

n∑k=1

Bi ,k (1)Ck (1)+Di ,k (1)Ck (2)+Xi ,kCk (3) =Gi (1) (3.10)

where the third term at j = 3 has been added to allow the treatment of complex boundary conditions

[9]. General boundary conditions for equation number 1 at x = 0 would read

n∑k=1

pi ,kdck

d x+ei ,k ck = fi (3.11)

A forward difference accurate to order h2 has the boundary coefficients in Eq. (E.10)

Xi ,k =−0.5pi ,k , Di ,k (1) = 2pi ,k ,

Bi ,k (1) = hei ,k −1.5pi ,k , Gi (1) = h fi

(3.12)

A central-difference form given in Eq. (E.3) introduces an image point at x = −h, outside the

domain of interest has the boundary coefficients in Eq. (E.10)

Xi ,k =−Bi ,k (1) = pi ,k

2, Di ,k (1) = hei ,k , Gi (1) = h fi (3.13)

where the coefficients Xi ,k allow the introduction of complex boundary conditions at x = 0.

For similar reasons, the difference equations at j = jmax are written

n∑k=1

Yi ,kCk ( j −2)+ Ai ,k ( j )Ck ( j −1)+Bi ,k ( j )Ck ( j ) =Gi ( j ) (3.14)

where the coefficients Yi ,k again allow the introduction of complex boundary conditions at x = L.

Newman gives a program code to solve these equations written for the Fortran environment, and

a translated program code to the Matlab environment is established by J. W. Evans and P. Kar at Dept.

of Materials Science and Engineering at University of California, Berkley. Suitable coefficients for

the system as defined above are supplied to the BAND routine, and the routine solves the diffusion

equation. A derivation of the solution of coupled, linear, difference equations is given in Appendix E.

The program code in the Matlab environment is given in Appendix F.

Page 32: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

3 NUMERICAL METHOD 26

3.2 Simulation parameters

We assume Butler-Volmer type kinetics

i f = i0

exp

((1−β)F (Φ1 −Φ2 −U )

RT

)−exp

(−βF (Φ1 −Φ2 −U )

RT

) (3.15)

By assuming A0 = AL = A and B0 = BL = B in Eqs. (2.62) and (2.65), we get directly from Eq. (3.15)

A = i0F

RT

∂U

∂c, B = i0F

RT(3.16)

The diffusion coefficients for each species are calculated by using Nernst-Einstein relation [9]

Di = kB T

qiu′

i (3.17)

and the diffusion coefficient for the system is given by [9, p. 11]

D = z+u+D−− z−u−D+z+u+− z−u−

(3.18)

where kB is the Boltzmann constant, qi is the charge of the species, zi is the valence of the species

and ui is the mobility of the species. Here we have used a different version of the Nernst-Einstein

relation than the one given in the theory section, in accordance with ref. [13].

The conductivity of the electrode material is given by [9]

κ= F 2∑

iz2

i ui ci (3.19)

The transport numbers are given by [9]

t j =z2

j u j c j∑i z2

i ui ci(3.20)

In general, to calculate the impedance spectra numerically, we solve the modified diffusion equa-

tion in Eq. (2.45)

s L c (s) = D∂2 L c (s)

∂x2 −k L c (s)+L

I0

(s) ·αe−αx (3.21)

where s = jω. The calculated modulating concentration profiles are inserted in the respective impedance

equations described above. The BAND-routine calculates the differential equations across a dimen-

sionless length domain, while the electrode system is defined for a dimension length domain. The

diffusion equation is written as a function of dimensionless length by assuming a length y = x/L, and

Page 33: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

3 NUMERICAL METHOD 27

proper L-factors are added in the coefficients supplied to the BAND-routine.

The material simulation parameters for the iridium oxide system are given in Table 3.1. The values

are given by Sunde et al. [13], if not otherwise stated. The calculated values are given in Table 3.2. The

modulating faradaic current is set to 1 for simplicity, since this term is cancelled when the impedance

is calculated.

Table 3.1: Simulation parameters for the iridium oxide system.

Parameter Value Unit Reference

c0 0.025 mol cm-3 –ce 0.004 mol cm-3 –z+ 1 – –z− -1 – –ν+ 1 – –ν− 1 – –u′+ 0.1 cm2 (V s)-1 –u′− 1.7×10−8 cm2 (V s)-1 –i0 0.69×10−3 A cm-2 –dE/dc -20.27 V cm3 mol-1 –k 1×10−2 s-1 –L 100 µm –T 353.15 K –α 0.25×10−5 cm-1 [19]F 96485 A s mol-1 –kB 8.618×10−5 eV K-1 –

L i f (s) = i f 1 A cm-2 –

Table 3.2: Calculated simulation parameters from Table 3.1.

Parameter Value Unit Reference

1/B 44.06 Ω cm2 –A -0.46 A cm mol-1 –D 1×10−9 cm2 s-1 –

3.3 Coefficients for the BAND routine

3.3.1 Warburg diffusion impedance

The coefficients supplied to the Newman’s BAND routine for a central difference method with mesh

distance H for calculating the transmissive Warburg diffusion impedance in Eq. (2.19) are given in

Table 3.3.

The coefficients supplied to the Newman’s BAND routine for a central difference method with

mesh distance H for calculating the reflective Warburg diffusion impedance in Eq. (2.22) are given in

Table 3.4.

Page 34: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

3 NUMERICAL METHOD 28

Table 3.3: Coefficients supplied to the BAND-routine for calculating the transmissive Warburg diffu-sion impedance in Eq. 2.18.

Coefficient Differential equation Boundary at x = 0 Boundary at x = L

A1,1 D1

L2– –

B1,1 −2D1

L2 −H 2s −D

2

1

L1

D1,1 D1

L20 0

G1 0 Hi f

nF0

X1,1 –D

2

1

L–

Y1,1 – – 1

Table 3.4: Coefficients supplied to the BAND-routine for calculating the reflective Warburg diffusionimpedance in Eq. (2.22).

Coefficient Differential equation Boundary at x = 0 Boundary at x = L

A1,1 D1

L2– –

B1,1 −2D1

L2 −H 2s −D

2

1

L−1

2

D1,1 D1

L20 0

G1 0 Hi f

nF0

X1,1 –D

2

1

L–

Y1,1 – –1

2

Page 35: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

3 NUMERICAL METHOD 29

3.3.2 Gerischer impedance

The coefficients supplied to the Newman’s BAND routine for a central difference method with mesh

distance H to calculate the transmissive Gerischer impedance in Eq. (2.29) are given in Table 3.5

Table 3.5: Coefficients supplied to the BAND-routine for calculating the transmissive Gerischerimpedance in Eq. (2.29).

Coefficient Differential equation Boundary at x = 0 Boundary at x = L

A1,1 D1

L2– –

B1,1 −2D1

L2 −H 2(s +k) −D

2

1

L1

D1,1 D1

L20 0

G1 0 Hi f

nF0

X1,1 –D

2

1

L–

Y1,1 – – 1

The coefficients supplied to the Newman’s BAND routine for a central difference method with

mesh distance H to calculate the reflective Gerischer impedance in Eq. (2.32) are given in Table 3.6

3.3.3 Electrochemical impedance of the mixed ionic conductor

The coefficients supplied to the Newman’s BAND routine for a central difference method with mesh

distance H to calculate the electrochemical impedance in Eq. (2.75) are given in Table 3.7.

3.3.4 Photoelectrochemical impedance of the mixed ionic conductor

The coefficients supplied to the Newman’s BAND routine for a central difference method with mesh

distance H to calculate the steady-state concentration under illumination in Eq. (2.78) are given in

Table 3.8. This steady state concentration profile is then used in combination with the numerically

solved modulating concentration in Eq. (2.58) to calculate the photoelectrochemical impedance with

L I0 = 0.

Page 36: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

3 NUMERICAL METHOD 30

Table 3.6: Coefficients supplied to the BAND-routine for calculating the reflective Gerischerimpedance in Eq. (2.32).

Coefficient Differential equation Boundary at x = 0 Boundary at x = L

A1,1 D1

L2– –

B1,1 −2D1

L2 −H 2(s +k) −D

2

1

L−1

2

D1,1 D1

L20 0

G1 0 Hi f

nF0

X1,1 –D

2

1

L–

Y1,1 – –1

2

Table 3.7: Coefficients supplied to the BAND-routine for calculating the electrochemical impedancein Eq. (2.75).

Coefficient Differential equation Boundary at x = 0 Boundary at x = L

A1,1 D1

L2– –

B1,1 −2D1

L2 −H 2(s +k) −1

2

D

1− t−1

L−1

2

D

1− t+1

L

D1,1 D1

L20 0

G1 0 Hi f

z−ν−FH

i f

z+ν+F

X1,1 –1

2

D

1− t−1

L–

Y1,1 – –1

2

D

1− t+1

L

Page 37: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

3 NUMERICAL METHOD 31

Table 3.8: Coefficients supplied to the BAND-routine for calculating the steady-state concentrationunder illumination in Eq. (2.78).

Coefficient Differential equation Boundary at x = 0 Boundary at x = L

A1,1 D1

L2– –

B1,1 −2D1

L2 −H 2(s +k) −1

2

D

1− t−1

L−1

2

D

1− t+1

L

D1,1 D1

L20 0

G1 −H 2L2I0αe−αx Hi f

z−ν−FH

i f

z+ν+F

X1,1 –1

2

D

1− t−1

L–

Y1,1 – –1

2

D

1− t+1

L

Page 38: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 32

4 Results

In these simulations, the impedances are calculated for a frequency range between 10 mHz and 100

MHz. The diffusion coefficient dependency, and rate constant dependency when suitable, of the

process are investigated to show any process control changes.

4.1 Warburg diffusion impedance spectra

4.1.1 Warburg infinite diffusion impedance

The Warburg infinite diffusion impedance from Eq. (2.18) with a diffusion coefficient D = 10−9 cm2

s-1 is given in Figure 4.1, where the solid line represent the analytical solution, and the markers repre-

sent calculated numerical solutions. The impedance spectra are calculated with the boundary condi-

tions d L c(s)d x

∣∣∣x=0

= L i f (s)nF and limx→∞L c(s) = 0. The numerical approach is a central difference

accurate to the order H 2 for the boundary conditions, where H is the inverse of number of steps.

The numerical calculations are done for 10, 100, 1000 and 10000 steps, where the numerical so-

lution approaches the analytical by increasing number of steps. A quicker convergence for lower

frequencies is observed. The impedance plane plot is a straight line with an inclination angle α= 45

for all frequencies, as it should be for a diffusion-controlled process.

Page 39: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 33

0 20 40 60 80 100 120 140 160 180 2000

20

40

60

80

100

120

140

160

180

200

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

← ω = 0.0062832

← ω = 0.0019869

← ω = 0.00099582

ZW

, Analytical

ZW

, Numerical. Steps = 10000

ZW

, Numerical. Steps = 1000

ZW

, Numerical. Steps = 100

ZW

, Numerical. Steps = 10

Figure 4.1: Impedance plane plot from Eq. (2.18) of the Warburg infinite diffusion impedance spec-trum for a diffusion coefficient D = 10−9 cm2 s-1 and n = 1. Calculated with a central differenceaccurate to the order of H 2, and plotted for a frequency range of 0.1 mHz to 100 MHz.

By doing the same calculation with D = 10−5 cm2 s-1 plotted in Figure 4.2, we see that the nu-

merical solution has a sufficient convergence for number of steps above 1000. Again, the impedance

plane plot is a straight line with an inclination angle α = 45 and the process is diffusion controlled,

as it should be.

Page 40: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 34

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

← ω = 0.0062832

← ω = 0.0019869

← ω = 0.00099582

ZW

, Analytical

ZW

, Numerical. Steps = 10000

ZW

, Numerical. Steps = 1000

ZW

, Numerical. Steps = 100

ZW

, Numerical. Steps = 10

Figure 4.2: Impedance plane plot from Eq. (2.18) of the Warburg diffusion impedance spectrum for adiffusion coefficient D = 10−5 cm2 s-1 and n = 1. Calculated with a central difference accurate to theorder of H 2, and plotted for a frequency range of 0.1 mHz to 100 MHz.

The same calculations for a forward difference accurate to order H 2 of the boundary conditions

for the iridium oxide electrode is given in Figure 4.3 for 1000 and 10000 steps. We see that a forward

difference requires a higher number of steps, that is, smaller step sizes, to give proper convergence,

and that the magnitude of the deviation is larger than that of the central difference. Forward differ-

ence has been done for the impedance spectra described below, and all calculations have shown the

same trend. Thus, the forward difference method has been proven poor to solve the differential equa-

tion in this study, and will be neglected in the remainder of this report. All numerical solutions below

are done with a central difference with accuracy to order H 2.

Page 41: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 35

0 50 100 150 200 2500

50

100

150

200

250

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

← ω = 0.0062832

← ω = 0.0019869

← ω = 0.00099582

ZW

, Analytical

ZW

, Numerical. Steps = 10000

ZW

, Numerical. Steps = 1000

Figure 4.3: Impedance plane plot from Eq. (2.18) of the Warburg diffusion impedance spectrum for adiffusion coefficient D = 10−9 cm2 s-1. Calculated with a forward difference accurate to the order ofH 2, and plotted for a frequency range of 0.1 mHz to 100 MHz.

4.1.2 Transmissive Warburg diffusion impedance

The transmissive Warburg diffusion impedance from Eq. (2.19) with a diffusion coefficient D = 10−9

cm2 s-1 is given in Figure 4.4, where the solid line represent the analytical solution, and the markers

represent calculated numerical solutions. The impedance spectra are calculated with the boundary

conditions d L c(s)d x

∣∣∣x=0

= L i f (s)nF and limx→L L c(s) = 0.

The numerical calculations are done for 10, 100 and 1000 steps. Deviations at both high and low

frequencies are observed, and by increasing number of steps the numerical solution approaches the

analytical. A proper convergence is observed for a calculation with 1000 steps. The impedance plane

plot is a straight line with an inclination angle α= 45 for all frequencies within the frequency range,

Page 42: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 36

which implies a diffusion controlled process.

0 20 40 60 80 100 120 140 160 180 2000

20

40

60

80

100

120

140

160

180

200

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

← ω = 0.62832← ω = 0.19869

← ω = 0.062832

ZW

, Analytical

ZW

, Numerical. Steps = 1000

ZW

, Numerical. Steps = 100

ZW

, Numerical. Steps = 10

Figure 4.4: Impedance plane plot from Eq. (2.19) of the transmissive Warburg diffusion impedancespectrum for a diffusion coefficient D = 10−9 cm2 s-1. Plotted for a frequency range of 0.1 mHz to 100MHz.

The same calculations for a system with a diffusion coefficient D = 10−5 cm2 s-1 are given in Figure

4.5. The diffusion coefficient is chosen to be larger than the previous to show the diffusion coefficient

dependency of the impedance spectrum. We observe a straight line with an inclination angle α =45 for high frequencies and a dome shape for lower frequencies. This implies a mixed control for

the system, where the system is rate limiting at lower frequencies and diffusion controlled at higher

frequencies. Again, a proper convergence is observed for a calculation process with 1000 steps.

Page 43: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 37

0 0.05 0.1 0.15 0.2 0.250

0.05

0.1

0.15

0.2

0.25

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

← ω = 0.62832

← ω = 0.19869

← ω = 0.062832

ZW

, Analytical

ZW

, Numerical. Steps = 1000

ZW

, Numerical. Steps = 100

ZW

, Numerical. Steps = 10

Figure 4.5: Impedance plane plot from Eq. (2.19) of the transmissive Warburg diffusion impedancespectrum for a diffusion coefficient D = 10−5 cm2 s-1. Plotted for a frequency range of 0.1 mHz to 100MHz.

4.1.3 Reflective Warburg diffusion impedance

The reflective Warburg finite diffusion impedance spectrum from Eq. (2.22) with a diffusion coeffi-

cient D = 10−9 cm2 s-1 is given in Figure 4.6, where the solid line represents the analytical solution and

the markers represent calculated numerical solutions. The impedance spectra are calculated with the

boundary conditions d L c(s)d x

∣∣∣x=0

= L i f (s)nF and d L c(s)

d x

∣∣∣x=L

= 0.

The numerical calculations are done for 10, 100 and 1000 steps. The numerical solution ap-

proaches the analytical solution with increasing number of steps, and a quicker convergence for lower

frequencies than higher is observed. A proper convergence is observed for 1000 steps. The impedance

plane plot is a straight line with an inclination angle α= 45 for all frequencies in the range, and the

Page 44: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 38

system is diffusion controlled.

0 20 40 60 80 100 120 140 160 180 2000

20

40

60

80

100

120

140

160

180

200

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

← ω = 0.0062832

← ω = 0.0019869

← ω = 0.00099582

ZW

, Analytical

ZW

, Numerical. Steps = 1000

ZW

, Numerical. Steps = 100

ZW

, Numerical. Steps = 10

Figure 4.6: Impedance plane plot from Eq. (2.22) for the reflective Warburg diffusion impedancespectrum for a diffusion coefficient D = 10−9 cm2 s-1. Plotted for a frequency range of 0.1 mHz to 100MHz.

The same calculations done for a system with a diffusion coefficient D = 10−7 cm2 s-1 are given

in Figure 4.7. We see that by increasing the diffusion coefficient, we observe a mixed reaction control

of the system. A divergence to infinite impedance is observed for the lower frequency region, and a

straight line with an inclination angle α= 45 is observed in the higher frequency region.

Page 45: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 39

0 5 10 15 20 25 300

5

10

15

20

25

30

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

← ω = 0.0062832

← ω = 0.0019869

← ω = 0.00099582

ZW

, Analytical

ZW

, Numerical. Steps = 1000

ZW

, Numerical. Steps = 100

ZW

, Numerical. Steps = 10

Figure 4.7: Impedance plane plot from Eq. (2.22) of the reflective Warburg diffusion impedance spec-trum for a diffusion coefficient D = 10−7 cm2 s-1. Plotted for a frequency range of 0.1 mHz to 100MHz.

4.2 Gerischer impedance spectra for thin film electrodes

From the previous calculated impedance spectra, proper convergence is obtained for number of steps

above 1000. For simplicity, a calculation process of 1000 steps is chosen in this section.

4.2.1 Transmissive Gerischer impedance

The transmissive Gerischer impedance from Eq. (2.29) for an IrO2 electrode with a diffusion coeffi-

cient D = 10−9 cm2 s-1 is given in Figure 4.8, where the solid line represents the analytical solution and

the markers the numerical solution. Here we have chosen an effective rate constant k = 1×10−2 s-1.

Page 46: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 40

For the higher frequency region a straight line with an inclination angle α = 45 is observed, which

implies a diffusion controlled process within this region. A dome shape is observed for lower frequen-

cies, corresponding to a mixed rate control between the heterogeneous transfer and a non-faradaic

reaction in the bulk.

0 10 20 30 40 50 60 700

10

20

30

40

50

60

70

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

← ω = 0.62832

← ω = 0.19869

← ω = 0.062832

ZG

, Analytical

ZG

, Numerical. Steps = 1000

Figure 4.8: Impedance plane plot from Eq. (2.29) of the transmissive Gerischer impedance spectrumfor a semiconducting thin film with a diffusion coefficient D = 10−9 cm2 s-1 and an effective rateconstant k = 1×10−2 s-1. Plotted for a frequency range of 0.1 mHz to 100 MHz.

We reduce the rate constant to k = 0 s-1 to show the rate constant dependency of the impedance

for the IrO2 system. This is given in Figure 4.9, where we observe a straight line with an inclination

angle α = 45 for all frequencies within the frequency range. The system is controlled by a diffusion

process.

Page 47: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 41

0 10 20 30 40 50 60 700

10

20

30

40

50

60

70

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

← ω = 0.62832

← ω = 0.19869

← ω = 0.062832

ZG

, Analytical

ZG

, Numerical. Steps = 1000

Figure 4.9: Impedance plane plot from Eq. (2.29) of the transmissive Gerischer impedance spectrumfor a semiconducting thin film with a diffusion coefficient D = 10−9 cm2 s-1 and an effective rateconstant k = 0 s-1. Plotted for a frequency range of 0.1 mHz to 100 MHz.

To show the diffusion coefficient dependency of the transmissive Gerischer impedance, a hypo-

thetical electrode with a diffusion coefficient D = 10−5 cm2 s-1 is chosen. Calculations are done with

an effective rate constant k = 1×10−2 s-1 in Figure 4.10, and k = 0 s-1 in Figure 4.11. Both of the sys-

tems show a mixed controlled process for all frequencies within the frequency range, compared to

the IrO2 system above. A reduction in the effective rate constant results in a larger radius of the dome

shape in the rate controlled region. That is, we observe a higher magnitude of the impedance in the

rate controlled region for a lower effective rate constant.

Page 48: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 42

0 0.05 0.1 0.15 0.2 0.250

0.05

0.1

0.15

0.2

0.25

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

← ω = 0.62832

← ω = 0.19869

← ω = 0.062832

ZG

, Analytical

ZG

, Numerical. Steps = 1000

Figure 4.10: Impedance plane plot from Eq. (2.29) of the transmissive Gerischer impedance spectrumfor a semiconducting thin film with a diffusion coefficient D = 10−5 cm2 s-1 and an effective rateconstant k = 1×10−2 s-1. Plotted for a frequency range of 0.1 mHz to 100 MHz.

Page 49: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 43

0 0.05 0.1 0.15 0.2 0.250

0.05

0.1

0.15

0.2

0.25

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

← ω = 0.62832

← ω = 0.19869

← ω = 0.062832

ZG

, Analytical

ZG

, Numerical. Steps = 1000

Figure 4.11: Impedance plane plot from Eq. (2.29) of the transmissive Gerischer impedance spectrumfor a semiconducting thin film with a diffusion coefficient D = 10−5 cm2 s-1 and an effective rateconstant k = 0 s-1. Plotted for a frequency range of 0.1 mHz to 100 MHz.

4.2.2 Reflective Gerischer impedance

The reflective Gerischer impedance from Eq. (2.32) for an IrO2 electrode with a diffusion coefficient

D = 10−9 cm2 s-1 is given in Figure 4.12, where the solid line represents the analytical solution and

the markers the numerical solution. We have chosen an effective rate constant k = 1×10−2 s-1. We

observe a straight line with an inclination angle α = 45 for the high frequencies, and a dome shape

for lower frequencies. This implies a diffusion controlled process for high frequencies and a mixed

rate control between the heterogeneous transfer and a non-faradaic reaction for low frequencies.

Page 50: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 44

0 10 20 30 40 50 60 700

10

20

30

40

50

60

70

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

← ω = 0.62832

← ω = 0.19869

← ω = 0.062832

ZG

, Analytical

ZG

, Numerical. Steps = 1000

Figure 4.12: Impedance plane plot from Eq. (2.32) of the reflective Gerischer impedance spectrum fora semiconducting thin film with a diffusion coefficient D = 10−9 cm2 s-1 and an effective rate constantk = 1×10−2 s-1. Plotted for a frequency range of 0.1 mHz to 100 MHz.

We reduce the effective rate constant to k = 0 s-1, and the results are given in Figure 4.13. In this

we observe a diffusion controlled system for all frequencies within the frequency range.

Page 51: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 45

0 10 20 30 40 50 60 700

10

20

30

40

50

60

70

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

← ω = 0.62832

← ω = 0.19869

← ω = 0.062832

ZG

, Analytical

ZG

, Numerical. Steps = 1000

Figure 4.13: Impedance plane plot from Eq. (2.32) of the reflective Gerischer impedance spectrum fora semiconducting thin film with a diffusion coefficient D = 10−9 cm2 s-1 and an effective rate constantk = 0 s-1. Plotted for a frequency range of 0.1 mHz to 100 MHz.

To investigate the diffusion coefficient dependency of the reflective Gerischer impedance, we

choose a hypothetical electrode with a diffusion coefficient of D = 10−6 cm2 s-1. Calculation for an

effective rate constant k = 1× 10−2 s-1 is given in Figure 4.14, and k = 0 s-1 is given in Figure 4.15.

We observe a mixed controlled system for both rate constants, compared to the IrO2 system shown

above.

In Figure 4.15 we observe a similar trend as that observed for the reflective Warburg diffusion

impedance in Figure 4.7, where the impedance plane plot is a straight line for high frequencies and

diverges to infinity for lower frequencies. This should be expected, since the choice of k = 0 reduces

the process to a Warburg-like process. In Figure 4.14 a small bend after the diffusion controlled region

Page 52: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 46

occurs, similar to the previous plot. However, for lower frequencies the impedance plane plot bends

towards zero in a dome shape rather than diverge to infinity compared to Figure 4.15. The dome

observed correspond to the mixed reaction controlled process with an effective rate constant k =1×10−2 s-1.

0 0.5 1 1.5 2 2.5 30

0.5

1

1.5

2

2.5

3

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

← ω = 0.62832

← ω = 0.19869

← ω = 0.062832

ZG

, Analytical

ZG

, Numerical. Steps = 1000

Figure 4.14: Impedance plane plot from Eq. (2.32) of the reflective Gerischer impedance spectrum fora semiconducting thin film with a diffusion coefficient D = 10−6 cm2 s-1 and an effective rate constantk = 1×10−2 s-1. Plotted for a frequency range of 0.1 mHz to 100 MHz.

Page 53: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 47

0 0.5 1 1.5 2 2.5 30

0.5

1

1.5

2

2.5

3

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

← ω = 0.62832

← ω = 0.19869

← ω = 0.062832

ZG

, Analytical

ZG

, Numerical. Steps = 1000

Figure 4.15: Impedance plane plot from Eq. (2.32) of the reflective Gerischer impedance spectrumfor a semiconducting thin film electrode with a diffusion coefficient D = 10−6 cm2 s-1 and an effectiverate constant k = 0 s-1. Plotted for a frequency range of 0.1 mHz to 100 MHz.

From these results, we see that the blocking electrode appears as a leaking electrode – that is, the

reflective Gerischer impedance is similar to the transmissive Gerischer impedance – for low diffusion

coefficients (cf. Figure 4.8 and Figure 4.9 for comparison). It can also be seen that the rate control

process given by the effective rate constant k is more significant for a system with a larger diffusion

coefficient.

4.3 Electrochemical impedance spectra for semiconducting thin films

The analytical and numerical solution of the electrochemical impedance spectrum from Eq. (2.75) for

an iridium oxide thin film electrode with a diffusion coefficient D = 10−9 cm2 s-1 and an effective rate

Page 54: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 48

constant k = 1×10−2 s-1 are given in Figure 4.16. We observe a straight line with an inclination angle

α= 45 for high frequencies, and a dome for low frequencies. The process is thus diffusion controlled

for higher frequencies and reaction controlled for lower frequencies.

40 50 60 70 80 90 100 1100

10

20

30

40

50

60

70

← ω = 0.62832

← ω = 0.19869

← ω = 0.062832

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

Zf, Analytical

Zf, Numerical

Figure 4.16: Impedance plane plot from Eq. (2.75) of the electrochemical impedance spectrum for aniridium oxide thin film electrode with a diffusion coefficient D = 10−9 cm2 s-1 and an effective rateconstant k = 1×10−2 s-1, calculated with 1000 steps. Plotted for a frequency range of 0.1 mHz to 100MHz.

To investigate the effective rate constant dependency, the impedance spectrum for the same irid-

ium oxide system for an effective rate constant k = 0 s-1 is given in Figure 4.17. Now, we observe a

diffusion controlled process for all frequencies.

Page 55: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 49

40 50 60 70 80 90 100 1100

10

20

30

40

50

60

70

← ω = 0.62832

← ω = 0.19869

← ω = 0.062832

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

Zf, Analytical

Zf, Numerical

Figure 4.17: Impedance plane plot from Eq. (2.75) of the electrochemical impedance spectrum for aniridium oxide thin film electrode with a diffusion coefficient D = 10−9 cm2 s-1 and an effective rateconstant k = 0 s-1, numerical solution calculated with 1000 steps. Plotted for a frequency range of 0.1mHz to 100 MHz.

We see that by reducing the effective rate constant, the frequency range for diffusion control in-

creases. An effective rate constant analysis of the iridium oxide electrode with D = 10−9 cm2 s-1 is

given in Figure 4.18. Here, the electrochemical impedance is calculated for a range of effective rate

constants between k = 0.1 and k = 10−5 s-1. We see that by increasing the effective rate constant, the

impedance bends towards zero for lower frequencies, corresponding to the mixed rate control of the

heterogeneous transfer and the non-faradaic reaction.

The impedance spectra are similar to the transmissive gerischer impedance spectra (cf. Figure

4.12 and Figure 4.13), we observe a leaking electrode system for the iridium oxide electrode.

Page 56: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 50

40 45 50 55 60 65 70 75 800

5

10

15

20

25

30

35

40

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

Zf, Numerical. k = 1e−05

Zf, Numerical. k = 0.0001

Zf, Numerical. k = 0.001

Zf, Numerical. k = 0.01

Zf, Numerical. k = 0.1

Figure 4.18: Rate constant analysis of the electrochemical impedance spectrum from Eq. (2.75) foran iridium oxide thin film electrode with a diffusion coefficient D = 10−9 cm2 s-1, numerical solutioncalculated with 1000 steps. Plotted for a frequency range of 0.1 mHz to 100 MHz.

The electrochemical impedance spectrum from Eq. (2.75) for a hypothetical semiconducting thin

film electrode with a diffusion coefficient D = 10−6 cm2 s-1 and an effective rate constant k = 1×10−2

s-1 is given in Figure 4.19. Again, we observe a straight line corresponding to a diffusion controlled

process for higher frequencies and a dome shape corresponding to a reaction controlled process for

lower frequencies, as for the iridium oxide electrode. However, compared to Figure 4.16, the diffusion

controlled region is smaller. A slight bend in the diffusion region located between ω = 0.062832 and

ω= 0.19869 similar to the mixed reflective gerischer impedance spectrum described in Figure 4.14 is

observed.

Page 57: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 51

44 44.5 45 45.5 46 46.5 470

0.5

1

1.5

2

2.5

3

← ω = 0.62832

← ω = 0.19869

← ω = 0.062832

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

Zf, Analytical

Zf, Numerical

Figure 4.19: Impedance plane plot from Eq. (2.75) of the electrochemical impedance spectrum for asemiconducting thin film electrode with a diffusion coefficient D = 10−6 cm2 s-1 and an effective rateconstant k = 1×10−2 s-1, numerical solution calculated with 1000 steps. Plotted for a frequency rangeof 0.1 mHz to 100 MHz.

The same hypothetical electrode with D = 10−6 cm2 s-1 and an effective rate constant k = 0 s-1 is

given in Figure 4.20. Here, the bend of the impedance caused by the rate controlled process described

by the effective rate constant is not present, and the impedance diverges to infinity. This is similar to

the reflective gerischer impedance described in Figure 4.14

Page 58: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 52

44 44.5 45 45.5 46 46.5 470

0.5

1

1.5

2

2.5

3

← ω = 0.62832

← ω = 0.19869

← ω = 0.062832

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

Zf, Analytical

Zf, Numerical

Figure 4.20: Impedance plane plot from Eq. (2.75) of the electrochemical impedance spectrum for asemiconducting electrode with a diffusion coefficient D = 10−6 cm2 s-1 and an effective rate constantk = 0 s-1, numerical solution calculated with 1000. Plotted for a frequency range of 0.1 mHz to 100MHz.

An effective rate constant analysis of this electrode with D = 10−6 cm2 s-1 is given in Figure 4.21.

The impedance spectrum is calculated for range of effective rate constants between k = 0.1 and k =10−5 s-1. This figure shows how the bending of the impedance spectrum caused by the effective rate

constant is reduced by reducing the rate constant. From these results we see that the impedance

spectrum is similar to the reflective gerischer impedance spectrum for high diffusion coefficients, we

observe a blocking electrode system for the hypothetical electrode.

Page 59: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 53

44 46 48 50 52 54 56 58 600

2

4

6

8

10

12

14

16

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

Zf, Numerical. k = 1e−05

Zf, Numerical. k = 0.0001

Zf, Numerical. k = 0.001

Zf, Numerical. k = 0.01

Zf, Numerical. k = 0.1

Figure 4.21: Effective rate constant analysis of the electrochemical impedance spectrum from Eq.(2.75) for a semiconducting thin film electrode with a diffusion coefficient D = 10−6 cm2 s-1, numeri-cal solution calculated with 1000 steps. Plotted for a frequency range of 0.1 mHz to 100 MHz.

4.4 Photoelectrochemical impedance spectra for semiconducting thin films

For the electrochemical impedance, the steady state concentration is assumed constant across the

electrode. However, under illumination, this assumption does not hold. The steady-state concentra-

tion profile from Eq. (2.78) across a 100 µm thick iridium oxide electrode electrode with a diffusion

coefficient D = 10−9 cm2 s-1, an effective rate constant k = 1×10−2 s-1, a reciprocal absorption length

α = 0.25× 10−5 cm-1, and a light intensity of I0 = 1000 mol cm-2 s-1 is given in Figure 4.22. We ob-

serve reduction in the steady-state concentration across the electrode, with a steep decay close to

the illuminated surface. The concentration quickly reaches a constant value, which remains across

Page 60: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 54

the rest of the electrode length. The numerical results are calculated for 1000 steps and show proper

convergence. A calculation process of 1000 steps is used in the remainder of this section.

0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.010

0.5

1

1.5

2

2.5

3

3.5

Length [cm]

Co

nce

ntr

atio

n [

mo

l cm

−3]

Ce, analytical. I

0 = 1000

Ce, numerical. I

0 = 1000

Figure 4.22: The steady state concentration from Eq. (2.78) of a photoelectrochemical iridium ox-ide thin film electrode as a function of the length through the electrode. Calculations done with aneffective rate constant of k = 1×10−2 s-1, 1000 steps, α= 0.25×10−5 cm-1, and I0 = 1000 mol cm-2 s-1

.

A light intensity analysis of the same system is given in Figure 4.23, where we see an increase in the

concentration by increasing the intensity. The profile shape, however, shows no significant change,

it is only shifted when changing the light intensity. In Figure 4.24 an effective rate constant analysis

with an illumination I0 = 1000 mol cm-2 s-1 is given. We observe a decreases in the steady state con-

centration with an increase in the reaction rate, and an increases in the steady state concentration

difference across the electrode with decreasing effective rate constant.

Page 61: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 55

0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01−0.5

0

0.5

1

1.5

2

2.5

3

3.5

Length [cm]

Concentr

ation [m

ol cm

−3]

Ce, numerical. I

0 = 1000

Ce, numerical. I

0 = 1

Ce, numerical. I

0 = 0.001

Ce, numerical. I

0 = 1e−05

Ce, numerical. I

0 = 0

Figure 4.23: Light intensity analysis for the steady state concentration from Eq. (2.78), D = 10−9 cm2

s-1, k = 1×10−2 s-1, and α= 0.25×10−5 cm-1.

0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.010

2

4

6

8

10

12

14

Length [cm]

Concentr

ation [m

ol cm

−3]

Ce, numerical. k = 1

Ce, numerical. k = 0.1

Ce, numerical. k = 0.01

Ce, numerical. k = 0.001

Figure 4.24: Rate constant analysis for the steady state concentration from Eq. (2.78), D = 10−9 cm2

s-1, α= 0.25×10−5 cm-1, and I0 = 1000 mol cm-2 s-1.

The photoelectrochemical impedance spectrum from Eqs. (2.78), (2.83) and (2.70) for the iridium

oxide electrode with an effective rate constant k = 1× 10−2 s-1 and a reciprocal absorption length

Page 62: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 56

α = 0.25× 10−5 cm-1 is given in Figure 4.25 for different light intensities. No significant change in

the impedance for different illuminations is observed. The system shows mixed control for all light

intensities, diffusion controlled for higher frequencies and rate controlled for lower frequencies.

40 50 60 70 80 90 100 1100

10

20

30

40

50

60

70

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

Zf, numerical. I

0 = 100000

Zf, numerical. I

0 = 1000

Zf, numerical. I

0 = 1

Zf, numerical. I

0 = 0.001

Zf, numerical. I

0 = 1e−05

Zf, numerical. I

0 = 0

Figure 4.25: Impedance plane plot from Eqs. (2.78), (2.83) and (2.70) of the photelectrochemicalimpedance spectrum as a function of light intensity for an iridium oxide thin film electrode with adiffusion coefficient D = 10−9 cm2 s-1, an effective rate constant k = 10−2 s-1, and a reciprocal absorp-tion length α= 0.25×10−5 cm-1, calculated with 1000 steps. Plotted for a frequency range of 0.1 mHzto 100 MHz.

The photoelectrochemical spectrum from Eqs. (2.78), (2.83) and (2.70) for the same electrode with

an effective rate constant k = 0 s-1 is given in Figure 4.26, where the impedance shows no significant

dependency of light intensity. The plot is a straight line for all frequencies within the range, and is

diffusion controlled.

Page 63: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 57

40 60 80 100 120 140 160 180 200 220 2400

20

40

60

80

100

120

140

160

180

200

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

Zf, numerical. I

0 = 100000

Zf, numerical. I

0 = 1000

Zf, numerical. I

0 = 1

Zf, numerical. I

0 = 0.001

Zf, numerical. I

0 = 1e−05

Zf, numerical. I

0 = 0

Figure 4.26: Impedance plane plot from Eqs. (2.78), (2.83) and (2.70) of the photelectrochemicalimpedance spectrum as a function of light intensity for an iridium oxide thin film electrode with adiffusion coefficient D = 10−9 cm2 s-1, an effective rate constant k = 0 s-1, and a reciprocal absorptionlength α = 0.25×10−5 cm-1, calculated with 1000 steps. Plotted for a frequency range of 0.1 mHz to100 MHz.

The effective rate constant is increased to k = 1 s-1 to investigate wether the light intensity is sig-

nificant for even higher effective rate constants. This is given Figure 4.27, where we observe a small

increase in the impedance in the lower frequency region when reducing the light intensity. However,

when the intensity approaches zero the numerical approach breaks down, and this plot is neglected

in this figure. We observe one dome shape at high frequencies going to a straight line when lowering

the frequency, and a larger dome shape at the lower frequencies for all light intensities. This implies

that the system is rate controlled in the highest frequency, diffusion controlled at intermediate fre-

quencies, and rate controlled for lower frequencies.

Page 64: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 58

44 45 46 47 48 49 50 510

1

2

3

4

5

6

7

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

Zf, numerical. I

0 = 100000

Zf, numerical. I

0 = 1000

Zf, numerical. I

0 = 1

Zf, numerical. I

0 = 0.001

Zf, numerical. I

0 = 1e−05

Figure 4.27: Impedance plane plot from Eqs. (2.78), (2.83) and (2.70) of the photelectrochemicalimpedance spectrum as a function of light intensity for an iridium oxide thin film electrode with adiffusion coefficient D = 10−9 cm2 s-1, an effective rate constant k = 1 s-1, and a reciprocal absorptionlength α = 0.25×10−5 cm-1, calculated with 1000 steps. Plotted for a frequency range of 0.1 mHz to100 MHz.

By increasing the effective rate constant, we observe a larger light intensity dependency of the

photoelectrochemical impedance. We assume a hypothetical electrode with a diffusion coefficient

to D = 10−9 cm2 s-1 to investigate this dependency, since the electrode is diffusion controlled over

a smaller frequency range for higher diffusion coefficients. In Figure 4.28, the photoelectrochemical

impedance spectrum from Eqs. (2.78), (2.83) and (2.70) for this electrode is given with an effective

rate constant k = 10−2 s-1 and a reciprocal absorption length α = 0.25× 10−5 cm-1. An increase in

the impedance is observed in the lower frequency region, and the light intensity dependency is more

Page 65: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 59

significant for this electrode than for the iridium system above.

44 44.5 45 45.5 46 46.5 470

0.5

1

1.5

2

2.5

3

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

Zf, numerical. I

0 = 100000

Zf, numerical. I

0 = 1000

Zf, numerical. I

0 = 1

Zf, numerical. I

0 = 0.001

Zf, numerical. I

0 = 1e−05

Zf, numerical. I

0 = 0

Figure 4.28: Impedance plane plot from Eqs. (2.78), (2.83) and (2.70) of the photelectrochemicalimpedance spectrum as a function of light intensity for a semiconducting thin film electrode witha diffusion coefficient D = 10−6 cm2 s-1, an effective rate constant k = 10−2 s-1, and a reciprocal ab-sorption length α= 0.25×10−5 cm-1, calculated with 1000 steps. Plotted for a frequency range of 0.1mHz to 100 MHz.

The photoelectrochemical impedance spectrum from Eqs. (2.78), (2.83) and (2.70) for the same

electrode with an effective rate constant k = 0.5 s-1 for different light intensities is given in Figure

4.29. The increase in the impedance for higher frequencies is even more significant for this system.

For high light intensities, we observe a system with diffusion control at high frequencies and rate

controlled at lower frequencies. A second dome in the lower frequency regions at light intensities

close to zero is observed, which disappears by increasing the light intensity.

Page 66: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 60

44.05 44.1 44.15 44.2 44.25 44.3 44.350

0.05

0.1

0.15

0.2

0.25

0.3

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

Zf, numerical. I

0 = 100000

Zf, numerical. I

0 = 1000

Zf, numerical. I

0 = 1

Zf, numerical. I

0 = 0.001

Zf, numerical. I

0 = 1e−05

Zf, numerical. I

0 = 0

Figure 4.29: Impedance plane plot from Eqs. (2.78), (2.83) and (2.70) of the photelectrochemicalimpedance spectrum as a function of light intensity for a semiconducting thin film electrode witha diffusion coefficient D = 10−6 cm2 s-1 and an effective rate constant k = 0.5 s-1, calculated with 1000steps. Plotted for a frequency range of 0.1 mHz to 100 MHz.

The effective rate constant is increased to k = 1 s-1, the results are given in Figure 4.30. For high

light intensities we observe a mixed controlled system which is diffusion controlled for high frequen-

cies and rate controlled at low frequencies. A second dome at lower frequencies appears at lower light

intensities. The numerical approach breaks down when the light intensity approach zero, just like the

iridium oxide system with k = 1 s-1 described above.

Page 67: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

4 RESULTS 61

44.05 44.1 44.15 44.2 44.25 44.3 44.35−0.05

0

0.05

0.1

0.15

0.2

0.25

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

Zf, numerical. I

0 = 100000

Zf, numerical. I

0 = 1000

Zf, numerical. I

0 = 1

Zf, numerical. I

0 = 0.001

Zf, numerical. I

0 = 1e−05

Zf, numerical. I

0 = 0

Figure 4.30: Impedance plane plot from Eqs. (2.78), (2.83) and (2.70) of the photelectrochemicalimpedance spectrum as a function of light intensity for a semiconducting thin film electrode witha diffusion coefficient D = 10−6 cm2 s-1, an effective rate constant k = 1 s-1, and a reciprocal absorp-tion length α= 0.25×10−5 cm-1, calculated with 1000 steps. Plotted for a frequency range of 0.1 mHzto 100 MHz.

Page 68: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

5 DISCUSSION 62

5 Discussion

In this project, we want to verify if Newman’s BAND routine is compatible for complex coefficients,

thus suitable for impedance spectra calculations. The largest focus and most important in this dis-

cussion will be how, or if, the numerical solution approaches the expected analytical solution, what

measures have been done to obtain proper convergences, and origins to any deviations or non-

convergence.

5.1 Parameterization sensitivity

In general, we assume that the numerical solutions converge to the analytical solutions for infinitely

small step sizes H . That is

limH→0

(Numerical approach

)→ (Analytical approach

)(5.1)

By increasing the number of steps, thus reducing the step size H , the numerical solution should ap-

proach the analytical solution.

We have seen that to solve the diffusion equation

Dd 2 L c ( jω)

d x2 − (k + jω)L c ( jω) =−L

I0

( jω) ·αe−αx (5.2)

with the Newman’s BAND routine, we supply the coefficients

A1,1 = D1

L2

B1,1 =−2D1

L2 −H 2 · ( jω+k)

D1,1 = D1

L2

G1,1 =−H 2L

I0

( jω) ·αe−αx

(5.3)

We have two contributions that influences the step size, H 2 · ( jω+k) and H 2

I0

( jω)αe−αx . From

Figure 4.2, we see that the numerical solution for the infinite Warburg diffusion impedance converges

quickly for low frequencies with respect to number of steps, but more slow in the high frequency

region. This general trend is found in all of the calculations, and can be explained from the H 2·( jω+k)

term, where the low frequency range is not as sensitive to the step size H than for the high frequency

region. Deviations for high frequencies were solved by reducing the step size.

As mentioned above, the numerical solution converges in general more quickly for lower frequen-

cies. However, an increase in deviation with decreasing step size in the lower frequency region of the

Page 69: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

5 DISCUSSION 63

faradaic impedance from Eq. (2.75) for the semiconducting thin film was observed. This is shown in

Figure 5.1a for a hypothetical thin film electrode with a diffusion coefficient D = 10−5 cm2 s-1 and rate

constant k = 10−2 s-1. The 1/L2-factor that originates from going from finite lengths to dimension-

less lengths effectively increases the a1,1 coefficient in the differential equation solved when L < 1,

and may alter the step size dependency. By multiplying the differential equation with the L2-factor,

proper convergence was observed. One explanation for this result could be that this multiplication

effectively reduces the step size, and should lead to an even quicker convergence. The same hypo-

thetical system solved with the parameterization where the differential equation solved is multiplied

with L2 is given in Figure 5.1b. A proper convergence trend with respect to step size is observed.

42 42.5 43 43.5 44 44.5 45 45.5 46 46.50

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

Zf, Numerical. Steps = 10

Zf, Numerical. Steps = 100

Zf, Numerical. Steps = 1000

Zf, Numerical. Steps = 10000

(a)

44 44.5 45 45.5 46 46.50

0.5

1

1.5

2

2.5

Re(Z) [Ω cm2]

−Im

(Z)

[Ω c

m2]

Zf, Numerical. Steps = 10

Zf, Numerical. Steps = 100

Zf, Numerical. Steps = 1000

Zf, Numerical. Steps = 10000

(b)

Figure 5.1: (a) The faradaic impedance plane plot from Eq. (2.75) for a semiconducting thin filmwith diffusion coefficient D = 10−5 cm2 s-1 and rate constant k = 10−2 s-1 that shows an increase indeviation with decreasing step size. (b) The same semiconducting thin system that shows properconvergence dependency of the step size by multiplying the differential equation with L2.

5.2 Impedance spectra

5.2.1 Diffusion control at high frequencies and low diffusion coefficients

From the analytical expressions, the impedances are typically an expression with a tanh

(√jω+k

DL

)

or a coth

(√jω+k

DL

)term. Since we have the relations

lim√jω+k

D L→∞tanh

√jω+k

DL

→ 1 (5.4)

Page 70: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

5 DISCUSSION 64

and

lim√jω+k

D L→∞coth

√jω+k

DL

→ 1 (5.5)

we see that

lim√jω+k

D L→∞Zfinite → Zinfinite (5.6)

Since the infinite Warburg diffusion impedance is diffusion controlled, all the processes described

above will be diffusion controlled when√

jω+kD L is substantially high. The largest contributions to

obtain this are a large frequency and a low diffusion coefficient. This can be seen from the results

above, where all processes are diffusion controlled at high frequencies, and the diffusion controlled

frequency region increases with decreasing diffusion coefficient. The magnitude of the rate constant

will also affect the process control. However, the rate constant only give contribution at lower fre-

quency regions when ω ≤ k. The rate constant will bend the impedance plane plot towards zero for

the blocking electrode, and more quickly towards zero for the leaking electrode.

5.2.2 Warburg diffusion impedance spectra

The derived numerical and analytical Warburg diffusion models above are in accordance with previ-

ous models, see refs. [16], [17] and [21] for comparison. Impedance measurements of tungsten oxide

(WO3) thin films deposited on tin oxide where carried out by Ho et al. [16], which showed a reflective

Warburg-like behavior. Transmissive Warburg-like behavior was observed by Sistat et al. [22] for an

AMX homogeneous anion-exchange membrane (described in ref. [23]).

The numerical model established may thus be fitted to Warburg-like impedance spectra to char-

acterize the electrode investigated.

5.2.3 Gerischer impedance spectra

The the Gerischer impedance models are in accordance with existing models, see refs. [18], [12]

and [24] for comparison. We see similar plots in this study for both the analytical model and, most

important, the numerical model. Thus, Newman’s BAND routine may be used for calculating the

Gerischer impedance for an electrochemical system. Observations strongly supporting the existence

of a finite-length Gerischer impedance responses in solid-oxide fuel cells (SOFC) have been reported

by Boukamp et. al [18, 12, 25].

Thus, the established numerical model may be fitted to these measurements to characterize the

electrical properties of these SOFC systems.

Page 71: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

5 DISCUSSION 65

5.2.4 Electrochemical impedance for a mixed conductivity thin film electrode

The thin film electrode is, as expected, diffusion controlled in the higher frequency region for all

processes described above. The increase of the effective rate constant bends the impedance more

quicker toward zero, because of the increased reaction rate of the charge transfer across the interface

and reaction to neutral species. From the boundary conditions chosen, we expect the electrochem-

ical impedance to behave as a reflective Gerischer-type impedance. Thus, we expect to observe a

transmissive-like behavior for low diffusion coefficients, and blocking-like behavior for higher diffu-

sion coefficients. The impedance plane plots above are in accordance with the expected behavior,

and the numerical model shows proper trends for the mixed conducting thin film electrode.

5.2.5 Photoelectrochemical impedance spectra for a mixed conductivity thin film electrode

We observe that for a diffusion controlled process the photoelectrochemical impedance is nearly in-

dependent of the light intensity. This is shown in Figure 4.26 for the diffusion controlled iridium

oxide electrode with an effective rate constant k = 0 s-1. A small increase in the impedance for low

light intensities and low frequencies is observed for high effective rate constants, which indicates

that the rate controlled process is more light intensity dependent than the diffusion controlled pro-

cess. However, the photoelectrochemical impedance spectrum iridium oxide electrode appears close

to independent of light intensity, regardless of the effective rate constant. By increasing the diffu-

sion coefficient we observe a more significant light intensity dependence of the photoelectrochemical

impedance for high rate constants and low frequencies. Thus, the light intensity source term affects

the rate controlled process, but not the diffusion controlled process.

A second dome is observed for a diffusion coefficient D = 10−6 cm2 s-1 and an effective rate con-

stant k = 0.5 s-1. The at higher frequency dome correspond to the heterogeneous diffusion rate, and

the lower frequency dome correspond to the recombination process. One explanation for this could

be by reducing the light intensity, the recombination in the semiconductor is more significant, lead-

ing to a more significant contribution in the impedance. This dome is however not present for the

calculations electrochemical impedance spectra. From the steady-state concentration profiles, we

see that under no illumination there is a significant concentration profile close to the electrolyte in-

terface. This rapid change in concentration is caused by the non-faradaic trapping process described

above. Thus, the electrochemical impedances calculated neglects the non-faradaic reaction depen-

dency of the steady-state concentration, and should be included in the numerical model.

The steady-state concentration equation (2.78) neglects contributions to ce from e.g. thermal

excitation of carriers in a semiconductor. By setting the faradaic current and the light intensity in Eq.

(2.78) to zero leads to a zero steady state concentration, which is not the case for real cases where

Page 72: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

5 DISCUSSION 66

thermal excitation e.g. are included. A constant additive term on the right of the equation should be

added to the right of Eq. (2.78) to include these contributions at zero current and light intensity. This

may significantly alter the calculated impedance spectra, and needs to be taken into consideration

for further work.

The faradaic photocurrent would be expected to be proportional to I0 by

i f = nF D∂ce

∂x(5.7)

Combination with the expression of the steady state concentration in Eq. (2.78) we get

i f =I0α

2e−αx

Dα2 −k

1− n

sinh

(√kD L

) ·K1 sinh

(√k

D(x −L)

)−K2 sinh

(√k

Dx

) (5.8)

with

K1 = 1− t−z−ν−

− F D I0α2

i f (Dα2 −k)(5.9)

K2 = 1− t+z+ν+

− F D I0α2

i f (Dα2 −k)e−αL (5.10)

which should be included in this model.

Page 73: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

6 CONCLUSION 67

6 Conclusion

A numerical model to calculate impedance using Newman’s BAND subroutine has been established.

The numerical model show proper convergence, and is not time consuming. Thus, Newman’s BAND

subroutine has been proven valid to supply complex matrix coefficients to solve differential equa-

tions, hence it’s compatibility with impedance calculations.

An electrochemical impedance model for a mixed conducting thin film electrode based on di-

lute solution theory and a binary electrolyte has been established. The mixed conducting thin film

electrode behaves as a blocking electrode, and the impedance spectra are similar to the reflective

Gerischer impedance spectrum model.

A numerical model of the steady state concentration profile of a semiconducting thin film elec-

trode under illumination has been suggested. This model was used to describe the photoelectro-

chemical impedance under of a mixed conducting semiconductor. A second dome for a charge trans-

fer limiting process at low frequencies was observed under no illumination in this model, which was

not present for the previous electrochemical model. One suggested cause of this dome is an observed

steady-state concentration gradient under no illumination, which was assumed to be constant in the

first model.

The suggested steady-state model disregard the faradaic steady-state current dependency of the

light intensity, which should to be taken into consideration. One expression to include this was sug-

gested. Also, the model disregard steady-state concentration contribution under no illumination by

e.g. thermal excitation, which should to be included.

Page 74: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

LIST OF SYMBOLS 68

List of symbols

A ∂i f /∂c, A mol-1 cm

B ∂i f /∂(Φ1 −Φ2),Ω−1 cm-2

c concentration of neutral hole-vacancy pair, mol cm-3

ce equilibrium concentration of neutral hole-vacancy pairs, mol cm-3

ci concentration of species i , mol cm-3

D diffusion coefficient, cm2 s-1

Di diffusion coefficient of species i , cm2 s-1

F Faraday constant, 96485 C mol-1

H xH intercalant hydrogen in the oxide lattice of effective zero charge

i current density, A cm-2

I0 light intensity, mol cm-2 s-1

I (t ) total time-dependent current, A

Im( ) imaginary part of complex number in parenthesis

j complex number,p−1

k effective rate constant, s-1

kB Boltzmann constant, 1.38×10−23 J K-1

L electrode thickness, cm

Na acceptor dopant concentration, cm-3

Nd donor dopant concentration, cm-3

Ni flux of species i , mol cm-2 s-1

qi charge of species i , C cm-2

R gas constant, 8.314 J K-1 mol-1

RC T charge transfer resistance,Ω cm2

RE electrolyte resistance,Ω cm2

Re( ) real part of complex number in parenthesis

s Laplace variable

ti transference number of species i

T temperature, K

u′i mobility of species i , cm2 (Vs)-1

V (t ) total time-dependent voltage, V

V ′H intercalant-hydrogen vacancy in the oxide lattice of effective negative charge

x coordinate normal to the electrode, cm

y dimensionless coordinate, x/L

Page 75: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

LIST OF SYMBOLS 69

zi charge number of species i

Z impedance,Ω cm2

Z ′D , Z ′′

D diffusion impedances,Ω cm2

Greek

α reciprocal diffusion length, cm-1

∂ partial derivative

κ electrode conductivity,Ω−1 cm-1

∇ del-operator, x∂/∂x + y∂/∂y + z∂/∂z

µe electrochemical potential of electrons in electrode backing, J mol-1

µh electrochemical potential of holes in electrode, J mol-1

ν+ number of holes per electron extracted

ν− number of proton vacancies per electron extracted

σ electrolyte conductivity,Ω−1 cm-1

θ phase shift

Φ1,Φ2,ΦM electrode, electrolyte and metal support potentials, V

ω angular frequency, s-1

Subscripts

i species number

1 electrode phase in mixed conducting system

2 electrolyte phase in mixed conducting system

f faradaic

G Gerischer

M metal support

W Warburg

Superscripts

0 reference value

Overline

∼ time-dependent part of quantity

∧ unit vector

Others

L Laplace transform

Page 76: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

REFERENCES 70

References

[1] United Nations. Department of economic and social affairs, 1999.

[2] International Energy Agency (IEA). World energy outlook (2007). Available from: http:

//www.worldenergyoutlook.org/media/weowebsite/2008-1994/weo_2007.pdf, accessed

December 12, 2013.

[3] Holger Rogner, Dadi Zhou, Rick Bradley, Philippe Crabbé, Ottmar Edenhofer, Bill Hare, Lambert

Kuijpers, and Mitsutsune Yamaguchi. Introduction in climate change 2007: Mitigation. contri-

bution of working group iii to the fourth assessment report of the intergovernmental panel on

climate change. Available from: http://www.ipcc.ch/pdf/assessment-report/ar4/wg3/

ar4-wg3-chapter1.pdf, accessed December 9, 2013.

[4] Morten Tjelta. Electrochemical and photoelectrochemical characterization of porous semicon-

ducting electrodes. PhD thesis, Norwegian University of Science and Technology (NTNU), 2013.

[5] Hamnett Andrew Hamann, Carl H. and Wolf Vielstich. Electrochemistry, 2nd Ed. Wiley-VCH,

1985.

[6] Martin A. Green. Solar cells: Operating Principles, Technology and System Applications. The

University of New South Wales, 1982.

[7] Md K. Nazeeruddin, Etienne Baranoff, and Michael Graetzel. Dye-sensitized solar cells: A brief

overview. Sol. Energy, 85(6):1172–1178, 2011.

[8] G. H. Aylward and T. J. V. Findlay. SI Chemical Data. 6th Ed. Wiley, 2008.

[9] John S. Newman. Electrochemical Systems. Prentice-Hall International Series in the Physical and

Chemical Engineering Sciences, 1973.

[10] Evgenij Barsoukov and Ross MacDonald. Impedance Spectroscopy: Theory, Experiment, and Ap-

plications, 2nd Edition. Wiley, 2005.

[11] R. Kern, R. Sastrawan, J. Ferber, R. Stangl, and J. Luther. Modeling and interpretation of electrical

impedance spectra of dye solar cells operated under open-circuit conditions. Electrochim. Acta,

47(26):4213–4225, 2002.

[12] B. A. Boukamp, M. Verbraeken, D. H. A. Blank, and P. Holtappels. SOFC anodes - proof for a

finite-length type gerischer impedance? Solid State Ionics, 177(26-32):2539–2541, 2006.

Page 77: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

REFERENCES 71

[13] Svein Sunde, Ingrid Anne Lervik, Lars-Erik Owe, and Mikhail Tsypkin. An impedance model for a

porous intercalation electrode with mixed conductivity. J. Electrochem. Soc., 156(8):B927–B937,

2009.

[14] Karl Rottmann. Matematisk formelsamling. Spektrum forlag, 2003.

[15] S. H. Glarum and J. H. Marshall. The a-c response of iridium oxide films. J. Electrochem. Soc.,

127(7):1467–74, 1980.

[16] C. Ho, I. D. Raistrick, and R. A. Huggins. Application of a-c techniques to the study of lithium

diffusion in tungsten trioxide thin films. J. Electrochem. Soc., 127(2):343–50, 1980.

[17] Donald R. Franceschetti and J. Ross Macdonald. Small-signal a-c response theory for elec-

trochromic thin films. J. Electrochem. Soc., 129(8):1754–6, 1982.

[18] Bernard A. Boukamp and Henny J. M. Bouwmeester. Interpretation of the gerischer impedance

in solid state ionics. Solid State Ionics, 157(1-4):29–33, 2003.

[19] Sven Soedergren, Anders Hagfeldt, Joergen Olsson, and Sten-Eric Lindquist. Theoretical models

for the action spectrum and the current-voltage characteristics of microporous semiconductor

films in photoelectrochemical cells. J. Phys. Chem., 98(21):5552–6, 1994.

[20] M. A. Vorotyntsev, L. I. Daikhin, and M. D. Levi. Modeling the impedance properties of electrodes

coated with electroactive polymer films. J. Electroanal. Chem., 364(1-2):37–49, 1994.

[21] C. Criado, P. Galan-Montenegro, P. Velasquez, and J. R. Ramos-Barrado. Diffusion with general

boundary conditions in electrochemical systems. J. Electroanal. Chem., 488(1):59–63, 2000.

[22] Philippe Sistat, Anton Kozmai, Natalia Pismenskaya, Christian Larchet, Gerald Pourcelly, and

Victor Nikonenko. Low-frequency impedance of an ion-exchange membrane system. Elec-

trochim. Acta, 53(22):6380–6390, 2008.

[23] E. Volodina, N. Pismenskaya, V. Nikonenko, C. Larchet, and G. Pourcelly. Ion transfer across ion-

exchange membranes with homogeneous and heterogeneous surfaces. J. Colloid Interface Sci.,

285(1):247–258, 2005.

[24] Rajesh Kumar and Rama Kant. Theory of generalized gerischer admittance of realistic fractal

electrode. J. Phys. Chem. C, 113(45):19558–19567, 2009.

[25] G. Pudmich, B. A. Boukamp, M. Gonzalez-Cuenca, W. Jungen, W. Zipprich, and F. Tietz.

Chromite/titanate based perovskites for application as anodes in solid oxide fuel cells. Solid

State Ionics, 135(1-4):433–438, 2000.

Page 78: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

REFERENCES 72

[26] Klaus Schittkowski. Numerical Data Fitting in Dynamical Systems: A Practical Introduction with

Applications and Software (Applied Optimization). Kluwer Academic Publishers, 2002.

Page 79: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix A 73

A Proof that the impedance can be derived by setting s = jω in the Laplace-

transform t-space equations

Laplace-transform:

L

f (t )

(s) =∫ ∞

0f (t )exp(−st )d t = F (s) (A.1)

where s =σ+ jω ( j =p−1). Inverse transform:

−1L

f (s)

= 1

∫ γ+ j∞

γ− j∞f (s)exp(st )d s = f (t ) (A.2)

Some simple rules and examples:

L t = 1

s2 (A.3)

L t 2 = 2

s2 (A.4)

L sinβt = β

s2 +β2 (A.5)

Applications in differential equations: Transform problem, solve transformed equations algebraically,

and then transform back.

For complex equations, the back-transformation is usually quite difficult, and only limiting forms

can (at best) be found. Numerical inversion is possible, but unstable. Some algorithms exist, see e. g.

Schittkowski [26].

Response to a harmonic driving signal

u(t ) = u0 sinωt : t > 0

0 : t < 0(A.6)

Driving signal:

u(s) = u0ω

s2 +ω2 (A.7)

Response when the transfer function is h(s):

y(s) = h(s)u0ω

s2 +ω2 (A.8)

In t-space

y(t ) = −1L

y(s)

= 1

2π j

∫ γ+ j∞

γ− j∞h(s)

u0ω

s2 +ω2 exp(st )d s (A.9)

Page 80: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix A 74

Residue theorem: ∮C

f (z) = 2π jN∑

k=1Res fz=zk (z) (A.10)

If simple poles only:

Res fz=zk (z) = limξ→z0

(z − z0) f (z) (A.11)

If the transfer function h(s) has N poles ( uoωs2+ω2 = u0ω

(s+ jω2)(s− jω2) ) has two poles in s =± jω

y(t ) = 1

∫ γ+ j∞

γ− j∞h(s)

u0ω

s2 +ω2 exp(st )d s

= h( jω)u0ωe jωt

2 jω+ h(− jω)u0ωe jωt

−2 jωN∑

k=1

(s − sk )h(s)u0ωe st

s2 +ω2

(A.12)

If we are primarily interested in the steady-state response, then we inspect the expression in Eq. (A.12)

when t →∞

• If all the poles are in the left half of the complex plane, Re(sk ) < 0, and the last term (the sum)

dies out exponentially.

• If there are any poles in the right half-plane, the system is unstable and will not be interesting

from an impedance point of view anyway.

• We therefore assume that h(s) only has poles in the left half-plane.

limt→∞ y(t ) = u0

[h( jω)

e jωt

2 j−h(− jω)

e− jωt

2 j

](A.13)

Setting (physical systems always have poles symmetrically about the real axis):

h( jω) = ∣∣h( jω)∣∣eφ(− jω) = ∣∣h( jω)

∣∣e−φ (A.14)

we get

limt→∞ y(t ) = u0

∣∣h( jω)∣∣sin(ω+φ) (A.15)

The steady-state response of the system to a sine stimulus is thus also a sine. The amplitude is scaled

by the absolute value of the transfer function. The phase is shifted by the phase of the transfer func-

tion.

We now assume that u(t ) takes the role of a voltage and y(t ) that of a current (for example). For

electrical and electrochemical systems, the transfer function as written with the argument s = jω is

defined as the admittance of the system:

Page 81: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix A 75

The admittance of an electrochemical system is the ratio of the Laplace-transformed current to the

Laplace-transformed voltage. The impedance is the inverse of the admittance.

Note that we assumed that there is response linearly connected to the stimulus in the definition of

the transfer function. If the experimental arrangement arrangement does not comply with this re-

quirement, the analysis breaks down. In electrochemistry this is usually achieved by applying a small

amplitude.

Page 82: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix B 76

B Full derivation of Warburg impedance

B.1 Warburg infinite diffusion impedance

Diffusion to an electrode in one dimension is given by

∂c(x, t )

∂t= D

∂2c(x, t )

∂x2 (B.1)

where D is the diffusion coefficient and c(x, t ) is the time dependent concentration.

The general solution of The Laplace transformation of a derivative is given by [14]

L

f (n)(t )= sn

L

f− sn−1 f ′(0)−·· ·− f n−1 f (0) (B.2)

where n denotes the n-th derivative of f .

Combination of Eq. (B.1) and (B.2) gives

L

∂c(t )

∂t

= s L c(t )− c(0) =L

D∂2c(t )

∂x2

(B.3)

where c(x, t ) is denoted as c(t ) for simplicity. c(x, t ) can be written as a linear combination c(t ) =c(0)+ c(t ). For the stationary case, Eq. (B.3) becomes

s

=s−1c(0)︷ ︸︸ ︷L c(0)+s L c(t )− c(0) = D

=0︷ ︸︸ ︷L

∂2c(0)

∂2x

+D L

∂2c(t )

∂x2

c(0)+ sc(s)− c(0) = D

∂2c(s)

∂2x

sc(s) = Dd 2c(s)

d x2 (B.4)

where c(s) =L c(t ). This differential equation has the general solution

c(s) = A exp

(√s

Dx

)+B exp

(−

√s

Dx

)(B.5)

Boundary conditions at x = 0 and x →∞ are given by the terms

i (s)

nF= D

dc(s)

d x

∣∣∣∣x=0

(B.6)

limx→∞ c(s) → 0 (B.7)

Page 83: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix B 77

Combination of the general solution in Eq. (B.5) and the boundary condition in Eq. (B.6) gives

i (s)

nF= D

[√s

DA exp

(√s

D0

)−

√s

DB exp

(−

√s

D0

)]i (s)

nF= D

[√s

DA−

√s

DB

]i (s)

nF

1pDs

= A−B (B.8)

The boundary condition at x →∞ results in

limx→∞ c(s) → 0 = A exp

(√s

D∞

)+B

exp(−∞)→0︷ ︸︸ ︷exp

(−

√s

D∞

)0 = A (B.9)

Thus, the constants A and B can be found by combining Eqs. (B.8) and (B.9)

B =− i (s)

nF

1pDs

; A = 0 (B.10)

The expression for c(s) is given from Eqs. (B.5) and (B.10)

c(s) =− i (s)

nF

1pDs

exp

(−

√s

Dx

)(B.11)

The time dependent potential can be found by invoking the linearity condition and expanding

E(t ) = E(0)+ E(t ) (B.12)

s L

dE

dc

= s L

˜E(t )

−E(0)

s

=0︷ ︸︸ ︷L

dE(0)

dc

+s L

dE(t )

dc

= s

=s−1E(0)︷ ︸︸ ︷L E(0)+s L

E(t )

−E(0)

L

dE(t )

dc

= E(s)

dE

dcc(s) = E(s) (B.13)

The Laplace constant is related to the angular frequency by s → jω. The local impedance, Z0, at x = 0

becomes

Z0( jω) = E( jω)

i ( jω)

∣∣∣∣x=0

= dE

dc

c( jω)

i ( jω)=−dE

dc

1

nF

1√D · jω

(B.14)

Page 84: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix B 78

B.2 Warburg transmissive diffusion impedance

Diffusion to an electrode in one dimension is given by

∂c(x, t )

∂t= D

∂2c(x, t )

∂x2 (B.15)

where D is the diffusion coefficient and c(x, t ) is the time dependent concentration.

The general solution of The Laplace transformation of a derivative is given by [14]

L

f (n)(t )= sn

L

f− sn−1 f ′(0)−·· ·− f n−1 f (0) (B.16)

where n denotes the n-th derivative of f .

Combination of Eqs. (B.15) and (B.16) gives

L

∂c(t )

∂t

= s L c(t )− c(0) =L

D∂2c(t )

∂x2

(B.17)

where c(x, t ) is denoted as c(t ) for simplicity. c(x, t ) can be written as a linear combination c(t ) =c(0)+ c(t ). For the stationary case, Eq. (B.17) becomes

s

=s−1c(0)︷ ︸︸ ︷L c(0)+s L c(t )− c(0) = D

=0︷ ︸︸ ︷L

∂2c(0)

∂2x

+D L

∂2c(t )

∂x2

c(0)+ sc(s)− c(0) = D

∂2c(s)

∂2x

sc(s) = Dd 2c(s)

d x2 (B.18)

where c(s) =L c(t ). This differential equation has the general solution

c(s) = A exp

(√s

Dx

)+B exp

(−

√s

Dx

)(B.19)

We assume a blocking electrode with a reflective boundary condition. Boundary conditions at

x = 0 and x = L are given by the terms

i (s)

nF= D

dc(s)

d x

∣∣∣∣x=0

(B.20)

limx→L

c(s) → 0 (B.21)

Page 85: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix B 79

Combination of Eq. (B.19) and boundary condition at x = L from Eq. (B.21) gives

limx→L

c(s) = 0 = A exp

(√s

DL

)+B exp

(−

√s

DL

)

A =−Bexp

(−

√sD L

)exp

(√sD L

) (B.22)

Boundary condition at x = 0 from Eq. (B.20) with the result in Eq. (B.22) gives B

i (s)

nF= D

[√s

DA exp

(√s

D0

)−

√s

DB exp

(−

√s

D0

)]i (s)

nF

1pDs

=−B

exp(−

√sD L

)exp

(√sD L

) +1

i (s)

nF

1pDs

=−B

exp(−

√sD L

)+exp

(√sD L

)exp

(√sD L

)

i (s)

nF

1pDs

=−B

2cosh

(√s

DL

)exp

(√sD L

)

−B = i (s)

nF

1pDs

exp(√

sD L

)2cosh

(√s

DL

) (B.23)

Combination of Eqs. (B.22) and (B.23) gives

A = i (s)

nF

1pDs

exp(√

sD L

)2cosh

(√s

DL

) exp(−

√sD L

)exp

(√sD L

)= i (s)

nF

1pDs

1

2cosh

(√s

DL

) exp

(−

√s

DL

)(B.24)

Thus, the specific solution of Eq. (B.19) at the interface x = 0 for the transmissive boundary conditions

is

c(s) =− i (s)

nF

1pDs

2sinh(√

sD L

)2cosh

(√sD L

) =− i (s)

nF

1pDs

tanh

(√s

D

)(B.25)

The time dependent potential can be found by invoking the linearity condition above, and the trans-

missive Warburg diffusion impedance becomes

ZW,trans( jω) = LE

( jω)

Li

( jω)=−dE

dc

1

nF

1pDs

tanh

√jω

DL

(B.26)

Page 86: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix B 80

B.3 Warburg reflective diffusion impedance

Diffusion to an electrode in one dimension is given by

∂c(x, t )

∂t= D

∂2c(x, t )

∂x2 (B.27)

where D is the diffusion coefficient and c(x, t ) is the time dependent concentration.

The general solution of The Laplace transformation of a derivative is given by [14]

L

f (n)(t )= sn

L

f− sn−1 f ′(0)−·· ·− f n−1 f (0) (B.28)

where n denotes the n-th derivative of f .

Combination of Eqs. (B.27) and (B.28) gives

L

∂c(t )

∂t

= s L c(t )− c(0) =L

D∂2c(t )

∂x2

(B.29)

where c(x, t ) is denoted as c(t ) for simplicity. c(x, t ) can be written as a linear combination c(t ) =c(0)+ c(t ). For the stationary case, Eq. (B.29) becomes

s

=s−1c(0)︷ ︸︸ ︷L c(0)+s L c(t )− c(0) = D

=0︷ ︸︸ ︷L

∂2c(0)

∂2x

+D L

∂2c(t )

∂x2

c(0)+ sc(s)− c(0) = D

∂2c(s)

∂2x

sc(s) = Dd 2c(s)

d x2 (B.30)

where c(s) =L c(t ). This differential equation has the general solution

c(s) = A exp

(√s

Dx

)+B exp

(−

√s

Dx

)(B.31)

We assume a blocking electrode with a reflective boundary condition. Boundary conditions at

x = 0 and x = L are given by the terms

i (s)

nF= D

∂dc(s)

∂x

∣∣∣∣x=0

(B.32)

0 = ∂dc(s)

∂x

∣∣∣∣x=L

(B.33)

Page 87: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix B 81

Combination of Eq. (B.31) and boundary condition at x = L from Eq. (B.33) gives

∂dc(s)

∂x

∣∣∣∣x=L

= 0 =√

s

D

[A exp

(√s

DL

)+B exp

(−

√s

DL

)]

A = Bexp

(−

√sD L

)exp

(√sD L

) (B.34)

Boundary condition at x = 0 from Eq. (B.32) with the result in Eq. (B.34) gives B

i (s)

nF= D

[√s

DA exp

(√s

D0

)−

√s

DB exp

(−

√s

D0

)]i (s)

nF

1pDs

= B

exp(−

√sD L

)exp

(√sD L

) −1

i (s)

nF

1pDs

= B

exp(−

√sD L

)−exp

(√sD L

)exp

(√sD L

)

i (s)

nF

1pDs

= B

−2sinh

(√s

DL

)exp

(√sD L

)

B =− i (s)

nF

1pDs

exp(√

sD L

)2sinh

(√s

DL

) (B.35)

Combination of Eqs. (B.34) and (B.35) gives

A =− i (s)

nF

1pDs

exp(√

sD L

)2sinh

(√s

DL

) exp(−

√sD L

)exp

(√sD L

)=− i (s)

nF

1pDs

1

2sinh

(√s

DL

) exp

(−

√s

DL

)(B.36)

Thus, the specific solution of Eq. (B.31) at the interface x = 0 for the transmissive boundary conditions

is

c(s) =− i (s)

nF

1pDs

2cosh(√

sD L

)2sinh

(√sD L

) =− i (s)

nF

1pDs

coth

(√s

D

)(B.37)

The time dependent potential can be found by invoking the linearity condition above, and the reflec-

tive Warburg diffusion impedance becomes

ZW,refl( jω) = LE

( jω)

Li

( jω)=−dE

dc

1

nF

1√D · jω

coth

√jω

DL

(B.38)

Page 88: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix C 82

C Full derivation of Gerischer impedance

C.1 Transmissive Gerischer impedance

Diffusion to an electrode one dimension is given by

∂c(x, t )

∂t= D

∂2c(x, t )

∂x2 (C.1)

where D is the diffusion coefficient and c(x, t ) is the time dependent concentration.

The general solution of The Laplace transformation of a derivative is given by [14]

L

f (n)(t )= sn

L

f− sn−1 f ′(0)−·· ·− f n−1 f (0) (C.2)

where n denotes the n-th derivative of f .

Combination of Eqs. (C.14) and (C.15) gives

L

∂c(t )

∂t

= s L c(t )− c(0) =L

D∂2c(t )

∂x2

(C.3)

where c(x, t ) is denoted as c(t ) for simplicity. c(x, t ) can be written as a linear combination c(t ) =c(0)+ c(t ). For the stationary case, Eq. (C.16) becomes

s

=s−1c(0)︷ ︸︸ ︷L c(0)+s L c(t )− c(0) = D

=0︷ ︸︸ ︷L

∂2c(0)

∂2x

+D L

∂2c(t )

∂x2

c(0)+ sc(s)− c(0) = D

∂2c(s)

∂2x

sc(s) = Dd 2c(s)

d x2 (C.4)

where c(s) = L c(t ). We introduce a sink term with an effective rate term that includes a non-

faradaic reaction in the bulk, and the modified Laplace transformed diffusion equation becomes

sc(s) = Dd 2c(s)

d x2 −kc(s) (C.5)

This differential equation has the general solution

c(s) = A exp

√s +k

Dx

+B exp

−√

s +k

Dx

(C.6)

We assume a leaking electrode with a transmissive boundary condition. Boundary conditions at

Page 89: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix C 83

x = 0 and x = L are given by the terms

i (s)

nF= D

dc(s)

d x

∣∣∣∣x=0

(C.7)

limx→L

c(s) → 0 (C.8)

Combination of Eq. (C.6) and boundary condition at x = L from Eq. (C.8) gives

limx→L

c(s) = 0 = A exp

√s +k

DL

+B exp

−√

s +k

DL

A =−Bexp

(−

√s+k

D L

)exp

(√s+k

D L

) (C.9)

Boundary condition at x = 0 from Eq. (C.7) with the result in Eq. (C.9) gives B

i (s)

nF= D

√s +k

DA exp

√s +k

D0

−√

s +k

DB exp

−√

s +k

D0

i (s)

nF

1pD(s +k)

=−B

exp

(−

√s+k

D L

)exp

(√s+k

D L

) +1

i (s)

nF

1pD(s +k)

=−B

exp

(−

√s+k

D L

)+exp

(√s+k

D L

)exp

(√s+k

D L

)

i (s)

nF

1pD(s +k)

=−B

2cosh

(√s +k

DL

)

exp

(√s+k

D L

)

−B = i (s)

nF

1pD(s +k)

exp

(√s+k

D L

)2cosh

(√s +k

DL

) (C.10)

Combination of Eqs. (C.9) and (C.10) gives

A = i (s)

nF

1pD(s +k)

exp

(√s+k

D L

)2cosh

(√s +k

DL

) exp

(−

√s+k

D L

)exp

(√s+k

D L

)

Page 90: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix C 84

= i (s)

nF

1pD(s +k)

1

2cosh

(√s +k

DL

) exp

−√

s +k

DL

(C.11)

Thus, the specific solution of Eq. (C.6) at the interface x = 0 for the transmissive boundary conditions

is

c(s) =− i (s)

nF

1pD(s +k)

2sinh

(√s+k

D L

)2cosh

(√s+k

D L

) =− i (s)

nF

1pD(s +k)

tanh

√s +k

D

(C.12)

The time dependent potential can be found by invoking the linearity condition above, and the trans-

missive Gerishcer impedance becomes

ZG ,trans( jω) = LE

( jω)

Li

( jω)=−dE

dc

1

nF

1√D( jω+k)

tanh

√jω+k

DL

(C.13)

Page 91: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix C 85

C.2 Reflective Gerischer impedance

Diffusion to an electrode one dimension is given by

∂c(x, t )

∂t= D

∂2c(x, t )

∂x2 (C.14)

where D is the diffusion coefficient and c(x, t ) is the time dependent concentration.

The general solution of The Laplace transformation of a derivative is given by [14]

L

f (n)(t )= sn

L

f− sn−1 f ′(0)−·· ·− f n−1 f (0) (C.15)

where n denotes the n-th derivative of f .

Combination of Eqs. (C.14) and (C.15) gives

L

∂c(t )

∂t

= s L c(t )− c(0) =L

D∂2c(t )

∂x2

(C.16)

where c(x, t ) is denoted as c(t ) for simplicity. c(x, t ) can be written as a linear combination c(t ) =c(0)+ c(t ). For the stationary case, Eq. (C.16) becomes

s

=s−1c(0)︷ ︸︸ ︷L c(0)+s L c(t )− c(0) = D

=0︷ ︸︸ ︷L

∂2c(0)

∂2x

+D L

∂2c(t )

∂x2

c(0)+ sc(s)− c(0) = D

∂2c(s)

∂2x

sc(s) = Dd 2c(s)

d x2 (C.17)

where c(s) = L c(t ). We introduce a sink term with an effective rate term that includes a non-

faradaic reaction in the bulk, and the modified Laplace transformed diffusion equation becomes

sc(s) = Dd 2c(s)

d x2 −kc(s) (C.18)

This differential equation has the general solution

c(s) = A exp

√s +k

Dx

+B exp

−√

s +k

Dx

(C.19)

We assume a blocking electrode with a reflective boundary condition. Boundary conditions at

Page 92: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix C 86

x = 0 and x = L are given by the terms

i (s)

nF= D

dc(s)

d x

∣∣∣∣x=0

(C.20)

0 = dc(s)

d x

∣∣∣∣x=L

(C.21)

Combination of Eq. (C.19) and boundary condition at x = L from Eq. (C.21) gives

dc(s)

d x

∣∣∣∣x=L

= 0 =√

s +k

D

A exp

√s +k

DL

+B exp

−√

s +k

DL

A = Bexp

(−

√s+k

D L

)exp

(√s+k

D L

) (C.22)

Boundary condition at x = 0 from Eq. (C.20) with the result in Eq. (C.22) gives B

i (s)

nF= D

√s +k

DA exp

√s +k

D0

−√

s +k

DB exp

−√

s +k

D0

i (s)

nF

1pD(s +k)

= B

exp

(−

√s+k

D L

)exp

(√s+k

D L

) −1

i (s)

nF

1pD(s +k)

= B

exp

(−

√s+k

D L

)−exp

(√s+k

D L

)exp

(√s+k

D L

)

i (s)

nF

1pD(s +k)

= B

−2sinh

(√s +k

DL

)

exp

(√s+k

D L

)

B =− i (s)

nF

1pD(s +k)

exp

(√s+k

D L

)2sinh

(√s +k

DL

) (C.23)

Combination of Eqs. (C.22) and (C.23) gives

A =− i (s)

nF

1pD(s +k)

exp

(√s+k

D L

)2sinh

(√s +k

DL

) exp

(−

√s+k

D L

)exp

(√s+k

D L

)

Page 93: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix C 87

=− i (s)

nF

1pD(s +k)

1

2sinh

(√s +k

DL

) exp

−√

s +k

DL

(C.24)

Thus, the specific solution of Eq. (C.19) at the interface x = 0 for the transmissive boundary conditions

is

c(s) =− i (s)

nF

1pD(s +k)

2cosh

(√s+k

D L

)2sinh

(√s+k

D L

) =− i (s)

nF

1pD(s +k)

coth

√s +k

D

(C.25)

The time dependent potential can be found by invoking the linearity condition above, and the reflec-

tive Gerischer impedance becomes

ZG ,refl( jω) = LE

( jω)

Li

( jω)=−dE

dc

1

nF

1√D( jω+k)

coth

√jω+k

DL

(C.26)

Page 94: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix D 88

D Electrochemical impedance for a semiconducting film electrode

D.1 The photoelectrochemical film electrode

The charge balance for the charge-neutral bulk is

n −Nd − (p −Na) = 0 (D.1)

where n, p, Nd , and Na are electron, hole, donor, and acceptor concentrations, respectively.

We introduce the nomenclature

c+ = p −Na (D.2)

c− = n −Nd (D.3)

which gives the charge balance from (2.33) as

z+ν+c++ z−ν−c− = 0 (D.4)

We employ the dilute-solution approximation in which the flux density vector of species i in the film,

N i , is described by

N i =−zi ui F ci∇Φ1 −Di∇ci (D.5)

where zi is the charge number, ui the mobility, ci the concentration, and Di the diffusion coefficient

of species i .

The material balance∂ci

∂t=−∇N i +Ri (D.6)

becomes, by combination of (2.34), (2.35), and (2.36)

∂c+∂t

= z+u+F c+∂2Φ1 +D+∇c+ (D.7)

∂c−∂t

= z−u−F c−∂2Φ1 +D−∇c− (D.8)

From (D.4) with z+ =−z− we get

c+ν+ = c−ν− (D.9)

where ν+ and ν− are the numbers of cations and anions produced by the dissociation of one molecule

of electrolyte, respectively. The concentration of the electrolyte, c, is then defined by

c = c+ν+

= c−ν−

(D.10)

Page 95: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix D 89

Combined with the material balances (D.7) and (D.8) gives

∂c

∂t= z+u+F∇(c∇Φ1)+D+∇2c +R+ (D.11)

∂c

∂t= z−u−F∇(c∇Φ1)+D−∇2c +R− (D.12)

The potential gradient is eliminated by subtracting (D.12) from (D.12)

0 = (z+u+− z−u−)F∇(c∇Φ1)+ (D+−D−)∇2c + (R+−R−) (D.13)

F∇(c∇Φ1) = D−−D+z+u+− z−u−

∇2c + R−−R+z+u+− z−u−

(D.14)

Inserting (D.14) in (D.11) gives

∂c

∂t= z+u+

(D−−D+

z+u+− z−u−∇2c + R−−R+

z+u+− z−u−

)+D+∇2c +R+

∂c

∂t= z+u+D−+ z+u−D+

z+u+− z−u−∇2c + z+u+R−− z+u+R+

z+u+− z−u−+D+∇2c +R+

∂c

∂t= z+u+D−− z+u+D++ (z+u+D+− z−u−D+)

z+u+− z−u−∇2c + z+u+R−− z+u+R++ (z+u+R+− z−u−R+)

z+u+− z−u−∂c

∂t= z+u+D−− z−u−D+

z+u+− z−u−∇2c + z+u+R−− z −−u−R+

z+u+− z−u−∂c

∂t= D∇2c +Rc (D.15)

where

D = z+u+D−− z−u−D+z+u+− z−u−

, Rc = z+u+R−− z−u−R+z+u+− z−u−

(D.16)

A harmonic perturbation is assumed applied in the driving force for intercalation for t > 0. The con-

centration may be written

c = c(r ,0)+ c(r , t ) (D.17)

The Laplace transform of the time derivative can be written as

L

∂c

∂t

= s L c−

=0︷︸︸︷c(0) = s L c = sc(s) (D.18)

Combination of (D.18) and (D.15) gives in an one-dimensional electrode system

sc(s) = D∂2c(s)

∂x2 +LRc

(D.19)

where s → jω.

We introduce sink term corresponding to recombination or trapping, and a source term due to

Page 96: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix D 90

photon absorption. The diffusion equation becomes

sc(s) = D∂2c(s)

∂x2 −kc(s)+L

I0αexp−αx (D.20)

where the rate constant k includes all rate constants and any other pre-factors stemming from lin-

earization of R+ and R−.

The current in the electrolyte is given by

i = F∑

izi Ni (D.21)

Thus, the net flux density is ∑i

Ni = i

F∑

i zi(D.22)

From (D.5) we see that Ni can be found by integration of (D.13). Thus, we get

− i

z+ν+F= (z+u+− z−u−)F c∇Φ1 + (D+−D−)∇c = N+ (D.23)

where Ri from (D.5) cancels with that of (D.13).

We assume an electrode in which electronic species are blocked at the solution interface x = 0

(here holes, h+), and we get the boundary conditions

N+x = 0 =−z+u+Fν+c∂Φ

∂x−D+ν+

∂c

∂x(D.24)

N−x = ix

z−F=−z−u−Fν−c

∂Φ

∂x−D−ν−

∂c

∂x(D.25)

where Ni x is the flux of species i in x-direction.

The flux of negative carriers in the x-direction is related to the faradaic current as

i f =−z−F N−x (D.26)

because a vacancy flux in the x-direction represents oxidation of the oxide. Thus, ix =−i f . We elimi-

nate the potential gradient by subtracting (D.25) from (D.24)

− ix

z−F=−(z+u+Fν+− z−u−Fν−)c

∂Φ

∂x− (D+ν+−D−ν−)

∂c

∂x

− ix

z−F=−F c

∂Φ

∂x(z+u+ν+− z−u−ν−)− (D+ν+−D−ν−)

∂c

∂x

− ix

z−F+ (D+ν+−D−ν−)

∂c

∂x=−F c

∂Φ

∂x(z+u+ν+− z−u−ν−)

Page 97: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix D 91

−F c∂Φ

∂x=

[− ix

z−F+ (D+ν+−D−ν−)

∂c

∂x

](z+u+ν+− z−u−ν−)−1 (D.27)

Insertion of (D.27) into (D.24) gives

0 = z+u+[− ix

z−F+ (D+ν+−D−ν−)

∂c

∂x

](z+u+ν+− z−u−ν−)−D+

∂c

∂x

D+(z+u+ν+− z−u−ν−)∂c

∂x=−z+u+ix

z−F+ z+u+(D+ν+−D−ν−)

∂c

∂x

(D+z+u+ν+−D+z−u−ν−− z+u+D+ν++ z+u+D−ν−)∂c

∂x=−z+u+ix

z−F

(z+u+D−ν−−D+z−u−ν−)∂c

∂x= z+u+

ix

z−ν−F

− ix

z−ν−F= z+u+D−−D+z−u−

z+u+∂c

∂xi f

z−ν−F=−z−u−D+− z+u+D−

z+u+∂c

∂x(D.28)

We introduce the transport number

t+ = 1− t− = z+u+z+u+− z−u−

(D.29)

Thus, (D.28) becomesi f

z−ν−F= D

1− t−∂c

∂x(D.30)

We then do the Laplace transformation

L

i f

z−ν−F

=L

D

1− t−∂c

∂x

Li f

z−ν−F

= D

1− t−∂L c

∂x

∣∣∣∣x=0

(D.31)

For the substrate interface we get similar boundary conditions

N+x = ix

z+F=−z+u+ν+c

∂Φ

∂x−D+ν+

∂c

∂x(D.32)

N−x = 0 =−z−u−Fν−c∂Φ

∂x−D−ν−

∂c

∂x(D.33)

which gives the boundary condition at x = L, by similar approach above, as

Li f

z+ν+F

= D

1− t+∂L c

∂x

∣∣∣∣x=L

(D.34)

Boundary conditions (D.31) and (D.34) are then used to solve the diffusion equation (D.20). This is

Page 98: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix D 92

solved in with the Maple software, with the solution

e

√s+k

D x(L I0DFα2ν+ν−z+z−e−

√s+k

D L −L I0DFα2ν+ν−z+z−e−αL

+Dα2L i f ν+t−z+e−

√s+k

D L −Dα2L i f ν+z+e−

√s+k

D L −Dα2L i f ν−t+z−

+Dα2L i f ν−z−−L i kν+t−z+e−

√s+k

D L −L i f ν+st−z+e−√

s+kD L +L i f kν+z+e−

√s+k

D L

+L i ν+sz+e−√

s+kD L +L i f kν−u−z−+L i f ν−su−z−−L i f kν−z−−L i f ν−sz−

)/

F√

D(s +k)ν+ν−z+z−(Dα2e

√s+k

D L −Dα2e−√

s+kD L −ke−

√s+k

D L − se−√

s+kD

+ke−√

s+kD L + se−

√s+k

D L)

+e−

√s+k

D x(L I0DFα2ν+ν−z+z−e

√s+k

D L −L I0DFα2ν+ν−z+z−e−αL

+Dα2L i f ν+t−z+e

√s+k

D L −Dα2L i f ν+z+e

√s+k

D L −Dα2L i f ν−t+z−

+Dα2L i f ν−z−−L i kν+t−z+e

√s+k

D L −L i f ν+st−z+e

√s+k

D L +L i f kν+z+e

√s+k

D L

+L i ν+sz+e

√s+k

D L +L i f kν−u−z−+L i f ν−su−z−−L i f kν−z−−L i f ν−sz−)/

F

√D(s +k)(Dα2 −k − s)ν+ν−z+z−

(e

√s+k

D L −e−√

s+kD L

)− L I0α2

Dα2 −k − se−αx

To find the appropriate expression, we write this as

L c = numerator 1

denominator 1+ numerator 2

denominator 2− L I0α2

Dα2 −k − se−αx (D.35)

and solve each numerator and denominator individually.

Denominator 1

From the maple solution, denominator 1 in (D.35) is

F√

D(s +k)ν+ν−z+z−(Dα2e

√s+k

D L −Dα2e−√

s+kD L

−ke−√

s+kD L +ke−

√s+k

D L − se−√

s+kD + se−

√s+k

D L)

Rearranging gives

F√

D(s +k)ν+ν−z+z−[

Dα2(e

√s+k

D L −e−√

s+kD L

)−k

(e

√s+k

D L −e−√

s+kD L

)−s

(e

√s+k

D L −e−√

s+kD L

)]

Page 99: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix D 93

By using the definition 2sinh x = ex −e−x we get the denominator

F√

D(s +k)z+z−ν+ν−

2Dα2 sinh

√s +k

DL

−2k sin2sinh

√s +k

DL

−2s sin2sinh

√s +k

DL

2F√

D(s +k)z+z−ν+ν−(Dα2 −k − s)sinh

√s +k

DL

(D.36)

Denominator 2

From the maple solution, denominator 2 in (D.35) is

F√

D(s +k)(Dα2 −k − s)z+z−ν+ν−(e

√s+k

D L −e−√

s+kD L

)

We use the definition of sinh, and get

2F√

D(s +k)z+z−ν+ν−(Dα2 −k − s)sinh

√s +k

DL

(D.37)

Numerators

From (D.36) and (D.37) we see that the denominators are equal. Thus, we get one fraction where

numerator 1 and numerator 2 are added. By using the relation

e

√s+k

x e−√

s+kD L = e

√s+k

D (x−L) (D.38)

and the definition 2cosh x = ex +e−x we get the numerator

2L I0DFα2ν+ν−z+z− cosh

√s +k

D(x −L)

−2L I −0DFe−αLα2ν+ν−z+z− cosh

√s +k

Dx

+2Dα2

L i ν+t−z+ cosh

√s +k

D(x −L)

−2Dα2

L i f ν+z+ cosh

√s +k

D(x −L)

Page 100: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix D 94

−2Dα2L i f ν−t+z− cosh

√s +k

Dx

+2Dα2

L i f ν−z− cosh

√s +k

Dx

−2L i f kν+t−z+ cosh

√s +k

D(x −L)

−2L i f ν+st−z+ cosh

√s +k

D(x −L)

+2L i f kν+z+ cosh

√s +k

D(x −L)

+2L i f ν+sz+ cosh

√s +k

D(x −L)

+i kν−t+z− cosh

√s +k

Dx

+L i f ν−st+z− cosh

√s +k

Dx

−L i f kν−z− cosh

√s +k

Dx

+L i f ν−sz− cosh

√s +k

Dx

Rearranging gives

2cosh

√s +k

D(x −L)

L I0DFα2ν+ν−z+z−+Dα2

L i f ν+t−z+−Dα2L i f

ν+z+−L i f kν+t−z+−L i f st−z++L i f kν+z+

+L i ν+sz+

+2cosh

√s +k

Dx

−L I0DFα2ν+ν−z+z−e−αL −Dα2L i f ν−t+z−

+Dα2L i f ν−z−+L i kν−t+z−+L i f ν−st+z−

−L i f kν−z−−L i f ν−sz−

This can be written as

2A cosh

√s +k

D(x −L)

+2B cosh

√s +k

Dx

(D.39)

and we calculate each constant, A and B , separately.

For constant A, by rearranging, we get

A =L i f ν+z+

(F Dα2 L I0ν−z−

L i f +Dα2t−−Dα2 −kt−− st−+k + s

)(D.40)

Page 101: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix D 95

For constant A, by rearranging, we get

B =L i f ν−z−

(−F Dα2 L I0ν+z+

L i f e−αL −Dα2t++Dα2 +kt++ st+−k − s

)(D.41)

Solution of diffusion equation

From these expressions we see that (D.35) can be written as

L c =2A cosh

(√s+k

D (x −L)

)denominator

+2B cosh

(√s+k

D x

)denominator

− L I0α2

Dα2 −k − se−αx (D.42)

which gives the result

L c =L i f ν+z+

(F Dα2 L I0ν−z−

L i f +Dα2t−−Dα2 −kt−− st−+k + s

)cosh

(√s+k

D (x −L)

)Fp

D(s +k)z+z−ν+ν−(Dα2 −k − s)sinh

(√s+k

D L

)

+L i f ν−z−

(−F Dα2 L I0ν+z+

L i f e−αL −Dα2t++Dα2 +kt++ st+−k − s

)cosh

(√s+k

D x

)Fp

D(s +k)z+z−ν+ν−(Dα2 −k − s)sinh

(√s+k

D L

)− L I0α2

Dα2 −k − se−αx

L c =−L i f cosh

(√s+k

D (x −L)

)Fp

D(s +k)sinh

(√s+k

D L

)−F Dα2 L I0ν−z−

L i f −Dα2t−+Dα2 +kt−+ st−−k − s

(Dα2 −k − s)z−ν−

−L i f cosh

(√s+k

D x

)Fp

D(s +k)sinh

(√s+k

D L

) F Dα2 L I0ν+z+e−αL

L i f +Dα2t+−Dα2 −kt+− st++k + s

(Dα2 −k − s)z+ν+

− L I0α2

Dα2 −k − se−αx

L c =− L i f

Fp

D(s +k)sinh

(√s+k

D L

) (1− t−z−ν−

− F Dα2 L I0

L i f (Dα2 −k − s)

)cosh

√s +k

D(x −L)

+ L i f

Fp

D(s +k)sinh

(√s+k

D L

) (1− t+z+ν+

− F D L I0

L i f (Dα2 −k − s)e−αL

)cosh

√s +k

Dx

− L I0α2

Dα2 −k − se−αx

Page 102: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix D 96

L c =− Li f

F

√D( jω+k)sinh

(√jω+k

D L

)

·K1(ω)cosh

√jω+k

D(x −L)

−K2(ω)cosh

√jω+k

Dx

− L

I0

α

Dα2 −k − jωexp(−αx)

(D.43)

where

K1(ω) = 1− t−z−ν−

− F D L

I0α2

Li f

(Dα2 −k − jω)

(D.44)

K2(ω) = 1− t+z+ν+

− F D L

I0α2

Li f

(Dα2 −k − jω)

exp(−αL) (D.45)

D.2 Electrochemical impedance

For the electrochemical impedance we assume that the Laplace transform of the light intensity is

zero. That is

L I0( jω) = 0, I0(x,0) = 0 (D.46)

We assume the faradaic current, i f , to be a function of the proton concentration in the oxide film and

the potential differenceΦ1 −Φ2 as

i f =(∂i f

∂c

)Φ1−Φ2

c(0)+[

∂i f

∂(Φ1 −Φ2)

]c,x=0

[Φ1(0)−Φ2(0)

](D.47)

= A0c(0)+B0[Φ1(0)−Φ2(0)

](D.48)

where

A0 =(∂i f

∂c

)Φ1−Φ2

, B0 =[

∂i f

∂(Φ1 −Φ2)

]c,x=0

(D.49)

The Laplace transform of i f is thus

L i f = A0 L c(0)+B0 L Φ1(0)−Φ2(0) (D.50)

The local admittance at the solution interface, Y0, at x = 0 is given by the expression

Y0 =L i f

L Φ1(0)−Φ2(0)(D.51)

Page 103: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix D 97

The Laplace transform of the current can be found by using the result in Eq. (2.58)

L c(0) =− L i f

Fp

D(s +k)sinh(

s+kD L

) ·K1(ω)cosh

√s +k

DL

−K2(ω)cosh(0)

where we have used that cosh(−x) = cosh(x). Inserting K1(ω) and K2(ω) gives

L c(0) =− L i f

Fp

D(s +k)sinh

(√s+k

D L

)1− t−

z−ν−cosh

√s +k

DL

− 1− t+z+ν+

(D.52)

which combined with (D.48) gives

L c(0)

Z ′D

= A0 L c(0)+B0 L Φ1(0)−Φ2(0)

L c(0) = B0 L Φ1(0)−Φ2(0)1

1Z ′

D− A0

(D.53)

where

Z ′D =− 1

Fp

D(s +k)sinh

(√s+k

D L

)1− t−

z−ν−cosh

√s +k

DL

− 1− t+z+ν+

(D.54)

Combination of (D.50) and (D.53) gives

L i f = A0

B0 L Φ1(0)−Φ2(0)1

1Z ′

D− A0

+B0 L Φ1(0)−Φ2(0)

= B0 L Φ1(0)−Φ2(0)

1(1

Z ′D− A0

)1

A0

+1

= B0 L Φ1(0)−Φ2(0)

11−Z ′

D A0

Z ′D A0

+1

= B0 L Φ1(0)−Φ2(0)

(Z ′

D A0

1−Z ′D A0

+ 1−Z ′D A0

1−Z ′D A0

)= B0 L Φ1(0)−Φ2(0)

(1

1− A0Z ′D

)(D.55)

Thus, (D.51) becomes

Y0 =B0 L Φ1(0)−Φ2(0) 1

1−A0 Z ′D

L Φ1(0)−Φ2(0)= B0

1− A0Z ′D

(D.56)

Page 104: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix D 98

The local admittance at the metal-oxide interface, YL at x = L is given by the expression

YL = L i f

L ΦM (L)−Φ1(L)(D.57)

where ΦM (L) is the potential at the metal, and i f at x = L is given by

i f =(∂i f

∂c

)ΦM−Φ1

c(L)+[

∂i f

∂(ΦM −Φ1)

]c,x=L

[ΦM (L)−Φ1(L)

](D.58)

= AL c(L)+BL[ΦM (L)−Φ1(L)

](D.59)

where

AL =(∂i f

∂c

)ΦM−Φ1

, BL =[

∂i f

∂(ΦM −Φ1)

]c,x=L

(D.60)

The Laplace transform of i f is thus

L i f = AL L c(L)+BL L ΦM (L)−Φ1(L) (D.61)

We use the result in Eq. (2.58) at x = L to find an expression for L i f

L c(L) =− L i f

Fp

D(s +k)sinh

(√s+k

D L

) ·K1(ω)cosh(0)−K2(ω)cosh

√s +k

DL

(D.62)

Inserting K1(ω) and K2(ω) gives

L c(L) =− L i f

Fp

D(s +k)sinh

(√s+k

D L

)1− t−

z−ν−− 1− t+

z+ν+cosh

√s +k

DL

(D.63)

which combined with (D.59) gives

L c(L)

Z ′′D

= AL L c(L)+BL L ΦM (L)−Φ1(L)

L c(L) = BL L ΦM (L)−Φ1(L)1

1Z ′′

D− AL

(D.64)

where

Z ′′D =− 1

Fp

D(s +k)sinh

(√s+k

D L

)1− t−

z−ν−− 1− t+

z+ν+cosh

√s +k

DL

(D.65)

Page 105: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix D 99

Combination of (D.61) and (D.64) gives

L i f = AL

BL L ΦM (L)−Φ1(L)1

1Z ′′

D− AL

+BL L ΦM (L)−Φ1(L)

= BL L ΦM (L)−Φ1(L)

1(1

Z ′′D− AL

)1

AL

+1

= BL L ΦM (L)−Φ1(L)

11−Z ′′

D AL

Z ′′D AL

+1

= BL L ΦM (L)−Φ1(L)

(Z ′′

D AL

1−Z ′′D AL

+ 1−Z ′D AL

1−Z ′D AL

)= BL L ΦM (L)−Φ1(L)

(1

1− AL Z ′′D

)(D.66)

Thus, (D.57) becomes

YL =BL L ΦM (L)−Φ1(L) 1

1−AL Z D ′′

L ΦM (L)−Φ1(L)= BL

1− AL Z ′′D

(D.67)

To relate the potential difference L Φ1(0)−Φ2(0) to the potential as measured with respect to a

reference electrode, we assume the iridium oxide system and the speciation given above. We write

the proton-transfer reaction as

HxH*)V′

H +H+(aq) (D.68)

The interface to the electrode support is written as

0*) h·+e ′ (D.69)

We assume (D.69) to be in equilibrium. The electrochemical potentials of electrodes in the connecting

leads, µe is thus

−µe =µh =µ0h +RT ln[c(L)]+FΦ1(L) (D.70)

The measured potential, V , is related to the electrochemical potential in a reference electrode, µrefe as

µe −µrefe =−FV (D.71)

We assume that µrefe can e measured by a reference electrode so that its value is representative of Φ2

at x = 0 plus a constant. The amplitude and phase of the measured electrode potential is thus derived

by taking the time dependent part of the linearized Eq. (D.70)

FV =µrefe +µ0

h +RT ln[c(L)]+FΦ1(L)

Page 106: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix D 100

=−FΦ2(0)+C +µ0h +RT ln[c(L)]+FΦ1(L)

FV = RT

cec(L)+F Φ1(L)−F Φ2(0) (D.72)

where C is a constant as explained above.

The potential Φ1 can be related to the concentration c and the faradaic current i f through

i f

z+ν+F= (z+u+− z−u−)F

(ce∂Φ1

∂x+ c

∂Φ1e

∂x

)+ (D+−D−)

∂c

∂x(D.73)

We expect ce to be independent of the position in the electrode. For zero current we get

0 = (z+u+− z−u−)F

(ce∂Φ1

∂x+ c

∂Φ1e

∂x

)+ (D+−D−)

∂c

∂x

F∂Φ1e

∂x=− D+−D−

z+u+− z−u−∂ lnce

∂x︸ ︷︷ ︸=0

(D.74)

which implies∂Φ1e

∂x= 0 (D.75)

Putting this result into (D.72) and integrating for x = 0 to x = L gives

i f

z+ν+F= (z+u+− z−u−)F

(ce∂Φ1

∂x

)+ (D+−D−)

∂c

∂x

∂Φ1

∂x=− D+−D−

F ce (z+u+− z−u−)

∂c

∂x+ i f

F 2ce (z+u+− z−u−)(z+ν+)

∂Φ1

∂x=− D+−D−

F ce (z+u+− z−u−)

∂c

∂x+ i f

F 2 ∑ci z2

i ui∫ x=L

x=0∂Φ1 =− D+−D−

F ce (z+u+− z−u−)

∫ x=L

x=0∂c − i f

F 2 ∑ci z2

i ui

∫ x=L

x=0∂x

Φ1(L)− Φ1(0) =− D+−D−F ce (z+u+− z−u−)

[c(L)− c(0)]+ i f L

κ

Φ1(L) = Φ1(0)− D+−D−F ce (z+u+− z−u−)

[c(L)− c(0)]+ i f L

κ(D.76)

where κ= F 2 ∑ci z2

i ui .

With the result from (D.76), Eq. E F tilde V 1 becomes

FV = RT

cec(L)+F Φ1(0)− D+−D−

ce (z+u+− z−u−)[c(L)− c(0)]+ F i f L

κ−F Φ2(0)

FV = F Φ1(0)−F Φ2(0)

+[

RT

ce− D+−D−

ce(z+u+− z−u−)

]c(L)+ D+−D−

ce (z+u+− z−u−)c(0)+ F i f L

κ

Page 107: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix D 101

We introduce the Nernst-Einstein relation ,Di = RTui , and get

FV = F Φ1(0)−F Φ2(0)

+[

RT

ce− RTu+−RTu−

ce (z+u+− z−u−)

]c(L)+ D+−D−

ce (z+u+− z−u−)c(0)+ F i f L

κ

FV = F Φ1(0)−F Φ2(0)

+

z+D+︷ ︸︸ ︷

RT (z+u+)−z−D−︷ ︸︸ ︷

RT (z−u−)−D+︷ ︸︸ ︷

RTu++D−︷ ︸︸ ︷

RTu−ce (z+u+− z−u−)

c(L)+ D+−D−ce (z+u+− z−u−)

c(0)+ F i f L

κ

FV = F Φ1(0)−F Φ2(0)

+[

(z+−1)D+− (z−−1)D−ce (z+u+− z−u−)

]c(L)+ D+−D−

ce (z+u+− z−u−)c(0)+ F i f L

κ(D.77)

The faradaic impedance is given by

Z f = L V

L i f (D.78)

We use the expression in (D.77) to find L V

L V =L Φ1(0)−Φ2(0) (D.79)

+ (z+−1)D+− (z−−1)D−F ce (z+u+− z−u−)

L c(L) (D.80)

+ D+−D−F ce (z+u+− z−u−)

L c(0) (D.81)

+ L i f L

κ(D.82)

Eq. (D.79) is found by the local impedance at x = 0, Y0, from Eqs. (D.51) and (D.56)

Y0 =L i f

L Φ1(0)−Φ2(0)

L Φ1(0)−Φ2(0) = L i f

Y0= L i f

B01−A0 Z ′

D

(D.83)

From (D.63) and (D.65) it can be shown that

L c(L) =L i f Z ′′D (D.84)

From (D.52) and (D.54) it can be shown that

L c(0))L i f Z ′D (D.85)

Page 108: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix D 102

Thus, L V becomes

L V = L i f

Y0+ (z+−1)D+− (z−−1)D−

F ce (z+u+− z−u−)L i f Z ′′

D

+ D+−D−F ce (z+u+− z−u−)

L i f Z ′D + L

κL i f

(D.86)

The faradaic impedance becomes

Z f = L V

L i f = 1

Y0+ D+−D−

F ce (z+u+− z−u−)Z ′

D

+ (z+−1)D+− (z−−1)D−F ce (z+u+− z−u−)

Z ′′D + L

κ

= Z0 +ZΦ+ZΩ

(D.87)

where

Z0 = Y −10 (D.88)

ZΩ = L

κ(D.89)

ZΦ = D+−D−F ce (z+u+− z−u−)

Z ′D + (z+−1)D+− (z−−1)D−

F ce (z+u+− z−u−)Z ′′

D (D.90)

Page 109: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix E 103

E Finite difference method

E.1 Coupled, linear, difference equations

The numerical approach described below is given in [9].

In general, a set of n coupled linear, second-order differential equations can be represented as [9]

n∑k=1

ai ,k (x)d 2ck

d x2 +bi ,k (x)dck

d x+di ,k (x)ck = gi (x) (E.1)

where ck (x) are the n unknown functions, i denotes the equation number, and each of the equations

can involve all of the unknowns ck through the sum.

For central difference approximations of the derivatives with a mesh distance h,

d 2ck

d x2 = ck (x j +h)+ ck (x j −h)−2ck (x j )

h2 +O(h2) (E.2)

dck

d x= ck (x j +h)− ck (x j −h)

2h+O(h2) (E.3)

we obtain the difference equations

n∑k=1

Ai ,k ( j )Ck ( j −1)+Bi ,k ( j )Ck ( j )+Di ,kCk ( j +1) =Gi ( j ) (E.4)

where j denotes a certain point number in the mesh, and the coefficients are given by [9]

Ck ( j ) = ck (x) (E.5)

Ai ,k ( j ) = ai ,k (x j )− h

2bi ,k (x j ) (E.6)

Bi ,k ( j ) =−2ai ,k (x j )+h2di ,k (x j ) (E.7)

Di ,k ( j ) = ai ,k (x j )+ h

2bi ,k (x j ) (E.8)

Gi ( j ) = h2gi (x j ) (E.9)

At j = 1, the equations are

n∑k=1

Bi ,k (1)Ck (1)+Di ,k (1)Ck (2)+Xi ,kCk (3) =Gi (1) (E.10)

where the third term at j = 3 has been added to allow the treatment of complex boundary conditions

[9]. General boundary conditions for equation number 1 at x = 0 would read

n∑k=1

pi ,kdck

d x+ei ,k ck = fi (E.11)

Page 110: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix E 104

A forward difference accurate to order h2 has the coefficients in Eq. (E.10)

Xi ,k =−0.5pi ,k , Di ,k (1) = 2pi ,k ,

Bi ,k (1) = hei ,k −1.5pi ,k , Gi (1) = h fi

(E.12)

A central-difference form given in Eq. (E.3) introduces an image point at x = −h, outside the

domain of interest has the coefficients in Eq. (E.10)

Xi ,k =−Bi ,k (1) = pi ,k

2, Di ,k (1) = hei ,k , Gi (1) = h fi (E.13)

For similar reasons, the difference equations at j = jmax are written

n∑k=1

Yi ,kCk ( j −2)+ Ai ,k ( j )Ck ( j −1)+Bi ,k ( j )Ck ( j ) =Gi ( j ) (E.14)

where the coefficients Yi ,k again allow the introduction of complex boundary conditions at x = L.

E.2 Solution of coupled, linear difference equations

For j = 1, we let Ck ( j ) take the form

Ck (1) = ξk (1)+n∑

l=1Ek,l (1)Cl (2)+xk,l Cl (3) (E.15)

Substitution into Eq. (E.10) shows that ξk , Ek,l , and xk,l satisfy the equations [9]

n∑k=1

Bi ,k (1)ξk (1) =Gi (1),

n∑k=1

Bi ,k (1)Ek,l (1) =−Di ,l (1),

n∑k=1

Bi ,k (1)xk,l =−Xi ,l

(E.16)

where Bi ,k can be readily solved.

For the remaining points, except j = jmax, we assume the form of the unknowns Ck

Ck ( j ) = ξk ( j )+n∑

l=1Ek,l ( j )Cl ( j +1) (E.17)

Substitution of Eq. (E.17) into Eq. (E.4) to eliminate first Ck ( j −1) and then Ck ( j ) and setting the

remaining coefficients of each Ck ( j +1) equal to zero yield a set of equations for the determination of

Page 111: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix E 105

ξk and Ek,l

n∑k=1

bi ,k ( j )ξk ( j ) =Gi ( j )−n∑

l=1Ai ,l ( j )ξl ( j −1) (E.18)

n∑k=1

bi ,k ( j )Ek,m( j ) =−Di ,m( j ) (E.19)

where

bi ,k ( j ) = Bi ,k ( j )+n∑

l=1Ai ,l ( j )El ,k ( j −1) (E.20)

and is not to be confused with bi ,k (x) in Eq. (E.1).

Here the Thomas method for tridiagonal matrices has been generalized to the banded matrix

defined by Eqs. (E.4), (E.10) and (E.14). Finally, one has Eq. (E.14) for j = jmax. If Ck ( j − 2) and

Ck ( j −1) are eliminated by means of Eq. (E.17), then the values of Ck ( jmax) can be determined from

the resulting equations

n∑k=1

bi ,k ( j )Ck ( j ) =Gi ( j )−n∑

l=1Yi ,lξl ( j −2)−

n∑l=1

ai ,l ( j )ξl ( j −1), (E.21)

where

ai ,l ( j ) = Ai ,l ( j )+n∑

m=1Yi ,mEm,l ( j −2) (E.22)

bi ,k ( j ) = Bi ,k ( j )+n∑

l=1ai ,l ( j )El ,k ( j −1) (E.23)

Having the values for Ck ( jmax), one is now in a position to determine Ck ( j ) in reverse order in j

from Eq. (E.17) and finally determine Ck (1) from Eq. (E.15).

Since the boundary-value problem involves boundary conditions at both x = 0 and x = L, it is

not possible to start at either end and obtain final values of the unknowns. Instead, one makes two

passes through the domain in opposite directions. Ek,l in Eq. (E.17) allows the effect of the boundary

conditions at x = L to be reflected back through this domain, the effect not being realized until the

back subsitution is carried out [9].

All the steps to solve the coupled, linear difference equations are given above. However, to pro-

gram these steps can be a bit tricky. Newman has given a program code to solve these steps in New-

man’s BAND routine, where you supply the coefficients A, B , D and G and run the program for each

value of j [9].

Page 112: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 106

F Program codes for the Matlab environment

The scripts used to calculate the impedance spectra in this study are given below. The frequency

distribution subroutine, the BAND subroutine, and the MATINV subroutine are required in order to

execute the scripts as written. Including the subroutines in the same folder as the impedance spectra

scripts is recommended, for simplicity.

F.1 Finite difference method

F.1.1 Newman’s BAND subroutine

Newman’s BAND subroutine that is supplied matrix coefficients defined by the differential equations

and boundary conditions to be solved. Calls the subroutine MATINV to invert the matrices. Estab-

lished for the Matlab environment by J. W. Evans and P. Kar at Dept. of Materials Science and Engi-

neering at University of California, Berkley.

% ************************************************************************

% MATLAB version of BAND

% The following is a version of BAND (and MATINV) obtained by

% "translating" the FORTRAN version in Newman.

% ************************************************************************

function [y]=band(J) % i.e. ’J’ = ’I’ from test_band

global A B C D E G X Y NPOINTS N NJ NP1 DETERMINANT

% ************************************************************************

% Case where J negative

% ************************************************************************

if (J-2) < 0 % i.e. image point (I=1) outside boundary (left hand side)

NP1=N+1; % I runs from 1:NPOINTS and NPOINTS = NJ, while N = # eqn

for I=1:N

D(I,2*N+1)=G(I);

for L=1:N

LPN=L+N;

D(I,LPN)=X(I,L);

end

end

% *******************************************************************

Page 113: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 107

% Calling Matinv

% *******************************************************************

matinv(N,2*N+1);

if (DETERMINANT == 0)

sprintf(’DETERMINANT = 0 at J= %6.3f’,J)

return % stod tidligere break

else

for K=1:N

E(K,NP1,1)=D(K,2*N+1);

for L=1:N

E(K,L,1) = -D(K,L);

LPN = L+N;

X(K,L) = -D(K,LPN);

end

end

return

end

end

% ************************************************************************

% Case where J-2 equal to zero (I=2, i.e. first real point)

% ************************************************************************

if((J-2)==0)

for I=1:N

for K=1:N

for L=1:N

D(I,K)=D(I,K)+A(I,L)*X(L,K);

end

end

end

end

% ************************************************************************

% Case where J-2 is greater than zero

% ************************************************************************

if (J-NJ) < 0

Page 114: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 108

for I=1:N

D(I,NP1) = -G(I);

for L=1:N

D(I,NP1)=D(I,NP1)+A(I,L)*E(L,NP1,J-1);

for K=1:N

B(I,K)=B(I,K)+A(I,L)*E(L,K,J-1);

end

end

end

else

for I=1:N

for L=1:N

G(I)=G(I)-Y(I,L)*E(L,NP1,J-2);

for M=1:N

A(I,L)=A(I,L)+Y(I,M)*E(M,L,J-2);

end

end

end

for I=1:N

D(I,NP1) = -G(I);

for L=1:N

D(I,NP1)=D(I,NP1)+A(I,L)*E(L,NP1,J-1);

for K=1:N

B(I,K)=B(I,K)+A(I,L)*E(L,K,J-1);

end

end

end

end

% ***********************************************************************

% Calling Matinv

% ***********************************************************************

matinv(N,NP1);

if DETERMINANT ~= 0

Page 115: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 109

for K=1:N

for M=1:NP1

E(K,M,J) = -D(K,M);

end

end

else

sprintf(’DETERMINANT = 0 at J= %6.3f’,J)

return % stod tidligere break

end

if (J-NJ)<0

return

else

for K = 1:N

C(K,J) = E(K,NP1,J);

end

for JJ = 2:NJ

M = NJ - JJ + 1;

for K=1:N

C(K,M) = E(K,NP1,M);

for L=1:N

C(K,M)=C(K,M)+E(K,L,M)*C(L,M+1);

end

end

end

for L=1:N

for K=1:N

C(K,1) = C(K,1) + X(K,L)*C(L,3);

end

end

end

return

Page 116: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 110

%*********************************************************************

Page 117: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 111

F.1.2 Newman’s matrix inversion subroutine MATINV

Newman’s program code for inverting matrices, used in the BAND subroutine. Established for the

Matlab environment by J. W. Evans and P. Kar at Dept. of Materials Science and Engineering at Uni-

versity of California, Berkley.

function [DETERMINANT] = matinv(N,M)

global A B C D E G X Y NPOINTS NJ DETERMINANT

DETERMINANT=1.0;

for I=1:N

ID(I)=0;

end

for NN=1:N

BMAX = 1.1;

for I=1:N

if(ID(I)~=0)

continue

else

BNEXT = 0;

BTRY = 0;

for J=1:N

if(ID(J)==0)

if(abs(B(I,J)) > BNEXT)

BNEXT=abs(B(I,J));

if(BNEXT > BTRY)

BNEXT = BTRY;

BTRY = abs(B(I,J));

JC = J;

end

end

end

end

end

if(BNEXT < (BMAX*BTRY))

BMAX=BNEXT/BTRY;

IROW=I;

Page 118: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 112

JCOL=JC;

end

end

if(ID(JC)==0)

ID(JCOL)=1;

else

DETERMINANT=0;

return

end

if(JCOL==IROW)

F=1/(B(JCOL,JCOL));

for J=1:N

B(JCOL,J)=B(JCOL,J)*F;

end

for K=1:M

D(JCOL,K)=D(JCOL,K)*F;

end

else

for J=1:N

SAVE=B(IROW,J);

B(IROW,J)=B(JCOL,J);

B(JCOL,J)=SAVE;

end

for K=1:M

SAVE=D(IROW,K);

D(IROW,K)=D(JCOL,K);

D(JCOL,K)=SAVE;

end

end

for I=1:N

if(I ~= JCOL)

F=B(I,JCOL);

for J=1:N

B(I,J)=B(I,J)-F*B(JCOL,J);

Page 119: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 113

end

for K=1:M

D(I,K)=D(I,K)-F*D(JCOL,K);

end

end

end

end

return

Page 120: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 114

F.1.3 Frequency array establisher

Subroutine that establishes a logarithmically distributed frequency array. Established by Professor

Svein Sunde at Department of Materials Science, Norwegian University of Science and Technology.

%**************************************************************************

% *

% Establishes a frequency array *

% *

% Svein Sunde *

% NTNU, Sem Saelands veg 12, NO-7491 Trondheim *

% Ver. 0.9 Jan 24, 2013 *

% *

% *

% *

% References: *

% *

% Uses: *

% *

%**************************************************************************

function [w] = freqs(fmin,fmax,pperd)

wmax = 2*pi*fmax; %maximum value of angular frequency (s-1)

wmin = 2*pi*fmin; %minimum value of angular frequency (s-1)

logwmax = log10(wmax);

logwmin = log10(wmin);

points = (logwmax-logwmin)*pperd;

steplogw = (logwmax-logwmin)/points;

w = zeros(points+1,1);

i = 0;

for logw = logwmax:-steplogw:logwmin;

i = i+1;

w(i) = 10^logw;

Page 121: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 115

end

end

Page 122: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 116

F.2 Warburg impedance

F.2.1 Infinite Warburg diffusion impedance, forward difference

Matlab code to calculate numerically the Warburg infinite diffusion impedance spectrum in Eq. (2.18)

with a forward difference with an accuracy to H 2 for the boundary conditions.

%**************************************************************************

% *

% TMT4500 - Prosjekt *

% *

% Warburg infinite impedance - Forward difference *

% *

% Didrik Smabraten *

% *

% Fall 2013 *

% *

%**************************************************************************

clear all % Clear all variables

close all % Close all plots etc

clc % Clear command window

%**************************************************************************

% Defining simulation parameters

%**************************************************************************

% Table 1 (Sunde et al.)

c0 = 0.025; % mol cm-3

ce = 0.004; % mol cm-3

zp = 1; % -

zn = -1; % -

nup = 1; % -

nun = 1; % -

up = 0.1; % cm2 (Vs)-1

un = 1.7e-8; % cm2 (Vs)-1

Page 123: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 117

i0 = 0.69e-3; % A cm-2

dE = -20.27; % V cm3 mol-1

kappa = 55e-6; % S cm-1

L = 100e-4; % cm

Cd = 10e-6; % F cm-2

T = 352.15; % K

RT = 8.314*T; % J mol-1

F = 96495; % A s mol-1

kb = 8.6173324e-5; % eV K-1

kbT = kb*T; % eV

n =1; % [-]

% Table 2 (Sunde et al.)

B0 = 44.06^-1; % Ohm cm2

A0 = -0.46; % A cm mol-1

sigma = 1.3; % S cm-1

tp = (zp*up)/(zp*up-zn*un); % -

tn = 1-tp; % -

% Calculated

Dp = kbT*up; % cm2 s-1

Dn = kbT*un; % cm2 s-1

diff =(zp*up*Dn-zn*un*Dp)/(zp*up-zn*un); % cm2 s-1

omega = freqs(0.1e-3,100e3,10); % Frequency distributed over log

s = j*omega; % Laplace variable

i = 1; % Lif=1 for simplicity

%**************************************************************************

% Setting up points for BAND subroutine

%**************************************************************************

%*********************

% Points for BAND(J) *

Page 124: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 118

%*********************

global A B C D G X Y N NJ

NPOINTS=input(’Number of steps: ’)+3; % Number of steps

N=1; % Number of equations

NJ=NPOINTS; % Number of points

H=1/(NPOINTS-3); % Step size

%**************************************************************************

% Setting up equations for BAND to solve tilde(c)

%**************************************************************************

for J=1:length(s)

for I=1:NPOINTS

A(1,1) = diff;

B(1,1) = -2*diff-H^2*s(J);

D(1,1) = A(1,1);

G(1) = 0;

if I==1;

X(1,1) = -0.5*diff;

B(1,1) = -1.5*diff;

D(1,1) = 2*diff;

G(1) = H*i/n/F;

end

if I==NPOINTS

Y(1,1) = 0;

B(1,1) = 1;

D(1,1) = 0;

G(1) = 0;

end

band(I)

end

%**************************************************************************

Page 125: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 119

% Numerical solution at x=0

%**************************************************************************

ZWnum(J)=dE*C(1)/i;

%**************************************************************************

% Analytical solution at x=0

%**************************************************************************

ZWan(J)=-dE/n/F/sqrt(diff*s(J));

end

%**************************************************************************

% Plotting solutions

%**************************************************************************

% Nyquist plot

figure(’units’,’normalized’,’outerposition’,[0 0 1 1])

plot(real(ZWan),-imag(ZWan),’-b’,’LineWidth’,1.5)

hold on

plot(real(ZWnum),-imag(ZWnum),’.r’,’MarkerSize’,20)

xlabel(’Re(Z) [\Omega cm^2]’,’FontSize’,12)

ylabel(’-Im(Z) [\Omega cm^2]’,’FontSize’,12)

legend(’Z_f, Analytical’,’Z_f, Numerical’)

title(’Nyquist plot of infinite Warburg impedance’)

axis equal

set(gca,’FontSize’,12)

Page 126: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 120

F.2.2 Infinite Warburg diffusion impedance, central difference

Matlab code to calculate numerically the Warburg infinite diffusion impedance spectrum in Eq. (2.18)

with a central difference with an accuracy to H 2 for the boundary conditions.

%**************************************************************************

% *

% TMT4500 - Prosjekt *

% *

% Warburg infinite impedance - Central difference *

% *

% Didrik Smabraten *

% *

% Fall 2013 *

% *

%**************************************************************************

clear all % Clear all variables

close all % Close all plots etc

clc % Clear command window

%**************************************************************************

% Defining simulation parameters

%**************************************************************************

% Table 1 (Sunde et al.)

c0 = 0.025; % mol cm-3

ce = 0.004; % mol cm-3

zp = 1; % -

zn = -1; % -

nup = 1; % -

nun = 1; % -

up = 0.1; % cm2 (Vs)-1

un = 1.7e-8; % cm2 (Vs)-1

i0 = 0.69e-3; % A cm-2

dE = -20.27; % V cm3 mol-1

Page 127: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 121

kappa = 55e-6; % S cm-1

L = 100e-4; % cm

Cd = 10e-6; % F cm-2

T = 352.15; % K

RT = 8.314*T; % J mol-1

F = 96495; % A s mol-1

kb = 8.6173324e-5; % eV K-1

kbT = kb*T; % eV

n =1; % [-]

% Table 2 (Sunde et al.)

B0 = 44.06^-1; % Ohm cm2

A0 = -0.46; % A cm mol-1

sigma = 1.3; % S cm-1

tp = (zp*up)/(zp*up-zn*un); % -

tn = 1-tp; % -

% Calculated

Dp = kbT*up; % cm2 s-1

Dn = kbT*un; % cm2 s-1

diff =(zp*up*Dn-zn*un*Dp)/(zp*up-zn*un); % cm2 s-1

omega = freqs(0.1e-3,100e3,10); % Frequency distributed over log

s = j*omega; % Laplace variable

i = 1; % Lif=1 for simplicity

%**************************************************************************

% Setting up points for BAND subroutine

%**************************************************************************

%*********************

% Points for BAND(J) *

%*********************

global A B C D G X Y N NJ

Page 128: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 122

NPOINTS=input(’Number of steps: ’)+3; % Number of steps

N=1; % Number of equations

NJ=NPOINTS; % Number of points

H=1/(NPOINTS-3); % Step size

%**************************************************************************

% Setting up equations for BAND to solve tilde(c)

%**************************************************************************

for J=1:length(s)

for I=1:NPOINTS

A(1,1) = diff;

B(1,1) = -2*diff-H^2*s(J);

D(1,1) = A(1,1);

G(1) = 0;

if I==1;

X(1,1) = 1/2*diff;

B(1,1) = -X(1,1);

D(1,1) = 0;

G(1) = H*i/n/F;

end

if I==NPOINTS

Y(1,1) = 0;

B(1,1) = 1;

D(1,1) = 0;

G(1) = 0;

end

band(I)

end

%**************************************************************************

% Numerical solution at x=0

Page 129: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 123

%**************************************************************************

ZWnum(J)=dE*C(2)/i;

%**************************************************************************

% Analytical solution at x=0

%**************************************************************************

ZWan(J)=-dE/n/F/sqrt(diff*s(J));

end

%**************************************************************************

% Plotting solutions

%**************************************************************************

% Nyquist plot

figure(’units’,’normalized’,’outerposition’,[0 0 1 1])

plot(real(ZWan),-imag(ZWan),’-b’,’LineWidth’,1.5)

hold on

plot(real(ZWnum),-imag(ZWnum),’.r’,’MarkerSize’,20)

xlabel(’Re(Z) [\Omega cm^2]’,’FontSize’,12)

ylabel(’-Im(Z) [\Omega cm^2]’,’FontSize’,12)

legend(’Z_f, Analytical’,’Z_f, Numerical’)

title(’Nyquist plot of infinite Warburg diffusion impedance’)

axis equal

set(gca,’FontSize’,12)

Page 130: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 124

F.2.3 Transmissive Warburg diffusion impedance

Matlab code to calculate numerically the transmissive Warburg diffusion impedance spectrum in Eq.

(2.19).

%**************************************************************************

% *

% TMT4500 - Prosjekt *

% *

% Warburg finite impedance - Transmissive boundary *

% - Central difference *

% *

% Didrik Smabraten *

% *

% Fall 2013 *

% *

%**************************************************************************

clear all % Clear all variables

close all % Close all plots etc

clc % Clear command window

%**************************************************************************

% Defining simulation parameters

%**************************************************************************

% Table 1 (Sunde et al.)

c0 = 0.025; % mol cm-3

ce = 0.004; % mol cm-3

zp = 1; % -

zn = -1; % -

nup = 1; % -

nun = 1; % -

up = 0.1; % cm2 (Vs)-1

un = 1.7e-5; % cm2 (Vs)-1

i0 = 0.69e-3; % A cm-2

Page 131: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 125

dE = -20.27; % V cm3 mol-1

kappa = 55e-6; % S cm-1

L = 100e-4; % cm

Cd = 10e-6; % F cm-2

T = 352.15; % K

RT = 8.314*T; % J mol-1

F = 96495; % A s mol-1

kb = 8.6173324e-5; % eV K-1

kbT = kb*T; % eV

n =1; % [-]

% Table 2 (Sunde et al.)

B0 = 44.06^-1; % Ohm cm2

A0 = -0.46; % A cm mol-1

sigma = 1.3; % S cm-1

tp = (zp*up)/(zp*up-zn*un); % -

tn = 1-tp; % -

% Calculated

Dp = kbT*up; % cm2 s-1

Dn = kbT*un; % cm2 s-1

diff =(zp*up*Dn-zn*un*Dp)/(zp*up-zn*un); % cm2 s-1

omega = freqs(0.1e-3,100e3,10); % Frequency distributed over log

s = j*omega; % Laplace variable

i = 1; % Lif=1 for simplicity

%**************************************************************************

% Setting up points for BAND subroutine

%**************************************************************************

%*********************

% Points for BAND(J) *

%*********************

Page 132: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 126

global A B C D G X Y N NJ

NPOINTS=input(’Number of steps: ’)+3; % Number of steps

N=1; % Number of equations

NJ=NPOINTS; % Number of points

H=1/(NPOINTS--3); % Step size

%**************************************************************************

% Setting up equations for BAND to solve tilde(c)

%**************************************************************************

for J=1:length(s)

for I=1:NPOINTS

A(1,1) = diff/L^2;

B(1,1) = -2*diff/L^2-H^2*s(J);

D(1,1) = A(1,1);

G(1) = 0;

if I==1;

X(1,1) = 0.5*diff;

B(1,1) = -X(1,1);

D(1,1) = 0;

G(1) = H*L*i/n/F;

end

if I==NPOINTS

Y(1,1) = 0;

B(1,1) = 1;

D(1,1) = 0;

G(1) = 0;

end

band(I)

end

%**************************************************************************

% Numerical solution at x=0

Page 133: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 127

%**************************************************************************

ZWnum(J)=dE*C(2)/i;

%**************************************************************************

% Analytical solution at x=0

%**************************************************************************

ZWan(J)=-dE/n/F*tanh(L*sqrt(s(J)/diff))/sqrt(s(J)*diff);

end

%**************************************************************************

% Plotting solutions

%**************************************************************************

% Nyquist plot

figure(’units’,’normalized’,’outerposition’,[0 0 1 1])

plot(real(ZWan),-imag(ZWan),’-k’,’LineWidth’,1.5)

hold on

plot(real(ZWnum),-imag(ZWnum),’ob’,’MarkerSize’,10,’LineWidth’,1.5)

xlabel(’Re(Z) [\Omega cm^2]’,’FontSize’,15)

ylabel(’-Im(Z) [\Omega cm^2]’,’FontSize’,15)

legend(’Z_W, Analytical’,...

[’Z_W, Numerical. Steps = ’,num2str(NPOINTS-3)])

%title(’Nyquist plot of finite Gerischer impedance’)

axis equal

for J=[length(s)-10 length(s)-5 length(s)-2]

text(real(ZWan(J)),-imag(ZWan(J)),...

[’\leftarrow \omega = ’,num2str(omega(J))],...

’HorizontalAlignment’,’left’,’FontSize’,15)

end

set(gca,’FontSize’,12)

Page 134: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 128

F.2.4 Reflective Warburg diffusion impedance

Matlab code to calculate numerically the reflective Warburg diffusion impedance spectrum in Eq.

(2.22).

%**************************************************************************

% *

% TMT4500 - Prosjekt *

% *

% Warburg finite impedance - Reflective boundary *

% - Central differenciation *

% *

% Didrik Smabraten *

% *

% Fall 2013 *

% *

%**************************************************************************

clear all % Clear all variables

close all % Close all plots etc

clc % Clear command window

%**************************************************************************

% Defining simulation parameters

%**************************************************************************

% Table 1 (Sunde et al.)

c0 = 0.025; % mol cm-3

ce = 0.004; % mol cm-3

zp = 1; % -

zn = -1; % -

nup = 1; % -

nun = 1; % -

up = 0.1; % cm2 (Vs)-1

un = 1.7e-8; % cm2 (Vs)-1

i0 = 0.69e-3; % A cm-2

Page 135: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 129

dE = -20.27; % V cm3 mol-1

kappa = 55e-6; % S cm-1

L = 100e-4; % cm

Cd = 10e-6; % F cm-2

T = 352.15; % K

RT = 8.314*T; % J mol-1

F = 96495; % A s mol-1

kb = 8.6173324e-5; % eV K-1

kbT = kb*T; % eV

n =1; % [-]

% Table 2 (Sunde et al.)

B0 = 44.06^-1; % Ohm cm2

A0 = -0.46; % A cm mol-1

sigma = 1.3; % S cm-1

tp = (zp*up)/(zp*up-zn*un); % -

tn = 1-tp; % -

% Calculated

Dp = kbT*up; % cm2 s-1

Dn = kbT*un; % cm2 s-1

diff =(zp*up*Dn-zn*un*Dp)/(zp*up-zn*un); % cm2 s-1

omega = freqs(0.1e-3,100e3,10); % Frequency distributed over log

s = j*omega; % Laplace variable

i = 1; % Lif=1 for simplicity

%**************************************************************************

% Setting up points for BAND subroutine

%**************************************************************************

%*********************

% Points for BAND(J) *

%*********************

Page 136: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 130

global A B C D G X Y N NJ

NPOINTS=input(’Number of steps: ’)+3; % Number of steps

N=1; % Number of equations

NJ=NPOINTS; % Number of points

H=1/(NPOINTS-3); % Step size

%**************************************************************************

% Setting up equations for BAND to solve tilde(c)

%**************************************************************************

for J=1:length(s)

for I=1:NPOINTS

A(1,1) = diff;

B(1,1) = -2*diff-H^2*(s(J))*L^2;

D(1,1) = A(1,1);

G(1) = 0;

if I==1;

B(1,1) = -0.5*diff/L;

X(1,1) = -B(1,1);

D(1,1) = 0;

G(1) = H*i/F/n;

end

if I==NPOINTS

B(1,1) = -0.5/L;

Y(1,1) = -B(1,1);

D(1,1) = 0;

G(1) = 0;

end

band(I)

end

%**************************************************************************

Page 137: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 131

% Numerical solution at x=0

%**************************************************************************

ZWnum(J)=dE*C(2)/i;

%**************************************************************************

% Analytical solution at x=0

%**************************************************************************

ZWan(J)=-dE/n/F/sqrt(diff*s(J))*coth(sqrt((s(J))/diff)*L);

end

%**************************************************************************

% Plotting solutions

%**************************************************************************

% Nyquist plot

figure(’units’,’normalized’,’outerposition’,[0 0 1 1])

plot(real(ZWan),-imag(ZWan),’-k’,’LineWidth’,1.5)

hold on

plot(real(ZWnum),-imag(ZWnum),’ob’,’MarkerSize’,10,’LineWidth’,1.5)

xlabel(’Re(Z) [\Omega cm^2]’,’FontSize’,15)

ylabel(’-Im(Z) [\Omega cm^2]’,’FontSize’,15)

legend(’Z_W, Analytical’,...

[’Z_W, Numerical. Steps = ’,num2str(NPOINTS-3)])

%title(’Nyquist plot of finite Gerischer impedance’)

axis equal

for J=[length(s)-10 length(s)-5 length(s)-2]

text(real(ZWan(J)),-imag(ZWan(J)),...

[’\leftarrow \omega = ’,num2str(omega(J))],...

’HorizontalAlignment’,’left’,’FontSize’,15)

end

set(gca,’FontSize’,15)

Page 138: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 132

F.3 Gerischer impedance

F.3.1 Transmissive Gerischer impedance

Matlab code to calculate numerically the transmissive Gerischer impedance spectrum in Eq. (2.29).

%**************************************************************************

% *

% TMT4500 - Prosjekt *

% *

% Finite Gerischer impedance - Transmissive boundary *

% - Central difference *

% *

% Didrik Smabraten *

% *

% Fall 2013 *

% *

%**************************************************************************

clear all % Clear all variables

close all % Close all plots etc

clc % Clear command window

%**************************************************************************

% Defining simulation parameters

%**************************************************************************

% Table 1 (Sunde et al.)

c0 = 0.025; % mol cm-3

ce = 0.004; % mol cm-3

zp = 1; % -

zn = -1; % -

nup = 1; % -

nun = 1; % -

up = 0.1; % cm2 (Vs)-1

un = 1.7e-8; % cm2 (Vs)-1

Page 139: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 133

i0 = 0.69e-3; % A cm-2

dE = -20.27; % V cm3 mol-1

k = input(’k=’); % s-1

kappa = 55e-6; % S cm-1

L = 100e-4; % cm

Cd = 10e-6; % F cm-2

T = 352.15; % K

RT = 8.314*T; % J mol-1

F = 96495; % A s mol-1

kb = 8.6173324e-5; % eV K-1

kbT = kb*T; % eV

n =1; % [-]

% Table 2 (Sunde et al.)

B0 = 44.06^-1; % Ohm cm2

A0 = -0.46; % A cm mol-1

sigma = 1.3; % S cm-1

tp = (zp*up)/(zp*up-zn*un); % -

tn = 1-tp; % -

% Calculated

Dp = kbT*up; % cm2 s-1

Dn = kbT*un; % cm2 s-1

diff =(zp*up*Dn-zn*un*Dp)/(zp*up-zn*un); % cm2 s-1

omega = freqs(0.1e-3,100e3,10); % Frequency distributed over log

s = j*omega; % Laplace variable

i = 1; % Lif=1 for simplicity

%**************************************************************************

% Setting up points for BAND subroutine

%**************************************************************************

%*********************

Page 140: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 134

% Points for BAND(J) *

%*********************

global A B C D G X Y N NJ

NPOINTS=input(’Number of steps: ’)+3; % Number of steps

N=1; % Number of equations

NJ=NPOINTS; % Number of points

H=1/(NPOINTS-3); % Step size

%**************************************************************************

% Setting up equations for BAND to solve tilde(c)

%**************************************************************************

for J=1:length(s)

for I=1:NPOINTS

A(1,1) = diff/L^2;

B(1,1) = -2*diff/L^2-H^2*(s(J)+k);

D(1,1) = A(1,1);

G(1) = 0;

if I==1;

B(1,1) = -0.5*diff/L;

X(1,1) = -B(1,1);

D(1,1) = 0;

G(1) = H*i/n/F;

end

if I==NPOINTS

Y(1,1) = 0;

B(1,1) = 1;

D(1,1) = 0;

G(1) = 0;

end

band(I)

end

Page 141: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 135

%**************************************************************************

% Numerical solution at x=0

%**************************************************************************

ZGnum(J)=dE*C(2)/i;

%**************************************************************************

% Analytical solution at x=0

%**************************************************************************

ZGan(J)=-dE*1/n/F/sqrt(diff*(s(J)+k))*tanh(sqrt((s(J)+k)/diff)*L);

end

%**************************************************************************

% Plotting solutions

%**************************************************************************

% Nyquist plot

figure(’units’,’normalized’,’outerposition’,[0 0 1 1])

plot(real(ZGan),-imag(ZGan),’-k’,’LineWidth’,1.5)

hold on

plot(real(ZGnum),-imag(ZGnum),’ob’,’MarkerSize’,10,’LineWidth’,1.5)

xlabel(’Re(Z) [\Omega cm^2]’,’FontSize’,15)

ylabel(’-Im(Z) [\Omega cm^2]’,’FontSize’,15)

legend(’Z_G, Analytical’,...

[’Z_G, Numerical. Steps = ’,num2str(NPOINTS-3)])

title(’Nyquist plot of finite Gerischer impedance’)

axis equal

for J=[length(s)-30 length(s)-25 length(s)-20]

text(real(ZGan(J)),-imag(ZGan(J)),...

[’\leftarrow \omega = ’,num2str(omega(J))],...

’HorizontalAlignment’,’left’,’FontSize’,15)

end

Page 142: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 136

set(gca,’FontSize’,15)

Page 143: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 137

F.3.2 Reflective Gerischer impedance

Matlab code to calculate numerically the reflective Gerischer impedance spectrum in Eq. (2.32).

%**************************************************************************

% *

% TMT4500 - Prosjekt *

% *

% Finite Gerischer impedance - Reflective boundary *

% - Central difference *

% *

% Didrik Småbråten *

% *

% Fall 2013 *

% *

%**************************************************************************

clear all % Clear all variables

close all % Close all plots etc

clc % Clear command window

%**************************************************************************

% Defining simulation parameters

%**************************************************************************

% Table 1 (Sunde et al.)

c0 = 0.025; % mol cm-3

ce = 0.004; % mol cm-3

zp = 1; % -

zn = -1; % -

nup = 1; % -

nun = 1; % -

up = 0.1; % cm2 (Vs)-1

un = 1.7e-8; % cm2 (Vs)-1

i0 = 0.69e-3; % A cm-2

dE = -20.27; % V cm3 mol-1

Page 144: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 138

k = input(’k=’); % s-1

kappa = 55e-6; % S cm-1

L = 100e-4; % cm

Cd = 10e-6; % F cm-2

T = 352.15; % K

RT = 8.314*T; % J mol-1

F = 96495; % A s mol-1

kb = 8.6173324e-5; % eV K-1

kbT = kb*T; % eV

n =1; % [-]

% Table 2 (Sunde et al.)

B0 = 44.06^-1; % Ohm cm2

A0 = -0.46; % A cm mol-1

sigma = 1.3; % S cm-1

tp = (zp*up)/(zp*up-zn*un); % -

tn = 1-tp; % -

% Calculated

Dp = kbT*up; % cm2 s-1

Dn = kbT*un; % cm2 s-1

diff =(zp*up*Dn-zn*un*Dp)/(zp*up-zn*un); % cm2 s-1

omega = freqs(0.1e-3,100e3,10); % Frequency distributed over log

s = j*omega; % Laplace variable

i = 1; % Lif=1 for simplicity

%**************************************************************************

% Setting up points for BAND subroutine

%**************************************************************************

%*********************

% Points for BAND(J) *

%*********************

Page 145: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 139

global A B C D G X Y N NJ

NPOINTS=input(’Number of steps: ’)+3; % Number of steps

N=1; % Number of equations

NJ=NPOINTS; % Number of points

H=1/(NPOINTS-3); % Step size

%**************************************************************************

% Setting up equations for BAND to solve tilde(c)

%**************************************************************************

for J=1:length(s)

for I=1:NPOINTS

A(1,1) = diff;

B(1,1) = -2*diff-H^2*(s(J)+k)*L^2;

D(1,1) = A(1,1);

G(1) = 0;

if I==1;

B(1,1) = -0.5*diff/L;

X(1,1) = -B(1,1);

D(1,1) = 0;

G(1) = H*i/n/F;

end

if I==NPOINTS

B(1,1) = -0.5;

Y(1,1) = -B(1,1);

D(1,1) = 0;

G(1) = 0;

end

band(I)

end

%**************************************************************************

Page 146: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 140

% Numerical solution at x=0

%**************************************************************************

ZGnum(J)=dE*C(2)/i;

%**************************************************************************

% Analytical solution at x=0

%**************************************************************************

ZGan(J)=-dE/n/F/sqrt(diff*(s(J)+k))*coth(sqrt((s(J)+k)/diff)*L);

end

%**************************************************************************

% Plotting solutions

%**************************************************************************

% Nyquist plot

figure(’units’,’normalized’,’outerposition’,[0 0 1 1])

plot(real(ZGan),-imag(ZGan),’-k’,’LineWidth’,1.5)

hold on

plot(real(ZGnum),-imag(ZGnum),’ob’,’MarkerSize’,10,’LineWidth’,1.5)

xlabel(’Re(Z) [\Omega cm^2]’,’FontSize’,15)

ylabel(’-Im(Z) [\Omega cm^2]’,’FontSize’,15)

legend(’Z_G, Analytical’,...

[’Z_G, Numerical. Steps = ’,num2str(NPOINTS-3)])

title(’Nyquist plot of reflective Gerischer impedance’)

axis equal

for J=[length(s)-30 length(s)-25 length(s)-20]

text(real(ZGan(J)),-imag(ZGan(J)),...

[’\leftarrow \omega = ’,num2str(omega(J))],...

’HorizontalAlignment’,’left’,’FontSize’,15)

end

set(gca,’FontSize’,15)

Page 147: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 141

F.4 Electrochemical impedance

Matlab code to calculate numerically the electrochemical impedance spectrum for a semiconducting

thin film electrode in Eq. (2.75).

%**************************************************************************

% *

% TMT4500 - Prosjekt *

% *

% Electrochemical impedance - Central difference *

% *

% Didrik Smabraten *

% *

% Fall 2013 *

% *

%**************************************************************************

clear all % Clear all variables

close all % Close all open windows

clc % Clear command window

%**************************************************************************

% Defining simulation parameters

%**************************************************************************

% Table 1 (Sunde et al.)

c0 = 0.025; % mol cm-3

ce = 0.004; % mol cm-3

zp = 1; % -

zn = -1; % -

nup = 1; % -

nun = 1; % -

up = 0.1; % cm2 (Vs)-1

un = 1.7e-8; % cm2 (Vs)-1

i0 = 0.69e-3; % A cm-2

dE = -20.27; % V cm3 mol-1

Page 148: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 142

k = input(’k = ’);

kappa = 55e-6; % S cm-1

L = 100e-4; % cm

Cd = 10e-6; % F cm-2

T = 352.15; % K

RT = 8.314*T; % J mol-1

F = 96495; % A s mol-1

kb = 8.6173324e-5; % eV K-1

kbT = kb*T; % eV

n =1; % [-]

% Table 2 (Sunde et al.)

B0 = 44.06^-1; % Ohm cm2

A0 = -0.46; % A cm mol-1

sigma = 1.3; % S cm-1

tp = (zp*up)/(zp*up-zn*un); % -

tn = 1-tp; % -

% Calculated

Dp = kbT*up; % cm2 s-1

Dn = kbT*un; % cm2 s-1

diff =(zp*up*Dn-zn*un*Dp)/(zp*up-zn*un); % cm2 s-1

omega = freqs(0.1e-3,100e3,10); % Frequency distributed over log

s = j*omega; % Laplace variable

i = 1; % Lif=1 for simplicity

kappa =F^2*ce*(zp*up-zn*un)*(zp*nup);

%**************************************************************************

% Setting up points for BAND subroutine

%**************************************************************************

%*********************

% Points for BAND(J) *

Page 149: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 143

%*********************

global A B C D G X Y N NJ

NPOINTS=input(’Number of steps: ’)+3; % Number of steps

N=1; % Number of equations

NJ=NPOINTS; % Number of points

H=1/(NPOINTS-3); % Step size

%**************************************************************************

% Setting up equations for BAND to solve tilde(c)

%**************************************************************************

for J=1:length(s)

for I=1:NPOINTS

A(1,1) = diff;

B(1,1) = -2*diff-H^2*(s(J)+k)*L^2;

D(1,1) = A(1,1);

G(1) = 0;

if I==1;

B(1,1) = -0.5*diff/L/(1-tn);

X(1,1) = -B(1,1);

D(1,1) = 0;

G(1) = H*i/(zn*nun*F);

end

if I==NPOINTS

B(1,1) = -0.5*diff/L/(1-tp);

Y(1,1) = -B(1,1);

D(1,1) = 0;

G(1) = H*i/(zp*nup*F);

end

band(I)

end

%**************************************************************************

Page 150: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 144

% Numerical solution at x=0

%**************************************************************************

Zfnum(J) = (i-A0*C(2))/B0/i+...

((zp-1)*Dp-(zn-1)*Dn)/(F*i*ce*(zp*up-zn*un))*...

C(NPOINTS-1)+(Dp-Dn)/(F*i*ce*(zp*up-zn*un))*C(2)+L/kappa;

%**************************************************************************

% Analytical solution at x=0

%**************************************************************************

x = 0;

prefactor(J) = -1/(F*sqrt(diff*(s(J)+k))*sinh(sqrt((s(J)+k)/diff)*L));

K1(J) = (1-tn)/(zn*nun);

K2(J) = (1-tp)/(zp*nup);

Can(J) = i*prefactor(J)*(K1(J)*cosh(sqrt((s(J)+k)/diff)*(x-L))-...

K2(J)*cosh(sqrt((s(J)+k)/diff)*x));

ZD(J) = prefactor(J)*((1-tn)/(zn*nun)*cosh(sqrt((s(J)+k)/diff)*L)-...

(1-tp)/(zp*nup));

ZDD(J) = prefactor(J)*((1-tn)/(zn*nun)-...

(1-tp)/(zp*nup)*cosh(sqrt((s(J)+k)/diff)*L));

Z0 (J) = (1-A0*ZD(J))/B0;

Zomega = L/kappa;

Zphi(J) = (Dp-Dn)/(F*ce*(zp*up-zn*un))*ZD(J)-...

((zp-1)*Dp-(zn-1)*Dn)/(F*ce*(zp*up-zn*un))*ZDD(J);

Zfan(J) = Z0(J)+Zomega+Zphi(J);

end

%**************************************************************************

% Plotting solutions

Page 151: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 145

%**************************************************************************

% Nyquist plot

figure(’units’,’normalized’,’outerposition’,[0 0 1 1])

plot(real(Zfan),-imag(Zfan),’-k’,’LineWidth’,1.5)

for J=[length(s)-30 length(s)-25 length(s)-20]

text(real(Zfan(J)),-imag(Zfan(J)),...

[’\leftarrow \omega = ’,num2str(omega(J))],...

’HorizontalAlignment’,’left’,’FontSize’,15)

end

hold on

plot(real(Zfnum),-imag(Zfnum),’ob’,’LineWidth’,1.5,...

’MarkerSize’,10,’MarkerFaceColor’,’auto’)

xlabel(’Re(Z) [\Omega cm^2]’,’FontSize’,15)

ylabel(’-Im(Z) [\Omega cm^2]’,’FontSize’,15)

legend(’Z_f, Analytical’,’Z_f, Numerical’)

title(’Nyquist plot of electrochemical impedance’)

axis equal

set(gca,’FontSize’,15)

Page 152: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 146

F.5 Photoelectrochemical impedance

F.5.1 Steady state concentration profile

Matlab code to calculate numerically the steady-state concentration profile for a semiconducting thin

film electrode in Eq. (2.78).

%**************************************************************************

% *

% TMT4500 - Prosjekt *

% *

% Steady state concentration- Central difference *

% *

% Didrik Smabraten *

% *

% Fall 2013 *

% *

%**************************************************************************

clear all % Clear all variables

close all % Close all open windows

clc % Clear command window

%**************************************************************************

% Defining simulation parameters

%**************************************************************************

% Table 1 (Sunde et al.)

c0 = 0.025; % mol cm-3

ce = 0.004; % mol cm-3

zp = 1; % -

zn = -1; % -

nup = 1; % -

nun = 1; % -

up = 0.1; % cm2 (Vs)-1

un = 1.7e-8; % cm2 (Vs)-1

Page 153: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 147

i0 = 0.69e-3; % A cm-2

dE = -20.27; % V cm3 mol-1

k = input(’k = ’);

kappa = 55e-6; % S cm-1

L = 100e-4; % cm

Cd = 10e-6; % F cm-2

T = 352.15; % K

RT = 8.314*T; % J mol-1

F = 96495; % A s mol-1

kb = 8.6173324e-5; % eV K-1

kbT = kb*T; % eV

n =1; % [-]

% Table 2 (Sunde et al.)

B0 = 44.06^-1; % Ohm cm2

A0 = -0.46; % A cm mol-1

sigma = 1.3; % S cm-1

tp = (zp*up)/(zp*up-zn*un); % -

tn = 1-tp; % -

% Calculated

Dp = kbT*up; % cm2 s-1

Dn = kbT*un; % cm2 s-1

diff =(zp*up*Dn-zn*un*Dp)/(zp*up-zn*un); % cm2 s-1

omega =freqs(0.01e-3,100e3,10); % Frequency distributed over log

s =j*omega; % Laplace variable

i =1; % Lif=1 for simplicity

I0 =[1e3 1 1e-3 1e-5 0]; % mol cm-2 s-1

alpha =0.25e-5; % cm-1

steps=input(’Number of steps: ’);

markerstyles = ’o’,’x’,’*’,’s’,’d’,’v’,’^’,’<’,’>’,’p’,’h’;

Page 154: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 148

linestyles = ’-o’,’-x’,’-*’,’-s’,’-d’,’-v’,’-^’,’-<’,...

’->’,’-p’,’-h’,’:’,’-.’,’--’;

figure(’units’,’normalized’,’outerposition’,[0 0 1 1])

%**************************************************************************

% Setting up points for BAND subroutine

%**************************************************************************

%*********************

% Points for BAND(J) *

%*********************

global A B C D G X Y N NJ

NPOINTS=steps+3; % Number of steps

N=1; % Number of equations

NJ=NPOINTS; % Number of points

H=1/(NPOINTS-3); % Step size

y=-H:H:1+H;

x=y*L;

for K=1:length(I0)

%**************************************************************************

% Setting up equations for BAND to solve tilde(c)

%**************************************************************************

for I=1:NPOINTS

A(1,1) = diff;

B(1,1) = -2*diff-H^2*k*L^2;

D(1,1) = A(1,1);

G(1) = -H^2*alpha*I0(K)*L^2*(exp(-alpha*x(I)));

if I==1;

B(1,1) = -0.5*diff/(1-tn);

Page 155: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 149

X(1,1) = -B(1,1);

D(1,1) = 0;

G(1) = H*i/(zn*nun*F)*L;

end

if I==NPOINTS

B(1,1) = -0.5*diff/(1-tp);

Y(1,1) = -B(1,1);

D(1,1) = 0;

G(1) = H*i/(zp*nup*F)*L;

end

band(I)

end

Cnum(K,:) = C;

%**************************************************************************

% Analytical solution at x=0

%**************************************************************************

prefactor = -1/(F*sqrt(diff*k)*sinh(sqrt(k/diff)*L));

K1 = (1-tn)/(zn*nun)-F*diff*I0(K)*alpha^2/(i*(diff*alpha^2-k));

K2 = (1-tp)/(zp*nup)-F*diff*I0(K)*alpha^2/(i*(diff*alpha^2-k))*...

exp(-alpha*L);

for J=2:length(x)-1

Can(J) = i*prefactor*(K1*cosh(sqrt(k/diff)*(x(J)-L))-...

K2*cosh(sqrt(k/diff)*x(J)))-...

I0(K)*alpha/(diff*alpha^2-k)*exp(-alpha*x(J));

end

%**************************************************************************

% Plotting solutions

Page 156: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 150

%**************************************************************************

figure(1)

plot(x(2:20:NPOINTS-1),Cnum(K,2:20:NPOINTS-1),linestylesK,...

’LineWidth’,1.5,...

’MarkerSize’,10,’MarkerFaceColor’,’auto’)

hold all

legendnameK = [’C_e, numerical. I_0 = ’,num2str(I0(K))];

legend(legendname)

xlabel(’Length [cm]’,’FontSize’,20)

ylabel(’Concentration [mol cm^-3]’,’FontSize’,20)

set(gca,’FontSize’,20)

end

Page 157: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 151

F.5.2 Photoelectrochemical impedance

Matlab code to calculate numerically the photoelectrochemical impedance spectrum for a semicon-

ducting thin film electrode in Eqs. (2.78), (2.83) and (2.70).

%**************************************************************************

% *

% TMT4500 - Prosjekt *

% *

% Photoelectrochemical impedance - Central differenciation *

% *

% Didrik Smabraten *

% *

% Fall 2013 *

% *

%**************************************************************************

clear all % Clear all variables

close all % Close all open windows

clc % Clear command window

%**************************************************************************

% Defining simulation parameters

%**************************************************************************

% Table 1 (Sunde et al.)

c0 = 0.025; % mol cm-3

ce = 0.004; % mol cm-3

zp = 1; % -

zn = -1; % -

nup = 1; % -

nun = 1; % -

up = 0.1; % cm2 (Vs)-1

un = 1.7e-8; % cm2 (Vs)-1

i0 = 0.69e-3; % A cm-2

dE = -20.27; % V cm3 mol-1

Page 158: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 152

k = input(’k = ’);

kappa = 55e-6; % S cm-1

L = 100e-4; % cm

Cd = 10e-6; % F cm-2

T = 352.15; % K

RT = 8.314*T; % J mol-1

F = 96495; % A s mol-1

kb = 8.6173324e-5; % eV K-1

kbT = kb*T; % eV

n =1; % [-]

% Table 2 (Sunde et al.)

B0 = 44.06^-1; % Ohm cm2

A0 = -0.46; % A cm mol-1

sigma = 1.3; % S cm-1

tp = (zp*up)/(zp*up-zn*un); % -

tn = 1-tp; % -

% Calculated

Dp = kbT*up; % cm2 s-1

Dn = kbT*un; % cm2 s-1

diff =(zp*up*Dn-zn*un*Dp)/(zp*up-zn*un); % cm2 s-1

omega =freqs(0.1e-3,100e3,10); % Frequency distributed over log

s =j*omega; % Laplace variable

i =1; % Lif=1, for simplicity

I0 =[1e5 1e3 1 1e-3 1e-5 0]; % mol cm-2 s-1

alpha =0.25e-5; % cm-1

markerstyles = ’o’,’x’,’*’,’s’,’d’,’v’,’^’,’<’,’>’,’p’,’h’;

linestyles = ’-o’,’-x’,’-*’,’-s’,’-d’,’-v’,’-^’,’-<’,...

’->’,’-p’,’-h’,’:’,’-.’,’--’;

steps = input(’Number of steps: ’);

Page 159: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 153

%**************************************************************************

% Creating full screen figures to plot

%**************************************************************************

figure(’units’,’normalized’,’outerposition’,[0 0 1 1])

xlabel(’Re(Z) [\Omega cm^2]’,’FontSize’,15)

ylabel(’-Im(Z) [\Omega cm^2]’,’FontSize’,15)

%**************************************************************************

% Setting up points for BAND subroutine

%**************************************************************************

%*********************

% Points for BAND(J) *

%*********************

global A B C D G X Y N NJ

NPOINTS=steps+3; % Number of steps

N=1; % Number of equations

NJ=NPOINTS; % Number of points

H=1/(NPOINTS-3); % Step size

y=-H:H:1+H;

x=y*L;

%**************************************************************************

% Setting up equations for BAND to solve tilde(c)

%**************************************************************************

for K=1:length(I0)

for J=1:length(s)

Page 160: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 154

%**************************************************************************

% Steady state concentration

%**************************************************************************

for I=1:NPOINTS

A(1,1) = diff;

B(1,1) = -2*diff-H^2*k*L^2;

D(1,1) = A(1,1);

G(1) = -H^2*L^2*alpha*I0(K)*(exp(-alpha*x(I)));

if I==1;

B(1,1) = -0.5*diff/(1-tn);

X(1,1) = -B(1,1);

D(1,1) = 0;

G(1) = H*i/(zn*nun*F)*L;

end

if I==NPOINTS

B(1,1) = -0.5*diff/(1-tp);

Y(1,1) = -B(1,1);

D(1,1) = 0;

G(1) = H*i/(zp*nup*F)*L;

end

band(I)

end

Ce = C;

%**************************************************************************

% Diffusion concentration

%**************************************************************************

for I=1:NPOINTS

A(1,1) = diff;

B(1,1) = -2*diff-H^2*(s(J)+k)*L^2;

D(1,1) = A(1,1);

Page 161: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 155

G(1) = 0;

if I==1;

B(1,1) = -0.5*diff/(1-tn);

X(1,1) = -B(1,1);

D(1,1) = 0;

G(1) = H*i/(zn*nun*F)*L;

end

if I==NPOINTS

B(1,1) = -0.5*diff/(1-tp);

Y(1,1) = -B(1,1);

D(1,1) = 0;

G(1) = H*i/(zp*nup*F)*L;

end

band(I)

end

dCe=gradient(Ce,H);

dC=gradient(C,H);

integrate = 0;

for I = 2:NPOINTS-1

integrate = integrate+...

(-i/(F*Ce(I)*zp*nup*(zp*up-zn*un))*(1-C(I)/Ce(I))+...

(Dp-Dn)/(Ce(I)*(zp*up-zn*un))*...

(dC(I)-C(I)/Ce(I)*dCe(I)))*H/F;

end

Zfnum(K,J) = RT/F/Ce(NPOINTS-1)/i*C(NPOINTS-1)+(i-A0*C(2))/B0/i-...

integrate/i/F;

end

%**************************************************************************

Page 162: Mathematical Modeling of Electrochemical and Photoelectrochemical Impedancefolk.ntnu.no/didrikre/Skole/TMT4500_Didrik_Smabraten.pdf · 2013-12-17 · Mathematical Modeling of Electrochemical

Appendix F 156

% Plotting numerical solution

%**************************************************************************

% Nyquist plot

figure(1)

plot(real(Zfnum(K,:)),-imag(Zfnum(K,:)),linestylesK,’LineWidth’,1.5,...

’MarkerSize’,10,’MarkerFaceColor’,’auto’)

xlabel(’Re(Z) [\Omega cm^2]’,’FontSize’,15)

ylabel(’-Im(Z) [\Omega cm^2]’,’FontSize’,15)

legendinfoK = [’Z_f, numerical. I_0 = ’,num2str(I0(K))];

legend(legendinfo)

title([’Nyquist plot of photoelectrochemical impedance. k = ’,...

num2str(k),’ , steps = ’,num2str(NPOINTS-1)])

axis equal

set(gca,’FontSize’,15)

hold all

end