| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=:), | public, | allocatable, target | :: | errmsg_c | |||
| character(len=:), | public, | allocatable, target | :: | version_c |
C API - Get the version.
Pointer to version string.
Compute the Nernst electrochemical potential in V.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=c_double), | intent(in), | value | :: | E0 |
Standard electrochemical potential in V. |
|
| integer(kind=c_int), | intent(in), | value | :: | z |
Number of exchanged electrons. |
|
| real(kind=c_double), | intent(in) | :: | aox(nox) |
Activities of the oxidants. |
||
| real(kind=c_double), | intent(in) | :: | vox(nox) |
Coefficients for the oxidants. |
||
| integer(kind=c_size_t), | intent(in), | value | :: | nox |
Number of oxidants. |
|
| real(kind=c_double), | intent(in) | :: | ared(nred) |
Activities of the reductants |
||
| real(kind=c_double), | intent(in) | :: | vred(nred) |
Coefficients for the reductants. |
||
| integer(kind=c_size_t), | intent(in), | value | :: | nred |
Number of reductants. |
|
| real(kind=c_double), | intent(in), | value | :: | T |
Temperature in °C. |
Compute Butler Volmer equation without mass transport.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=c_double), | intent(in) | :: | U(n) |
Potential in volts. |
||
| real(kind=c_double), | intent(in), | value | :: | OCV |
Open circuit potential in volts. |
|
| real(kind=c_double), | intent(in), | value | :: | j0 |
Exchange current density in A.cm-2 |
|
| real(kind=c_double), | intent(in), | value | :: | jdla |
Anodic diffusion limiting current density in A.cm-2. |
|
| real(kind=c_double), | intent(in), | value | :: | jdlc |
Cathodic diffusion limiting current density in A.cm-2. |
|
| real(kind=c_double), | intent(in), | value | :: | aa |
Anodic transfert coefficient. |
|
| real(kind=c_double), | intent(in), | value | :: | ac |
Cathodic transfert coefficient. |
|
| real(kind=c_double), | intent(in), | value | :: | za |
Number of exchanged electrons in anodic branch. |
|
| real(kind=c_double), | intent(in), | value | :: | zc |
Number of exchanged electrons in cathodic branch. |
|
| real(kind=c_double), | intent(in), | value | :: | A |
Area in cm2. |
|
| real(kind=c_double), | intent(in), | value | :: | T |
Temperature in °C. |
|
| real(kind=c_double), | intent(out) | :: | I(n) |
Current in A. |
||
| integer(kind=c_size_t), | intent(in), | value | :: | n |
Size of U and I. |
Compute the thermal voltage.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=c_double), | intent(in) | :: | T(n) |
Temperature in °C. |
||
| real(kind=c_double), | intent(out) | :: | kTe_(n) |
Thermal voltage in V. |
||
| integer(kind=c_size_t), | intent(in), | value | :: | n |
Size of T and kTe. |
C API - Convert wavelength to energy
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=c_double), | intent(in) | :: | lambda(n) |
Wavelength in nm. |
||
| real(kind=c_double), | intent(out) | :: | E(n) |
Energy in eV. |
||
| integer(kind=c_size_t), | intent(in), | value | :: | n |
Size of lambda and E. |
Compute Butler Volmer equation without mass transport.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=c_double), | intent(in) | :: | U(n) |
Potential in volts. |
||
| real(kind=c_double), | intent(in), | value | :: | OCV |
Open circuit potential in volts. |
|
| real(kind=c_double), | intent(in), | value | :: | j0 |
Exchange current density in A.cm-2. |
|
| real(kind=c_double), | intent(in), | value | :: | aa |
Anodic transfert coefficient. |
|
| real(kind=c_double), | intent(in), | value | :: | ac |
Cathodic transfert coefficient. |
|
| real(kind=c_double), | intent(in), | value | :: | za |
Number of exchanged electrons in anodic branch. |
|
| real(kind=c_double), | intent(in), | value | :: | zc |
Number of exchanged electrons in cathodic branch. |
|
| real(kind=c_double), | intent(in), | value | :: | A |
Area in cm2. |
|
| real(kind=c_double), | intent(in), | value | :: | T |
Temperature in °C. |
|
| real(kind=c_double), | intent(out) | :: | I(n) |
Current in A. |
||
| integer(kind=c_size_t), | intent(in), | value | :: | n |
Size of U and I. |
Compute the complex impedance for the given element.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=c_double), | intent(in) | :: | p(k) |
Parameters. |
||
| real(kind=c_double), | intent(in) | :: | w(n) |
Angular frequencies in rad.s-1 |
||
| complex(kind=c_double_complex), | intent(out) | :: | zout(n) |
Complex impedance in Ohms. |
||
| character(kind=c_char, len=1), | intent(in), | value | :: | e |
Electrochemical element: R, C, L, Q, O, T, G |
|
| integer(kind=c_size_t), | intent(in), | value | :: | k |
Size of p |
|
| integer(kind=c_size_t), | intent(in), | value | :: | n |
Size of w |
|
| integer(kind=c_int), | intent(out) | :: | errstat |
Error status |
||
| type(c_ptr), | intent(out) | :: | errmsg |
errmsg Error message |