using a variable from an external file in LAMMPS

Dear All,

I want to use time-dependent electric field during my simulation. I can apply this with a time-depended equation, defined as variable. Due to some reason, I can’t use a time-depended equation. But rather, I have to apply efield from an external file. As an example:

fix kick all efield 0.0 0.0 Ez

Now for every timestep, there is a Ez in an external file efield.txt (as example). I want my Ez to be varying by reading from this file. I hope that I made my question clear. I will be grateful for any support.

best regards,

Pankaj

Dear All,

I want to use time-dependent electric field during my simulation. I can
apply this with a time-depended equation, defined as variable. Due to some
reason, I can't use a time-depended equation. But rather, I have to apply
efield from an external file. As an example:

fix kick all efield 0.0 0.0 Ez

Now for every timestep, there is a Ez in an external file efield.txt (as
example). I want my Ez to be varying by reading from this file. I hope that
I made my question clear. I will be grateful for any support.

http://lammps.sandia.gov/doc/variable.html

Dear Axel,

Yes I had a look to this section. I tried to read file with

variable oscillate file efield.txt

But How to make it time-depended?

best regards,

Pankaj

Dear Axel,

Yes I had a look to this section. I tried to read file with

variable oscillate file efield.txt

But How to make it time-depended?

http://lammps.sandia.gov/doc/next.html

Dear All,

I want to use time-dependent electric field during my simulation. I can
apply this with a time-depended equation, defined as variable. Due to some
reason, I can't use a time-depended equation. But rather, I have to apply

BTW: would you mind explaining, what this mysterious "some reason" is?

i've been responding to inquiries on mailing lists now for over 15
years and almost always when people requested about doing something
complex for "some reason", it turned out that this "some reason" was
invalid, so that a much simpler solution would be applicable.

axe;/