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.

Particle tracing data

Please login with a confirmed email address before reporting spam

Hello guys,

I need your help for the following problem. I'm simulating a 2D flow and I want to do the following. Trace a number of particles and for each particle calculate the summation of the shear stress (abs value) their undergo during the motion. It is a steady simulation. Mainly should be an integration of the shear stress (abs value) along each streamline (coincinding with the pathlines since is steady).
After that I need also the following:
1) being able to say to which streamline each particle belongs to
2) put a marker like that: when a particle (massless) reaches a certain value of the integral of the shear stress I would like to plot a coloured spot in my domain in order to show an "activation map".

Anyone can give me some hints? I'm a novice with COMSOL, so every comment is more than welcome

Thanks
J

13 Replies Last Post May 6, 2015, 12:41 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: 1 decade ago May 5, 2010, 9:21 p.m. EDT
Hello,

Did you find a solution to your problem ?
I have a problem similar .... and I hope that since january, you became a professional of particle tracing !

I would like to do particle tracing in a porous media, to see which way is the longest and calculate it ...

At that time, my particle doesn't move and I don't understand why ...

thanks

Marie
Hello, Did you find a solution to your problem ? I have a problem similar .... and I hope that since january, you became a professional of particle tracing ! I would like to do particle tracing in a porous media, to see which way is the longest and calculate it ... At that time, my particle doesn't move and I don't understand why ... thanks Marie

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 6, 2010, 7:30 a.m. EDT
Marie,

yes, I found a solution and it works pretty good. Normally I do the post-processing using Comsol with Matlab that is extremely powerful.

We can discuss your problems if you want...just let me know what you did.

J
Marie, yes, I found a solution and it works pretty good. Normally I do the post-processing using Comsol with Matlab that is extremely powerful. We can discuss your problems if you want...just let me know what you did. J

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 6, 2010, 11:08 a.m. EDT
Hello,

I applied NS simplified (creeping flow) on a pore ... (like a tube with a strange form), the boundray condition were a pressure gradient between inlet and outlet and a wall with no slip on pore walls. I would like to do particle tracing for measuring effective length of each particle .....

Calculations seem well, but when I try to use particle tracing :

First, I don't find the function which is in the guide to set the point on boundary setting.
and then, my particle doens't move and I don't know why ...

I have matlab and comsol script but my matlab isn't connected to comsol ....

Thanks a lot.

Marie
Hello, I applied NS simplified (creeping flow) on a pore ... (like a tube with a strange form), the boundray condition were a pressure gradient between inlet and outlet and a wall with no slip on pore walls. I would like to do particle tracing for measuring effective length of each particle ..... Calculations seem well, but when I try to use particle tracing : First, I don't find the function which is in the guide to set the point on boundary setting. and then, my particle doens't move and I don't know why ... I have matlab and comsol script but my matlab isn't connected to comsol .... Thanks a lot. Marie

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 6, 2010, 11:25 a.m. EDT
Ok,

first of all if you want to use a Matlab script to do your particle tracing you have to use "Comsol with Matlab", otherwise Matlab if won't be able to recognize Comsol's commands. If you have problems with that probably you didn't set the Matlab path properly or you didn't update Comsol with the patches. Let me know...

On the other hand you should be able to do the particle tracing (simplified) using the GUI in Comsol, just going on Post-processing --> Plot Parameters etc...

Let me know how it goes and we'll work out a way :)

J
Ok, first of all if you want to use a Matlab script to do your particle tracing you have to use "Comsol with Matlab", otherwise Matlab if won't be able to recognize Comsol's commands. If you have problems with that probably you didn't set the Matlab path properly or you didn't update Comsol with the patches. Let me know... On the other hand you should be able to do the particle tracing (simplified) using the GUI in Comsol, just going on Post-processing --> Plot Parameters etc... Let me know how it goes and we'll work out a way :) J

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 6, 2010, 1:06 p.m. EDT
Hello,

It works, sorry, it was because my initial particle was in a null-flow.
And after, how You do for export coordinates of the points ?
If I have several particles in the same time ?

I did "export current plot", but in it, there are 4 columns .... i don't know what is the fourth....
if you have an idea ...

thanks a lot.

