espressomd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ESPResSo-users] Problem for Zeeman energy and dimension of box


From: address@hidden
Subject: Re: [ESPResSo-users] Problem for Zeeman energy and dimension of box
Date: Mon, 29 Apr 2019 21:25:00 +0800

Dear all,

I'm trying to add a constant magnetic field to the simulation with the following codes:
###my code###
H_field = HomogeneousMagneticField()
H_field.H=[100,0,0]
system.constraints.add(H_field)
###my code###

Then I run the simulation:
###my code###
for i in range(0, int_n_times):

    #print("run %d at time=%f " % (i, system.time))

    system.integrator.run(int_steps)
###my code###
When I checked the The orientation of the dipole axis of every dipolar particles, I found there is no difference before and after the application of the magnetic field.

###my code###
for i in range(0,n_part):
    id = system.part[i].id
    part_dip = MagneticDipoleMoment(ids = [id])
    print(id,part_dip.calculate())
###my code###

I have rare experience with python and espresso , and it would be very appreciate for your help!





address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]