LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] region move with periodic boundary conditions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] region move with periodic boundary conditions


From: Axel Kohlmeyer <akohlmey@...24...>
Date: Tue, 24 Oct 2017 10:12:06 -0400

On Tue, Oct 24, 2017 at 7:32 AM, Francesco Benfenati
<f.benfenati@...7192...> wrote:
> Hi,
>
> I'm studying a flow inside a nanotube, with periodic boundary conditions:
> the fluid particles exit from one end of the nanotube and enter from the
> other.
> There are two fluids moving side by side, and I'd like to know the
> temperatures and pressures for each fluid away from the interface and from
> the walls. So, I created moving regions centered around the center of mass
> of each fluid.
>
> The problem is that, while the center of mass is computed with unwrapped
> coordinates, the region command uses "wrapped" coordinates, so after a while
> the moving region moves outside of the simulation box and then it doesn't
> contain any atom.
>
> Is there a way to make the moving region reenter the simulation box, with
> periodic boundary conditions? The only workaround I could think of is to
> define multiple moving regions separated by the box length, so that when one
> is exiting another one is entering.

that would be my first thought to address this issue as well.

axel.

>
> Here is the code I'm using:
>
> compute           wcom water com
> compute           hcom hept com
> variable             dz_w equal c_wcom[3]-150
> variable             dz_h equal c_hcom[3]-150
>
> region               waterregion cylinder z 0 0 22 130 170 units box move
> NULL NULL v_dz_w
> region               heptregion1 cylinder z 0 0 22 0 20 units box move NULL
> NULL v_dz_h
> region               heptregion2 cylinder z 0 0 22 281 301 units box move
> NULL NULL v_dz_h
> region               heptregion union 2 heptregion1 heptregion2
> group                waterbulk dynamic water region waterregion every 1
> group                heptbulk dynamic hept region heptregion every 1
>
> compute            twater waterbulk temp/com
> compute            pperatomwater waterbulk stress/atom twater
>
> compute            thept heptbulk temp/com
> compute            pperatomhept heptbulk stress/atom thept
>
>
>
> Thank you all in advance,
> Francesco
>
>
> Informativa sulla Privacy: http://www.unibs.it/node/8155
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> lammps-users mailing list
> lammps-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lammps-users
>



-- 
Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.