Setting initial temperature and energy constraints?

Hello,

I was wondering if there were ways to set the initial temperature of a simulation and set energy conditions.

The simulation I am trying to run is of a small cylinder (rod) of argon at 300 K, and I would like to fix the total energy of the system so that no energy leaves or enters the system. My goal is to observe the volume of the rod as it approaches equilibrium.

Here is my code as it stands now:

#Cylinder of Argon
units metal metal
boundary s s s

atom_style atomic

lattice f cc 5.26
region rod cylinder x 0 0 5 -2.5 2.5

pair_style lj/cut 8.4

create_box 1 rod
pair_coeff 1 1 1.03e-2 3.4

mass 1 1.0

create_atoms 1 region rod

neighbor 2.0 bin
neighbor_modify delay 10

fix 1 all nve

thermo_style custom step temp vol etotal press
thermo 10
timestep 0.001

run 300

I appreciate any help or advice you could give me.

Thank you,
Casey Hansen
[email protected]…24…

Hello,

I was wondering if there were ways to set the initial temperature of a
simulation and set energy conditions.

​initial temperature can be assigned with the velocity command.

if you use fix nve and nothing else that manipulates positions or
velocities, no energy will leave the system.​

The simulation I am trying to run is of a small cylinder (rod) of argon at
300 K, and I would like to fix the total energy of the system so that no
energy leaves or enters the system. My goal is to observe the volume of the
rod as it approaches equilibrium.

Here is my code as it stands now:

#Cylinder of Argon

units metal metal
boundary s s s

atom_style atomic

lattice f cc 5.26
region rod cylinder x 0 0 5 -2.5 2.5

pair_style lj/cut 8.4

create_box 1 rod
pair_coeff 1 1 1.03e-2 3.4

mass 1 1.0

​argon has an atomic mass of 1???​

create_atoms 1 region rod

neighbor 2.0 bin
neighbor_modify delay 10

fix 1 all nve

thermo_style custom step temp vol etotal press
thermo 10
timestep 0.001

run 300

​300 steps until you reach equilibrium? i don't think so.​

​you now still have the remaining problem to determine the volume, of your
rod, which is not as trivial as you might think.​

axel

Thank you very much for your help. I completely overlooked the mass. That fixed some of the issues. However, I still have the problem of energy leaving and entering the system (and in some cases negative energy). Would this be because I’m using the velocity command? Fixing the energy of this simulation is a pretty important factor to what I’m trying to do.

I appreciate any advice or suggestions you have.

Thanks you,
Casey Hansen
[email protected]…24…

Thank you very much for your help. I completely overlooked the mass. That fixed some of the issues. However, I still have the problem of energy leaving and entering the system (and in some cases negative energy). Would this be because I’m using the velocity command?

The fundamental laws of thermodynamics also apply here. So it is not possible that energy “leaves” or “enters” the system.

Fixing the energy of this simulation is a pretty important factor to what I’m trying to do.

What is your level of understanding of statistical mechanics? Could it be that you are misinterpreting the simulation data or the process of equilibration?

Thank you for your response.

I would say that my understanding of statistical mechanics is basic at best. I majored in physics in college, but most of my upper level classes were in particle and solid state physics.

There is a very good possibility that I’m misinterpreting the simulation data. I have the output of the sum of the potential and kinetic energy of the system, the volume, and the temperature.

I’ve run two 10000 run simulations, one starting at 300K and one starting at 0K, and in both cases the temperature fluctuates, but the the volume increases constantly, and the total energy increases to some value where becomes approximately constant. For the 300K simulation, by total energy starts at -205 eV and goes up from there. I’m not sure if simulation is telling me something I don’t understand or if I’ve set the input data up incorrectly.

Thanks again for your response.
Casey Hansen
[email protected]…29…

Thank you for your response.

I would say that my understanding of statistical mechanics is basic at best. I majored in physics in college, but most of my upper level classes were in particle and solid state physics.

There is a very good possibility that I’m misinterpreting the simulation data. I have the output of the sum of the potential and kinetic energy of the system, the volume, and the temperature.

Then please read up on these topics and particularly equilibration in text books and see if you can find the explanation yourself.