Fortran#

FORD documentation

ecx (module)#

Main module for ecx.

ecx__api (module)#

API

Procedures

get_version (function)#

function get_version() -> fptr

Get the version.

Returns:
fptrcharacter(len=:), pointer

Version of the library.

kTe (function)#

pure elemental function kTe(T) -> r

Compute the thermal voltage.

Arguments:
Treal(dp), intent(in)

Temperature in °C.

Returns:
rreal(dp)

Thermal voltage in V.

z (subroutine)#

subroutine z(p, w, zout, e, errstat, errmsg)
Arguments:
preal(dp), intent(in), dimension(:)
wreal(dp), intent(in), dimension(:)

Angular frequencies in rad.s-1

zoutcomplex(dp), intent(out), dimension(:)

Complex impedance in Ohms.

echaracter(len=1), intent(in)

Electrochemical element: R, C, L, Q, O, T, G

errstatinteger(int32), intent(out)

Error status

errmsgcharacter(len=:), intent(out), pointer

Error message

mm (subroutine)#

subroutine mm(p, w, zout, n)
Arguments:
preal(dp), intent(in), dimension(:)

Compute the measurement model.

wreal(dp), intent(in), dimension(:)

Parameters.

zoutcomplex(dp), intent(out), dimension(:)

Angular frequencies in rad.s-1

ninteger(int32), intent(in)

Complex impedance in Ohms.

nernst (function)#

pure function nernst(E0, z, aox, vox, ared, vred, T) -> E

Compute the Nernst electrochemical potential in V.

Arguments:
E0real(dp), intent(in)
zinteger(int32), intent(in)

Standard electrochemical potential in V.

aoxreal(dp), intent(in), dimension(:)

Number of exchanged electrons.

voxreal(dp), intent(in), dimension(:)

Activities of the oxidants.

aredreal(dp), intent(in), dimension(:)

Coefficients for the oxidants.

vredreal(dp), intent(in), dimension(:)

Activities of the reductants

Treal(dp), intent(in)

Coefficients for the reductants.

Returns:
Ereal(dp)

Temperature in °C.

sbv (function)#

pure elemental function sbv(U, OCV, j0, aa, ac, za, zc, A, T) -> I
Arguments:
Ureal(dp), intent(in)

Open Circuit Voltage in V.

OCVreal(dp), intent(in)

Compute Butler Volmer equation without mass transport.

j0real(dp), intent(in)

Electrochemical potential in V.

aareal(dp), intent(in)

Exchange current density in A.cm-2.

acreal(dp), intent(in)

Anodic transfer coefficient.

zareal(dp), intent(in)

Cathodic transfer coefficient.

zcreal(dp), intent(in)

Number of exchnaged electrons in the anodic branch.

Areal(dp), intent(in)

Number of exchnaged electrons in the cathodic branch.

Treal(dp), intent(in)

Area in cm2.

Returns:
Ireal(dp)

Temperature in °C.

bv (function)#

pure elemental function bv(U, OCV, j0, jdla, jdlc, aa, ac, za, zc, A, T) -> I

Compute Butler Volmer equation with mass transport.

Arguments:
Ureal(dp), intent(in)

Open Circuit Voltage in V.

OCVreal(dp), intent(in)
j0real(dp), intent(in)

Electrochemical potential in V.

jdlareal(dp), intent(in)

Exchange current density in A.cm-2.

jdlcreal(dp), intent(in)

Anodic diffusion limiting current density in A.cm-2.

aareal(dp), intent(in)

Cathodic diffusion limiting current density in A.cm-2.

acreal(dp), intent(in)

Anodic transfer coefficient.

zareal(dp), intent(in)

Cathodic transfer coefficient.

zcreal(dp), intent(in)

Number of exchnaged electrons in the anodic branch.

Areal(dp), intent(in)

Number of exchnaged electrons in the cathodic branch.

Treal(dp), intent(in)

Area in cm2.

Returns:
Ireal(dp)

Temperature in °C.

ecx__capi (module)#

Procedures

capi_get_version (function)#

function capi_get_version()bind(c, name="ecx_get_version") -> cptr

C API - Get the version.

Returns:
cptrtype(c_ptr)

capi_nm2eV (subroutine)#

pure subroutine capi_nm2eV(lambda, E, n)bind(C, name="ecx_core_nm2eV")
Arguments:
lambdareal(c_double), intent(in), dimension(n)

Wavelength in nm.

Ereal(c_double), intent(out), dimension(n)

