[lammps-users] query on fix/AtC

Dear users,

I recently started to work on fixAtC command. I want to know if by using the “thermal” option in this command, is it possible to estimate thermal conductivity of very large systems (order of microns) which are impossible to calculate using the conventional MD ?

Thanks
Ajit

Hi Ajit, to help answer your question take a look at the example problems in:

Wagner, Jones, Templeton, & Parks, "An atomistic-to-continuum coupling method for heat transfer in solids," CMAME 197 2008
Templeton, Jones, & Wagner, "Application of a field-based method to spatially varying thermal transport problems in molecular dynamics," MSMSE 18 2010

In one case MD is extended with finite elements, but you need to supply to them a constitutive law, while in the other the method provides appropriate boundary conditions to facilitate computation of the phonon-mediated thermal conductivity. If you want to measure the conductivity imparted by phonons, you need to simulate phonons. If you are interested, for example, in the impact a lattice defect has on the conductivity, the method is more appropriate. The papers should give you an idea of the application areas, but if you figure out how to use it for the problem you describe, well that's why Lammps is open source.
Jeremy

Jeremy,

Thanks for referring to those examples. Things are more clear to me now. But i still have some concerns about the implementation. I am actually trying to use two temp model in my work.

  1. Can’t we use normal fix/NVT or NVE or NPT in these type of problems?

  2. I didn’t observe the advantage of using fix/atc thermal coupling clearly. Like in the examples on Argon, it was mentioned that temp’s on left and right ends are maintained at 40 &20 k respectively. It can be implemented directly with out using any coupling to observe a steady state temp profile. So, what’s the point in using this method.

  3. How much will the computation time vary with using fix/atc-thermal or ttm compared to the simulation with out using them?

Thanks
Ajit

Hi Ajit, answers in line:

Jeremy,

            Thanks for referring to those examples. Things are more clear to me now. But i still have some concerns about the implementation. I am actually trying to use two temp model in my work.

Here's the ttm reference as well then:

Jones, Templeton, Wagner, Olmsted, & Modine, "Electron transport enhanced molecular dynamics for metals and semi-metals," IJNME 83 (8-9) 2010.

   1. Can't we use normal fix/NVT or NVE or NPT in these type of problems?

No, you cannot use any other fix that performs time integration with ATC (except for Hardy). The reason is that ATC provides it's own thermostatting based on the user-specified coupling. If other thermostats are used, the two will conflict.

  2. I didn't observe the advantage of using fix/atc thermal coupling clearly. Like in the examples on Argon, it was mentioned that temp's on left and right ends are maintained at 40 &20 k respectively. It can be implemented directly with out using any coupling to observe a steady state temp profile. So, what's the point in using this method.

There are three main (intended) applications of the AtC dynamics packages (again distinct from Hardy): 1) multiscale coupling with a larger finite element model, 2) multiphysics coupling, e.g., MD with an electron temperature model, and 3) prescription of NEMD conditions including boundary conditions, initial conditions, and sources corresponding to those typically encountered in finite elements. In mode 3, standard Lammps commands of creating regions and then applying heat fluxes and thermostats to atoms in those regions is equivalent to using AtC with piecewise constant elements and no time filtering (the Templeton et al. paper describes this in more detail). AtC would make setting up these problems much easier, but more importantly significantly generalizes the method to use other type of shape functions and basing the thermostat effort on time filtered values. Empirically this has been shown to have advantages as can be seen in the Si conductivity example in Templeton et al. The decay of the piecewise linear shape function results in a smoother transition from the thermostatted to non-thermostatted regions and so we were able to calculate the conductivity of a Si sheet that was much thinner than had been done in the past using other methods, to the best of our knowledge.

3. How much will the computation time vary with using fix/atc-thermal or ttm compared to the simulation with out using them?

It depends on how big your finite element mesh is and how much/what type of thermostatting you do. Also, our finite element calculations are not parallelized (the interactions with the atoms is parallelized using the same scheme as Lammps). Our code up until now has been primarily for research, so it is far from optimized. We will be looking at improving performance over the next year, although unless you need a very large grid or are running on a very large number of processors, if your Lammps simulation cost is acceptable I would think adding AtC would not make it unacceptable.
Jeremy

Jeremy,

Thanks again for your comments. I read through a couple of sample programs on ttm. I am getting an error message when i tried
to run them. I didnot make any changes to the program. I think the problem is with reading the parameters from the file “Ar_ttm.mat”. I copied the file into the same folder as the input. Please let me know if there is anything more that has to be done.

“in.bar1d_ttm” is the input file i tried to run.

The output from the log file is here:

LAMMPS (3 Jul 2010)

in this example the electron temperature on the left is ramped up in time

and held fixed on the right. the phonon temperature is free on the left

and fixed and consistent with the electron temperature on the right.

this mimics some simplified pumped system

also a volume source is added to mimic Joule heating

#echo both

units

units real
atom_style atomic

create domain

#lattice type reduced density rho* = 4*(sigma/a)^3,

where N = 4 for fcc,

s = 3.405 A (Wagner)

