YSZ

Dear lammps users,

I would like to simulate thermal conductivity in YSZ, Y stabilized ZrO2. But I do not know how to create data file. I want to create write data file but sow me some errors that some atoms are missing.I have error

variable a0 equal 5
lattice custom ${a0} a1 1 0 0 a2 0 1 0 a3 0 0 1 basis 0 0 0 basis 0 0.5 0.5 basis 0.5 0 0.5 basis 0.5 0.5 0 basis 0 0 0 basis 0 0.5 0.5 basis 0.5 0 0.5 basis 0.5 0.5 0 basis 0.25 0.25 0.25 basis 0.75 0.75 0.75 basis 0.75 0.75 0.25 basis 0.25 0.25 0.75 basis 0.75 0.25 0.75 basis 0.25 0.75 0.25 basis 0.25 0.75 0.75 basis 0.75 0.25 0.25

dimension 3
boundary p p p

region box block 0 2 0 2 0 2

create_box 3 box

create_atoms 1 box basis 1 1 basis 2 1 basis 3 1 basis 4 1 basis 5 2 basis 6 2 basis 7 2 basis 8 2 basis 9 3 basis 10 3 basis 11 3 basis 12 3 basis 13 3 basis 14 3 basis 15 3 basis 16 3

Create groups

group Zr type 1 #A for cations
group Y type 2 #B for cations
group O type 3 #C for anions

Set charges

set group 1 charge 2.4
set group 2 charge 2.4
set group 3 charge -1.2

set group 1 type/fraction 1 0.8 2150
set group 2 type/fraction 2 0.2 1353
set group 3 type/fraction 3 0.9 4652

Set masses

variable 1 equal 91.224# Zr
variable 2 equal 88.915 # Y
variable 3 equal 15.999 # O

Thanks in advance

Zahra

the provided input cannot run correctly.
there are multiple problems that are ignoring basic LAMMPS command requirements, which can be learned by simply following the LAMMPS documentation.
please find comments inserted into the input.

Dear lammps users,

I would like to simulate thermal conductivity in YSZ, Y stabilized ZrO2. But I do not know how to create data file. I want to create write data file but sow me some errors that some atoms are missing.I have error

as mentioned, there is no “atoms missing” error, but the error is about undefined groups.

there is no units setting here. LAMMPS defaults to reduced units (units lj) but the lattice command below suggests, that you would rather want to use a units style that has angstroms as length units (i.e. metal or real).

variable a0 equal 5
lattice custom ${a0} a1 1 0 0 a2 0 1 0 a3 0 0 1 basis 0 0 0 basis 0 0.5 0.5 basis 0.5 0 0.5 basis 0.5 0.5 0 basis 0 0 0 basis 0 0.5 0.5 basis 0.5 0 0.5 basis 0.5 0.5 0 basis 0.25 0.25 0.25 basis 0.75 0.75 0.75 basis 0.75 0.75 0.25 basis 0.25 0.25 0.75 basis 0.75 0.25 0.75 basis 0.25 0.75 0.25 basis 0.25 0.75 0.75 basis 0.75 0.25 0.25

dimension 3
boundary p p p

region box block 0 2 0 2 0 2

create_box 3 box

create_atoms 1 box basis 1 1 basis 2 1 basis 3 1 basis 4 1 basis 5 2 basis 6 2 basis 7 2 basis 8 2 basis 9 3 basis 10 3 basis 11 3 basis 12 3 basis 13 3 basis 14 3 basis 15 3 basis 16 3

Create groups

group Zr type 1 #A for cations
group Y type 2 #B for cations
group O type 3 #C for anions

the command below cannot work, because there have been no groups defined that are called 1, 2, or 3
also, the command will fail unless you have an atom style that supports charges. LAMMPS defaults to atom style atomic, which does not support charges.

Set charges

set group 1 charge 2.4
set group 2 charge 2.4
set group 3 charge -1.2

the commands below are bogus. there is no point to changing a fraction of the atoms to the type, that they are already defined as.
the total fractions are given by your lattice commands already. you have obviously not understanding how set type/fraction would work.
you need to be more diligent in reading and understanding the LAMMPS documentation.

set group 1 type/fraction 1 0.8 2150
set group 2 type/fraction 2 0.2 1353
set group 3 type/fraction 3 0.9 4652

Set masses

the commands below do NOT set masses. LAMMPS has a mass command. again, the problem here is in lack of proper study of the LAMMPS documentation. this is all documented and explained.

variable 1 equal 91.224# Zr
variable 2 equal 88.915 # Y
variable 3 equal 15.999 # O

when creating a geometry with lattice and create_atoms, no data file would be needed. so your overall question makes very little sense. it also is not clear what you are trying to do with the resulting system. there is lots of information and settings missing for a complete calculation.

axel.

Thanks Axel

I want to run this program and use write_data to create a read data file.

Also I have used:
units metal
atom_style charge

that script is just one part of program.