Energy in eV.

ninteger(c_size_t), intent(in), value

Size of lambda and E.

capi_kTe (subroutine)#

pure subroutine capi_kTe(T, kTe_, n)bind(C, name="ecx_core_kTe")
Arguments:
Treal(c_double), intent(in), dimension(n)

Temperature in °C.

kTe_real(c_double), intent(out), dimension(n)

Thermal voltage in V.

ninteger(c_size_t), intent(in), value

Size of T and kTe.

capi_z (subroutine)#

subroutine capi_z(p, w, zout, e, k, n, errstat, errmsg)bind(C, name="ecx_eis_z")
Arguments:
preal(c_double), intent(in), dimension(k)

Parameters.

wreal(c_double), intent(in), dimension(n)

Angular frequencies in rad.s-1

zoutcomplex(c_double_complex), intent(out), dimension(n)

Complex impedance in Ohms.

echaracter(len=1,kind=c_char), intent(in), value

Electrochemical element: R, C, L, Q, O, T, G

kinteger(c_size_t), intent(in), value

Size of p

ninteger(c_size_t), intent(in), value

Size of w

errstatinteger(c_int), intent(out)

Error status

errmsgtype(c_ptr), intent(out)

errmsg Error message

capi_nernst (function)#

pure function capi_nernst(E0, z, aox, vox, nox, ared, vred, nred, T)bind(C, name="ecx_kinetics_nernst") -> E

Compute the Nernst electrochemical potential in V.

Arguments:
E0real(c_double), intent(in), value
zinteger(c_int), intent(in), value

Standard electrochemical potential in V.

aoxreal(c_double), intent(in), dimension(nox)

Number of reductants.

voxreal(c_double), intent(in), dimension(nox)

Activities of the oxidants.

noxinteger(c_size_t), intent(in), value

Number of exchanged electrons.

aredreal(c_double), intent(in), dimension(nred)

Coefficients for the oxidants.

vredreal(c_double), intent(in), dimension(nred)

Activities of the reductants

nredinteger(c_size_t), intent(in), value

Number of oxidants.

Treal(c_double), intent(in), value

Coefficients for the reductants.

Returns:
Ereal(c_double)

Temperature in °C.

capi_sbv (subroutine)#

pure subroutine capi_sbv(U, OCV, j0, aa, ac, za, zc, A, T, I, n)bind(c, name="ecx_kinetics_sbv")

Compute Butler Volmer equation without mass transport.

Arguments:
Ureal(c_double), intent(in), dimension(n)

Open circuit potential in volts.

OCVreal(c_double), intent(in), value

Size of U and I.

j0real(c_double), intent(in), value

Potential in volts.

aareal(c_double), intent(in), value

Exchange current density in A.cm-2.

acreal(c_double), intent(in), value

Anodic transfert coefficient.

zareal(c_double), intent(in), value

Cathodic transfert coefficient.

zcreal(c_double), intent(in), value

Number of exchanged electrons in anodic branch.

Areal(c_double), intent(in), value

Number of exchanged electrons in cathodic branch.

Treal(c_double), intent(in), value

Area in cm2.

Ireal(c_double), intent(out), dimension(n)

Temperature in °C.

ninteger(c_size_t), intent(in), value

capi_bv (subroutine)#

pure subroutine capi_bv(U, OCV, j0, jdla, jdlc, aa, ac, za, zc, A, T, I, n)bind(c, name="ecx_kinetics_bv")

Compute Butler Volmer equation without mass transport.

Arguments:
Ureal(c_double), intent(in), dimension(n)

Open circuit potential in volts.

OCVreal(c_double), intent(in), value

Size of U and I.

j0real(c_double), intent(in), value

Potential in volts.

jdlareal(c_double), intent(in), value

Exchange current density in A.cm-2

jdlcreal(c_double), intent(in), value

Anodic diffusion limiting current density in A.cm-2.

aareal(c_double), intent(in), value

Cathodic diffusion limiting current density in A.cm-2.

acreal(c_double), intent(in), value

Anodic transfert coefficient.

zareal(c_double), intent(in), value

Cathodic transfert coefficient.

zcreal(c_double), intent(in), value

Number of exchanged electrons in anodic branch.

Areal(c_double), intent(in), value

Number of exchanged electrons in cathodic branch.

Treal(c_double), intent(in), value

Area in cm2.

Ireal(c_double), intent(out), dimension(n)

Temperature in °C.

ninteger(c_size_t), intent(in), value