Modified the fix_elec_drag.* name to fix_electron_stopping_fit.* to align with and distinguish from existing fix_electron_stopping.*
This commit is contained in:
7008
examples/USER/misc/electron_stopping_fit/CuNb_ZL4.eam.alloy
Normal file
7008
examples/USER/misc/electron_stopping_fit/CuNb_ZL4.eam.alloy
Normal file
File diff suppressed because it is too large
Load Diff
54
examples/USER/misc/electron_stopping_fit/README
Normal file
54
examples/USER/misc/electron_stopping_fit/README
Normal file
@ -0,0 +1,54 @@
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
VERSION: JULY, 2018
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
This package contains the commands necessary to calculate and apply
|
||||
electronic stopping effects via an inelastic energy-loss (IEL) force.
|
||||
A detailed description of this method can be found in the following
|
||||
papers:
|
||||
|
||||
J.A. Stewart, G. Brookman, P. Price, M. Franco, W. Ji, K. Hattar,
|
||||
R. Dingreville (2018) Characterizing single isolated radiation-damage
|
||||
events from molecular dynamics via virtual diffraction methods.
|
||||
Journal of Applied Physics, 123(16), 165902.
|
||||
|
||||
C.W. Lee, J.A. Stewart, S.M. Foiles, R. Dingreville, and A. Schleife
|
||||
(2020) Multiscale simulations of electron and ion dynamics in
|
||||
self-irradiated silicon. Physical Review B, 102(2), 024107.
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
USAGE AND INPUT:
|
||||
|
||||
fix_elec_drag: Calculates electronic stopping power and cumulative
|
||||
energy lost to the electron gas via a quadratic
|
||||
functional and applies a drag force to the classical
|
||||
equations of motion for atoms moving above some
|
||||
cutoff velocity.
|
||||
|
||||
Usage : fix edrag all electron/stopping/fit 4.63 3.3e-3 4.0e-8
|
||||
|
||||
Input : - Lower energy cutoff (Upper cutoff is assumed
|
||||
to be 2x this value for truncation)
|
||||
- Linear coefficient
|
||||
- Quadratic coefficient (Usually taken = 0)
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
AUTHOR INFORMATION:
|
||||
|
||||
The primary contributors to this package are:
|
||||
Stephen M. Foiles (Sandia National Laboratories)
|
||||
James A. Stewart (Sandia National Laboratories)
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
ACKNOWLEDGEMENTS:
|
||||
|
||||
Thanks for additional contributions and development goes to:
|
||||
Remi Dingreville (Sandia National Laboratories)
|
||||
Elton Y. Chen (Sandia National Laboratories)
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
18
examples/USER/misc/electron_stopping_fit/Si.tersoff.zbl
Normal file
18
examples/USER/misc/electron_stopping_fit/Si.tersoff.zbl
Normal file
@ -0,0 +1,18 @@
|
||||
# Tersoff pair style parameters for various elements and/or mixtures
|
||||
# Multiple entries can be added to this file, LAMMPS reads the ones it needs
|
||||
#
|
||||
# The following entries are in LAMMPS "metal" units (all others are unitless):
|
||||
# A, B = eV; lambda1, lambda2, lambda3 = 1/Angstroms; R, D, ZBLcut = Angstroms; Z_i, Z_j = electron charge units
|
||||
#
|
||||
# These parameters are from the following papers and adapted to be used in the LAMMPS formalism:
|
||||
# Tersoff (1988) New empirical approach for the structure and energy of covlent systems. Phys Rev B, 37, 6991 - 7000.
|
||||
# Devanathan et al. (1998) Displacement threshold energies in beta-SiC. J Nucl Mater, 253, 47 - 52.
|
||||
#
|
||||
# Z_i and Z_j are the charges of the ith and jth nuclei from the coulomb potential
|
||||
# ZBLcut is the ZBL cutoff parameter (should be less than 1.0 angstrom), ZBLexpscale is the scaling parameter in the exponential of the smoothing function
|
||||
#
|
||||
#
|
||||
# Format of a single entry (one or more lines):
|
||||
# element 1, element 2, element 3, m, gamma, lambda3, c, d, h, n, beta, lambda2, X_ij*B, R, D, lambda1, A, Z_i, Z_j, ZBLcut, ZBLexpscale
|
||||
|
||||
Si Si Si 1.0 1.0 0.0 1.0039e5 1.6217e1 -5.9825e-1 7.8734e-1 1.1e-6 1.7322 4.7118e2 2.85 0.15 2.4799 1.8308e3 14 14 0.95 14
|
||||
38
examples/USER/misc/electron_stopping_fit/in.cascade_CuNb
Normal file
38
examples/USER/misc/electron_stopping_fit/in.cascade_CuNb
Normal file
@ -0,0 +1,38 @@
|
||||
# ***
|
||||
# Example input for including electronic stopping effects using fix elec/drag
|
||||
# Perfect Cu lattice with a single incident Nb atom - multiple species simulation
|
||||
# ***
|
||||
|
||||
units metal
|
||||
boundary p p p
|
||||
|
||||
lattice fcc 3.597
|
||||
|
||||
region box block -15 15 -15 15 -15 15
|
||||
create_box 2 box
|
||||
create_atoms 1 box
|
||||
|
||||
pair_style eam/alloy
|
||||
pair_coeff * * CuNb_ZL4.eam.alloy Cu Nb
|
||||
|
||||
mass 1 63.546
|
||||
mass 2 92.90638
|
||||
|
||||
velocity all create 300 42534 mom yes rot yes
|
||||
|
||||
set atom 1 type 2
|
||||
group pka id 1
|
||||
velocity pka set 1120 1620 400
|
||||
|
||||
fix 1 all nve
|
||||
fix 2 all dt/reset 1 NULL 0.001 0.05 emax 10.0
|
||||
fix 3 all electron/stopping/fit 3.49 1.8e-3 9.0e-8 7.57 4.2e-3 5.0e-8
|
||||
|
||||
thermo 20
|
||||
thermo_style custom step dt time temp pe ke f_3
|
||||
thermo_modify lost warn flush yes
|
||||
|
||||
dump 0 all custom 200 dump.pka_* id type x y z vx vy vz fx fy fz
|
||||
dump_modify 0 first yes
|
||||
|
||||
run 2000
|
||||
36
examples/USER/misc/electron_stopping_fit/in.cascade_SiSi
Normal file
36
examples/USER/misc/electron_stopping_fit/in.cascade_SiSi
Normal file
@ -0,0 +1,36 @@
|
||||
# ***
|
||||
# Example input for including electronic stopping effects using fix elec/drag
|
||||
# Perfect Si lattice with one primary knock-on atom (PKA) - single species simulation
|
||||
# ***
|
||||
|
||||
units metal
|
||||
boundary p p p
|
||||
|
||||
lattice diamond 5.431
|
||||
|
||||
region box block -15 15 -15 15 -15 15
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
|
||||
pair_style tersoff/zbl
|
||||
pair_coeff * * Si.tersoff.zbl Si
|
||||
|
||||
mass 1 28.0855
|
||||
|
||||
velocity all create 300 42534 mom yes rot yes
|
||||
|
||||
group pka id 1
|
||||
velocity pka set 1120 1620 400
|
||||
|
||||
fix 1 all nve
|
||||
fix 2 all dt/reset 1 NULL 0.001 0.05 emax 10.0
|
||||
fix 3 all electron/stopping/fit 4.63 3.3e-3 4.0e-8
|
||||
|
||||
thermo 20
|
||||
thermo_style custom step dt time temp pe ke f_3
|
||||
thermo_modify lost warn flush yes
|
||||
|
||||
dump 0 all custom 200 dump.pka_* id type x y z vx vy vz fx fy fz
|
||||
dump_modify 0 first yes
|
||||
|
||||
run 2000
|
||||
191
examples/USER/misc/electron_stopping_fit/log.cascase_CuNb
Normal file
191
examples/USER/misc/electron_stopping_fit/log.cascase_CuNb
Normal file
@ -0,0 +1,191 @@
|
||||
LAMMPS (18 Sep 2020)
|
||||
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:94)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# ***
|
||||
# Example input for including electronic stopping effects using fix elec/drag
|
||||
# Perfect Cu lattice with a single incident Nb atom - multiple species simulation
|
||||
# ***
|
||||
|
||||
units metal
|
||||
boundary p p p
|
||||
|
||||
lattice fcc 3.597
|
||||
Lattice spacing in x,y,z = 3.5970000 3.5970000 3.5970000
|
||||
|
||||
region box block -15 15 -15 15 -15 15
|
||||
create_box 2 box
|
||||
Created orthogonal box = (-53.955000 -53.955000 -53.955000) to (53.955000 53.955000 53.955000)
|
||||
2 by 2 by 4 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 108000 atoms
|
||||
create_atoms CPU = 0.002 seconds
|
||||
|
||||
pair_style eam/alloy
|
||||
pair_coeff * * CuNb_ZL4.eam.alloy Cu Nb
|
||||
|
||||
mass 1 63.546
|
||||
mass 2 92.90638
|
||||
|
||||
velocity all create 300 42534 mom yes rot yes
|
||||
|
||||
set atom 1 type 2
|
||||
Setting atom values ...
|
||||
1 settings made for type
|
||||
group pka id 1
|
||||
1 atoms in group pka
|
||||
velocity pka set 1120 1620 400
|
||||
|
||||
fix 1 all nve
|
||||
fix 2 all dt/reset 1 NULL 0.001 0.05 emax 10.0
|
||||
fix 3 all elec/drag 3.49 1.8e-3 9.0e-8 7.57 4.2e-3 5.0e-8
|
||||
|
||||
thermo 20
|
||||
thermo_style custom step dt time temp pe ke f_3
|
||||
thermo_modify lost warn flush yes
|
||||
|
||||
dump 0 all custom 200 dump.pka_* id type x y z vx vy vz fx fy fz
|
||||
dump_modify 0 first yes
|
||||
|
||||
run 2000
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 10 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 7.506786
|
||||
ghost atom cutoff = 7.506786
|
||||
binsize = 3.753393, bins = 29 29 29
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair eam/alloy, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/atomonly/newton
|
||||
stencil: half/bin/3d/newton
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 10.07 | 10.20 | 10.47 Mbytes
|
||||
Step Dt Time Temp PotEng KinEng f_3
|
||||
0 2.4879625e-05 0 18322 -382316.35 255774.5 0
|
||||
20 2.6647604e-06 0.00022494231 18308.42 -382179.62 255584.93 52.356667
|
||||
40 1.1679999e-06 0.00025990893 18297.517 -382035.55 255432.72 60.488565
|
||||
60 7.7212205e-07 0.00027888914 18288.602 -381915.51 255308.27 64.900024
|
||||
80 5.9617028e-07 0.0002924637 18281.252 -381816.05 255205.66 68.05358
|
||||
100 5.0061743e-07 0.00030339238 18275.297 -381735.46 255122.53 70.591475
|
||||
120 4.4398667e-07 0.00031281961 18270.646 -381672.72 255057.61 72.780023
|
||||
140 4.0989229e-07 0.00032134586 18267.246 -381627.23 255010.13 74.758942
|
||||
160 3.9088566e-07 0.00032934172 18265.061 -381598.59 254979.64 76.614452
|
||||
180 3.8354475e-07 0.00033707186 18264.073 -381586.58 254965.84 78.408129
|
||||
200 3.8666558e-07 0.00034475509 18264.267 -381591.08 254968.56 80.190876
|
||||
220 4.007769e-07 0.00035260282 18265.643 -381612.1 254987.76 82.011874
|
||||
240 4.2835811e-07 0.00036085456 18268.204 -381649.77 255023.51 83.926836
|
||||
260 4.7508573e-07 0.00036982649 18271.964 -381704.34 255076 86.009307
|
||||
280 5.5330823e-07 0.00038000239 18276.946 -381776.25 255145.55 88.371814
|
||||
300 6.9321904e-07 0.0003922506 18283.186 -381866.22 255232.67 91.216358
|
||||
320 9.9050009e-07 0.00040850901 18290.744 -381975.51 255338.18 94.993734
|
||||
340 2.0231145e-06 0.00043538567 18299.707 -382106.87 255463.3 101.24112
|
||||
360 4.4734023e-06 0.00055311495 18304.008 -382193.31 255523.34 128.62138
|
||||
380 8.7874706e-06 0.00064748812 18302.306 -382191.51 255499.58 150.56708
|
||||
400 1.7106596e-06 0.00081274722 18292.538 -382095.51 255363.22 188.99556
|
||||
420 8.1490654e-07 0.00083625178 18280.012 -381926.12 255188.35 194.45667
|
||||
440 5.3697762e-07 0.00084952246 18268.337 -381766.23 255025.38 197.53782
|
||||
460 4.0152518e-07 0.00085884162 18257.329 -381614.72 254871.7 199.70011
|
||||
480 3.2168885e-07 0.00086605243 18246.914 -381471 254726.31 201.37217
|
||||
500 2.6930333e-07 0.00087195548 18237.05 -381334.66 254588.6 202.7402
|
||||
520 2.3246067e-07 0.00087697172 18227.709 -381205.43 254458.21 203.90207
|
||||
540 2.0526276e-07 0.00088134976 18218.874 -381083.1 254334.87 204.91559
|
||||
560 1.8445601e-07 0.00088524862 18210.529 -380967.5 254218.37 205.81773
|
||||
580 1.6810201e-07 0.00088877616 18202.662 -380858.5 254108.55 206.63358
|
||||
600 1.5497555e-07 0.0008920089 18195.265 -380755.99 254005.29 207.38093
|
||||
620 1.4426609e-07 0.00089500317 18188.331 -380659.88 253908.49 208.07286
|
||||
640 1.3541502e-07 0.00089780169 18181.853 -380570.09 253818.06 208.71932
|
||||
660 1.280267e-07 0.00090043764 18175.826 -380486.56 253733.91 209.328
|
||||
680 1.2181366e-07 0.00090293739 18170.244 -380409.22 253656 209.90504
|
||||
700 1.165613e-07 0.00090532232 18165.106 -380338.04 253584.27 210.45541
|
||||
720 1.1210827e-07 0.00090761002 18160.406 -380272.96 253518.66 210.9832
|
||||
740 1.0833074e-07 0.00090981526 18156.143 -380213.96 253459.15 211.49183
|
||||
760 1.0513259e-07 0.0009119506 18152.314 -380161 253405.7 211.98422
|
||||
780 1.024387e-07 0.00091402688 18148.917 -380114.05 253358.28 212.4629
|
||||
800 1.0019011e-07 0.00091605359 18145.95 -380073.1 253316.86 212.93007
|
||||
820 9.8340559e-08 0.00091803919 18143.412 -380038.13 253281.42 213.38769
|
||||
840 9.6853951e-08 0.0009199913 18141.301 -380009.11 253251.96 213.83753
|
||||
860 9.5702524e-08 0.0009219169 18139.617 -379986.04 253228.45 214.28121
|
||||
880 9.4865542e-08 0.00092382249 18138.358 -379968.91 253210.87 214.72025
|
||||
900 9.4328102e-08 0.00092571421 18137.525 -379957.71 253199.24 215.15607
|
||||
920 9.4080772e-08 0.00092759795 18137.116 -379952.43 253193.53 215.59003
|
||||
940 9.411979e-08 0.00092947946 18137.131 -379953.08 253193.74 216.02348
|
||||
960 9.4445831e-08 0.00093136447 18137.571 -379959.65 253199.88 216.45774
|
||||
980 9.5064438e-08 0.00093325877 18138.435 -379972.15 253211.94 216.89415
|
||||
1000 9.5986287e-08 0.0009351683 18139.723 -379990.58 253229.93 217.33411
|
||||
1020 9.7227647e-08 0.00093709927 18141.437 -380014.95 253253.85 217.77904
|
||||
1040 9.8811125e-08 0.00093905828 18143.576 -380045.26 253283.72 218.23048
|
||||
1060 1.0076676e-07 0.00094105243 18146.142 -380081.54 253319.54 218.69009
|
||||
1080 1.0313314e-07 0.00094308952 18149.136 -380123.8 253361.32 219.15967
|
||||
1100 1.0595985e-07 0.00094517823 18152.558 -380172.05 253409.09 219.64123
|
||||
1120 1.0930985e-07 0.00094732832 18156.41 -380226.32 253462.87 220.13705
|
||||
1140 1.132636e-07 0.000949551 18160.694 -380286.64 253522.68 220.64974
|
||||
1160 1.1792417e-07 0.00095185927 18165.412 -380353.04 253588.54 221.1823
|
||||
1180 1.2342496e-07 0.00095426848 18170.567 -380425.55 253660.5 221.73831
|
||||
1200 1.2994083e-07 0.00095679702 18176.161 -380504.23 253738.59 222.32204
|
||||
1220 1.3770383e-07 0.00095946728 18182.197 -380589.11 253822.86 222.93869
|
||||
1240 1.4702749e-07 0.00096230702 18188.679 -380680.26 253913.35 223.59472
|
||||
1260 1.5834556e-07 0.00096535133 18195.613 -380777.75 254010.14 224.29828
|
||||
1280 1.7227762e-07 0.00096864561 18203.002 -380881.67 254113.29 225.05993
|
||||
1300 1.897315e-07 0.00097225015 18210.853 -380992.1 254222.89 225.89367
|
||||
1320 2.1209523e-07 0.00097624755 18219.173 -381109.18 254339.04 226.81871
|
||||
1340 2.4160263e-07 0.00098075538 18227.971 -381233.03 254461.86 227.86238
|
||||
1360 2.8207358e-07 0.00098594918 18237.256 -381363.86 254591.48 229.0655
|
||||
1380 3.4063727e-07 0.00099210804 18247.042 -381501.9 254728.09 230.49294
|
||||
1400 4.322825e-07 0.00099971618 18257.343 -381647.47 254871.9 232.25731
|
||||
1420 5.9482769e-07 0.0010097306 18268.179 -381801.05 255023.16 234.58112
|
||||
1440 9.6055241e-07 0.0010245153 18279.561 -381963.38 255182.06 238.01409
|
||||
1460 2.6487585e-06 0.0010540252 18291.412 -382135.65 255347.49 244.87092
|
||||
1480 1.6540131e-06 0.0011473577 18286.353 -382087.11 255276.87 266.56651
|
||||
1500 7.7231163e-07 0.0011698578 18273.103 -381907.39 255091.9 271.79306
|
||||
1520 5.0196808e-07 0.0011823587 18260.401 -381732.97 254914.58 274.69466
|
||||
1540 3.7028814e-07 0.0011910172 18248.126 -381563.62 254743.22 276.70297
|
||||
1560 2.9266906e-07 0.0011976261 18236.229 -381399.08 254577.14 278.23481
|
||||
1580 2.4170771e-07 0.0012029632 18224.682 -381239.13 254415.96 279.47106
|
||||
1600 2.0581226e-07 0.0012074372 18213.468 -381083.61 254259.4 280.50668
|
||||
1620 1.7924561e-07 0.0012112887 18202.573 -380932.4 254107.31 281.39766
|
||||
1640 1.5884307e-07 0.0012146714 18191.986 -380785.4 253959.52 282.1797
|
||||
1660 1.4272115e-07 0.0012176891 18181.701 -380642.51 253815.94 282.87696
|
||||
1680 1.2968815e-07 0.0012204153 18171.711 -380503.67 253676.47 283.5065
|
||||
1700 1.1895537e-07 0.0012229038 18162.009 -380368.82 253541.04 284.08082
|
||||
1720 1.0998022e-07 0.0012251951 18152.594 -380237.91 253409.6 284.60934
|
||||
1740 1.0237742e-07 0.0012273205 18143.459 -380110.88 253282.08 285.09933
|
||||
1760 9.5866108e-08 0.0012293045 18134.603 -379987.7 253158.44 285.55651
|
||||
1780 9.0236829e-08 0.0012311671 18126.022 -379868.34 253038.65 285.98547
|
||||
1800 8.5330251e-08 0.0012329241 18117.714 -379752.77 252922.68 286.38994
|
||||
1820 8.1023028e-08 0.0012345889 18109.677 -379640.95 252810.48 286.77299
|
||||
1840 7.7218826e-08 0.0012361724 18101.908 -379532.87 252702.03 287.13719
|
||||
1860 7.384063e-08 0.0012376841 18094.407 -379428.5 252597.32 287.48469
|
||||
1880 7.0826602e-08 0.0012391317 18087.172 -379327.83 252496.32 287.81735
|
||||
1900 6.8126364e-08 0.0012405221 18080.201 -379230.84 252399 288.13672
|
||||
1920 6.5698544e-08 0.0012418611 18073.494 -379137.51 252305.37 288.44417
|
||||
1940 6.3508807e-08 0.0012431539 18067.049 -379047.83 252215.39 288.7409
|
||||
1960 6.1528608e-08 0.0012444049 18060.865 -378961.79 252129.06 289.02794
|
||||
1980 5.9733936e-08 0.0012456182 18054.941 -378879.37 252046.37 289.3062
|
||||
2000 5.8104457e-08 0.0012467971 18049.277 -378800.57 251967.3 289.57652
|
||||
Loop time of 32.2671 on 16 procs for 2000 steps with 108000 atoms
|
||||
|
||||
Performance: 0.000 ns/day, 77129.149 hours/ns, 61.983 timesteps/s
|
||||
98.2% CPU use with 16 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 27.828 | 28.038 | 28.257 | 2.5 | 86.89
|
||||
Neigh | 0.11693 | 0.119 | 0.1208 | 0.4 | 0.37
|
||||
Comm | 1.1116 | 1.3315 | 1.5544 | 11.5 | 4.13
|
||||
Output | 1.1689 | 1.1693 | 1.1739 | 0.1 | 3.62
|
||||
Modify | 1.3304 | 1.3421 | 1.3515 | 0.6 | 4.16
|
||||
Other | | 0.2677 | | | 0.83
|
||||
|
||||
Nlocal: 6750.00 ave 6782 max 6721 min
|
||||
Histogram: 2 2 0 3 2 2 1 1 1 2
|
||||
Nghost: 11502.0 ave 11531 max 11470 min
|
||||
Histogram: 2 1 1 1 2 2 3 0 2 2
|
||||
Neighs: 472501.0 ave 475010 max 470641 min
|
||||
Histogram: 2 1 3 2 2 2 1 1 1 1
|
||||
|
||||
Total # of neighbors = 7560018
|
||||
Ave neighs/atom = 70.000167
|
||||
Neighbor list builds = 8
|
||||
Dangerous builds = 1
|
||||
Total wall time: 0:00:32
|
||||
189
examples/USER/misc/electron_stopping_fit/log.cascase_SiSi
Normal file
189
examples/USER/misc/electron_stopping_fit/log.cascase_SiSi
Normal file
@ -0,0 +1,189 @@
|
||||
LAMMPS (18 Sep 2020)
|
||||
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:94)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# ***
|
||||
# Example input for including electronic stopping effects using fix elec/drag
|
||||
# Perfect Si lattice with one primary knock-on atom (PKA) - single species simulation
|
||||
# ***
|
||||
|
||||
units metal
|
||||
boundary p p p
|
||||
|
||||
lattice diamond 5.431
|
||||
Lattice spacing in x,y,z = 5.4310000 5.4310000 5.4310000
|
||||
|
||||
region box block -15 15 -15 15 -15 15
|
||||
create_box 1 box
|
||||
Created orthogonal box = (-81.465000 -81.465000 -81.465000) to (81.465000 81.465000 81.465000)
|
||||
2 by 2 by 4 MPI processor grid
|
||||
create_atoms 1 box
|
||||
Created 216000 atoms
|
||||
create_atoms CPU = 0.004 seconds
|
||||
|
||||
pair_style tersoff/zbl
|
||||
pair_coeff * * Si.tersoff.zbl Si
|
||||
|
||||
mass 1 28.0855
|
||||
|
||||
velocity all create 300 42534 mom yes rot yes
|
||||
|
||||
group pka id 1
|
||||
1 atoms in group pka
|
||||
velocity pka set 1120 1620 400
|
||||
|
||||
fix 1 all nve
|
||||
fix 2 all dt/reset 1 NULL 0.001 0.05 emax 10.0
|
||||
fix 3 all elec/drag 4.63 3.3e-3 4.0e-8
|
||||
|
||||
thermo 20
|
||||
thermo_style custom step dt time temp pe ke f_3
|
||||
thermo_modify lost warn flush yes
|
||||
|
||||
dump 0 all custom 200 dump.pka_* id type x y z vx vy vz fx fy fz
|
||||
dump_modify 0 first yes
|
||||
|
||||
run 2000
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 10 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 5
|
||||
ghost atom cutoff = 5
|
||||
binsize = 2.5, bins = 66 66 66
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair tersoff/zbl, perpetual
|
||||
attributes: full, newton on
|
||||
pair build: full/bin/atomonly
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 10.68 | 10.68 | 10.68 Mbytes
|
||||
Step Dt Time Temp PotEng KinEng f_3
|
||||
0 2.4879625e-05 0 6509.9241 -999992.11 181757.49 0
|
||||
20 5.8535376e-06 0.00018285984 6504.2109 -999911.08 181597.97 78.573248
|
||||
40 7.3437077e-06 0.00032558782 6501.6468 -999900.7 181526.38 139.85652
|
||||
60 5.7782387e-06 0.00048338337 6499.9817 -999922.1 181479.89 207.59157
|
||||
80 1.7803041e-05 0.00062201376 6498.3851 -999937.11 181435.31 267.07596
|
||||
100 5.7695724e-06 0.0008764226 6491.6929 -999859.81 181248.47 376.21265
|
||||
120 1.4719757e-06 0.00092268759 6488.491 -999790.21 181159.07 396.03972
|
||||
140 2.040106e-06 0.0009541283 6488.9044 -999815.23 181170.61 409.51037
|
||||
160 1.1709752e-05 0.0011249721 6489.6218 -999908.14 181190.64 482.73616
|
||||
180 1.4052166e-06 0.0012237574 6482.8292 -999761.21 181000.99 525.05834
|
||||
200 7.0645649e-07 0.0012432698 6478.465 -999647.7 180879.15 533.40945
|
||||
220 5.3086492e-07 0.0012554161 6475.6927 -999575.49 180801.74 538.60481
|
||||
240 4.7640655e-07 0.0012653882 6474.3494 -999542.24 180764.24 542.86876
|
||||
260 4.8787977e-07 0.0012749228 6474.3825 -999547.24 180765.16 546.9453
|
||||
280 5.7550217e-07 0.0012853466 6475.7725 -999590.51 180803.97 551.40265
|
||||
300 8.4917452e-07 0.0012989169 6478.5144 -999672.88 180880.52 557.20767
|
||||
320 3.2530619e-06 0.0013265212 6482.5081 -999796.2 180992.03 569.02383
|
||||
340 9.1659616e-06 0.0014955314 6481.8343 -999849.09 180973.22 641.40448
|
||||
360 1.3432453e-05 0.0017808405 6476.4943 -999822.19 180824.12 763.54528
|
||||
380 8.0104844e-06 0.0020958913 6469.4698 -999760.52 180628 898.31998
|
||||
400 3.3669621e-06 0.0022009729 6464.0253 -999653.36 180475.99 943.23198
|
||||
420 1.4887493e-05 0.0024115306 6462.9467 -999712.65 180445.87 1033.2068
|
||||
440 7.6182614e-06 0.0025715115 6457.6166 -999632.22 180297.06 1101.5392
|
||||
460 2.4972112e-05 0.0029551455 6450.3406 -999593.38 180093.91 1265.318
|
||||
480 2.3561752e-05 0.0032880532 6442.0409 -999503.89 179862.18 1407.3073
|
||||
500 1.4420455e-05 0.0035074129 6433.361 -999354.82 179619.84 1500.7814
|
||||
520 1.1816914e-05 0.0038239154 6427.2604 -999318.69 179449.51 1635.5741
|
||||
540 1.3748768e-05 0.0042004194 6417.4523 -999205.3 179175.67 1795.789
|
||||
560 7.52018e-06 0.0043887882 6409.6827 -999068.82 178958.74 1875.8751
|
||||
580 1.257523e-05 0.004616805 6405.6624 -999053.63 178846.49 1972.7564
|
||||
600 1.9968416e-06 0.00472482 6398.5405 -998900.91 178647.65 2018.6254
|
||||
620 1.5482324e-06 0.0047571463 6396.6815 -998862.7 178595.74 2032.3426
|
||||
640 1.011291e-05 0.0048098552 6397.7948 -998915.97 178626.83 2054.7096
|
||||
660 9.8205405e-06 0.0051044128 6390.8702 -998847.14 178433.49 2179.7236
|
||||
680 7.6429983e-06 0.0053365884 6383.8042 -998748.69 178236.21 2278.1889
|
||||
700 6.3388347e-06 0.0054927256 6378.4359 -998665.06 178086.33 2344.3656
|
||||
720 2.3522106e-06 0.0056227115 6372.253 -998548.02 177913.7 2399.4307
|
||||
740 6.4757544e-07 0.0056460538 6365.5083 -998369.63 177725.39 2409.3096
|
||||
760 3.8324351e-07 0.005656035 6359.7035 -998211.79 177563.32 2413.5291
|
||||
780 2.7394838e-07 0.005662533 6354.5359 -998070.25 177419.04 2416.2735
|
||||
800 2.1564956e-07 0.0056674054 6349.9385 -997943.95 177290.68 2418.3296
|
||||
820 1.8023193e-07 0.0056713554 6345.8823 -997832.36 177177.43 2419.9952
|
||||
840 1.5702192e-07 0.0056747244 6342.3522 -997735.22 177078.87 2421.4148
|
||||
860 1.4112901e-07 0.0056777042 6339.3392 -997652.35 176994.74 2422.6698
|
||||
880 1.3002216e-07 0.0056804148 6336.838 -997583.66 176924.91 2423.8107
|
||||
900 1.2228805e-07 0.0056829369 6334.8452 -997529.08 176869.27 2424.872
|
||||
920 1.1709975e-07 0.0056853297 6333.3582 -997488.57 176827.75 2425.8784
|
||||
940 1.1397036e-07 0.0056876388 6332.3755 -997462.1 176800.32 2426.8495
|
||||
960 1.1263139e-07 0.0056899026 6331.8956 -997449.65 176786.92 2427.8014
|
||||
980 1.1297372e-07 0.0056921557 6331.9175 -997451.21 176787.53 2428.7487
|
||||
1000 1.1502522e-07 0.0056944318 6332.44 -997466.76 176802.12 2429.7058
|
||||
1020 1.1895651e-07 0.0056967663 6333.4621 -997496.27 176830.65 2430.6875
|
||||
1040 1.2511681e-07 0.0056991998 6334.9825 -997539.75 176873.11 2431.711
|
||||
1060 1.3411487e-07 0.0057017822 6337.0003 -997597.17 176929.44 2432.7975
|
||||
1080 1.4698231e-07 0.0057045791 6339.514 -997668.53 176999.62 2433.9747
|
||||
1100 1.6551147e-07 0.0057076833 6342.5222 -997753.83 177083.61 2435.2818
|
||||
1120 1.9300845e-07 0.0057112358 6346.0234 -997853.08 177181.37 2436.7785
|
||||
1140 2.3618478e-07 0.0057154712 6350.015 -997966.31 177292.81 2438.564
|
||||
1160 3.108468e-07 0.0057208289 6354.4922 -998093.58 177417.82 2440.8243
|
||||
1180 4.6429306e-07 0.0057282929 6359.4421 -998234.93 177556.02 2443.9758
|
||||
1200 9.2816707e-07 0.0057409335 6364.8148 -998390.27 177706.03 2449.3178
|
||||
1220 2.0979021e-05 0.0058204095 6369.2961 -998548.29 177831.14 2482.9438
|
||||
1240 3.2882081e-06 0.0060039745 6361.0026 -998394.02 177599.59 2560.609
|
||||
1260 3.6924049e-06 0.0060569852 6359.1486 -998364.67 177547.82 2583.0193
|
||||
1280 9.1658886e-06 0.0063262182 6353.595 -998323.02 177392.77 2696.8502
|
||||
1300 6.8768211e-06 0.0064666219 6347.4618 -998210.93 177221.53 2756.1664
|
||||
1320 6.9121863e-06 0.0066088699 6342.5533 -998134.15 177084.48 2816.2408
|
||||
1340 7.0074085e-06 0.0067699237 6337.3331 -998056.53 176938.73 2884.2214
|
||||
1360 1.6151257e-06 0.0068943644 6330.8472 -997929.72 176757.65 2936.7264
|
||||
1380 5.1421721e-07 0.0069122062 6323.1882 -997723.46 176543.81 2944.2462
|
||||
1400 2.9444595e-07 0.0069200351 6315.8333 -997521.42 176338.46 2947.5417
|
||||
1420 2.0082068e-07 0.0069249277 6308.579 -997320.95 176135.92 2949.5985
|
||||
1440 1.4987791e-07 0.0069284157 6301.3823 -997121.48 175934.99 2951.0631
|
||||
1460 1.1822986e-07 0.0069310902 6294.2263 -996922.81 175735.19 2952.1847
|
||||
1480 9.683654e-08 0.0069332389 6287.1024 -996724.81 175536.29 2953.0847
|
||||
1500 8.1500357e-08 0.0069350221 6280.0061 -996527.43 175338.16 2953.8306
|
||||
1520 7.0019944e-08 0.0069365379 6272.9345 -996330.63 175140.72 2954.464
|
||||
1540 6.1135299e-08 0.0069378503 6265.8856 -996134.37 174943.92 2955.0117
|
||||
1560 5.4075905e-08 0.0069390034 6258.8583 -995938.65 174747.71 2955.4923
|
||||
1580 4.8345462e-08 0.0069400286 6251.8517 -995743.45 174552.09 2955.9191
|
||||
1600 4.3610621e-08 0.0069409491 6244.8652 -995548.77 174357.03 2956.3019
|
||||
1620 3.9639615e-08 0.0069417824 6237.8984 -995354.6 174162.51 2956.648
|
||||
1640 3.6266563e-08 0.0069425423 6230.951 -995160.95 173968.54 2956.9632
|
||||
1660 3.3369776e-08 0.0069432394 6224.0227 -994967.8 173775.1 2957.2521
|
||||
1680 3.0858062e-08 0.0069438824 6217.1135 -994775.16 173582.2 2957.5182
|
||||
1700 2.8661809e-08 0.0069444782 6210.2233 -994583.03 173389.82 2957.7644
|
||||
1720 2.6727002e-08 0.0069450326 6203.3521 -994391.41 173197.98 2957.9934
|
||||
1740 2.5011123e-08 0.0069455505 6196.4998 -994200.31 173006.66 2958.2069
|
||||
1760 2.3480268e-08 0.0069460359 6189.6665 -994009.73 172815.87 2958.4068
|
||||
1780 2.2107089e-08 0.0069464923 6182.8523 -993819.66 172625.62 2958.5946
|
||||
1800 2.0869294e-08 0.0069469224 6176.0571 -993630.11 172435.9 2958.7713
|
||||
1820 1.9748543e-08 0.006947329 6169.2811 -993441.1 172246.71 2958.9382
|
||||
1840 1.8729611e-08 0.0069477141 6162.5244 -993252.61 172058.06 2959.0961
|
||||
1860 1.7799764e-08 0.0069480797 6155.787 -993064.65 171869.96 2959.2458
|
||||
1880 1.6948273e-08 0.0069484275 6149.0691 -992877.23 171682.39 2959.388
|
||||
1900 1.6166034e-08 0.006948759 6142.3708 -992690.34 171495.37 2959.5234
|
||||
1920 1.5445281e-08 0.0069490753 6135.6922 -992504.01 171308.91 2959.6525
|
||||
1940 1.4779344e-08 0.0069493778 6129.0335 -992318.22 171123 2959.7757
|
||||
1960 1.4162469e-08 0.0069496675 6122.3947 -992132.98 170937.64 2959.8936
|
||||
1980 1.3589666e-08 0.0069499452 6115.776 -991948.3 170752.85 2960.0066
|
||||
2000 1.3056587e-08 0.0069502119 6109.1776 -991764.18 170568.62 2960.1149
|
||||
Loop time of 102.285 on 16 procs for 2000 steps with 216000 atoms
|
||||
|
||||
Performance: 0.000 ns/day, 1088049.652 hours/ns, 19.553 timesteps/s
|
||||
99.5% CPU use with 16 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 86.624 | 87.611 | 88.388 | 6.4 | 85.65
|
||||
Neigh | 0.88619 | 0.90996 | 0.92467 | 1.3 | 0.89
|
||||
Comm | 7.3456 | 8.144 | 9.1588 | 21.2 | 7.96
|
||||
Output | 2.2851 | 2.2855 | 2.2903 | 0.1 | 2.23
|
||||
Modify | 3.0244 | 3.0283 | 3.0332 | 0.1 | 2.96
|
||||
Other | | 0.3064 | | | 0.30
|
||||
|
||||
Nlocal: 13500.0 ave 13528 max 13447 min
|
||||
Histogram: 1 0 0 2 1 2 2 2 3 3
|
||||
Nghost: 7282.56 ave 7336 max 7254 min
|
||||
Histogram: 3 3 2 2 2 1 2 0 0 1
|
||||
Neighs: 0.00000 ave 0 max 0 min
|
||||
Histogram: 16 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 378000.0 ave 378780 max 376516 min
|
||||
Histogram: 1 0 0 2 1 2 2 2 3 3
|
||||
|
||||
Total # of neighbors = 6048000
|
||||
Ave neighs/atom = 28.000000
|
||||
Neighbor list builds = 56
|
||||
Dangerous builds = 24
|
||||
Total wall time: 0:01:42
|
||||
@ -51,7 +51,7 @@ dihedral_style table/cut, Mike Salerno, ksalerno@pha.jhu.edu, 11 May 18
|
||||
fix accelerate/cos, Zheng Gong (ENS de Lyon), z.gong@outlook.com, 24 Apr 20
|
||||
fix addtorque, Laurent Joly (U Lyon), ljoly.ulyon at gmail.com, 8 Aug 11
|
||||
fix ave/correlate/long, Jorge Ramirez (UPM Madrid), jorge.ramirez at upm.es, 21 Oct 2015
|
||||
fix elec/drag, James Stewart (SNL), jstewa .at. sandia.gov, 23 Sep 2020
|
||||
fix electron/stopping/fit, James Stewart (SNL), jstewa .at. sandia.gov, 23 Sep 2020
|
||||
fix electron/stopping, Konstantin Avchaciov, k.avchachov at gmail.com, 26 Feb 2019
|
||||
fix ffl, David Wilkins (EPFL Lausanne), david.wilkins @ epfl.ch, 28 Sep 2018
|
||||
fix filter/corotate, Lukas Fath (KIT), lukas.fath at kit.edu, 15 Mar 2017
|
||||
|
||||
202
src/USER-MISC/fix_electron_stopping_fit.cpp
Normal file
202
src/USER-MISC/fix_electron_stopping_fit.cpp
Normal file
@ -0,0 +1,202 @@
|
||||
/* ---------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------ */
|
||||
|
||||
/* ---------------------------------------------------------------------
|
||||
Contributing authors: Stephen M. Foiles (SNL)
|
||||
James A. Stewart (SNL)
|
||||
------------------------------------------------------------------ */
|
||||
|
||||
#include "fix_electron_stopping_fit.h"
|
||||
|
||||
#include "mpi.h"
|
||||
#include "math.h"
|
||||
#include "string.h"
|
||||
#include "stdlib.h"
|
||||
#include "atom.h"
|
||||
#include "force.h"
|
||||
#include "update.h"
|
||||
#include "modify.h"
|
||||
#include "compute.h"
|
||||
#include "domain.h"
|
||||
#include "region.h"
|
||||
#include "respa.h"
|
||||
#include "comm.h"
|
||||
#include "error.h"
|
||||
#include "citeme.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
static const char cite_fix_electron_stopping_fit_c[] =
|
||||
"fix_elec_drag command:\n\n"
|
||||
"@Article{Stewart2018,\n"
|
||||
" author = { J.A. Stewart and G. Brookman and P. Price and M. Franco and W. Ji and K. Hattar and R. Dingreville },\n"
|
||||
" title = { Characterizing single isolated radiation-damage events from molecular dynamics via virtual diffraction methods },\n"
|
||||
" journal = { Journal of Applied Physics },\n"
|
||||
" year = { 2018 },\n"
|
||||
" volume = { 123 },\n"
|
||||
" number = { 16 },\n"
|
||||
" pages = { 165902 }\n"
|
||||
"}\n\n"
|
||||
"@Article{Lee2020,\n"
|
||||
" author = { C.W. Lee and J.A. Stewart and S.M. Foiles and R. Dingreville and A. Schleife },\n"
|
||||
" title = { Multiscale simulations of electron and ion dynamics in self-irradiated silicon },\n"
|
||||
" journal = { Physical Review B },\n"
|
||||
" year = { 2020 },\n"
|
||||
" volume = { 102 },\n"
|
||||
" number = { 2 },\n"
|
||||
" pages = { 024107 }\n"
|
||||
"}\n\n";
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
FixElectronStoppingFit::FixElectronStoppingFit(LAMMPS *lmp, int narg, char **arg) :
|
||||
Fix(lmp,narg,arg)
|
||||
{
|
||||
if (narg < 3 + 3*atom->ntypes) {
|
||||
error->all(FLERR,"Incorrect number of fix electron/stopping/fit arguments");
|
||||
}
|
||||
|
||||
scalar_flag = 1;
|
||||
global_freq = 1;
|
||||
|
||||
energy_coh_in = new double[atom->ntypes+1];
|
||||
drag_fac_in_1 = new double[atom->ntypes+1];
|
||||
drag_fac_in_2 = new double[atom->ntypes+1];
|
||||
|
||||
for (int i = 1; i <= atom->ntypes; i++) {
|
||||
energy_coh_in[i] = atof(arg[3*i]);
|
||||
drag_fac_in_1[i] = atof(arg[3*i+1]);
|
||||
drag_fac_in_2[i] = atof(arg[3*i+2]);
|
||||
};
|
||||
|
||||
v_min_sq = new double[atom->ntypes+1];
|
||||
v_max_sq = new double[atom->ntypes+1];
|
||||
drag_fac_1 = new double[atom->ntypes+1];
|
||||
drag_fac_2 = new double[atom->ntypes+1];
|
||||
|
||||
for (int i = 1; i <= atom->ntypes; i++) {
|
||||
double mvv;
|
||||
mvv = 2.0*energy_coh_in[i]/force->mvv2e;
|
||||
|
||||
v_min_sq[i] = 1.0*mvv/atom->mass[i];
|
||||
v_max_sq[i] = 2.0*mvv/atom->mass[i];
|
||||
|
||||
drag_fac_1[i] = drag_fac_in_1[i];
|
||||
drag_fac_2[i] = drag_fac_in_2[i];
|
||||
};
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
FixElectronStoppingFit::~FixElectronStoppingFit()
|
||||
{
|
||||
delete [] drag_fac_in_1;
|
||||
delete [] drag_fac_in_2;
|
||||
delete [] drag_fac_1;
|
||||
delete [] drag_fac_2;
|
||||
delete [] v_min_sq;
|
||||
delete [] v_max_sq;
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
int FixElectronStoppingFit::setmask()
|
||||
{
|
||||
int mask = 0;
|
||||
mask |= POST_FORCE;
|
||||
mask |= POST_FORCE_RESPA;
|
||||
return mask;
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
void FixElectronStoppingFit::init()
|
||||
{
|
||||
electronic_loss_this_node = 0.;
|
||||
electronic_loss = 0.;
|
||||
f_dot_v_prior = 0.;
|
||||
f_dot_v_current = 0.;
|
||||
last_step = update->ntimestep;
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
void FixElectronStoppingFit::setup(int vflag)
|
||||
{
|
||||
if (strcmp(update->integrate_style,"verlet") == 0)
|
||||
post_force(vflag);
|
||||
else {
|
||||
((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1);
|
||||
post_force_respa(vflag,nlevels_respa-1,0);
|
||||
((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1);
|
||||
};
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
void FixElectronStoppingFit::post_force(int vflag)
|
||||
{
|
||||
double **v = atom->v;
|
||||
double **f = atom->f;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
f_dot_v_current = 0.0;
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
double vv = v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2];
|
||||
if (vv > v_min_sq[type[i]]) {
|
||||
double gamma_x;
|
||||
double gamma_y;
|
||||
double gamma_z;
|
||||
double v_mag = sqrt(vv);
|
||||
if (vv < v_max_sq[type[i]]) {
|
||||
double frac = (vv - v_min_sq[type[i]])/(v_max_sq[type[i]] - v_min_sq[type[i]]);
|
||||
gamma_x = frac*(drag_fac_2[type[i]]*v[i][0] + drag_fac_1[type[i]]);
|
||||
gamma_y = frac*(drag_fac_2[type[i]]*v[i][1] + drag_fac_1[type[i]]);
|
||||
gamma_z = frac*(drag_fac_2[type[i]]*v[i][2] + drag_fac_1[type[i]]);
|
||||
} else {
|
||||
gamma_x = drag_fac_2[type[i]]*v[i][0] + drag_fac_1[type[i]];
|
||||
gamma_y = drag_fac_2[type[i]]*v[i][1] + drag_fac_1[type[i]];
|
||||
gamma_z = drag_fac_2[type[i]]*v[i][2] + drag_fac_1[type[i]];
|
||||
};
|
||||
f[i][0] -= gamma_x*v[i][0];
|
||||
f[i][1] -= gamma_y*v[i][1];
|
||||
f[i][2] -= gamma_z*v[i][2];
|
||||
f_dot_v_current += sqrt(pow(gamma_x*v[i][0], 2.0) + pow(gamma_y*v[i][1], 2.0) + pow(gamma_z*v[i][2], 2.0))*v_mag;
|
||||
};
|
||||
};
|
||||
this_step = update->ntimestep;
|
||||
electronic_loss_this_node += (this_step - last_step)*update->dt*0.5*(f_dot_v_prior + f_dot_v_current);
|
||||
last_step = this_step;
|
||||
f_dot_v_prior = f_dot_v_current;
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
void FixElectronStoppingFit::post_force_respa(int vflag, int ilevel, int iloop)
|
||||
{
|
||||
if (ilevel == nlevels_respa-1) post_force(vflag);
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
double FixElectronStoppingFit::compute_scalar()
|
||||
{
|
||||
MPI_Allreduce(&electronic_loss_this_node,&electronic_loss,1,MPI_DOUBLE,MPI_SUM,world);
|
||||
return electronic_loss;
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
54
src/USER-MISC/fix_electron_stopping_fit.h
Normal file
54
src/USER-MISC/fix_electron_stopping_fit.h
Normal file
@ -0,0 +1,54 @@
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Contributing authors: Stephen M. Foiles (SNL)
|
||||
James A. Stewart (SNL)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef FIX_CLASS
|
||||
|
||||
FixStyle(electron/stopping/fit,FixElectronStoppingFit)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_FIX_ELECTRON_STOPPING_FIT_H
|
||||
#define LMP_FIX_ELECTRON_STOPPING_FIT_H
|
||||
|
||||
#include "fix.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class FixElectronStoppingFit : public Fix {
|
||||
public:
|
||||
FixElectronStoppingFit(class LAMMPS *, int, char **);
|
||||
~FixElectronStoppingFit();
|
||||
int setmask();
|
||||
void init();
|
||||
void setup(int);
|
||||
void post_force(int);
|
||||
void post_force_respa(int, int, int);
|
||||
double compute_scalar();
|
||||
|
||||
private:
|
||||
double *energy_coh_in,*v_min_sq,*v_max_sq,*drag_fac_in_1,*drag_fac_in_2,*drag_fac_1,*drag_fac_2;
|
||||
double electronic_loss,electronic_loss_this_node;
|
||||
double f_dot_v_prior,f_dot_v_current;
|
||||
int last_step,this_step;
|
||||
int nlevels_respa;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user