C. MODEL DEVELOPMENT
2. Nano-structure generation
particles in the center and far from the interface are superfluous. Thus after this type of model is made it is filtered into an image removal routine that will only keep the imaginary particles and atoms that are within a cutoff radius of a real atom or particle of the same scale. In this way all superfluous images are removed. This routine increases the computational cost and time of model development, but with the utilization of Verlet Neighbor Lists the speed is greatly increased.
The drawback of this automatic scale interface creation is that specific imaginary domains that would be needed for auto-decomposition (see Sections II.A.4.a and Appendix B.1) would be automatically removed since they are not a part of the scale interface. For this situation either the user could use the older version 7 of the code or they could add an imaginary domain to the model separately, outside of the program. The latter process would require two “model.in” files, one for the main GP model and the other for the imaginary domain. The imaginary domain would need to be made as a real domain first, to prevent it from being automatically removed, and then after it’s made it should be converted to images with the utility “chScale.exe”. This model should then be appended to the GP model. If the user is knowledgeable about proper scale interface design then the former approach is recommended as it is more concise, but for users uncomfortable with scale interface design the latter method is recommended.
and randomization. At about 85% of the total lines of code begins the actual program. To start, line 521 and 522 specify the volume percent of the model to be cut/filled with nanograins and the other line is the domain array of the model box, as xmin, xmax, ymin ymax, zmin, zmax.
PercentVolume=20.0
boxsize=(/-235.2422, 235.2422, -219.0186, 219.0186,-24.82, 24.72/)
On line 533-536 are specified the ranges for the a and b axis for the cutting and plugging of the holes. Random values will be chosen within these ranges.
mina=5.0 maxa=30.0 minb=5.0 maxb=25.0
On line 540-547 define two domains, elliptical shown below, these domains will be avoided when creating the nanostructure. This is useful when generating a bimodal material. These two domains would be two large elliptical grains, clearly Not part of the nanostructure being generated. The variable: e1 and e2 stand for ellipse 1 and 2. These are specially defined variables or objects, as such they have subvariables associated with each object. The ‘ct’ variable of the e1 object, defined as “e1%ct" is for cut type or the shape of the domain. This is a three letter string, “ell" for ellipse and “rec" for rectangular. The ‘axis’ variable, defined as “e1%axis" specifies the direction or plane of the ellipse, here 3 is the z direction meaning that the ellipse is in the XoY plane. The
‘inside’ variable is a logical or boolean type which determines whether the volume defined by the domain is inside or outside. The last variable, 'parm’ of the “e1“ and “e2“
objects is an array that holds the domain values for the specific domain geometry. For ellipses there is needed six values, the x and y coordinates to locate the center of the ellipse, the a and b values of the ellipse, and the angle in radians from the x axis to rotate the ellipse, and the same angle but for the rotation of the material.
e1%ct="ell"
e1%axis=3
e1%inside=.true.
e1%parm=(/-96.5,96.5,124.,124.,0.0,0.0,0.0/)
e2%ct="ell"
e2%axis=3
e2%inside=.true.
e2%parm=(/96.5,-96.5,124.,124.,0.0,0.0,0.0/)
On lines 550-552 specifies the domain type for the nanostructures being cut into the crystal matrix.
dom(i)%ct="ell"
dom(i)%axis=3
dom(i)%inside=.true.
The parameters for these domains are randomly distributed and checked for interaction. For these domains to be useful in model development the cuts into the matrix are output to standard output as a format compatible for “model.in” files. The material to be placed inside of the cuts is output on standard error.
A shell script was designed to more easily use this program to generate a
“model.in” file for nanostructure generation. It is simply called “nanoStructGen.sh” and it is listed below:
echo "running for 30 seconds..." #to maximize the volume to the requested ./nanoStructGen.exe 2>err >out & sleep 30s ; kill $!
echo `tail -n2 err | head -n1 | awk '{print $2}'` " percent nanostructured"
echo "Generating the model.in file"
lines=`wc -l out | cut -d " " -f1`
echo "5 3 This value is not used 10582.164 9112.419 587.898 Half model sizes
T T T Periodic boundaries in X Y Z 2 number of blocks below CuFCC 5 $((lines/2))
-10582.164 10582.164 -9112.419 9112.419 -587.898 587.898" >model.in cat out >>model.in #append the cuts to the model.in
lines=`wc -l err | cut -d " " -f1`
echo "CuFCC 5 $((lines/2))
-10582.164 10582.164 -9112.419 9112.419 -587.898 587.898" >> model.in cat err >>model.in #append the plugs to the model.in
echo "Generating the Model.MD file" #run the new model generator /shared/DATA/crystals/Mater_Model5.exe model.in
echo "Removing Particles that are too close"
delMDdup.exe 1.0 1 -10582.164 10582.164 -9112.419 9112.419 -587.898 587.898
<Model.MD \ 2>ModelDups.MD >ModelNew.MD
The last part is very important, the part about removing the duplicate particles.
This is to make sure that the material used to plug the holes cut is not too large for the hole. This program is explained in detail in Appendix C.4.