# Why does the lattice constant remain unchanged with temperatures variation ?

Hello,

I am very new to LAMMPS, and taking my first steps in MD with it. I wanted to try to simulate the thermal expansion coefficient of Al in a simple way, using the basic features of LAMMPS.

The basic idea was to create a loop which, at each step :

l Uses the fix box/relax under 1 bar pressure to let itself expand freely in later operations

l Performs a NPT run from Tn to Tn+1, under a fixed pressure of 1.0 bar

l After reaching Tn+1, minimzes its energy (with a fix box/relax to expand freely), to reach its most stable configuration at that temperature

l Computes temperature and volume and exports them to a file

I would have expected this to result in the following : as the value of Tn+1 gets higher and higher, the most stable lattice constant reached after energy minimization should have been larger and large, effectively reproducing the thermal dilatation.

However, what I observe is even simpler : nothing chqnges. The volume remains constant for all temperatures.

What is the problem here ? What is the reason why my simulation fails to reproduce thermal expansion in this simple way ?

My input scritp is given below.

Many thanks in advance !

shell rm data_alpha

print “Timestep |||| Temperature |||| atomic volume” append data_alpha

#------------ units ----------------------

boundary p p p

units metal

atom_style atomic

timestep 0.005

#------------ lattice ----------------------

variable lattice_constant equal 4.025

lattice fcc \${lattice_constant}

region box block 0 1 0 1 0 1

create_box 1 box

create_atoms 1 box

#------------ potential ----------------------

pair_style eam/alloy

pair_coeff * * Al_mm.eam.fs Al

mass 1 26.98

#------------- variables&export ----------

dump 1 all custom 1 dump.* mass type xs ys zs

variable N equal atoms

variable atomic_volume equal vol/\$N

variable T equal temp

variable time equal step

variable Tstart equal 200

variable Tstop equal 800

variable Titer equal 20

variable Tincrement equal \$((v_Tstop-v_Tstart)/v_Titer)

run 0

#------------loop to get data on different temperatures--------

label loopTemp

variable i loop \${Titer}

variable startingT equal \${Tstart}+(i-1)*{Tincrement}

variable currentT equal \${Tstart}+i*{Tincrement}

### NPT run to reach a given temperature

fix 1 all box/relax iso 1.0

fix NPT_fix all npt temp {startingT} {currentT} 0.008 iso 1.0 1.0 10000

dump_modify 1 every 2500

run 5000

### minimize energy at the given temperature

fix 1 all box/relax iso 1.0

minimize 1.0e-25 1.0e-25 5000 10000

print “\${time} T {atomic_volume}” append data_alpha

#------------closing the loop--------

next i

jump SELF loopTemp

Minimizations are always at 0K.

Grab a book on Statistical Mechanics an learn, that there is no such thing as a minimum at a given temperature. But an ensemble of equivalent configurations for finite temperature.

You need to find a tutor if you want to avoid missteps like this.

Axel