2 * sic.c - investigation of the sic precipitation process of silicon carbide
4 * author: Frank Zirkelbach <frank.zirkelbach@physik.uni-augsburg.de>
11 #include "math/math.h"
12 #include "init/init.h"
13 #include "visual/visual.h"
17 int main(int argc,char **argv) {
18 printf("%d\n",sizeof(t_atom));
19 /* main moldyn structure */
22 /* potential parameters */
25 t_tersoff_mult_params tp;
27 /* initialize moldyn */
28 printf("[sic] moldyn init\n");
29 moldyn_init(&md,argc,argv);
31 /* choose integration algorithm */
32 printf("[sic] setting integration algorithm\n");
33 set_int_alg(&md,MOLDYN_INTEGRATE_VERLET);
35 /* choose potential */
36 printf("[sic] selecting potential\n");
37 set_potential1b(&md,tersoff_mult_1bp,&tp);
38 set_potential2b(&md,tersoff_mult_2bp,&tp);
39 set_potential3b(&md,tersoff_mult_3bp,&tp);
40 //set_potential2b(&md,lennard_jones,&lj);
43 * potential parameters
47 lj.sigma6=LJ_SIGMA_SI*LJ_SIGMA_SI*LJ_SIGMA_SI;
49 lj.sigma12=lj.sigma6*lj.sigma6;
50 lj.epsilon4=4.0*LJ_EPSILON_SI;
52 /* harmonic oscillator */
53 ho.equilibrium_distance=0.25*sqrt(3.0)*LC_SI;
57 * tersoff mult potential parameters for SiC
63 tp.lambda[0]=TM_LAMBDA_SI;
65 tp.beta[0]=TM_BETA_SI;
75 tp.lambda[1]=TM_LAMBDA_C;
84 tersoff_mult_complete_params(&tp);
87 printf("[sic] setting cutoff radius\n");
88 set_cutoff(&md,TM_S_SI);
90 /* set (initial) dimensions of simulation volume */
91 printf("[sic] setting dimensions\n");
92 set_dim(&md,4*LC_SI,4*LC_SI,4*LC_SI,TRUE);
94 /* set periodic boundary conditions in all directions */
95 printf("[sic] setting periodic boundary conditions\n");
96 set_pbc(&md,TRUE,TRUE,TRUE);
98 /* create the lattice / place atoms */
99 printf("[sic] creating atoms\n");
100 create_lattice(&md,DIAMOND,LC_SI,SI,M_SI,
101 ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP,
104 /* setting a nearest neighbour distance for the moldyn checks */
105 set_nn_dist(&md,sqrt(3.0)*LC_SI/4.0); /* diamond ! */
107 /* set temperature */
108 printf("[sic] setting temperature\n");
109 set_temperature(&md,273.0+450.0);
111 /* initial thermal fluctuations of particles */
112 printf("[sic] thermal init\n");
115 /* create the simulation schedule */
116 printf("[sic] adding schedule\n");
117 moldyn_add_schedule(&md,10000,1.0e-15);
119 /* activate logging */
120 printf("[sic] activate logging\n");
121 moldyn_set_log(&md,LOG_TOTAL_ENERGY,"saves/test-energy",100);
122 moldyn_set_log(&md,VISUAL_STEP,"saves/test-visual",100);
125 * let's do the actual md algorithm now
127 * integration of newtons equations
130 printf("[sic] integration start, go get a coffee ...\n");
131 moldyn_integrate(&md);
135 printf("[sic] shutdown\n");
136 moldyn_shutdown(&md);