2017 p vs. TDGL 4 Metropolis Monte Carlo equation of continuity s( r, t) t + J( r, t) = 0 (79) J s flux (67) J (79) J( r, t) = k δf δs s( r,

Similar documents
C 2 / 21 1 y = x 1.1 lagrange.c 1 / Laglange / 2 #include <stdio.h> 3 #include <math.h> 4 int main() 5 { 6 float x[10], y[10]; 7 float xx, pn, p; 8 in

1 4 2 EP) (EP) (EP)

PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU

[1] #include<stdio.h> main() { printf("hello, world."); return 0; } (G1) int long int float ± ±

DOPRI5.dvi

C言語によるアルゴリズムとデータ構造

Microarray Data Analysis Tool Ver3.0 Manual.doc


tuat1.dvi

program.dvi

programmingII2019-v01

untitled

P06.ppt

新版明解C言語 実践編


PowerPoint Presentation

第7章 有限要素法のプログラミング

comment.dvi

/* do-while */ #include <stdio.h> #include <math.h> int main(void) double val1, val2, arith_mean, geo_mean; printf( \n ); do printf( ); scanf( %lf, &v

Krylov (b) x k+1 := x k + α k p k (c) r k+1 := r k α k Ap k ( := b Ax k+1 ) (d) β k := r k r k 2 2 (e) : r k 2 / r 0 2 < ε R (f) p k+1 :=

r07.dvi

ohp07.dvi

#6 : ( 8-13) URL : j inoue/index.html : Neugart

実際の株価データを用いたオプション料の計算

j x j j j + 1 l j l j = x j+1 x j, n x n x 1 = n 1 l j j=1 H j j + 1 l j l j E

1 1.1 C 2 1 double a[ ][ ]; 1 3x x3 ( ) malloc() malloc 2 #include <stdio.h> #include

void hash1_init(int *array) int i; for (i = 0; i < HASHSIZE; i++) array[i] = EMPTY; /* i EMPTY */ void hash1_insert(int *array, int n) if (n < 0 n >=

18 C ( ) hello world.c 1 #include <stdio.h> 2 3 main() 4 { 5 printf("hello World\n"); 6 } [ ] [ ] #include <stdio.h> % cc hello_world.c %./a.o

ex01.dvi

: CR (0x0d) LF (0x0a) line separator CR Mac LF UNIX CR+LF MS-DOS WINDOWS Japan Advanced Institute of Science and Technology

I ASCII ( ) NUL 16 DLE SP P p 1 SOH 17 DC1! 1 A Q a q STX 2 18 DC2 " 2 B R b

£Ã¥×¥í¥°¥é¥ß¥ó¥°(2018) - Âè11²ó – ½ÉÂꣲ¤Î²òÀ⡤±é½¬£² –

ex14.dvi

[ 1] 1 Hello World!! 1 #include <s t d i o. h> 2 3 int main ( ) { 4 5 p r i n t f ( H e l l o World!! \ n ) ; 6 7 return 0 ; 8 } 1:

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裵²ó ¨¡ À©¸æ¹½Â¤¡§¾ò·ïʬ´ô ¨¡

6 6.1 sound_wav_files flu00.wav.wav 44.1 khz 1/44100 spwave Text with Time spwave t T = N t N 44.1 khz t = 1 sec j t f j {f 0, f 1, f 2,, f N 1

資料

問 2 ( 型変換 ) 次のプログラムを実行しても正しい結果が得られない 何が間違いかを指摘し 正しく修正せよ ただし int サイズが 2 バイト long サイズが 4 バイトの処理系での演算を仮定する #include <stdio.h> int main( void ) { int a =

p = 1, 2, cos 2n + p)πj = cos 2nπj 2n + p)πj, sin = sin 2nπj 7.1) f j = a ) 0 + a p + a n+p cos 2nπj p=1 p=0 1 + ) b n+p p=0 sin 2nπj 1 2 a 0 +

I. Backus-Naur BNF S + S S * S S x S +, *, x BNF S (parse tree) : * x + x x S * S x + S S S x x (1) * x x * x (2) * + x x x (3) + x * x + x x (4) * *

