yanxon / diffusion

Hydrogen diffusivity in Pd Bulk
2 stars 0 forks source link

H diffuse in Pd #1

Closed yanxon closed 4 years ago

yanxon commented 5 years ago

Hi @timfrol,

I hope your vacation went well.

I created this repo in an attempt to calculate the diffusivity constant.

Please check out the LAMMPS scripts.

yanxon commented 5 years ago

@timfrol

Here is the MD for 300 K (D = 0.95 A^2/ps) after 1ns of equilibration: 300K

400K (D = 4.18 A^2/ps): 400K

Here is the new plot of Arrhenius: Figure_1

timfrol commented 5 years ago

@yanxon

excellent, we nailed that one. It appears that the high T point doesn't follow the perfect Arrhenius behavior. Is this a question of statistics, longer simulation time? Once the slope match the published data we can move on to GB diffusion calculations.

yanxon commented 5 years ago

@timfrol

I reran the MD for 2.2ns (burn 1ns) 500K and 600K. I see this kink at around 2000 ps: 500K

Perhaps, 500K behaves the same as 300K and 400 K, but it is taking longer to occur. I think. I'm currently running longer simulation.

Are you going to be in on Monday?

yanxon commented 5 years ago

@timfrol

I ran the relaxation with this script:

clear
units metal
dimension 3
boundary p p p
atom_style atomic

read_data PdH.dump
group 1 type 1
group 2 type 2

pair_style eam/alloy
pair_coeff * * PdH_zhou.eam.alloy Pd H

compute eng all pe/atom
compute eatoms all reduce sum c_eng

reset_timestep 0
fix 1 all box/relax iso 0.0 vmax 0.001
thermo 10
thermo_style custom step pe vol lx ly lz press pxx pyy pzz c_eatoms
min_style cg
minimize 1e-25 1e-25 5000 10000

variable natoms equal "count(all)"
variable teng equal "c_eatoms"
variable length equal "lx"
variable ecoh equal "v_teng/v_natoms"

print "Total energy (eV) = ${teng};"
print "Number of atoms = ${natoms};"
print "Lattice constant (Angstoms) = ${length};"
print "Cohesive energy (eV) = ${ecoh};"

I got this plot for the E(y-axis) vs V(x-axis): EvsV

There might be phase transition!

timfrol commented 5 years ago

@yanxon

Howard, can you please provide more details? Are you changing the number of H atoms? Energy is a good parameter to look at. Are you saying that there are outlires? In addition it would be good to compare the initialial number of both H and Pd with the numbers after the relaxation.

yanxon commented 5 years ago

@timfrol

The number of atoms stays the same, aka 2048 Pd and 819 H. Here is the log file:

LAMMPS (10 Aug 2015)
Reading data file ...
  orthogonal box = (0 0 0) to (33.3144 33.3144 33.3144)
  1 by 1 by 1 MPI processor grid
  reading atoms ...
  2867 atoms
2048 atoms in group 1
819 atoms in group 2
WARNING: Resetting reneighboring criteria during minimization (../min.cpp:168)
Neighbor list info ...
  1 neighbor list requests
  update every 1 steps, delay 0 steps, check yes
  master list distance cutoff = 7.35
  ghost atom cutoff = 7.35
Setting up cg style minimization ...
  Unit style: metal
Memory usage per processor = 3.65105 Mbytes
Step PotEng Volume Lx Ly Lz Press Pxx Pyy Pzz eatoms 
       0   -5342.8968    36973.849    33.314366    33.314366    33.314366     413482.7    414506.77    390085.35    435855.97   -5342.8968 
      10   -5605.3255    38094.193     33.64751     33.64751     33.64751     338194.9    339135.46    316548.03    358901.22   -5605.3255 
      20   -5823.1731    39236.944    33.980653    33.980653    33.980653    273586.35    274464.33    253496.88    292797.86   -5823.1731 
      .
      .
      .
    2440   -9803.0948    34151.414    32.444137    32.444137    32.444137  0.030968224   -61.352703   -35.198474    96.644082   -9803.0948 
Loop time of 27.5529 on 1 procs for 2440 steps with 2867 atoms

Minimization stats:
  Stopping criterion = energy tolerance
  Energy initial, next-to-last, final = 
        -5342.89683858      -9803.0947871      -9803.0947871
  Force two-norm initial, final = 28643.4 0.00342891
  Force max component initial, final = 28626.1 0.00203344
  Final line search alpha, max atom move = 0.270424 0.000549891
  Iterations, force evaluations = 2440 4190

