OBE units used

55 views
Skip to first unread message

Louis

unread,
Apr 13, 2023, 11:06:14 AM4/13/23
to pylcp
Hi!
I am trying to get comfortable with this package and I tried to get the example "MOT forces with the OBE" and change the units to the ones that they show in the "MOT forces" example (the ones given under the sentences "From the documentation, the consistent mass scale is...". n It should reproduce the same result. However when solving the OBE the program doesn't advance after reaching x=0. If I plot the solution up to that value, it coincides with the rateeq solution and with the solution with the units that are given in the example itself. However I am curious to know why it gets blocked near x=0. I tried to change the value deltat_r, but I get the same problem. 

Thx a lot for your help,
L

Barker, Daniel S. (Fed)

unread,
Apr 17, 2023, 9:27:15 AM4/17/23
to Louis, pylcp

Hi L.,

 

I hope to have a response to each of your questions today.

 

Just to check, I’ve also converted the units from the OBE code (https://python-laser-cooling-physics.readthedocs.io/en/latest/examples/MOTs/02_F0_to_F1_1D_MOT_OBE.html) to match the rate equation code (https://python-laser-cooling-physics.readthedocs.io/en/latest/examples/MOTs/00_F0_to_F1_1D_MOT_forces.html). The two cells that run the simulations both completed in less than 10 s.

 

Without seeing how you converted the units, I don’t have any good suggestions for what is going wrong in your code. To get my code working, I copied code cells [2] and [3] from the MOT forces example (code cells numbered as in the online docs above) into the OBE forces example just below the import statements (and adding new imports as needed). I then updated code cell [2] in the OBE to read:

#alpha = 1e-3

magField = pylcp.quadrupoleMagneticField(alpha)

 

# Hamiltonian for F=0->F=1

H_g, muq_g = pylcp.hamiltonians.singleF(F=0, gF=0, muB=1)

H_e, muq_e = pylcp.hamiltonians.singleF(F=1, gF=1, muB=1)

d_q = pylcp.hamiltonians.dqij_two_bare_hyperfine(0, 1)

hamiltonian = pylcp.hamiltonian(H_g, H_e - ham_det*np.eye(3), muq_g, muq_e, d_q, mass=mass)

 

Note that I’ve commented out ‘alpha’ here, so it will use the value that I copied in from rate equation forces example and changed the last argument to the Hamiltonian (‘mass=250’ -> ‘mass=mass’). The simulations then all ran and produced plots that look the same as the online documentation.

 

I hope this helps,

 

Daniel

--
You received this message because you are subscribed to the Google Groups "pylcp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylcp+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pylcp/c76dfb4e-b52f-4401-bd96-d9ff0a823202n%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages