chr1shr / voro

Voro++: a three-dimensional Voronoi cell library in C++
Other
154 stars 44 forks source link

Problem with Lee-Edwards boundary condition #18

Open zjufrcon opened 3 years ago

zjufrcon commented 3 years ago

When my simulation boundary conditions are Lee-Edwards in x y and z direction, in shear gradient direction(like use fix deform in lammps), local fraction calculted in this direction seems wired on particles near the boundary, but it's normal in other two directions, I want to ask that does code consider about shear displacement induced by box deformed?

Because I transfer my simulation box from triclinc to cube to use Command-line utility, I think code in ZEO which dealt with non-orthogonal periodic boundary is quiet different with periodic boundary in cube?

chr1shr commented 3 years ago

If you are using Lees–Edwards boundary conditions, then the regular container class with periodic boundary conditions will not work. It assumes that all of the periodic images are orthogonally aligned, but that's no longer the case.

There is a variation on the regular class called container_periodic that can work with non-orthogonal periodic boundary conditions. It is currently not usable via the command-line utility and the only way to use it is via C++. You can take a look at the cp_test.cc example in the zeo directory.

I am currently overhauling the library (in the "dev" branch) and one of the goals of the overhaul is to make the command-line utility also work with container_periodic. It could be a few weeks before that is available, though.

zjufrcon commented 3 years ago

If you are using Lees–Edwards boundary conditions, then the regular container class with periodic boundary conditions will not work. It assumes that all of the periodic images are orthogonally aligned, but that's no longer the case.

There is a variation on the regular class called container_periodic that can work with non-orthogonal periodic boundary conditions. It is currently not usable via the command-line utility and the only way to use it is via C++. You can take a look at the cp_test.cc example in the zeo directory.

I am currently overhauling the library (in the "dev" branch) and one of the goals of the overhaul is to make the command-line utility also work with container_periodic. It could be a few weeks before that is available, though.

Thanks for reply, I have tested with cp_test.cc for non-orthogonally, but the results I get from container class are as the same as container_periodic. I have choose onestep, my container parameters as below(like lammps dump file):

-6.02 6.62 0.60(x direction) -6.02 6.02 0(y direction) -6.02 6.02 0(z direction)

That means my box(cube) length is 12.04, and shear direction is x direction, shear gradient is y direction which I meet a problem when I just use container class. When I use container_prd class. I set: bx =12.04; bxy=0.6, by=12.04; bxz=0,byz=0,bz =12.04; My think is that, only xy tilt value is 0.6, bx by and bz are box length. When I calculated it, the code return me a cube seen from the povray. But when I calculate local function, I get the same PDF with container class. Did I make mistakes on bx by bz... settings?