LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Inquiry on LAMMPS fix_deform and variable formula"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Inquiry on LAMMPS fix_deform and variable formula"


From: Axel Kohlmeyer <akohlmey@...24...>
Date: Thu, 27 Jul 2017 15:38:38 -0400

On Thu, Jul 27, 2017 at 3:31 PM, MASATO KOIZUMI <mkoizumi@...3709...> wrote:
> Dear Dr. Axel Kohlmeyer,
>
> Hello Dr. Kohlmeyer. Thank you for your e-mail.
>
> I was curious if I could ask a question on an error that I obtained when I
> ran my LAMMPS simulation.
>
> I used a "fix deform" command to change my simulation box such that the
> length of the box follows a triangular sinusoidal path using the following
> "variable" command. (L0 is the initial box length. Tp is the time period.)
>
> variable displace equal "v_L0 + (0.5*v_L0)*(1 +
> (2/PI)*asin(sin((2*PI*(1/v_Tp)*step*dt) - (PI/2))))"
> variable rate equal "(2*v_L0*(1/v_Tp))*(-1)^floor(2*(1/v_Tp)*step*dt)"
> fix 4 all deform 1 x variable v_displace v_rate remap v
>
>
> However, I obtained an error statement: ERROR: Power by 0 in variable
> formula (../variable.cpp:1718)
>
> Even when I looked at the LAMMPS error manual, I am not understanding this
> error since my variable formula does not have a zero powered to a number. I

that is not what the error message says. it says that you have a
number raised to the power of 0.

axel.

> would greatly appreciate if you could inform me a clue in resolving this
> error. Thank you.
>
> Sincerely,
>
> Masato Koizumi
>
> On Wed, Jul 19, 2017 at 9:53 AM, Axel Kohlmeyer <akohlmey@...24...> wrote:
>>
>> On Wed, Jul 19, 2017 at 12:37 PM, MASATO KOIZUMI <mkoizumi@...3709...>
>> wrote:
>> > Dear Dr. Axel Kohlmeyer,
>> >
>> > Hello Dr. Kohlmeyer. Thank you for your email.
>> >
>> > I created a LAMMPS input script that applies tensile and compressive
>> > stress
>> > on the simulation box that I created using "fix deform" command.
>> >
>> > I was curious if there is a way to perform cyclic loading without
>> > repeating
>> > the "fix deform" command. That is, I was curious if there is a way to
>> > perform cyclic loading (stretching and compressing) without changing the
>> > number of timesteps and the strain rate. Thank you.
>>
>> please re-read the fix deform command documentation and pay special
>> attention to any mentioning of variables.
>>
>> axel.
>>
>> >
>> > Sincerely,
>> >
>> > Masato Koizumi
>> >
>> > On Thu, Jun 8, 2017 at 11:17 AM, Axel Kohlmeyer <akohlmey@...24...>
>> > wrote:
>> >>
>> >>
>> >>
>> >> On Thu, Jun 8, 2017 at 11:22 AM, MASATO KOIZUMI <mkoizumi@...3709...>
>> >> wrote:
>> >>>
>> >>> Hello All,
>> >>>
>> >>> This is Masato Koizumi, and I am currently learning how to use LAMMPS.
>> >>>
>> >>> I was curious if I could ask a question on two commands in LAMMPS:
>> >>> special_bonds and pair_style hybrid/overlay.
>> >>>
>> >>> Observing the LAMMPS manual, I was curious if the command,
>> >>> "special_bonds
>> >>> lj/coul 0 1 1" means that there are two interactions acting between
>> >>> each
>> >>> pair of atoms: Lennard-Jones and Coloumb. Lennard-Jones is the
>> >>> pairwise
>> >>> interaction and Coulomb is the bond interaction. I was curious if the
>> >>> 0 1 1
>> >>> means that each pairs of atoms consist either one, two or three bonds.
>> >>> 0
>> >>> means that for one-bond pair, the LJ pair potential is turned off.
>> >>> Likewise,
>> >>> the 1's mean that for two-bond and three-bond pairs, the LJ pair
>> >>> potential
>> >>> is turned on.
>> >>
>> >>
>> >> this sounds a bit confused, but may be right. you may want to read up
>> >> on
>> >> what is often called "exclusions" in your preferred MD textbook.
>> >> here is my way to describe it:
>> >>
>> >> if you have a system, where you have non-bonded interactions, e.g. via
>> >> pair style lj/cut/coul/cut, *and* bonded interactions e.g. via bond
>> >> style
>> >> harmonic and angle style harmonic and dihedral style harmonic, then the
>> >> special_bonds scaling factors are applied to all 1-2, 1-3, and 1-4
>> >> pairs
>> >> connected by bonds. for the default setting (0/0/0), that means when
>> >> two
>> >> atoms are connected with a bond (i.e. a 1-2 pair), the non-bonded
>> >> interaction is turned off, if there are two bonds to the same central
>> >> atom
>> >> (a-b-c), then the 1-3 interaction (a-c) is scaled by the 1-3 factor. if
>> >> there is also a bond between a-c, then the 1-2 factor is applied. same
>> >> rules
>> >> apply for 1-4 pairs and the 1-4 special bonds factor.
>> >>
>> >>>
>> >>>
>> >>>
>> >>> Lastly, for pair_style hybrid/overlay, I was curious if this command
>> >>> simply means that the potential energy between each pairs of atoms is
>> >>> the
>> >>> summation of the pair potentials. That is, pair_style hybrid/overlay
>> >>> lj/cut
>> >>> 2.5 coul/long 2.0 is defined as the summation of Lennard-Jones and
>> >>> Coulomb
>> >>> potential acting between each pairs of atoms.
>> >>
>> >>
>> >> yes, this would be the same as lj/cut/coul/long 2.5 2.0. please make a
>> >> test and see for yourself.
>> >>
>> >> axel.
>> >>
>> >>
>> >>>
>> >>>
>> >>> Thank you.
>> >>>
>> >>>
>> >>> Masato
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> 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.
>> >
>> >
>>
>>
>>
>> --
>> 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.
>
>



-- 
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.