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

Please login with a confirmed email address before reporting spam

Hi all,

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

1 Reply Last Post 2015年7月13日 GMT-4 03:06
COMSOL Moderator

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.


Please login with a confirmed email address before reporting spam

Posted: 9 years ago 2015年7月13日 GMT-4 03:06
Hi Devin Short

I also want to do something similar to what you have done. It would be very helpful if you send me your mph file. Could you?

Thanks in advance.
Hi Devin Short I also want to do something similar to what you have done. It would be very helpful if you send me your mph file. Could you? Thanks in advance.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.