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.

partical tracing never works

Please login with a confirmed email address before reporting spam

hi i cant get particle tracing to work help pls. i have a simple 2d example with a rectangular with an electric field on it. the particle tracing modul doesnt show any interaction between the particles and the electric field even though i added the electric force in the particle tracing module.

i attached the example.


7 Replies Last Post 2013年4月16日 GMT-4 13:13

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年7月25日 GMT-4 05:06
does anyone ever answer is this forum...?
does anyone ever answer is this forum...?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年7月25日 GMT-4 08:33
Hi Robin,

you have uploaded a file in 3D some days ago. I couldn't answer at that time because of my work. However I had time to look at your file nowadays.

1. To see the trajectories you should change line style to tube or line and point style to None in coloring and style in Particle trajectories window in results.

2. After that, if you still see the dots instead of lines, that means there is a problem in your numbers.
If the magnetic field you're applying is too high wrt the speed of electrons, you'll see the circular trajectories as dots. So, you need to change the magnetic field and get an appropriate magnetic field/velocity ratio.

3. Try to give sensible time intervals, not (0,0.1,1) but somethings in the order of 1e-6 (or close to it) After you see some expected results, you can play with the time interval. (I think this is not that important in 4.2a but it's important in 4.2 which is not charged particle tracing but particle tracing in ACDC interface. anyways it does not harm.)

I'm attaching your 3D file. I did some changes. You can observe what I said from the file.


Ceren
Hi Robin, you have uploaded a file in 3D some days ago. I couldn't answer at that time because of my work. However I had time to look at your file nowadays. 1. To see the trajectories you should change line style to tube or line and point style to None in coloring and style in Particle trajectories window in results. 2. After that, if you still see the dots instead of lines, that means there is a problem in your numbers. If the magnetic field you're applying is too high wrt the speed of electrons, you'll see the circular trajectories as dots. So, you need to change the magnetic field and get an appropriate magnetic field/velocity ratio. 3. Try to give sensible time intervals, not (0,0.1,1) but somethings in the order of 1e-6 (or close to it) After you see some expected results, you can play with the time interval. (I think this is not that important in 4.2a but it's important in 4.2 which is not charged particle tracing but particle tracing in ACDC interface. anyways it does not harm.) I'm attaching your 3D file. I did some changes. You can observe what I said from the file. Ceren


Nagi Elabbasi Facebook Reality Labs

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年7月25日 GMT-4 08:44
In addition to the steps Ceren described, also check your initial particle velocity. It was too low.
In addition to the steps Ceren described, also check your initial particle velocity. It was too low.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年7月26日 GMT-4 05:09
ok your help file was kind of confusing. you changed the magnetic force in the particle tracing module to user-defined instead of using the field from the mef module which is really dodging the problem because i want the particle tracing to use the however complex fields resulting from my geometry.
so i changed that back to use the mef fields.
then i just adjusted the numbers a bit.
i increased the particle speed as suggested and decreased the fieldstrengh.

the result is a strange behaviour of the particles which i observed in several other attempts to create particle tracings: the force only affects the particles on the inlet surface, after that the particles fly totally linear. the magnetic field strengh only affects the angle under which the particles leave the inlet!

thx for your help have a look at the attachment
ok your help file was kind of confusing. you changed the magnetic force in the particle tracing module to user-defined instead of using the field from the mef module which is really dodging the problem because i want the particle tracing to use the however complex fields resulting from my geometry. so i changed that back to use the mef fields. then i just adjusted the numbers a bit. i increased the particle speed as suggested and decreased the fieldstrengh. the result is a strange behaviour of the particles which i observed in several other attempts to create particle tracings: the force only affects the particles on the inlet surface, after that the particles fly totally linear. the magnetic field strengh only affects the angle under which the particles leave the inlet! thx for your help have a look at the attachment


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年7月27日 GMT-4 05:55
i solved the problem myself. to get real trajectories and not just the linear ones one has to set the start/stop time interval in the "range" settings of the time dependent study to roughly the time the particles will neeed to fly through the geometry. then you have to set "number of values" to about 50 to get a smooth trajectory. to make it clear: if you have set number of values to 1 OR a time interval so huge that there will only be only one value "in the geometry" you will only get the linear trajectories. for example if u have a particle speed of 1e7 m/s and a time interval of 0-1 seconds and set number of values to 50 you will still get linear trajectories...
i solved the problem myself. to get real trajectories and not just the linear ones one has to set the start/stop time interval in the "range" settings of the time dependent study to roughly the time the particles will neeed to fly through the geometry. then you have to set "number of values" to about 50 to get a smooth trajectory. to make it clear: if you have set number of values to 1 OR a time interval so huge that there will only be only one value "in the geometry" you will only get the linear trajectories. for example if u have a particle speed of 1e7 m/s and a time interval of 0-1 seconds and set number of values to 50 you will still get linear trajectories...

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年2月4日 GMT-5 00:38
Hello,

Reg. your thread about : www.comsol.com/community/forums/general/thread/30528/

Reg. the model: www.comsol.com/community/forums/general/download/file/14757/particle%20tracing%20example%20(1).mph

I was trying to add another charge particle trace physics (cpt2), for which I duplicate the particle inlet and the magnetic field. It works fine with user defined magnetic field, but once I keep the mef/acl1 , I dont observe the influence of magnetic field over the electrons.

Is there something else we need to do to use the magnetic field generated from the geometry.

Thanks
Uttam
Hello, Reg. your thread about : http://www.comsol.com/community/forums/general/thread/30528/ Reg. the model: http://www.comsol.com/community/forums/general/download/file/14757/particle%20tracing%20example%20(1).mph I was trying to add another charge particle trace physics (cpt2), for which I duplicate the particle inlet and the magnetic field. It works fine with user defined magnetic field, but once I keep the mef/acl1 , I dont observe the influence of magnetic field over the electrons. Is there something else we need to do to use the magnetic field generated from the geometry. Thanks Uttam

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年4月16日 GMT-4 13:13
Uttam~

Depending on what you are trying to do, you might try the following. Instead of adding a second CPT, and as I needed to model both sodium and chlorine ions in my model (makeshift salt water), I just used a conditional to give me associated mass, diameter, and charge for each charged particle as below.
Z = -1 + 2 * mod(cpt.pidx,2)
Z is the particle charge, -1 is for the Cl- ions (also true for an electron) and the +2*mod() says that if the particle index number is even +0, but if the number is odd +2 to make the odd particles of a +1 charge as in Na+. Let me know if that doesn't make sense. It seems to work for me, though I am having other issues with my models at the moment.
Uttam~ Depending on what you are trying to do, you might try the following. Instead of adding a second CPT, and as I needed to model both sodium and chlorine ions in my model (makeshift salt water), I just used a conditional to give me associated mass, diameter, and charge for each charged particle as below. Z = -1 + 2 * mod(cpt.pidx,2) Z is the particle charge, -1 is for the Cl- ions (also true for an electron) and the +2*mod() says that if the particle index number is even +0, but if the number is odd +2 to make the odd particles of a +1 charge as in Na+. Let me know if that doesn't make sense. It seems to work for me, though I am having other issues with my models at the moment.

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.