a = 5.25 A (Ashcroft & Mermin, p. 70)

#if {restart}
boundary f p p
pair_style lj/cut 13.5
read_data temp.init
orthogonal box = (-64.86 -16.215 -16.215) to (64.86 16.215 16.215)
1 by 1 by 1 processor grid
3456 atoms
3456 velocities
#endif

lattice fcc 5.405 origin 0.25 0.25 0.25
Lattice spacing in x,y,z = 5.405 5.405 5.405
region feRegion block -14 14 -3 3 -3 3
region mdRegion block -12 12 -3 3 -3 3
region mdInternal block -10 10 -3 3 -3 3

NOTE: don’t define ghosts if they are outside the feRegion

group internal region mdInternal
2880 atoms in group internal
group ghost subtract all internal
576 atoms in group ghost

create atoms

#if !{restart}
#boundary f p p
#create_box 1 mdRegion
#create_atoms 1 region mdRegion
#mass 1 39.95
#pair_style lj/cut 13.5
#pair_coeff 1 1 .238 3.405 13.5
#velocity internal create 40 87287 mom yes loop geom
#endif

timestep & neighboring

timestep 5.0
thermo 10
neighbor 5. bin
neigh_modify every 10 delay 0 check no

ID group atc PhysicsType ParameterFile

fix AtC internal atc two_temperature Ar_ttm.mat
ERROR: Invalid fix style

Have you built/installed the atc package? This error makes it look as though you haven't. Instructions can be found on the Lammps website:

http://lammps.sandia.gov/doc/Section_start.html#2_3_3

Jeremy,

i have build the atc library by modifying the existing make file. I got the file “libatc.a”. But i am not sure how to build the package or link it to LAMMPS. I compiled LAMMPS before without any of these libraries, But not quite sure how to do it with this library.

I used this command as per documentation and got the following output.

make yes-atc

*** No rule to make traget ‘yes-atc’. Stop

Thanks
Ajit

Jeremy,

          i have build the atc library by modifying the existing make

file. I got the file "libatc.a". But i am not sure how to build the package
or link it to LAMMPS. I compiled LAMMPS before without any of these
libraries, But not quite sure how to do it with this library.

I used this command as per documentation and got the following output.

make yes-atc

*** No rule to make traget 'yes-atc'. Stop

try: make yes-user-atc

axel.

Axel,

I generated the “libatc.a” file. Then i used the command “make yes-user-atc” for installing the package. I think it worked fine. Later when i tried to generate the exe file, the process terminated in between with the following message.

catastrophic error: cannot open source file “ATC_Transfer.h”
#include “ATC_Transfer.h”
make[1]: *** [fix_atc.d] Error 4
make[1]: Leaving directory `/usr/rmt_share/scratch95/a/lammps-12Mar11/src/Obj_rhel5’
make: *** [rhel5] Error 2

When i tried with out the library “atc”, the exe file was generated successfully. Please let me know if there is any problem.

Thanks
Ajit

Axel,
I generated the "libatc.a" file. Then i used the command "make
yes-user-atc" for installing the package. I think it worked fine. Later when
i tried to generate the exe file, the process terminated in between with the
following message.

catastrophic error: cannot open source file "ATC_Transfer.h"
#include "ATC_Transfer.h"
make[1]: *** [fix_atc.d] Error 4
make[1]: Leaving directory
`/usr/rmt_share/scratch95/a/lammps-12Mar11/src/Obj_rhel5'
make: *** [rhel5] Error 2

When i tried with out the library "atc", the exe file was generated
successfully. Please let me know if there is any problem.

in short: PEBCAC

the longer explanation is that your Makefile.rhel5 is probably
not conforming to what is needed for the lammps build.
have a look at, e.g., MAKE/Makefile.linux or MAKE/Makefile.openmpi
and compare them to whatever you are using. the essential
line is the include Makefile.package statement which pulls in
a file, Makefile.package, that has the correct include path
for the ATC headers. these things have changed a while ago,
so if you are using a makefile that was customized before that,
then it is probably not conforming. the only other explanation
would be that your Makefile.package is messed up somehow,
but i don't know how that would be possible.

cheers,
    axel.

Axel,

I am not very familiar with these codes. I see some difference in the codes (i guess something regarding libraries is definitely missing). Below is the make file i used. It works if you need not build any libraries. Please take a look and let me know what should be added.

MAKE FILE:

Axel,

          I am not very familiar with these codes. I see some
difference in the codes (i guess something regarding libraries is
definitely missing). Below is the make file i used. It works if you
need not build any libraries. Please take a look and let me know what
should be added.

if you didn't write that makefile yourself,
why don't you ask the person that gave it to you?

other than that, just use some common sense:
take one of the existing makefiles in the distribution,
e.g. Makefile.linux or Makefile.openmpi and adjust the
settings where there are comments about changing them
for your system and leave those without alone.

axel.

Dear Axel,
I finally am able to compile and link the Atc Library. I ran some example programs on ttm successfully on Argon.

