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) {
19 /* main moldyn structure */
22 /* potential parameters */
25 t_tersoff_mult_params tp;
27 /* misc variables, mainly to initialize stuff */
33 /* initialize moldyn */
34 printf("[sic] moldyn init\n");
35 moldyn_init(&md,argc,argv);
37 /* choose integration algorithm */
38 printf("[sic] setting integration algorithm\n");
39 set_int_alg(&md,MOLDYN_INTEGRATE_VERLET);
41 /* choose potential */
42 printf("[sic] selecting potential\n");
43 //set_potential1b(&md,tersoff_mult_1bp,&tp);
44 //set_potential2b(&md,tersoff_mult_2bp,&tp);
45 //set_potential3b(&md,tersoff_mult_3bp,&tp);
46 set_potential2b(&md,lennard_jones,&lj);
49 * potential parameters
53 lj.sigma6=LJ_SIGMA_SI*LJ_SIGMA_SI*LJ_SIGMA_SI;
55 lj.sigma12=lj.sigma6*lj.sigma6;
56 lj.epsilon4=4.0*LJ_EPSILON_SI;
58 /* harmonic oscillator */
59 ho.equilibrium_distance=0.25*sqrt(3.0)*LC_SI;
63 printf("[sic] setting cutoff radius\n");
64 set_cutoff(&md,5*LC_SI);
66 /* set (initial) dimensions of simulation volume */
67 printf("[sic] setting dimensions\n");
68 set_dim(&md,10*LC_SI,10*LC_SI,10*LC_SI,TRUE);
70 /* set periodic boundary conditions in all directions */
71 printf("[sic] setting periodic boundary conditions\n");
72 set_pbc(&md,TRUE,TRUE,TRUE);
74 /* create the lattice / place atoms */
75 printf("[sic] creating atoms\n");
76 //memset(&v,0,sizeof(t_3dvec));
79 //r.x=0.23*sqrt(3.0)*LC_SI/2.0;
80 //add_atom(&md,SI,M_SI,0,ATOM_ATTR_2BP,&r,&v);
82 //add_atom(&md,SI,M_SI,0,ATOM_ATTR_2BP,&r,&v);
83 create_lattice(&md,DIAMOND,LC_SI,SI,M_SI,ATOM_ATTR_2BP,0,10,10,10);
86 printf("[sic] setting temperature\n");
87 set_temperature(&md,0.0);
89 /* initial thermal fluctuations of particles */
90 printf("[sic] thermal init\n");
93 /* create the simulation schedule */
94 printf("[sic] adding schedule\n");
95 moldyn_add_schedule(&md,100,1.0e-15);
97 /* activate logging */
98 printf("[sic] activate logging\n");
99 moldyn_set_log(&md,LOG_TOTAL_ENERGY,"saves/test-energy",1);
100 moldyn_set_log(&md,VISUAL_STEP,"saves/test-visual",1);
103 * let's do the actual md algorithm now
105 * integration of newtons equations
108 printf("[sic] integration start, go get a coffee ...\n");
109 moldyn_integrate(&md);
113 printf("[sic] shutdown\n");
114 moldyn_shutdown(&md);