How do you suggest modeling the interaction of neutral atoms with a magnetic gradient? I have a beam of atoms incident on a step in |B| from 1 to 2 tesla, and would like to quantify the population of atoms on the far side of the step. (The field remains at 2 T after the step.) The atoms interact via their magnetic moment, feeling a potential which is just (magnetic moment) * (abs(B)), since the interaction is adiabatic.
I have considered using a series of transparent planes that impart a change in velocity to the atoms through a definition as "moving" parts, but this approach has limitations and is rather inelegant. Is it possible for me to define an arbitrary energy landscape that influences the test partice's motion as it travels from one facet to the next?
Update: After implementing a moving plane that imparts a negative velocity, I have encountered a problem. If I set the opacity of the plane to 0, no particles interact with it. If I increase the opacity, some of the particles are turned back (reflected with changed velocities). However, particles that pass through emerge with their original velocities unchanged. If I set the opacity to 1, all the particles are reflected (and have the moving surface velocity added to theirs). What I would like is for the plane to apply a velocity change to each particle that traverses it, but without reflecting the particle.
The core of Molflow is to interact with walls only, and perform ray tracing assuming straight rays. Any interaction with the volume, or non-straight paths would need a fundamental rewrite of the program so it won't be supported.
I see why free space interactions are incompatible with the underlying paradigm. Perhaps there are simpler approaches to producing this behavior.
When a particle encounters a moving surface, it appears to undergo a reflection like at any facet, with the facet's velocity added to the reflected velocity. Removing the reflection so the facet only imparts a specified velocity change would suffice for my application. How complex would it be to add this kind of facet to Molflow's capabilities?
The most basic approach is perhaps to make use of the mirror reflection type. I know you added it as a demonstration of why such reflections are unphysical from a material wall, but it's not a bad approximation for reflection from a magnetic wall. It would more accurately mimic a magnetic wall if the probability for a particle to pass through or undergo reflection was a function of the particle's initial speed and angle to the facet.
Thanks again for a most useful program and for helping me understand its capabilities.
We've implemented angle- and energy-based transparency/reflectivity in Synrad, which is Molflow's sister code for synchrotron radiation. It needed importing external tables, updating the file formats to save the new information, etc.
As for Molflow, you wouldn't be much forward with the half-transparent "moving" facets, because currently all facets have the same "fixed" velocity vector. In the medium term, I plan to change this and allow each facet to have an own vector.
In general, the physics underlying your ideas is fairly simple, but the corresponding interface changes (and ensuring backwards compatibilty) take a lot of time. Since magnetic particles is a very specific application, to be frank, I won't have the time to tweak Molflow to be able do this soon.
I hope you understand, and thank you for the suggestions anyway. I'm still available to debug your other thread (particlis not thermalizing) if you wish!