I do not understand how to make fraction?

Is it need to put vacancy?

Best wishes
Zahra

the provided input cannot run correctly.
there are multiple problems that are ignoring basic LAMMPS command requirements, which can be learned by simply following the LAMMPS documentation.
please find comments inserted into the input.

Dear lammps users,

I would like to simulate thermal conductivity in YSZ, Y stabilized ZrO2. But I do not know how to create data file. I want to create write data file but sow me some errors that some atoms are missing.I have error

as mentioned, there is no “atoms missing” error, but the error is about undefined groups.

there is no units setting here. LAMMPS defaults to reduced units (units lj) but the lattice command below suggests, that you would rather want to use a units style that has angstroms as length units (i.e. metal or real).

variable a0 equal 5
lattice custom ${a0} a1 1 0 0 a2 0 1 0 a3 0 0 1 basis 0 0 0 basis 0 0.5 0.5 basis 0.5 0 0.5 basis 0.5 0.5 0 basis 0 0 0 basis 0 0.5 0.5 basis 0.5 0 0.5 basis 0.5 0.5 0 basis 0.25 0.25 0.25 basis 0.75 0.75 0.75 basis 0.75 0.75 0.25 basis 0.25 0.25 0.75 basis 0.75 0.25 0.75 basis 0.25 0.75 0.25 basis 0.25 0.75 0.75 basis 0.75 0.25 0.25

dimension 3
boundary p p p

region box block 0 2 0 2 0 2

create_box 3 box

create_atoms 1 box basis 1 1 basis 2 1 basis 3 1 basis 4 1 basis 5 2 basis 6 2 basis 7 2 basis 8 2 basis 9 3 basis 10 3 basis 11 3 basis 12 3 basis 13 3 basis 14 3 basis 15 3 basis 16 3

Create groups

group Zr type 1 #A for cations
group Y type 2 #B for cations
group O type 3 #C for anions

the command below cannot work, because there have been no groups defined that are called 1, 2, or 3
also, the command will fail unless you have an atom style that supports charges. LAMMPS defaults to atom style atomic, which does not support charges.

Set charges

set group 1 charge 2.4
set group 2 charge 2.4
set group 3 charge -1.2

the commands below are bogus. there is no point to changing a fraction of the atoms to the type, that they are already defined as.
the total fractions are given by your lattice commands already. you have obviously not understanding how set type/fraction would work.
you need to be more diligent in reading and understanding the LAMMPS documentation.

set group 1 type/fraction 1 0.8 2150
set group 2 type/fraction 2 0.2 1353
set group 3 type/fraction 3 0.9 4652

Set masses

the commands below do NOT set masses. LAMMPS has a mass command. again, the problem here is in lack of proper study of the LAMMPS documentation. this is all documented and explained.

variable 1 equal 91.224# Zr
variable 2 equal 88.915 # Y
variable 3 equal 15.999 # O

when creating a geometry with lattice and create_atoms, no data file would be needed. so your overall question makes very little sense. it also is not clear what you are trying to do with the resulting system. there is lots of information and settings missing for a complete calculation.

axel.

Thanks Axel

I want to run this program and use write_data to create a read data file.

why read a data file, if you can create the system right away?

Also I have used:
units metal
atom_style charge

that script is just one part of program.

it is extremely irritating and frustrating when people post incomplete and non-functioning input script code. you are just inviting people to give you incorrect advice.

I do not understand how to make fraction?

a fraction of what? where and how and with what command, and why do you want/need to do this?

Is it need to put vacancy?

how should anybody be able to answer this question?

in general, the quality and usefulness of responses to your question crucially depends on the quality and clarity of the information you provide and how well formulated your questions are. you are so far doing a bad job in that regard and thus there is only very little help that can be given.

axel.

Thx Axel,
I have run program for ZrO2 and i want to run program for doped ZrO2 (YSZ). I do not know how add Y to my program. Should I use fraction for Y and Zr and add vacancy of Oxygen?

MD Calculation of doped-ZrO2

units metal
atom_style charge

dimension 3
boundary p p p

variable a0 equal 5
lattice custom ${a0} a1 1 0 0 a2 0 1 0 a3 0 0 1 basis 0 0 0 basis 0 0.5 0.5 basis 0.5 0 0.5 basis 0.5 0.5 0 basis 0 0 0 basis 0 0.5 0.5 basis 0.5 0 0.5 basis 0.5 0.5 0 basis 0.25 0.25 0.25 basis 0.75 0.75 0.75 basis 0.75 0.75 0.25 basis 0.25 0.25 0.75 basis 0.75 0.25 0.75 basis 0.25 0.75 0.25 basis 0.25 0.75 0.75 basis 0.75 0.25 0.25

dimension 3
boundary p p p

region box block 0 4 0 4 0 4

create_box 3 box

