Hi.
To accurately represent the pre-crack, I need to define a region using lammps that captures the unique geometry of an elliptical prism. However, I am unsure how to create such a region within the software. I have attempted to modify the built-in region styles, but I have not been successful in achieving the desired shape. I wanted to reach out to you and ask if you have any experience on simulating an elliptical prism-shaped pre-crack in lammps.
I also need your advice on appropriate boundary conditions.
If you know of any existing examples that could help me with this challenge, please share it.
How do you need to use the region? To define a group?
Yes, I thought I could create a crack using the (delete_atoms) command. By building a region and defining a group, I believe I can make my crack. But is there any other way to do this?
I couldn’t find any alternative methods.
You could use an an atom style variable to define the group. Only atoms for which the variable evaluates to some non-zero value will be included in the group. The following simple example defines a group for all atoms within 0 and 5 length units in each direction. so it would be similar to using region to_delete block 0 5 0 5 0 5 units box
variable to_delete atom (x>=0)*(x<=5)*(y>=0)*(y<=5)*(z>=0)*(z<=5)
group delete_me variable to_delete
Thank you for your help.
But my main issue is that I need to define an elliptical prism-shaped region (see the linked photo). Could you provide some assistance with this?
You didn’t answer my question what you need the region for.
If it is just for defining a group, my suggestion for using an atom style variable will work well and your problem turns from a LAMMPS problem into a simple issue of math and geometry.
Can you clarify what you mean by boundary conditions?
Is it boundary conditions on the entire simulation box (usually periodic in all three directions) or boundary conditions on the surface of the elliptical prism?
Let me explain what I’m trying to achieve. I need to create a crack in my simulation, which is elliptical-prism shaped. Initially, I tried to find a built-in command to simulate this crack, and my first solution was to define a region in that shape. After transforming the region into a group, I planned to delete it using the delete_atoms) command. However, I couldn’t define the desired region using built-in commands. This has become my main issue—defining an elliptical-prism-shaped region. Now, I need your help to suggest any method to create my elliptical-prism-shaped crack, either by using delete_atoms, an atom style variable, or any other approach.
I already did that. You can use an atom style variable like I showed you for a block region.
Then you can define a group and use delete atoms on that group. The only issue is to define that atom style variable, but that is a question of math and geometry that you should be able to handle yourself.
The alternative would be to implement a new region style, but that is far more complex and more work. Again, doing that would be your job. Most of LAMMPS was contributed by people in your situation, that had a need that was not yet implemented. So they did and contributed their code.
You seem to be having the impression that people are here to do your work for you, but that is not how it is.
I need to find a way to negate or remove the potentials of atoms on the crack surface so that when the temperature reaches 800 K, for example, the crack doesn’t close. I’m not sure if I’ve explained myself clearly. If you have any questions or need further clarification, please let me know.
That’s correct, and thank you for your advice.
Unlike a block shape, creating an elliptical prism requires two conditions: one to define the overall region of the crack and another to create the elliptical shape itself, such as using the equation (((x^2)/(($a)^2)))+((y^2)/(($b)^2)))<=1). How can I implement this in my simulation?
The block example has six conditions. So that is not a problem.