CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

particles escaping instead of aborting

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 17, 2015, 01:25
Default
  #21
Member
 
Join Date: Mar 2015
Posts: 30
Rep Power: 11
mimi0201 is on a distinguished road
how to control particle number? i tracked whole lot particles (over 1000 particles) and the file just crashed because of the large particle information.
mimi0201 is offline   Reply With Quote

Old   April 17, 2015, 02:01
Default
  #22
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
Are you injecting 1,000 particles per time step? If you run a simulation for 1,000 time steps then that would yield one million particles which require tracking (assuming none have escaped). Desktop machines less than 3-5 years old should handle these particles OK, but for older machines or many more particles, you may require a cluster/HPC.
`e` is offline   Reply With Quote

Old   April 17, 2015, 02:12
Default
  #23
Member
 
Join Date: Mar 2015
Posts: 30
Rep Power: 11
mimi0201 is on a distinguished road
Quote:
Originally Posted by `e` View Post
Are you injecting 1,000 particles per time step? If you run a simulation for 1,000 time steps then that would yield one million particles which require tracking (assuming none have escaped). Desktop machines less than 3-5 years old should handle these particles OK, but for older machines or many more particles, you may require a cluster/HPC.
well, i have no idea how to control particle number, just simply click "track" and see how many particles have been generated. Do you know if there is any way to control particle numbers, like i just want 50 particles? my simulation is steady state so does it relate to the time step?
mimi0201 is offline   Reply With Quote

Old   April 17, 2015, 02:39
Default
  #24
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
If you're simulating steady state then there won't be a sequence of particles injected, only one set of particles for each injection. You can modify the maximum number of particles simulated by modifying the injections (Define > Injections). You can scale down this number of injected particles from the results section (Display > Graphics and Animations... > Particle Tracks) by specifying a nonzero integer for "Skip".
`e` is offline   Reply With Quote

Old   April 17, 2015, 05:39
Default
  #25
Senior Member
 
Join Date: Mar 2014
Posts: 375
Rep Power: 13
hwet is on a distinguished road
I think you are looking at making a group injection in which you can specify the number of particles.
hwet is offline   Reply With Quote

Old   October 27, 2015, 19:26
Default
  #26
Member
 
Join Date: Mar 2015
Posts: 30
Rep Power: 11
mimi0201 is on a distinguished road
Quote:
Originally Posted by `e` View Post
Ok, let's work through this reflection code with an example.

Suppose our particle exists in 2-D and has a velocity vector p = (3,-2) m/s. The wall is parallel to the x-axis and therefore has a normal unit vector of n = (0,1). Units are absent to keep simplicity in the following text.

Code:
/* Compute normal velocity. */
for(i=0; i<idim; i++)
vn += P_VEL(p)[i]*normal[i];
vn = p dot n = (3,-2) dot (0,1) = -2 (the same speed our particle was travelling towards the wall, "normal component")

Code:
/* Subtract off normal velocity. */
for(i=0; i<idim; i++)
P_VEL(p)[i] -= vn*normal[i];
p = p - vn*n = (3,-2) - (-2)*(0,1) = (3,0) (now the normal component for our particle is zero)

Code:
/* Apply tangential coefficient of restitution. */
for(i=0; i<idim; i++)
P_VEL(p)[i] *= tan_coeff;
Suppose the tangential coefficient is 0.5:
p = p*tangential_coefficient = (3,0)*0.5 = (1.5,0) (the tangential speed is reduced but the direction remains the same)

Code:
/* Add reflected normal velocity. */
for(i=0; i<idim; i++)
P_VEL(p)[i] -= nor_coeff*vn*normal[i];
Suppose the normal coefficient is 0.5:
p = p - normal_coefficient*vn*n = (1.5,0) - 0.5*(-2)*(0,1) = (1.5,1) (the normal speed is reduced and changes direction)

Code:
/* Store new velocity in P_VEL0 of particle */
for(i=0; i<idim; i++)
P_VEL0(p)[i] = P_VEL(p)[i];
Some DPM solvers may use the velocity of the particle as it enters the current cell for calculating the next velocity or position.

As we expect, our reflected velocity, (1.5,1) m/s, has been reduced and directed away from the wall. This code works.
A stupid question, just wondering that why the first part uses the dot product for P_VEL(p)[i]*normal[i], but the rest just use normal multiply??

Code:
/* Compute normal velocity. */
for(i=0; i<idim; i++)
vn += P_VEL(p)[i]*normal[i];
Code:
/* Subtract off normal velocity. */
for(i=0; i<idim; i++)
P_VEL(p)[i] -= vn*normal[i];
mimi0201 is offline   Reply With Quote

Old   October 28, 2015, 06:43
Default
  #27
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Quote:
Originally Posted by mimi0201 View Post
A stupid question, just wondering that why the first part uses the dot product for P_VEL(p)[i]*normal[i], but the rest just use normal multiply??

Code:
/* Compute normal velocity. */
for(i=0; i<idim; i++)
vn += P_VEL(p)[i]*normal[i];
Code:
/* Subtract off normal velocity. */
for(i=0; i<idim; i++)
P_VEL(p)[i] -= vn*normal[i];
Because in the first part, a velocity component is calculated (vn), and in the other parts, velocity vectors are calculated (P_VEL(p)).
pakk is offline   Reply With Quote

Old   October 28, 2015, 08:09
Default
  #28
Member
 
Join Date: Mar 2015
Posts: 30
Rep Power: 11
mimi0201 is on a distinguished road
Quote:
Originally Posted by pakk View Post
Because in the first part, a velocity component is calculated (vn), and in the other parts, velocity vectors are calculated (P_VEL(p)).
Oh ok got it. Cheers!!! One more question is that which statement indicates whether the particle hits the wall and then reflects?
mimi0201 is offline   Reply With Quote

Old   November 2, 2015, 16:59
Default
  #29
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
Quote:
Originally Posted by mimi0201 View Post
One more question is that which statement indicates whether the particle hits the wall and then reflects?
The fate of the particle is dependent on if the velocity is above some critical capture velocity and is implemented with the conditional statement ("if(vmag > capture_vel)") where the particle trajectory is either continued:

Code:
return PATH_ACTIVE
or the particle trajectory is terminated:

Code:
return PATH_ABORT
`e` is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to determine the number of particles injected. welch FLUENT 2 January 18, 2024 05:08
trying to simulate two-phase jet flow with particles in surface injection ajkratos FLUENT 5 March 3, 2015 22:33
Conditional Release of DPM particles - UDF nvschandra Fluent UDF and Scheme Programming 0 December 10, 2013 12:02
particles model ati_ros61 FLOW-3D 3 December 6, 2009 17:03
Particles escaping geometry - through seams? Jeremy FLUENT 1 July 30, 2008 04:29


All times are GMT -4. The time now is 21:18.