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 - particle counting
Posted May 2, 2012, 6:56 a.m. EDT Ray Optics, Results & Visualization Version 5.1 21 Replies
Please login with a confirmed email address before reporting spam
Im new to COMSOL and currently trying to work with particle tracing for fluid flow.
The model we are working on is part of vascular network and we are using as physics : structural mechanics, laminar flow, darcy flow, and particle tracing for fluid flow. Everything is working up to the point where we can calculate the particles trajectories but we need to be able to calculate how many particles pass though a specific area section. I have tried to use the Total number of particles in selection, Particle density, Particle position from the results in order to accomplish this. Unfortunately when i try this i get the following error:
CANNOT EVALUATE EXPRESSION
failed to evaluate variable -
Geometry -
Domain -
I have tried to toggle " compute particle mass" on from the particle tracing menu but then when i do this and try to calculate the solution i get another error:
Solution cannot be updated. Clear Solution to expunge.
Failed to evaluate expression.
Failed to evaluate variable.
- Variable: mod1.mp
- Geometry: 2
- Boundary: 1
Failed to evaluate expression.
- Expression: mod1.mp
I have checked the example of laminar_mixer_particle and the model but at that particulate example it only calculates trajectories and nothing more.
I've also tried to export the particle coordinates (designated as q) to excel spreadsheet file so i can process them elsewhere but been also unsuccesfull at that.
If someone has a solution please respond
Thank you,
SM
Hello Stefanos Michael
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
Please login with a confirmed email address before reporting spam
I am facing the exact same problem as Stefanos. When I try to integrate the number of particles over a selected surface, I get the 'failed to evaluate variable' error. My model file can be found here www.mediafire.com/?q6twua5qiu5pg9t. Any help in this regard would be greatly appreciated.
Thanks
Ashish
Please login with a confirmed email address before reporting spam
The variable cpt.Nsel contains the total number of particles in a selection (of domains), so use a Global Evaluation node under Derived Values to evaluate cpt.Nsel for a Particle data set (no integration is needed). If you want the particles in a specific domain instead of the entire geometry, add a Selection subnode to the Particle data set and use it to restrict the partuicle data to the domains selected in the settings for the Selection subnode.
Best regards,
Magnus Ringh, COMSOL
Please login with a confirmed email address before reporting spam
-------------------------------------------------------------------------
www.avl.com/particle-counter - en.wikipedia.org/wiki/Particle_counter - www.comsol.com/video/
Please login with a confirmed email address before reporting spam
Global evaluation is giving only time selection as parameter.
Hi,
The variable cpt.Nsel contains the total number of particles in a selection (of domains), so use a Global Evaluation node under Derived Values to evaluate cpt.Nsel for a Particle data set (no integration is needed). If you want the particles in a specific domain instead of the entire geometry, add a Selection subnode to the Particle data set and use it to restrict the partuicle data to the domains selected in the settings for the Selection subnode.
Best regards,
Magnus Ringh, COMSOL
Please login with a confirmed email address before reporting spam
I am using the mathematical particle tracing module with the Hamiltonian analogy to simulate optical ray tracing. I want to be able to quantify the distribution of rays that reach specific boundaries in 2D and/or a surface in 3D.
Any help would be greatly appreciated. Thanks!
-NC
Please login with a confirmed email address before reporting spam
I have the same question. I could not find a way to (automatically) count the particle number passing a boundary, though manually count is OK. But what if when there is a huge bunch of particles...
Thanks in advance for anyone who knows the answer.
Please login with a confirmed email address before reporting spam
I have the same question as well!!!
did you find any answer?
would you please help me?
thanks
Please login with a confirmed email address before reporting spam
I haven't got a solution yet, but I found this post:
www.comsol.com/community/forums/general/thread/34641/
Probably we should use the LiveLink for Matlab... I am going to study this.
Jingyuan
Please login with a confirmed email address before reporting spam
1) The subnode should be under the "Derived Values" node
2) Add a "Global Evaluation" subnode instead of "Particle Evaluation" subnode.
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
Under the "Global Evaluation" node, select "particle1" for "Data Set". You need also to add the "fpt.Nsel" under "expression".
Please login with a confirmed email address before reporting spam
Also, if I want to count the particle number in a specific region or passing through specific cutting surface, may I know how to do the setting? thanks for the time!
Please login with a confirmed email address before reporting spam
This is basically how to calculate the no. of particles in a chosen boundary. If you want to know the no. of particles in a specific boundary, just choose it. There is also a "time selection" in your "Global evaluation" settings. This indicate the total no. of particles passing your selected boundary from the beginning to your selected time.
Please login with a confirmed email address before reporting spam
Attachments:
Please login with a confirmed email address before reporting spam
Please make sure to have this "selection" node under "particles", and choose the boundary you want (see attached file). I believe that is the reason why you only have the total no. of particles.
Attachments:
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
I'm doing something similar only for a ray trace simulation. How do I count the number of rays in a particular wall?
Attachments:
Please login with a confirmed email address before reporting spam
www.comsol.com/blogs/different-ways-to-count-particles-in-comsol-multiphysics/
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
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.
Suggested Content
- FORUM Issue with gravity force in Particle Tracing Module
- BLOG How to Compute Residence Time in Flow Models with COMSOL®
- FORUM Counting Particle Types at Outlet for Particle Tracing for Fluid Flow feature
- FORUM Particle Tracing for fluid flow and magnetic field
- BLOG Different Ways to Count Particles in COMSOL Multiphysics