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.

parametric sweep with charged particle tracing

Please login with a confirmed email address before reporting spam

Hello, i have 2 studies in my model:
1) A study that calculates electric and magnetic fields
2) A study that calculates charged particle tracing only with the fields from 1)

now i would like to parametric sweep a part of my model geometry and see how it affects particle trajectories. to do so i obviously have to create a parametric sweep in study 1) to sweep the e/m fields. this works fine.

my problem is that i dont know how to carry over the sweep of the e/m fields of 1) to the trajectories in 2). when i just create another sweep of the same kind in study 2) it is possible to watch the geometry sweep in the particle tracing plot but the trajectories do not change with the sweep because appearently the sweep of 2) does not affect the e/m fields even though it works fien in the sweep of 1).

any ideas for a parametric sweep of a particle tracing?

6 Replies Last Post 2015年8月17日 GMT-4 09:58
COMSOL Moderator

Hello Robin Kieser

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: 1 decade ago 2012年10月29日 GMT-4 14:17
I have the same question for what is likely a similar model. In my case I would like to sweep the voltage on a fixed geometry and see the change in particle trajectories.

My model is very similar to the "charged particle tracing in a quadrupole mass spectrometer" model in the gallery (#10653). The particle tracing calculation gets values for dependent variables from the previous electric field calculation, which was performed as a parametric sweep. Under the settings tab for the time dependent particle study, in the values of dependent variables section, there is the option to select a parameter value. The options are "automatic", "all", or each value of the swept voltage. Choosing automatic or all seems to give the same result as choosing the last value of the swept voltage. The results available coincide with the last voltage, and the calculation time and resources if I choose "all" are the same as choosing just the last parameter.

Initially this seemed like the obvious method for sweeping the particle tracing calculation, but clearly I'm wrong! Any ideas are appreciated, thanks!
I have the same question for what is likely a similar model. In my case I would like to sweep the voltage on a fixed geometry and see the change in particle trajectories. My model is very similar to the "charged particle tracing in a quadrupole mass spectrometer" model in the gallery (#10653). The particle tracing calculation gets values for dependent variables from the previous electric field calculation, which was performed as a parametric sweep. Under the settings tab for the time dependent particle study, in the values of dependent variables section, there is the option to select a parameter value. The options are "automatic", "all", or each value of the swept voltage. Choosing automatic or all seems to give the same result as choosing the last value of the swept voltage. The results available coincide with the last voltage, and the calculation time and resources if I choose "all" are the same as choosing just the last parameter. Initially this seemed like the obvious method for sweeping the particle tracing calculation, but clearly I'm wrong! Any ideas are appreciated, thanks!

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年10月30日 GMT-4 02:31
Hi

I'm no longer sure how it is in 4.2 as I'm in 4.3a and there has been changes on the Parametric sweep methode. Now on can even sweep on "t" and use "t" to point into a time series solution and get the related initial conditions correctly from therein (not just the last one). In his case Im', solving a parametric sweep of a stationary solver in MEF, based on a time series CFD that gives me voleotitiy values U(t) for the MEF case. Hence making me get a "time solved MEF analysis. But I believe this did not work prior to 4.3a.

The easiest is to test out the parametreic sweep on some very simple "dummy" cases. I'm also often upsaet that I ned to test out but with COMSOl now there are so many combinations possible, it' difficult to describe all cases, as well as to find the correct combination. So I mostly test them out to get the logic of the linking i.e. initial conditions when and where for multiple coupled sepp solviers

--
Good luck
Ivar
Hi I'm no longer sure how it is in 4.2 as I'm in 4.3a and there has been changes on the Parametric sweep methode. Now on can even sweep on "t" and use "t" to point into a time series solution and get the related initial conditions correctly from therein (not just the last one). In his case Im', solving a parametric sweep of a stationary solver in MEF, based on a time series CFD that gives me voleotitiy values U(t) for the MEF case. Hence making me get a "time solved MEF analysis. But I believe this did not work prior to 4.3a. The easiest is to test out the parametreic sweep on some very simple "dummy" cases. I'm also often upsaet that I ned to test out but with COMSOl now there are so many combinations possible, it' difficult to describe all cases, as well as to find the correct combination. So I mostly test them out to get the logic of the linking i.e. initial conditions when and where for multiple coupled sepp solviers -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年11月9日 GMT-5 16:39
Thank you for your suggestions. I made a very simple model in 4.3a, but I fear I am still struggling with the parametric sweep.

The model is two electrostatic lenses with charged particles flying between them. The electric field is calculated using Electrostatics physics and a stationary study. The charged particle trajectories are calculated with a time-dependent study that uses the ES solution for values for dependent variables.

If I sweep the value of the potential (called Udc) on a lens in the stationary ES study, the CPT study gives me an option to select one or all of the parameter values. This is shown in the attached screenshot. The CPT calculation is successful if I choose an individual parameter. However if I choose "All" from this menu, the calculation is only performed using the last parameter of the sweep in the ES study.

I am able to sweep Udc if I include the ES physics in the time-dependent calculation. However the calculation takes unreasonably long because it recalculates the electric field at every time step.

To me it seems like this drop down menu is the obvious selection for using the ES parameter sweep in the CPT calculation, but perhaps I am missing a necessary part of the procedure?

Thank you again for your suggestions.
Thank you for your suggestions. I made a very simple model in 4.3a, but I fear I am still struggling with the parametric sweep. The model is two electrostatic lenses with charged particles flying between them. The electric field is calculated using Electrostatics physics and a stationary study. The charged particle trajectories are calculated with a time-dependent study that uses the ES solution for values for dependent variables. If I sweep the value of the potential (called Udc) on a lens in the stationary ES study, the CPT study gives me an option to select one or all of the parameter values. This is shown in the attached screenshot. The CPT calculation is successful if I choose an individual parameter. However if I choose "All" from this menu, the calculation is only performed using the last parameter of the sweep in the ES study. I am able to sweep Udc if I include the ES physics in the time-dependent calculation. However the calculation takes unreasonably long because it recalculates the electric field at every time step. To me it seems like this drop down menu is the obvious selection for using the ES parameter sweep in the CPT calculation, but perhaps I am missing a necessary part of the procedure? Thank you again for your suggestions.


Daniel Smith COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年11月9日 GMT-5 16:47
Hi, you have to perform both study steps within the same study. To do this, remove study 2. Then right click on Study 1 and choose Study Steps>Time Dependent. If you regenerate the solver sequence on Study 1, the particle tracing will use the correct field values in the sweep.
Hi, you have to perform both study steps within the same study. To do this, remove study 2. Then right click on Study 1 and choose Study Steps>Time Dependent. If you regenerate the solver sequence on Study 1, the particle tracing will use the correct field values in the sweep.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年10月23日 GMT-4 09:57

Hi, you have to perform both study steps within the same study. To do this, remove study 2. Then right click on Study 1 and choose Study Steps>Time Dependent. If you regenerate the solver sequence on Study 1, the particle tracing will use the correct field values in the sweep.


Hello,
If I understand well, the parametric study really recalculates the field at each parameter setting. For a simple voltage change (when the field solution simply scales with the voltage parameter) this is not necessary. Is there a simple way to quickly visualize charged particle trajectories at different field strengths?

Thank you
Daniel
[QUOTE] Hi, you have to perform both study steps within the same study. To do this, remove study 2. Then right click on Study 1 and choose Study Steps>Time Dependent. If you regenerate the solver sequence on Study 1, the particle tracing will use the correct field values in the sweep. [/QUOTE] Hello, If I understand well, the parametric study really recalculates the field at each parameter setting. For a simple voltage change (when the field solution simply scales with the voltage parameter) this is not necessary. Is there a simple way to quickly visualize charged particle trajectories at different field strengths? Thank you Daniel

Jacqueline van Veldhoven

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 2015年8月17日 GMT-4 09:58

Hi, you have to perform both study steps within the same study. To do this, remove study 2. Then right click on Study 1 and choose Study Steps>Time Dependent. If you regenerate the solver sequence on Study 1, the particle tracing will use the correct field values in the sweep.

I'm currently working in version 5.0 and I encounter the same problem (I'm changing electrode voltage and I'm interested in the trajectories of electrons of different energy. That means combining different parameter sweeps, but if I do this in two studies (electric field sweep in the first, the rest in the second), it does not pass the correct field, it only passes 1 field). Yes, I can solve the problem in 1 study, but doesn't that result in Comsol recalculating the electic field for every variation of parameters? Is it still not possible to do this in 2 studies, or am I mistaken in thinking Comsol recalculates the electric field too many times?
[QUOTE] Hi, you have to perform both study steps within the same study. To do this, remove study 2. Then right click on Study 1 and choose Study Steps>Time Dependent. If you regenerate the solver sequence on Study 1, the particle tracing will use the correct field values in the sweep. [/QUOTE] I'm currently working in version 5.0 and I encounter the same problem (I'm changing electrode voltage and I'm interested in the trajectories of electrons of different energy. That means combining different parameter sweeps, but if I do this in two studies (electric field sweep in the first, the rest in the second), it does not pass the correct field, it only passes 1 field). Yes, I can solve the problem in 1 study, but doesn't that result in Comsol recalculating the electic field for every variation of parameters? Is it still not possible to do this in 2 studies, or am I mistaken in thinking Comsol recalculates the electric field too many times?

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.