Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
25.08.2014, 20:30 GMT-4
I haven't found a completely satisfactory solution yet.
One solution is to set the initial velocity components as parameters; do a parametric sweep with swept parameters and values loaded from the file. The problem with this is that one sweep solution corresponds to one particle trajectory which becomes impractical to plot for more than a few trajectories since a particle trajectory node must be created in a plot group for each sweep setting. The workaround for this is NOT to plot the trajectories in Comsol, rather output the sweep solution results to data files that can then be plotted by other software (Matlab, Python, ...).
I haven't found a completely satisfactory solution yet.
One solution is to set the initial velocity components as parameters; do a parametric sweep with swept parameters and values loaded from the file. The problem with this is that one sweep solution corresponds to one particle trajectory which becomes impractical to plot for more than a few trajectories since a particle trajectory node must be created in a plot group for each sweep setting. The workaround for this is NOT to plot the trajectories in Comsol, rather output the sweep solution results to data files that can then be plotted by other software (Matlab, Python, ...).
Daniel Smith
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
26.08.2014, 09:22 GMT-4
Hi Ryan, this should be possible using interpolation functions. In the attached model, I have an interpolation function containing my initial velocity data. The first column of the file is a unique number from 1 up to the number of particles. The second column is my initial x-velocity, the third my y-velocity and fourth my z-velocity. I then simply call the function in the Release 1 feature using vx0(particleindex), vy0(particleindex) etc.
The plot shows that I have the expected initial velocity for all particles at t=0.
Hi Ryan, this should be possible using interpolation functions. In the attached model, I have an interpolation function containing my initial velocity data. The first column of the file is a unique number from 1 up to the number of particles. The second column is my initial x-velocity, the third my y-velocity and fourth my z-velocity. I then simply call the function in the Release 1 feature using vx0(particleindex), vy0(particleindex) etc.
The plot shows that I have the expected initial velocity for all particles at t=0.
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
26.08.2014, 15:27 GMT-4
Daniel, that is a perfect idea. Thanks!
Daniel, that is a perfect idea. Thanks!
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
20.01.2017, 13:34 GMT-5
Hi Daniel, I have a relate question. I am very new so please be as descriptive as possible. I would like to set my initial particle velocity to follow a distribution given by cos(theta) from -pi/2 to +pi/2. How can I achieve this?
Hi Daniel, I have a relate question. I am very new so please be as descriptive as possible. I would like to set my initial particle velocity to follow a distribution given by cos(theta) from -pi/2 to +pi/2. How can I achieve this?
Jeff Hiller
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
20.01.2017, 13:54 GMT-5
Hi Eric,
To request technical support from COMSOL employees, please email support@comsol.com .
Best regards,
Jeff
Hi Eric,
To request technical support from COMSOL employees, please email support@comsol.com .
Best regards,
Jeff
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
20.01.2017, 13:56 GMT-5
I don't really need technical support. Just looking for some tips. Is the forum not a better place to post so that others may also benefit from the answer?
I don't really need technical support. Just looking for some tips. Is the forum not a better place to post so that others may also benefit from the answer?
Jeff Hiller
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
20.01.2017, 14:25 GMT-5
The Discussion Forum is a great place to reach out for help from other users. Your post was addressed to a specific COMSOL employee though.
As the front page of the Discussion Forum so eloquently states, "COMSOL provides the Discussion Forum for the benefit of our user community to share ideas with each other, and for open discussion on topics that are of interest to the COMSOL Multiphysics user base.
While COMSOL employees may occasionally participate in Discussion Forum discussions, their contributions to a specific topic or technical question may not be as comprehensive as a response to a support request handled through COMSOL's support process.
All of COMSOL's on-subscription customers are welcome to submit their questions via:
www.comsol.com/support to be addressed individually by the COMSOL Technical Support Team."
Best,
Jeff
The Discussion Forum is a great place to reach out for help from other users. Your post was addressed to a specific COMSOL employee though.
As the front page of the Discussion Forum so eloquently states, "COMSOL provides the Discussion Forum for the benefit of our user community to share ideas with each other, and for open discussion on topics that are of interest to the COMSOL Multiphysics user base.
While COMSOL employees may occasionally participate in Discussion Forum discussions, their contributions to a specific topic or technical question may not be as comprehensive as a response to a support request handled through COMSOL's support process.
All of COMSOL's on-subscription customers are welcome to submit their questions via: www.comsol.com/support to be addressed individually by the COMSOL Technical Support Team."
Best,
Jeff