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.

Restart simulation with particles already in the domain

Please login with a confirmed email address before reporting spam

Hello there,

I have another question regarding the particle tracing module. I have a model consisting of a Laminar Flow (chns) and a Particle Tracing for Fluid Flow (fpt) interfaces. Assume that I solve first the fluid flow without solving for the particles’ position and that my inlet flow rate is periodic (let’s say with period is one second). I then introduce on the inlet a distribution of particles that are released every 0.1 s and I run the particle tracing for one period. My problem comes when I want to restart the simulation for the particle tracing in order to calculate the fate of the particles during the next 1 second – now I have the particles that were already in the domain at the end of the previous calculation plus the ones that are released every 0.1 s during this new calculation. I cannot figure out how to do that, simply saying to the solver to use as initial condition the previous solution gives an error in the stiffness matrix.

Anyone has an idea?

Thanks in advance, J

4 Replies Last Post Aug 29, 2017, 10:40 p.m. EDT
COMSOL Moderator

Hello J

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: 7 years ago Aug 29, 2017, 1:23 p.m. EDT
I am also interested in this problem, if anyone has a way to solve it.

--
Steven Conrad, MD PhD
LSU Health
I am also interested in this problem, if anyone has a way to solve it. -- Steven Conrad, MD PhD LSU Health

Daniel Smith COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Aug 29, 2017, 4:04 p.m. EDT
Hi Steve, there are a couple of ways of doing this:
1. The most flexible is to export the particle positions from the end of the first study, then use the "Release from Data File" option to set the initial positions for the second study. This also allows you to specify a different initial velocity.
2. You can also "trick" the solver into using the final particle position and velocity as the initial condition for a second study. An example is attached (made in V5.3). The basic steps are:
* Set up the model and compute the first study as you would do normally.
* Add a second study, and set the "Initial values of variables solved for" to come from Study 1.
* In the list of Times, set the initial time to correspond to the exact end time of Study 1.
This last step tricks the particle release mechanism into using the final position and velocity from Study 1 in Study 2.

Dan
Hi Steve, there are a couple of ways of doing this: 1. The most flexible is to export the particle positions from the end of the first study, then use the "Release from Data File" option to set the initial positions for the second study. This also allows you to specify a different initial velocity. 2. You can also "trick" the solver into using the final particle position and velocity as the initial condition for a second study. An example is attached (made in V5.3). The basic steps are: * Set up the model and compute the first study as you would do normally. * Add a second study, and set the "Initial values of variables solved for" to come from Study 1. * In the list of Times, set the initial time to correspond to the exact end time of Study 1. This last step tricks the particle release mechanism into using the final position and velocity from Study 1 in Study 2. Dan


Daniel Smith COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Aug 29, 2017, 4:21 p.m. EDT
Hi Steve, a corrected version of the model is attached which uses the correct list of times in Study 2.

Dan
Hi Steve, a corrected version of the model is attached which uses the correct list of times in Study 2. Dan


Please login with a confirmed email address before reporting spam

Posted: 7 years ago Aug 29, 2017, 10:40 p.m. EDT
Thanks Dan, this is just what I needed. The second approach seems the way I will go.

--
Steven Conrad, MD PhD
LSU Health
Thanks Dan, this is just what I needed. The second approach seems the way I will go. -- Steven Conrad, MD PhD LSU Health

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.