implementing an electric field force based on the desired functions

Hi,

I’m using efield to add an electric force on my particles with specific functions.

I’m sure about my functions and I know that how should the particles behaviour in the presence of the electric field but the results is something else and I checked my code so many.

I guess I’m making a mistake which I’m not aware of.

I just want to check my method :

1- I’m using the LJ system

2- I use the variable atom style

3 - I write my functions based on these variables like this :

region right block 0 150 -250 250 -150 150
region left block -150 0 -250 250 -150 150
variable p atom “y”

variable p2 atom “z”

variable Ex atom “x^2”
varaible Ey atom “(v_p)^2 + (v_p2)^2”
varaible Ez atom “(v_p)^2 -(v_p2)^2”

varaible Ez2 atom “(v_p)^2 + (v_p2)^2”
varaible Ey2 atom “(v_p)^2 -(v_p2)^2”

fix Eright all efield v_Ex v_Ey2 v_Ez2 region right

fix Eleft all efield v_Ex v_Ey v_Ez region left

run 100000

these variables our not mine I just wanted to simplify my code.

Just imagine that by writing the above lines you expect that you particles behave in a specific manner. Do you think that these lines have any problem which avoid you to see your desired results?

thanks

Hi,

I'm using efield to add an electric force on my particles with specific
functions.

I'm sure about my functions and I know that how should the particles
behaviour in the presence of the electric field but the results is something
else and I checked my code so many.

I guess I'm making a mistake which I'm not aware of.

I just want to check my method :

1- I'm using the LJ system

2- I use the variable atom style

3 - I write my functions based on these variables like this :

region right block 0 150 -250 250 -150 150
region left block -150 0 -250 250 -150 150
variable p atom "y"

variable p2 atom "z"
variable Ex atom "x^2"
varaible Ey atom "(v_p)^2 + (v_p2)^2"
varaible Ez atom "(v_p)^2 -(v_p2)^2"
varaible Ez2 atom "(v_p)^2 + (v_p2)^2"
varaible Ey2 atom "(v_p)^2 -(v_p2)^2"
fix Eright all efield v_Ex v_Ey2 v_Ez2 region right
fix Eleft all efield v_Ex v_Ey v_Ez region left
run 100000

these variables our not mine I just wanted to simplify my code.
Just imagine that by writing the above lines you expect that you particles
behave in a specific manner. Do you think that these lines have any problem
which avoid you to see your desired results?

nobody can give meaningful advice on incomplete input for some
hypothetical and confusingly described stuff.

show us a *complete* input deck that a person can run and see
directly, tell us what you expect to see and how you find that what
you get doesn't match what you expect.
then you *may* get some meaningful feedback. otherwise be prepared for
a similarly vague and unhelpful: "if it doesn't work, you must be
doing something wrong, but i don't know what"

axel.

All I’m saying is that if you were in my shoes and you wanted to add a functional electric field in your system , would you follow the structure that I described?

I mean using the variable atom style and then writing fix command and …

Are my functions in the correct order?

I understand what are you trying to say me but believe that my code IS NOT simpler than this and definitely nobody understands that why those variables have been defined. All I wanted to know is the answers to the aforementioned questions.

All I'm saying is that if you were in my shoes and you wanted to add a

i would not *want* to be in your shoes.

functional electric field in your system , would you follow the structure
that I described?

i would follow the documentation, would make (simple) tests, confirm
that the code works as expected for a simple test example. do a more
complex test and so on. that is how computational science works. to
simply confirm that a simple and well documented functionality works,
should not require arguing about it. if you were as smart and
competent as you believe you are, you should be able to sort this out
all by yourself. what does it help you, if i guess, say yes, but then
it turns out, i have guessed wrong?

i definitely would not want to irritate people that might help me with
more serious problems later on such a straightforward issue.
i most certainly would not ignore their advice and recommendations so
blatantly and start pointless arguments about it.

I mean using the variable atom style and then writing fix command and ...

Are my functions in the correct order?

I understand what are you trying to say me but believe that my code IS NOT
simpler than this and definitely nobody understands that why those variables
have been defined. All I wanted to know is the answers to the aforementioned
questions.

if this is so simple, why didn't you simply indulge me and provide a
*complete* and *runnable* input example?

anyway, this was your last chance. i grant everybody a certain quota
of pointless questions and some degree of ignorance. you have now
exhausted that quota.

good luck,
     axel.