Marie
Hello, It works, sorry, it was because my initial particle was in a null-flow. And after, how You do for export coordinates of the points ? If I have several particles in the same time ? I did "export current plot", but in it, there are 4 columns .... i don't know what is the fourth.... if you have an idea ... thanks a lot. Marie

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 6, 2010, 2:06 p.m. EDT
Ok, the problem now is that using "export current plot" or in general the post-processing capabilities of the GUI is not enough for what you need. You, instead, need to use Matlab's script in order to perform proper calculations.

I attach here a file with an example of Matlab script used for particle tracing. Be careful that you MUST use Comsol with Matlab in this case, otherwise it won't work. In particular: open Comsol with Matlab, then export the Fem Structure into Matlab and then run the script (modified in the way you need).

J
Ok, the problem now is that using "export current plot" or in general the post-processing capabilities of the GUI is not enough for what you need. You, instead, need to use Matlab's script in order to perform proper calculations. I attach here a file with an example of Matlab script used for particle tracing. Be careful that you MUST use Comsol with Matlab in this case, otherwise it won't work. In particular: open Comsol with Matlab, then export the Fem Structure into Matlab and then run the script (modified in the way you need). J


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 6, 2010, 2:06 p.m. EDT
Forgot: for any other question just let me know.

J
Forgot: for any other question just let me know. J

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 6, 2010, 2:23 p.m. EDT
Thanks a lot for all ...

it's possible to do it with comsol script, no ?? I'm going to try ....
because I didn't connect matlab with comsol .....

If not, export "current plot" give me this file .....(I don't know why we can't attach .txt here)

I did only one particle tracing .... with particle tracing color according to the time ...
and it's quite easy to understand coordinates and data ... but there are two times this datas ....and for only one particle...

It will be my last question ... I will stop to disturb you !!!
Thank you very much.

Marie
Thanks a lot for all ... it's possible to do it with comsol script, no ?? I'm going to try .... because I didn't connect matlab with comsol ..... If not, export "current plot" give me this file .....(I don't know why we can't attach .txt here) I did only one particle tracing .... with particle tracing color according to the time ... and it's quite easy to understand coordinates and data ... but there are two times this datas ....and for only one particle... It will be my last question ... I will stop to disturb you !!! Thank you very much. Marie


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 6, 2010, 2:32 p.m. EDT
I believe that I understood the file ....

Thanks very much for all

++
I believe that I understood the file .... Thanks very much for all ++

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 6, 2010, 2:39 p.m. EDT
Don't worry...you're not disturbing. I perfectly know how painful is when a software doesn't work :)

If you want to create a script you need to use Matlab since there are not scripting capabilities "inside" the Comsol GUI. I'll check your .doc file asap and I'll let you know something.

But I strongly suggest to use Matlab for all the calculations...works extremely well.

J
Don't worry...you're not disturbing. I perfectly know how painful is when a software doesn't work :) If you want to create a script you need to use Matlab since there are not scripting capabilities "inside" the Comsol GUI. I'll check your .doc file asap and I'll let you know something. But I strongly suggest to use Matlab for all the calculations...works extremely well. J

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 3, 2010, 8:12 a.m. EDT
tks.
i want to know, when tracking electrons, relativistic effects are taken into account or not? If not, how to add in?
thank you !

rj
tks. i want to know, when tracking electrons, relativistic effects are taken into account or not? If not, how to add in? thank you ! rj

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 3, 2010, 8:27 a.m. EDT
Well, I don't know that. You can check the manual of the module you're using. In case you wanna add relativistic effects (I think some kind of force due to the relavitistic effects) you can type the expression of the force vector in the call for the particle tracing.

J
Well, I don't know that. You can check the manual of the module you're using. In case you wanna add relativistic effects (I think some kind of force due to the relavitistic effects) you can type the expression of the force vector in the call for the particle tracing. J

Vishnu Priyanka Kadiriboina

Please login with a confirmed email address before reporting spam

Posted: 9 years ago May 6, 2015, 12:41 p.m. EDT
Hey , Do you know how to compute number of particles in a selected section along the channel.
Please help me ia m not able to compute the number which is very important to me
Hey , Do you know how to compute number of particles in a selected section along the channel. Please help me ia m not able to compute the number which is very important to me

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.