Pair  time (%) = 26.2664 (95.3308)
Neigh time (%) = 0.171029 (0.62073)
Comm  time (%) = 0.163721 (0.594204)
Outpt time (%) = 0.020715 (0.0751826)
Other time (%) = 0.931046 (3.37912)

Nlocal:    2867 ave 2867 max 2867 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost:    6769 ave 6769 max 6769 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs:    189605 ave 189605 max 189605 min
Histogram: 1 0 0 0 0 0 0 0 0 0

Total # of neighbors = 189605
Ave neighs/atom = 66.1336
Neighbor list builds = 24
Dangerous builds = 0
Total energy (eV) = -9803.09478710058;
Number of atoms = 2867;
Lattice constant (Angstoms) = 32.4441372220902;
Cohesive energy (eV) = -3.41928663658897;

So, the volume will expand during the relaxation. Then at some point, perhaps, it get to a certain volume, the atoms rearrange themselves in which lowers the formation energy.

In case you want to run it yourself. Here is the PdH.dump file and the potentials:

  1. https://github.com/yanxon/diffusion/blob/master/test_script/PdH.dump
  2. https://github.com/yanxon/diffusion/blob/master/PdH_zhou.eam.alloy The simulation takes very short

If you just want to run it yourself, it takes very short

yanxon commented 5 years ago

@timfrol

I visualized the minimization scheme with Ovito. There is no phase transition. The minimization actually moves all the hydrogen atoms that was previously close to the Pd atoms to somewhere in between the lattice.

Do you think it's better to run the MD simulation with the minimized structure?

timfrol commented 5 years ago

@yanxon

Howard, this sounds good. Perhaps you could try inserting atoms where the minimization takes them, further from the Pd atoms into interplanar spacing. In terms of the initial configuration for the MD simulation, it should not matter too much if the atoms do not fly out. This was a test for us, it maybe more important for future GB simulations.

yanxon commented 5 years ago

@timfrol

I think so too. I don't think the MD result is going to change a lot. I have been wasting time on the submission on Borax these past few days. I submitted some jobs and waited for them to run. Then, it turns out there are some bugs in the script. But, I think I have fixed it. Let's see if the MD simulation with more Temperature points works.

yanxon commented 4 years ago

@timfrol

I try Borax again last night. I ran the Pd bulk simulation in parts instead of fully-automation. So, I ran 300K, 325K, 350K, ... 500K for 4 hours/submission instead of 36 hours.

After minimizing the Pd structure with 40% hydrogen, I would be able to obtain closer activation value. Now, it is about 7% error. The red circles are the data before structure minimization. lnDvsT

I'm gonna try to run 550K and 600K to complete the data.

timfrol commented 4 years ago

@yanxon Hi Howard,

I think the slope is good. Why do you think your curve is shifted upward? You are using NPT correct?

yanxon commented 4 years ago

@timfrol

Both red and blue are using the same exact script (NPT). The only difference is the blue dataset ran with minimized structure.

Perhaps, the structure is not minimized, so that the hydrogen can travel more distance before a collision. Thus, this subjected to higher diffusivity.

timfrol commented 4 years ago

@yanxon

There should not be any different, perhaps your equilibration stage is too short.

timfrol commented 4 years ago

@yanxon

Howard, why don't we work on this together next week. I will ask you for your scripts and I will run them myself to see where the discrepancy comes from.

I will need your script that creates the structure with Pd and H, with and without minimization and the lammps script that runs the simulations and outputs the MSQD. In the meantime, you can focus on the potential development.

yanxon commented 4 years ago

Hi @timfrol ,

I give you a folder in Borax. The folder contains 6 items:

When I try give frolov2 PdH_bulk/, it gives me this error:

[yanxon1@borax2:diffusion]$ give frolov2 PdH_bulk/
Giving PdH_bulk/.
/bin/cp: omitting directory 'PdH_bulk/'
Copy of PdH_bulk/ was unsuccessful.
Removing /usr/give/frolov2/yanxon1/ from give spool.
Problem running unlink.
No files given.
timfrol commented 4 years ago

@yanxon great, I will play with it next week

yanxon commented 4 years ago

@timfrol

I created a tar.gz file so that I can give it to you on Borax. The filename is PdH_bulk.tar.gz.

Also, below is a more complete graph: Figure_1

For higher temperature, it seems like the ln(D) agrees more with the literature. However, for the lower temperature, the ln(D) seems to have lower value.

timfrol commented 4 years ago

@yanxon

Thanks Howard, I will take a look soon. Again, the biggest issue I see is that your red and blue points are different. There should not be any difference at all. There must be a bug or something. This is the first thing to check.

yanxon commented 4 years ago

@timfrol

Sounds good. Thank you, Tim.