Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.
Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Buffer gas collisions with an external function
Posted 11.08.2014, 16:54 GMT-4 Charged Particle Tracing, Particle Tracing for Fluid Flow Version 4.4 1 Reply
Please login with a confirmed email address before reporting spam
I'm trying to set up a more detailed elastic collision model for the particle tracing module. I'm using the Monte Carlo method and I want to reinitialize the particle velocity with an external function. I'd like to reinitialize all velocity components with one call but that isn't possible in the COMSOL desktop (you have to have a separate function call for each cartesian component of the User Defined reinitialzed particle velocity in Charged Particle Tracing -> Elastic Collision Force -> Collision Model). This is a problem because the velocity of the collision partner needs to be random but it has to be the same value when I reinitialize each component of the particle velocity. Right now I'm getting around this by seeding my random number generator with the "particleindex" variable so that I get the same sequence of random numbers as long as I'm looking at a single particle. That's an awkward solution but it still leaves me doing a bunch of computation three times per collision (once for each cartesian component of the reinitialized velocity) when I'd like to be able to do it just once for each collision.
Anyone have some ideas about a good way to do this?
Thanks,
Devin
Hello Devin Short
Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.
If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.