• R/O
  • SSH

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修订版86a4b8d573167ecfa08b73a06cded33d5aae654f (tree)
时间2014-08-07 01:05:18
作者Lorenzo Isella <lorenzo.isella@gmai...>
CommiterLorenzo Isella

Log Message

I also calculate the mobility radius in the free molecular regime.

更改概述

差异

diff -r 6a49efe3f11f -r 86a4b8d57316 R-codes/projected-gamma.R
--- a/R-codes/projected-gamma.R Tue Aug 05 20:58:21 2014 +0200
+++ b/R-codes/projected-gamma.R Wed Aug 06 18:05:18 2014 +0200
@@ -19,7 +19,7 @@
1919 size = 12, hjust = 0.5,
2020 vjust = 0.5, face = 'bold'),
2121 axis.title.x = element_text(size = 20),
22- axis.title.y = element_text(size = 20, angle=90, vjust=.4),
22+ axis.title.y = element_text(size = 20, angle=90, vjust=1),
2323 axis.text.x = element_text(size=15, colour="black", vjust=1),
2424 axis.text.y = element_text(size=15, colour="black", hjust=1),
2525 legend.text = element_text(size = 14, vjust=0.4),
@@ -46,11 +46,23 @@
4646 return(res)
4747 }
4848
49+
50+Rm_over_R <- function(k,f_gamma){
51+
52+res <- sqrt(k-(k-1)*f_gamma)
53+
54+}
55+
56+
4957 ##################################################################
50-glength <- 100
58+glength <- 101
59+
60+k_list <- c(2,4,8, 10, 15, 20, 30, 50 ,100)
61+
5162
5263 N <- 100000
5364
65+############################
5466
5567 gamma_list <- seq(0,2,length=glength)
5668
@@ -79,6 +91,11 @@
7991
8092 names(data) <- c("area", "gamma")
8193
94+write.table(data,"projected-area-sintering.csv",
95+ col.names=TRUE,row.names=FALSE, sep=",")
96+
97+
98+
8299 gpl <- ggplot(data, aes(x=gamma, y=area
83100 )) +
84101
@@ -118,8 +135,82 @@
118135
119136 tools::texi2dvi(fn,pdf=T)
120137
138+############################################
139+#Now some calculations of the mobility radius
121140
122141
142+Rm <- c()
143+gl <- c()
144+kl <- c()
145+
146+f_gamma <- data$area
147+gamma <- data$gamma
148+leng <- length(gamma)
149+
150+for (k in k_list){
151+
152+
153+Rm <-c(Rm, Rm_over_R(k,f_gamma))
154+gl <- c(gl, gamma)
155+kl <- c(kl, rep(k, leng))
156+
157+}
158+
159+data3 <- cbind(Rm,gl,kl)
160+
161+data3 <- as.data.frame(data3)
162+
163+names(data3) <- c("Rm", "gamma", "k")
164+
165+
166+
167+lbls <- levels(data3$k)
168+
169+
170+
171+gpl <- ggplot(data3, aes(x=gamma, y=Rm,
172+ ## colour=variable,
173+ ## ## shape=d
174+ ## ,linetype=variable
175+ )) +
176+
177+facet_wrap( ~ k, nrow = 3, scales = "free_y" )+
178+
179+scale_x_continuous(limits=c(0,2), breaks=seq(0,2)## ,
180+ ## labels=c("$0$", "$\\pi/4$", "$\\pi/2$", "$3/4\\pi$", "$\\pi$
181+## ")
182+ ## ,expand = c(0.01,0.01)
183+ )+
184+
185+
186+
187+my_ggplot_theme(c(0.8, 0.1))+
188+
189+## geom_point(size=4)+
190+geom_line(size=1, color="black") +
191+## geom_point(size=3.6) +
192+
193+ ## theme(legend.text=element_text("ddd"))+
194+
195+## scale_shape_manual("$d$", breaks=lbls, labels=lbls, values=c(1,2,3,4,5)) +
196+## scale_colour_manual("", breaks=lbls, labels=c("$R_g/R_0$ [numerical]", "$R_g/R_0$ [asymptotic]"), values=c(1,2)) +
197+## scale_linetype_manual("", breaks=lbls, labels=c("$R_g/R_0$ [numerical]", "$R_g/R_0$ [asymptotic]"), values=c(1,2))+
198+
199+ ## theme( axis.text.y = element_text(size=15, colour="black", vjust=1))+
200+
201+ xlab("$\\gamma$")+
202+ ylab("$R_m(\\infty)/R$")
203+
204+
205+fn <-'sintering_Rm_free_molecular.tex'
206+
207+tikz(fn, standAlone = TRUE, width=8,height=5)
208+
209+
210+print(gpl)
211+dev.off()
212+
213+tools::texi2dvi(fn,pdf=T)
123214
124215
125216