Bessel ( 06/11/21) Bessel 1 ( ) 1.1 0, 1,..., n n J 0 (x), J 1 (x),..., J n (x) I 0 (x), I 1 (x),..., I n (x) Miller (Miller algorithm) Bess

:30 12:00 I. I VI II. III. IV. a d V. VI

12.2 電気回路網に関するキルヒホッフの法則による解法 2 多元連立 1 次方程式の工学的応用についての例を 2 つ示す.1 つはブリッジ T 型回路, もう 1 つはホーイストンブリッジ回路である. 示された回路図と与えられた回路定数からキルヒホッフの法則を使って多元連立 1 次方程式を導出する

USB ID TA DUET 24:00 DUET XXX -YY.c ( ) XXX -YY.txt() XXX ID 3 YY ID 5 () #define StudentID 231

スライド 1

θ (t) ω cos θ(t) = ( : θ, θ. ( ) ( ) ( 5) l () θ (t) = ω sin θ(t). ω := g l.. () θ (t) θ (t)θ (t) + ω θ (t) sin θ(t) =. [ ] d dt θ (t) ω cos θ(t

double float

DKA ( 1) 1 n i=1 α i c n 1 = 0 ( 1) 2 n i 1 <i 2 α i1 α i2 c n 2 = 0 ( 1) 3 n i 1 <i 2 <i 3 α i1 α i2 α i3 c n 3 = 0. ( 1) n 1 n i 1 <i 2 < <i


1.ppt

ex01.dvi

untitled

pptx

橡Pro PDF

Sample function Re random process Flutter, Galloping, etc. ensemble (mean value) N 1 µ = lim xk( t1) N k = 1 N autocorrelation function N 1 R( t1, t1

¥Ñ¥Ã¥±¡¼¥¸ Rhpc ¤Î¾õ¶·

新・明解C言語 実践編

4/15 No.

C¥×¥í¥°¥é¥ß¥ó¥° ÆþÌç

微分方程式 モデリングとシミュレーション

C

Transcription:

27 p. 47 7 7. vs. TDGL 4 Metropolis Monte Carlo equation of continuity s( r, t) t + J( r, t) = (79) J s flux (67) J (79) J( r, t) = k δf δs s( r, t) t = k δf δs (59) TDGL (8) (8) k s t = [ T s s 3 + ξ s ] (82) 7 4 7. ( 6 2) spatial periodic structure TDGL 2 4 x + 4 4 y + 4 r r : 4r : + 6r : 4r : r t ( x) 4 t 7.2 7 5

27 p. 48 #include <stdio.h> #include <stdlib.h> #define NUM_CELL #define NUM_STEP 8 #define NUM_SAVE 2 double state[num_cell]; void initial( ) int icell; for (icell=;icell<num_cell;icell++) state[icell]=.*(rand( )/(double)rand_max-.5); void data_out(int iout) int icell; char filen[]; FILE *filep; sprintf(filen,"t-./%5.5d.dat",iout); printf("%s\n",filen); filep=fopen(filen,"w"); for (icell=;icell<num_cell;icell++) fprintf(filep,"%7.4f\n",state[icell]); fclose(filep); int main() int istep,icell,icell,icell,iout; double temp,st,st,st; double dstate[num_cell]; double xi=.; double dtime=.5; scanf("%lf",&temp); initial(); istep=; data_out(istep); for (istep=;istep<=num_step;istep++) for (icell=;icell<num_cell;icell++) icell=icell-; if (icell==-) icell=num_cell-; icell=icell+; if (icell==num_cell) icell=; st=state[icell]; dstate[icell] = -temp*st - st*st*st + xi*(state[icell]+state[icell]-2*st); for (icell=;icell<num_cell;icell++) icell=icell-; if (icell==-) icell=num_cell-; icell=icell+; if (icell==num_cell) icell=; state[icell] -= dtime*(dstate[icell]+dstate[icell]-2*dstate[icell]); if (istep%num_save==) data_out(istep); return ; List 7.: TDGL Order Parameter s.4.3.2. -. -.2 T= -. 2 2 2 3 5 8 sqrt(-t) Order Parameter s.5 -.5 T= -. 2 2 2 2 25 3 sqrt(-t) -.3 -.4 2 4 6 8 Spatial Coordinate - 2 4 6 8 Spatial Coordinate 7 4: TDGL

27 p. 49 #include <stdio.h> #include <stdlib.h> #include <math.h> #define NUM_CELL #define NUM_STEP 2 #define NUM_SAVE #define dtime.2 // double state[num_cell][num_cell]; FILE *fplot; void initial() //----------------------------------------- int ic,jc; for (ic=;ic<num_cell;ic++) for (jc=;jc<num_cell;jc++) state[ic][jc]=.*(rand()/(double)rand_max-.5); void data_out(int istep) //------------------------------- int ic,jc; char cfile[]; static int flag=; FILE *filep; sprintf(cfile,"%6.6d.dat",istep); filep=fopen(cfile,"w"); for (ic=;ic<num_cell;ic++) for (jc=;jc<num_cell;jc++) fprintf(filep," %7.4f",state[ic][jc]); fprintf(filep,"\n"); fclose(filep); // gnuplot fprintf(fplot,"splot \ %s\ matrix\n",cfile); if (flag==) fprintf(fplot,"pause -\n"); flag=; else fprintf(fplot,"pause.\n"); int main() //--------------------------------------------- int istep,ic,jc,ic,ic,jc,jc; double temp,st,grad; static double dstate[num_cell][num_cell]; static double ddstate[num_cell][num_cell]; double xi=.; //. printf("input T: "); scanf("%lf",&temp); fplot=fopen("tdgl.plt","w"); // gnuplot (Ver 4.6) fprintf(fplot,"set term windows font \"Arial,2\"\n"); fprintf(fplot,"set size square\n"); fprintf(fplot,"unset surface\n"); fprintf(fplot,"set style data pm3d\n"); fprintf(fplot,"set view map\n"); fprintf(fplot,"set pm3d implicit at b\n"); fprintf(fplot,"set palette rgbformulae 33, 3, \n"); fprintf(fplot,"set key at %3d,%3d\n",NUM_CELL,NUM_CELL+); fprintf(fplot,"set cbrange [%6.f:%6.f] noreverse \n",-.2*sqrt(fabs(temp)),.2*sqrt(fabs(temp))); fprintf(fplot,"set size square\n"); initial(); istep=; data_out(istep); for (istep=;istep<=num_step;istep++) for (ic=;ic<num_cell;ic++) for (jc=;jc<num_cell;jc++) st=state[ic][jc]; ic=ic-; if (ic==-) ic=num_cell-; ic=ic+; if (ic==num_cell) ic=; grad =state[ic][jc]+state[ic][jc]-2*st; jc=jc-; if (jc==-) jc=num_cell-; jc=jc+; if (jc==num_cell) jc=; grad+=state[ic][jc]+state[ic][jc]-2*st; dstate[ic][jc]= -temp*st - st*st*st + xi*grad;

熱物性論 27 松本充弘 p. 5 for (ic=;ic<num_cell;ic++) for (jc=;jc<num_cell;jc++) st=dstate[ic][jc]; ic=ic-; if (ic==-) ic=num_cell-; ic=ic+; if (ic==num_cell) ic=; grad =dstate[ic][jc]+dstate[ic][jc]-2*st; jc=jc-; if (jc==-) jc=num_cell-; jc=jc+; if (jc==num_cell) jc=; grad+=dstate[ic][jc]+dstate[ic][jc]-2*st; ddstate[ic][jc]=grad; for (ic=;ic<num_cell;ic++) for (jc=;jc<num_cell;jc++) state[ic][jc] -= dtime*ddstate[ic][jc]; if (istep%num_save==) printf("%7d step\n",istep); data_out(istep); fprintf(fplot,"set out\n"); fclose(fplot); return ; List 7.2: 2次元保存系 TDGL モデルの数値計算プログラム例 やはり gnuplot 4.6 (or later) 用のコマンドファイルを生成する.dat matrix 5.dat matrix.5 9 8 7.5 9 8 7.5 6.5 6 5 4 5 4 -.5 3 -.5 3-2 -.5-2 -.5 2 3 4 5 6 7 8 9 2 3 4 5 6 7 8 9 5.dat matrix.dat matrix.5 9 8 7.5 9 8 7.5 6.5 6 5 4 5 4 -.5 3 -.5 3-2 -.5-2 -.5 2 3 4 5 6 7 8 9 2 3 4 5 6 7 8 9.dat matrix 2.dat matrix.5 9 8 7.5 9 8 7.5 6.5 6 5 4 5 4 -.5 3 -.5 3-2 -.5-2 -.5 2 3 4 5 6 7 8 9 2 3 4 5 6 7 8 9 図 7 5: 2次元保存系 TDGL 方程式の数値計算 List 7.2 の可視化例 T =. の場合 図 6 3 と比べてみよう

27 p. 5 7.2 spatial autocorrelation function G( r, t) s( r, t) G( r, t) s( r + r, t) s( r, t) s( r, t) s( r, t) (83)... r G G(r, t) [r = G(, t) = ] TDGL List 7.3 7 6 ( ) autocorrelation function V AF (t) = v(t ) v(t + t) t (84) velocity autocorrelation function Brown V AF (t) exp [ mγ ] t m γ γ m s ( r) radial distribution function (85)

27 p. 52 #include <stdio.h> #include <math.h> #define NUM_CELL 2 // #define NUM_COR // #define DEL_COR. // dr int main( ) int i,j,i,j,is,id,jd,dist; int nstep; int num[num_cor]; double sum[num_cor], sum=.; double state[num_cell][num_cell]; char cdum[]; FILE *fdata,*fout; scanf("%d",&nstep); sprintf(cdum,"%6.6d.dat",nstep); fdata=fopen(cdum,"r"); if (fdata==null) printf("file NOT Exist\n"); return -9; sprintf(cdum,"%6.6d.cor",nstep); fout=fopen(cdum,"w"); for (i=;i<num_cell;i++) for (j=;j<num_cell;j++) fscanf(fdata,"%lf",&state[i][j]); fclose(fdata); for (is=;is<num_cor;is++) num[is]=; sum[is]=.; for (i=;i<num_cell;i++) for (j=;j<num_cell;j++) sum+=state[i][j]*state[i][j]; sum/=(num_cell*num_cell); Spatial Correlation.75.5.25 -.2 2D TDGL (Conserved System) -.5 2 4 6 Distance 8 27 64 25 26 343 52 729 33 728 297 7 6: TDGL for (i=;i<num_cell;i++) printf("%3d\n",i); for (j=;j<num_cell;j++) // (i, j) for (i=;i<num_cell;i++) for (j=;j<num_cell;j++) // (i, j) id=i-i; if (id <-NUM_CELL/2) id+=num_cell; // else if (id > NUM_CELL/2) id-=num_cell; jd=j-j; if (jd <-NUM_CELL/2) jd+=num_cell; else if (jd > NUM_CELL/2) jd-=num_cell; dist=sqrt((double)(id*id+jd*jd))/del_cor+.5; // if (dist<num_cor) num[dist]++; // sum[dist] +=state[i][j]*state[i][j]; for (is=;is<num_cor;is++) fprintf(fout,"%7.3f %.7f %d\n",is*del_cor,sum[is]/sum/num[is],num[is]); return ; List 7.3:

27 p. 53 7.3 TDGL T < ( 5) ( 6) 7.3. s = ( disordered state) ordered state s linear mode analysis tool s = δs( r) δs( r) = k δ s k exp[i k r] (86) Fourier TDGL (69) (82) δ s k ( linear analysis ) k δ s k t ( T ξk 2) δ s k k ( 2 T ξk 2) δ s k δ s k T < 7 7 (87) exp[i k r] = k 2 exp[i k r] dx = ax dt x(t) exp[at] () k = δ s k= (t) e T t (88) T k > ξ 2 Non-conserved Conserved Growth Rate - -2.5.5 2 Wave Number k 7 7: k T =. ξ =.

27 p. 54 (2) k 2 k = δ s k (t) e (T ) 2 4ξ t T 2ξ (89) x(a bx) x = a 2b a 2 4b 7.3.2 TDGL s 3 dimension analysis () 7 8 ( ) characteristic length L L t L L t /2 (9) L (2) 7 8 ( ) L t L 2 L L 2 L t /3 (9) 7 8: TDGL