In the example “in.uniform_exchange” I want to know why the coordinates and velocities of Ar atoms were input separately using “read_data” command instead of creating it directly in the main program itself using “create_atoms” & “velocity” commands. (I tried the program with above commands and it worked fine.)

Also, i tried to run the same program on copper just by replacing the material propertoes of Ar with Cu. But it got terminated after the equilibration part with the following message.

Hi Ajit. The answer to your first question is that we read data in to have a common benchmarking problem the produces the same results in both serial and parallel. This can help us debug problems you encounter. The atoms were initially created using standard lammps commands, so this is a perfectly viable option as well.

As for the error, can you please attach your input deck. It is hard to debug a problem just from these outputs.
Jeremy

Jeremy,

Here is the input file. As i mentioend, its being terminated after the first 500 timesteps with the error message (bold and underlined below).

Hi Ajit, I looked through the input deck and ran it myself. The AtC error is simply the proximate cause of the problem. The real cause is units, which should be metal to correspond to the eam file potential and the units of the Cu_ttm.mat file. There are also a number of minor suggestions which I’ve outlined below. In the future when you observe a failure, please change thermo to 1 and look at the output, which in this case would probably have led you to the same conclusions. You should try to play around with it first before sending it to the user list.
Jeremy

Suggestions (not necessary):

  1. When using AtC, it’s best to offset the atomic lattice from the finite elements for best performance. In this case append origin 0.25 0.25 0.25 to the lattice command. You’ll see what I mean if you overlay the FE and MD output files.
  2. Create an initial velocity of 2X the temperature you want, which gives you the correct initial energy for atoms.
  3. During AtC equilibration, turn off the exchange between the electrons and phonons with the following command
    fix_modify atc extrinsic exchange off
    and then turn it on when you are ready to get at the physics.
  4. Start with a case with no time filtering. It’s a bit more temperamental.
  5. Always Always Always check your time step refinement. AtC imposes additional time stepping constraints in some cases (see point 4), but your timesteps look too big for this case anyway.

Jeremy,
Thanks for ur reply.

However, i want to do some simulations on copper with fixed BC. In that case, should i describe my mesh only over the atoms that can move?

Thanks
Ajit

Yes, you can declare atc to apply to any particular group, just like any other fix.
Jeremy

Jeremy,

I tried a case for copper similar to the example " in.uniform_exchange" where there is an inequilibrium between temp’s of electron and phonon and then they are let to equilibrate.However, i observed continuous increase in temperature in the equilibration phase. But if i repeat the same with filter off, then it looks normal. (although i expect some increase in phonon temp and decrease in electron temp) From the literature, i understood that filtering is done to reduce fluctuations and if a large mesh is used, the fluctuations can be reduced. So, is it ok if i continue my calculations without the filtering with a coarse mesh or is there a simple way to fix the problem??

Actually, i want to simulate the electron-phonon nonequilibrium process in copper. First i want to equilibrate both e & ph to 300k and then introduce some non-eqbm in phonon temp by applying a velocity and then let it equilibrate. Does the command fix/ttm helps in this regard?? ANy other comments regarding the best approach to model this problem will be appreciated.

Thanks
Ajit

Here is the input file: (output file is attached)

cuttm.engy (264 KB)

Hi Ajit, a few comments are in-line.

            I tried a case for copper similar to the example " in.uniform_exchange" where there is an inequilibrium between temp's of electron and phonon and then they are let to equilibrate.However, i observed continuous increase in temperature in the equilibration phase. But if i repeat the same with filter off, then it looks normal. (although i expect some increase in phonon temp and decrease in electron temp) From the literature, i understood that filtering is done to reduce fluctuations and if a large mesh is used, the fluctuations can be reduced. So, is it ok if i continue my calculations without the filtering with a coarse mesh or is there a simple way to fix the problem??

The results you produced look quite reasonable. There is a rapid relaxation of the electron temperature to the phonon temperature. If the relaxation timescale is not correctly, the mostly likely way to address it is to use different exchange coefficients and heat capacities. There is plenty of info in the literature for these values for the materials you're studying, at least in the bulk. Without seeing the results when using filtering, I can't comment, but it does tend to be less numerically stable from the loss of machine precision commensurate with the filter scale.

         Actually, i want to simulate the electron-phonon nonequilibrium process in copper. First i want to equilibrate both e & ph to 300k and then introduce some non-eqbm in phonon temp by applying a velocity and then let it equilibrate. Does the command fix/ttm helps in this regard?? ANy other comments regarding the best approach to model this problem will be appreciated.

First, there is no equilibration of the phonons as they are a continuous field with a given initial condition. Second, during equilibration I would suggest turning the exchange off. This also may adversely impact the filter. Third, I know it is confusing, but atc and ttm are totally independent and were written by different groups of people. My limited understanding of fix/ttm is that it assumes a spatially uniform electron temperature and density (questions about it are best directed to the user list). fix/atc is designed for non-equilibrium calculations. In your case, I imagine the departure from equilibrium would be driven by boundary conditions/sources on the electrons and/or phonons, depending on what is the physics you're interested in.
Jeremy