Best practices for implementing your own monitors?

Hey all,

I’d like to add a monitor for average particle-wall separation distance (to help quantify sticking behavior), and it doesn’t look like the GUI has an option for tracking particle positions, as you can see below. I should be able to do this in usr2_des, but it would be really nice to have my particle velocity and particle position readouts synced up. I’m going through the monitor code now and there is a lot going on, so I’m having trouble identifying where/how I could append the particle position information to ‘data’ in write_monitor so it adds to the Excel file that’s already generated. It seems like this is not a simple endeavor, but let me know if you guys have any ideas/thoughts!

For reference, I am looking specifically for average DES values (monitor_type=104).

Update: Finally did this using a combination of UDFs and subroutines from the monitor module. It’s not the most elegant, but if anyone needs help on this, let me know and I can point you to the important parts of the source code.