PD simulation via LAMMPS

Dear LAMMPS users,

I hope this message finds you well.
My name is Aki, and I am currently working on a research project involving peridynamics simulation using LAMMPS for a composite material.
I aim to model the behavior of a composite material, taking into account its complex microstructure and failure mechanisms. My goal is to generate a stress-strain curve to analyze the material’s strength, stiffness, and failure characteristics. I have some problems with my LAMMPS script specially for applying the tensile test and stress calculations.
I will be really grateful if someone could help me.
Thank you,
Aki

Unless you explain what specifically your problems are and provide sufficient information and data to reproduce them, it is impossible to provide any assistance.

One would have to be a long-distance mind reader… :wink:

1 Like

Yeah, I’m so sorry. :sweat_smile:
#-------# 3D microscale Peridynamics Ti/TiB composite’s simulation -------------

#-----------------------------------------------------------------------------

units si
dimension 3
boundary s s s

atom_style peri
atom_modify map array
neighbor 0.0010 bin
neigh_modify one 8000

create geometry

lattice sc 0.0005
region plate block -0.00625 0.00620 -0.035 0.030 -0.00145 0.00145 units box
create_box 2 plate

create_atoms 2 random 1150 12345 NULL overlap 1.0 maxtry 50
create_atoms 1 region plate

#potentials

pair_style peri/pmb
pair_coeff 1 1 3.2601e17 0.002005 0.011200 0.25
pair_coeff 1 2 5.4567e17 0.002005 0.009473 0.25
pair_coeff 2 2 9.3567e17 0.002005 0.001073 0.25

set group all volume 1.25e-10
set type 1 density 4506
set type 2 density 4520

compute peratom all pe/atom
compute virial all stress/atom NULL

reset_timestep 0
timestep 5e-8

velocity all create 300 12345
fix 1 all nve

thermo 20
thermo_style custom step lx ly lz press pxx pyy pzz pe temp

dump 1 all custom 50 dump.Ti. id type x y z c_peratom fx fy fz &
c_virial[1] c_virial[2] c_virial[3] c_virial[4] c_virial[5] c_virial[6]

run 920
unfix 1
undump 1

variable tmp equal “ly”
variable L0 equal {tmp} print "Initial Length, L0: {L0}"

reset_timestep 0
fix 1 all nve
fix 2 all deform 1 x erate 0.01

variable strain equal “(ly - v_L0)/v_L0”
variable p1 equal “v_strain”
variable p2 equal “pxx/10000”
variable p3 equal “pyy/10000”
variable p4 equal “pzz/10000”
fix def1 all print 10 “{p1} {p2} {p3} {p4}” file Tideformation.txt title screen no

dump 1 all custom 20 Ti.dump2. id type x y z c_peratom fx fy fz &
c_virial(1) c_virial(2) c_virial(3) c_virial(4) c_virial(5) c_virial(6)

thermo 20
thermo_style custom step v_strain temp v_p2 v_p3 v_p4 ke pe press

run 920

print “All done”

this is my LAMMPS script and I tried to apply the tensile test in the same way I did before in MD simulation but unfortunately my code didn’t work! could you please help me know what is the problem with my input file?
please let me know if there is any question or more required details.
thank you so much :blush:

The last time I tried the nvt too!

There are multiple problems:

  • your input must be properly quoted using triple back quotes (```) or else the forum software will interpret special characters as markup and change the format. Just look at your post.
  • your statement of “it doesn’t work” is about as bad as “i am having problems”. You need to explain what does not work how. What kind of errors you see if any, or how else you come to the conclusion that “it does not work”.

First off, please always report exactly which LAMMPS version you are using and what platform you are running on.

Then the situation is one of the a few cases:
Either there are syntax issues, then LAMMPS will throw and error and you should first study the documentation for the commands that you are using very carefully and see if you can resolve those issues. You can also search the forum. The archives contain the entire LAMMPS mailing list history going back over 15 years. If you cannot resolve them, you need to properly document what is happening and what you did to resolve them. Ideally, the only issue would be that there is a bug in LAMMPS so that it does not agree with the documentation.

The next possibility is that you are setting up a bogus geometry or are using improper parameters and settings. There you have to explain how you chose your parameters and explain other choices so that people can understand what you are trying to do and where possible mistakes could be. Always keep in mind that you are discussing with people that have next to no knowledge of your research, so many issues that may be obvious to you are not obvious to others. If in doubt, better explain something rather than not.

Final possibility is that you have data or results that do not match your expectations, so you have to explain what your expectations are and why and how you chose to set up the simulations and what the reasons are why the results should be as you describe and how the actual data differs. Again, we do not know your research, so the burden is on you to explain what you do. Just dumping your input on us does not explain anything.

Thank you so much for your time and consideration
LAMMPS Shell version 1.2 OS: Windows 11 21H2, Windows ABI 6.2 (9200) on x86_64
MinGW-w64 64bit 9.0 / GNU C++ 11.2.1 20210728 (Fedora MinGW 11.2.1-3.fc35) with OpenMP 4.5

I’m trying to locate the reinforcements (TiB) randomly in the simulation box that is full of the matrix (Ti) particles, and then apply the velocity to tensile the box and compute the stress and strain components. I used this approach before in MD simulation of TiB whiskers.
In this case I’m really confused about boundaries, boundary condition and using the deform command! my last error is about the deform command with shrink-wrapped boundary. Actually, I want to make sure that this way is correct for PD simulation to do the tensile test. I can gain the results for damages but I am looking for a good idea to have stress and strain amount in my output file!
I hope you will forgive me for my not so good English!:smiling_face:

Your command of the English language is not the problem here, but what you say. I have seen plenty worse in my time, but was still able to help people since they provided the required information. But how you conduct and explain your science is not making it possible to help you. Everything you write is too vague and nonspecific or misformatted.

I have tried now multiple of times to guide you to improve but without success. You either need to wait for somebody else that has more patience or make a significantly better effort or try to talk to somebody local that can help you.

I was wondering if it’s possible me to know what information is required to explain more, please?

Please re-read (all) my responses. I have spelled it all out for you. If you don’t understand what I am asking to be able to assist you, then there is little chance that you will understand my on-topic explanations.

By sure.
Anyway, thank you so much.