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.

User define interaction force

Please login with a confirmed email address before reporting spam

Hello

Now I am using charged particle tracing module and ,as you know, the defult interaction among particle set by comsol is Coulomb force.

I want to change Coulomb interaction to other types of interaction, for example, the force inversely proporitonal to particle distance.

I know that I can put the desired expression in "user define force", however, I have no idea to write it down. That is, I dont know the syntax. Whenever I tried, it appeared that the syntax was wrong but I couldn't find any information regarding syntax.

I really look forwad to your helping me. Thanks.

2 Replies Last Post Jul 26, 2016, 6:10 p.m. EDT
COMSOL Moderator

Hello Byoung-moo Ann

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: 8 years ago Jul 25, 2016, 7:01 p.m. EDT
I have a related problem using particle tracing for fluid flow and the acoustophoretic force. I am attempting to implement the secondary particle-particle force which depends on the distance between the particles as well as their relative positions within the acoustic field.

First, I too would like to know how to refer to the distance between particles, as well as the actual particle positions.

In addition, I would like to know how to refer to the velocity and pressure at the particle positions. I know I can use acpr.vx for instance for velocity (and use this to calculate field direction), but I don't know how to get the value at a specific position.
I have a related problem using particle tracing for fluid flow and the acoustophoretic force. I am attempting to implement the secondary particle-particle force which depends on the distance between the particles as well as their relative positions within the acoustic field. First, I too would like to know how to refer to the distance between particles, as well as the actual particle positions. In addition, I would like to know how to refer to the velocity and pressure at the particle positions. I know I can use acpr.vx for instance for velocity (and use this to calculate field direction), but I don't know how to get the value at a specific position.

Please login with a confirmed email address before reporting spam

Posted: 8 years ago Jul 26, 2016, 6:10 p.m. EDT
I was able to track down some of the variables via a combination of the Help documentation and the plot variable selector. For particles, the distance between them is given by fpt.r. The position components of the particle generating a force are qx, qy, qz, while the position components of the particle experiencing the force are dest(qx), dest(qy), dest(qz).

I assume, though I would love to hear if I am wrong, that any fields that are included in the expression are evaluated at the position of the particle producing the force.

As an aside, if your equation is large you might want to break it up and put parts of it (those that can be evaluated outside of the particle-particle calculation) in several variables. It will not only reduce the size of the equation, if there is a problem with units it will make finding the error easier.
I was able to track down some of the variables via a combination of the Help documentation and the plot variable selector. For particles, the distance between them is given by fpt.r. The position components of the particle generating a force are qx, qy, qz, while the position components of the particle experiencing the force are dest(qx), dest(qy), dest(qz). I assume, though I would love to hear if I am wrong, that any fields that are included in the expression are evaluated at the position of the particle producing the force. As an aside, if your equation is large you might want to break it up and put parts of it (those that can be evaluated outside of the particle-particle calculation) in several variables. It will not only reduce the size of the equation, if there is a problem with units it will make finding the error easier.

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.