create_atoms 1 box basis 1 1 basis 2 1 basis 3 1 basis 4 1 basis 5 2 basis 6 2 basis 7 2 basis 8 2 basis 9 3 basis 10 3 basis 11 3 basis 12 3 basis 13 3 basis 14 3 basis 15 3 basis 16 3

Create groups

group Zr type 1 #A for cations
group Y type 2 #B for cations
group O type 3 #C for anions

set group 1 charge 2.4
set group 2 charge 2.4

set group 3 charge -1.2

set group 1 type/fraction 1 0.8 2150
set group 2 type/fraction 2 0.2 1353
set group 3 type/fraction 3 0.9 4652

Set masses

variable 1 equal 91.224# Zr
variable 2 equal 88.915 # Y
variable 3 equal 15.999 # O

variable V equal vol

variable dt equal 0.0015

variable T equal 200

variable P equal 0.0

variable kB equal 8.6173423e-5 # [eV/K] Boltzman constant

variable eV2J equal 1.60217646e-19
variable A2m equal 1.0e-10
variable ps2s equal 1.0e-12
variable convert equal {eV2J}/{A2m}/${ps2s}

variable CL equal 10000 # correlation length
variable SI equal 1 # sample interval
variable DI equal {CL}*{SI} # dump interval

setup problem

velocity all create $T 27281 units box

pair_style buck/coul/long 10.0 10
pair_coeff 1 3 1986.8 0.3511 20.40

pair_style buck/coul/long 10.0 10
pair_coeff 3 3 22746.3 0.1490 45.83

pair_style buck/coul/long 10.0 10
pair_coeff 1 1 0.0 1.0 0.0

pair_style buck/coul/long 10.0 10
pair_coeff 2 3 1885.75 0.3399 20.34

pair_style buck/coul/long 10.0 10
pair_coeff 2 2 0.0 1.0 0.0

pair_style buck/coul/long 10.0 10
pair_coeff 1 2 0.0 1.0 0.0

kspace_style ewald 1.0e-4

equilibrization and thermalization

fix NPT all npt temp $T $T 0.15 iso $P $P 1.5

run 2000000

thermal conductivity calculation

unfix NPT

fix NPT all npt temp $T $T 0.15 iso $P $P 1.5

reset_timestep 0

compute myKE all ke/atom
compute myPE all pe/atom
compute myStress all stress/atom NULL virial
compute flux all heat/flux myKE myPE myStress
variable Jx equal c_flux[1]/vol
variable Jy equal c_flux[2]/vol
variable Jz equal c_flux[3]/vol

variable scale equal 1/${kB}/$T/$T/V*{SI}{dt} variable k11 equal trap(f_JJ[3])*{scale}{convert} variable k22 equal trap(f_JJ[4])*{scale}{convert} variable k33 equal trap(f_JJ[5])*{scale}${convert}

run 2000000

variable k equal (v_k11+v_k22+v_k33)/3.0
variable ndens equal count(all)/vol

print “average thermal conductivity: $k [W/mK] @ T K, {ndens} /A^3”

Thanks Axel

I want to run this program and use write_data to create a read data file.

why read a data file, if you can create the system right away?

Also I have used:
units metal
atom_style charge

that script is just one part of program.

it is extremely irritating and frustrating when people post incomplete and non-functioning input script code. you are just inviting people to give you incorrect advice.

I do not understand how to make fraction?

a fraction of what? where and how and with what command, and why do you want/need to do this?

Is it need to put vacancy?

how should anybody be able to answer this question?

in general, the quality and usefulness of responses to your question crucially depends on the quality and clarity of the information you provide and how well formulated your questions are. you are so far doing a bad job in that regard and thus there is only very little help that can be given.

axel.

Thx Axel,
I have run program for ZrO2 and i want to run program for doped ZrO2 (YSZ). I do not know how add Y to my program. Should I use fraction for Y and Zr and add vacancy of Oxygen?

you are not making sense. your system already contains Y atoms. just visualize it to see.
there are a lot more of bad/incorrect things in your input. some of which i already pointed out as incorrect previously and you didn’t address. in fact, this input cannot run because of the unresolved mistakes.

it looks like you need more help than can be provided through a mailing list. you need to find a local tutor and talk about this with your adviser/supervisor.

axel.

Dear Axel,

Your comments are worthless. If you can not help and guide me, Just say that.

Thx Axel,
I have run program for ZrO2 and i want to run program for doped ZrO2 (YSZ). I do not know how add Y to my program. Should I use fraction for Y and Zr and add vacancy of Oxygen?

you are not making sense. your system already contains Y atoms. just visualize it to see.
there are a lot more of bad/incorrect things in your input. some of which i already pointed out as incorrect previously and you didn’t address. in fact, this input cannot run because of the unresolved mistakes.

it looks like you need more help than can be provided through a mailing list. you need to find a local tutor and talk about this with your adviser/supervisor.

axel.

Unless you start reading the documentation, LAMMPS error messages and answers Axel has given you more carefully, I do not think anyone can help and guide you.