Description Usage Arguments Value Examples
A wrapper of diff_1D function, returning the mean values of concentration during each time step of the diffusion.
1 | diff_1D_Ct(Lx, Tt, nt, nx, D, C_ini, C_lim)
|
Lx |
Total length of slab in x direction, usually in mm. |
Tt |
Total diffusion time, usually in second. |
nt |
Number of time discretization. |
nx |
Number of dimension x discretization |
D |
Coefficient of diffusion. Must be constant value. |
C_ini |
Initial concentration value inside the slab. |
C_lim |
Boundary condition, written as a vector with one or two elements. If there is only one element, the other side of the slab will be presented as having Neumann boundary condition with flux = 0. If there are two elements, the first element is the dirichlet concentration on the left side, while the second element is the dirichlet concentration on the right side. |
A vector with nt number of elements with the values of mean concentration in the slab for each Ti.
1 2 3 4 5 6 7 8 | Lx <- 5 #Length of slab, in mm
Tt <- 20 #Total measured diffusion time, in seconds
nt <- 100 #Number of time discretization, wherein the Tt will be divided into 100 equal parts (0, 0.2, 0.4, ..., 20)
nx <- 50 #Number of dimension discretization
D <- 0.05 #Coefficient of diffusion in mm^2/s.
C_ini <- 0.05 #Initial concentration inside the slab.
C_lim <- c(0.10,0.25) #Dirichlet boundary concentration diffusing into the slab
meanCt <- diff_1D_Ct(Lx, Tt, nt, nx, D, C_ini, C_lim)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.