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.

Velocity reinitialization in particle tracing module

Please login with a confirmed email address before reporting spam

Hi everyone,

I am trying to model a 2D particle particle collision using velocity reinitialization.
What I want is, the velocity should reinitialization into a set of specified x and y velocity components, whenever the r < 0.03. This is what I tried:

1. I have defined distance between particles using dest function. r= sqrt(qx-dest(qx)^2+(qy-dest(qy)^2+0.02)

2. Then I defined an analytic function as step1(-r) with argument r. (step function is already been defined under comp1 with location 0.03)

3. Then I put e = an1(r)

But I am getting an error message as "Internal error in expression evaluation.
- Undefined operator.: dest
- Feature: Time-Dependent Solver 1 (sol1/t1)"

When i put an arbitrary function of x and y instead of an1(r), it worked. It seems dest function can't be an entry for e. But I am not sure.
Pls help me....
Any other ways to do 2D collision is also greatly appreciated.

Thanks in advance :))))

2 Replies Last Post 2015年7月13日 GMT-4 07:54
Gunnar Andersson COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 2015年7月13日 GMT-4 06:59
It seems dest function can't be an entry for e. But I am not sure.


Functions can only depend on other functions and parameters defined in Global Definitions > Parameters. I think that you can achieve what you want using a variable definition instead of a function.

[QUOTE]It seems dest function can't be an entry for e. But I am not sure.[/QUOTE] Functions can only depend on other functions and parameters defined in Global Definitions > Parameters. I think that you can achieve what you want using a variable definition instead of a function.

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 2015年7月13日 GMT-4 07:54

It seems dest function can't be an entry for e. But I am not sure.


Functions can only depend on other functions and parameters defined in Global Definitions > Parameters


Hi

So functions can't depend on variables? Can a function be an entry of "e" ?
I want e to be 0 for r (which is a variable depending on particle degree of freedom qx and qy) > 0.03 and otherwise e can be any value other than 0. If e can take a variable k (lets say ), then this k should depend on r (since e should react with change in r ). Could you tell me how we can implement this in comsol?

[QUOTE] [QUOTE]It seems dest function can't be an entry for e. But I am not sure.[/QUOTE] Functions can only depend on other functions and parameters defined in Global Definitions > Parameters [/QUOTE] Hi So functions can't depend on variables? Can a function be an entry of "e" ? I want e to be 0 for r (which is a variable depending on particle degree of freedom qx and qy) > 0.03 and otherwise e can be any value other than 0. If e can take a variable k (lets say ), then this k should depend on r (since e should react with change in r ). Could you tell me how we can implement this in comsol?

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.