j_anod_jin: j_anod_jin(t, k1, k2, k3, k4, k5, t0 = 0, U0 = 60, d = 0.005)

View source: R/models.R

j_anod_jinR Documentation

j_anod_jin(t, k1, k2, k3, k4, k5, t0 = 0, U0 = 60, d = 0.005)

Description

Theoretical expresion for anodisation current as a function of time. Equation is adopted from publication: R. Jin, et al., A capacitor circuit model for theoretical derivation of anodizing current, Electrochim. Acta (2016), http://dx.doi.org/10.1016/j.electacta.2016.11.066 For detailed description of the model and used parameters check R. Jin publication

Usage

j_anod_jin(t, k1, k2, k3, k4, k5, t0 = 0, U0 = 60, d = 0.005)

Arguments

t

time variable (usualy given in seconds)

k1

model parameter (see R. Jin)

k2

model parameter (see R. Jin)

k3

model parameter (see R. Jin)

k4

model parameter (see R. Jin)

k5

model parameter (see R. Jin)

t0

model parameter (see R. Jin) Starting moment of experiment (voltage switched on)

U0

model parameter (see R. Jin) anodisation voltage

d

model parameter (see R. Jin) distance between electrodes

Value

j(t) for given set of parameters

Author(s)

K. Juraic

Examples

           library(ggplot2)
           k1 <- 55.556
           k2 <- 9.086
           k3 <- 6.5734
           k4 <- 0.047
           k5 <- 5# 6.6772
           t0 <- 0
           U0 <- 60
           d <- 0.005
           t <- 0:900
           j1 <- U0 / k2 * exp(-(t - t0) / k1) / (1 - exp(-(t - t0) / k3))
           j2 <- k4 / sqrt(d) * (U0  * (1 - exp(-(t - t0) / k1)) - k5 * log(t - t0))
           anod_sim <- data.frame(
             t = t,
             struja = j_anod_jin(t = t, t0 = t0, k1 = k1, k2 = k2, k3 = k3, k4 = k4, k5 = k5),
             j1 = j1,
             j2 = j2,
             j_uk = j1 + j2
           )
           head(anod_sim)
           ggplot2::ggplot(data = anod_sim) +
             geom_line(mapping = aes(x = t, y = struja), color = "red") +
             geom_line(data = anod_sim, mapping = aes(x = t, y = j1), color = "blue") +
             geom_line(data = anod_sim, mapping = aes(x = t, y = j2), color = "green") +
             geom_line(data = anod_sim, mapping = aes(x = t, y = j_uk), color = "purple") +
             theme_linedraw(base_size = 20)

kjuraic/rAnod documentation built on Feb. 20, 2023, 12:20 p.m.