Daniel Smith
                                                                                                                                                    COMSOL Employee
                                                         
                            
                                                                                                                                                
                         
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                9 years ago                            
                            
                                05.01.2017, 08:53 GMT-5                            
                        
                        
                                                    Hi Todd, this is possible using the General reflection condition. For an elastic specular reflection, the "Reflected particle velocity" should be set to:
vp = v - 2*(n.v)n
To make this inelastic, you can modify this equation to be:
vp = v - alpha*2*(n.v)n
where alpha is a user-defined parameter. If alpha=0.9, then the particle will leave the wall with 90% of the incoming velocity. Note that alpha can also be a function of the velocity, you would need to create a variable under Definitions and give an appropriate expression. You can refer to the attached example.
Dan                                                
                                                
                            Hi Todd, this is possible using the General reflection condition. For an elastic specular reflection, the "Reflected particle velocity" should be set to:
vp = v - 2*(n.v)n
To make this inelastic, you can modify this equation to be:
vp = v - alpha*2*(n.v)n
where alpha is a user-defined parameter. If alpha=0.9, then the particle will leave the wall with 90% of the incoming velocity. Note that alpha can also be a function of the velocity, you would need to create a variable under Definitions and give an appropriate expression. You can refer to the attached example.
Dan                        
                                                
                        
                                                
                                                                                                            
                                             
                                            
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                9 years ago                            
                            
                                06.01.2017, 11:46 GMT-5                            
                        
                        
                                                    Hi Daniel, thank you for replying. Unfortunately when I try to open the attached file I get the error "COMSOL Multiphysics model file is damaged or not valid." I am using 5.2a with the most recent update. 
Can you provide an example of the code you would enter into the Vp t1, t2, and n fields, or x, y, and z fields, whichever is appropriate? Even just providing the proper term for the normal vector would be sufficient as I know how to apply that to the x, y, and z components.                                                
                                                
                            Hi Daniel, thank you for replying. Unfortunately when I try to open the attached file I get the error "COMSOL Multiphysics model file is damaged or not valid." I am using 5.2a with the most recent update. 
Can you provide an example of the code you would enter into the Vp t1, t2, and n fields, or x, y, and z fields, whichever is appropriate? Even just providing the proper term for the normal vector would be sufficient as I know how to apply that to the x, y, and z components.                        
                                                
                                                                                                            
                                             
                                            
                            
                                                                                        
                                Daniel Smith
                                                                                                                                                    COMSOL Employee
                                                         
                            
                                                                                                                                                
                         
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                9 years ago                            
                            
                                06.01.2017, 12:01 GMT-5                            
                        
                        
                                                    Hi Todd, the expressions would be (in 3D for the x, y and z components):
vpx = pt.vx-alpha*2*(pt.vx*nx+pt.vy*ny+pt.vz*nz)*nx
vpy = pt.vy-alpha*2*(pt.vx*nx+pt.vy*ny+pt.vz*nz)*ny
vpz = pt.vz-alpha*2*(pt.vx*nx+pt.vy*ny+pt.vz*nz)*nz
I attach the model again. It was created in V5.2a with the most recent update, so it should open.                                                
                                                
                            Hi Todd, the expressions would be (in 3D for the x, y and z components):
vpx = pt.vx-alpha*2*(pt.vx*nx+pt.vy*ny+pt.vz*nz)*nx
vpy = pt.vy-alpha*2*(pt.vx*nx+pt.vy*ny+pt.vz*nz)*ny
vpz = pt.vz-alpha*2*(pt.vx*nx+pt.vy*ny+pt.vz*nz)*nz
I attach the model again. It was created in V5.2a with the most recent update, so it should open.                        
                                                
                        
                                                
                                                                                                            
                                             
                        
                        
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                9 years ago                            
                            
                                06.01.2017, 14:04 GMT-5                            
                        
                        
                                                    Thank you. I see now that there is a reference to the normal vector variables in the Help, though it is not where I would have expected and it is not as explicit as I think it should be:
"As a result, the tangential and normal directions may point in the opposite direction of the corresponding vectors defined for the geometry (for example, root.nx) and for the physics interface (for example, pt.nx)."
In addition to not specifically saing what "root.nx" is, it suggests to me a global variable, not one associated with a specific, or the current, wall normal vector. Also of note, using Particle Tracing for Fluid Flow, the default physics variable is "fpt", which could also produce some confusion as the help uses "pt".
Putting nx, ny, and nz in the Equation View for the Wall would help. The Equation View was very helpful to me as I was working on a complex particle-particle interaction model.
One last note, I believe the equation should be:
vpx = pt.vx-(1+alpha)*(pt.vx*nx+pt.vy*ny+pt.vz*nz)*nx
(1+alpha) replacing 2*alpha
That makes alpha range from 0 (particle freeze) to 1 (particle bounce). Using "2*alpha" would be more complicated and make the range 0.5 to 1, with the proportion of velocity maintained being 2*alpha-1.                                                
                                                
                            Thank you. I see now that there is a reference to the normal vector variables in the Help, though it is not where I would have expected and it is not as explicit as I think it should be:
"As a result, the tangential and normal directions may point in the opposite direction of the corresponding vectors defined for the geometry (for example, root.nx) and for the physics interface (for example, pt.nx)."
In addition to not specifically saing what "root.nx" is, it suggests to me a global variable, not one associated with a specific, or the current, wall normal vector. Also of note, using Particle Tracing for Fluid Flow, the default physics variable is "fpt", which could also produce some confusion as the help uses "pt".
Putting nx, ny, and nz in the Equation View for the Wall would help. The Equation View was very helpful to me as I was working on a complex particle-particle interaction model.
One last note, I believe the equation should be:
vpx = pt.vx-(1+alpha)*(pt.vx*nx+pt.vy*ny+pt.vz*nz)*nx
(1+alpha) replacing 2*alpha
That makes alpha range from 0 (particle freeze) to 1 (particle bounce). Using "2*alpha" would be more complicated and make the range 0.5 to 1, with the proportion of velocity maintained being 2*alpha-1.