-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFigure_07.R
More file actions
63 lines (61 loc) · 1.64 KB
/
Copy pathFigure_07.R
File metadata and controls
63 lines (61 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
## Feldspar irradiation in laboratory
rm(list = ls(all=T))
##load packages and FSF
library("plot3D")
library("FNN")
library("khroma")
library("minpack.lm")
source("Functions_FSFpaper.R")
##set color space for color blind persons
col <- khroma::color("bright")()
##set parameters
rho <- 2e-6 # dimensionless acceptor density
s <- 3e15 # frequency factors in s^-1
D0 <- 538 # D0 in Gy
Ddot <- 0.1 * 3.15576e+10 # high laboratory dose rate = 0.1 Gy/s
dr <- .05 # step in dimensionless distance r'
rprimes <- seq(0.01, 2.2, dr) # values of r'=0-2.2 in steps of dr
irrTimes <- 10 ^ seq(1, 5, by = .2)
##run calculation
distribs <- irradfortimeT(irrTimes, rprimes, rho, s, Ddot, D0)
##plotting
par(mfrow=c(1,2))
matplot(
rprimes,
distribs,
typ = "l",
ylim = c(0, 1.5),
lty = "solid",
col = col,
xlab = "Dimensionless distance r'",
ylab = "Distribution of r'",
main = "(A) Irradiation in lab",
lwd = 1
)
legend("topleft", bty = "n", legend =
expression(paste(t[irr], " =1-10" ^ "6" * " s")))
plot(
irrTimes,
colSums(distribs) * dr,
typ = "p",
lwd = 1,
xlab = "Time [s]",
ylab = "Trap filling ratio n(t)/N",
ylim = c(0, 1),
main = "(B) Trap filling n(t)/N"
)
legend(
"topleft",
bty = "n",
legend = "Analytical Eq.",
lwd = 1,
lty = c(1),
col = col[2]
)
Ddot <- Ddot/3.15576e+10
lines(
x = irrTimes,
y = (1 - exp(-(Ddot * irrTimes) / D0)) * exp(-rho * (log(D0 * s / Ddot) ^ 3.0)),
lwd = 1,
col = col[2]
)