|
[Sponsors] |
Does any know how to use "file" as the input of the particles in DPM? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 22, 2015, 21:33 |
Does any know how to use "file" as the input of the particles in DPM?
|
#1 |
Member
Join Date: Mar 2015
Posts: 30
Rep Power: 11 |
Does any know how to use "file" as the input of the particles in DPM? how do i set each component and what type of the file is that? really appreciate!
|
|
April 22, 2015, 21:59 |
|
#2 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
The injection file extension can be *.inj and written with a text editor, the format is:
Code:
((x y z u v w diameter temperature mass-flow-rate) streamID) Code:
(( 0. 0. 0. 0. 0. 0. 1. 300. 1.) stream-0) |
|
April 22, 2015, 22:31 |
|
#3 | |
Member
Join Date: Mar 2015
Posts: 30
Rep Power: 11 |
Quote:
|
||
April 22, 2015, 23:07 |
|
#4 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
You can inject a particle at a particular point by setting the corresponding position components x, y and z. For example if you have an inlet at x = -1 m and you would like to inject a line of particles then you would have a series of injection lines varying in the y- and z-directions:
Code:
(( -1. -0.5 -0.5 0. 0. 0. 1. 300. 1.) stream-0) (( -1. 0. 0. 0. 0. 0. 1. 300. 1.) stream-1) (( -1. 0.5 0.5 0. 0. 0. 1. 300. 1.) stream-2) |
|
April 23, 2015, 00:23 |
|
#5 | |
Member
Join Date: Mar 2015
Posts: 30
Rep Power: 11 |
Quote:
|
||
April 23, 2015, 01:10 |
|
#6 | |
Member
Join Date: Mar 2015
Posts: 30
Rep Power: 11 |
Quote:
Code:
((14.802 -2.0 2.5 22.75 0.0 0.0 0.000001 300.0 1.0)injection-0:0) |
||
April 23, 2015, 04:51 |
|
#7 | |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Quote:
What does your error message say? Have you injected this stream inside your domain? Be careful of units. |
||
April 23, 2015, 21:34 |
|
#8 | |
Member
Join Date: Mar 2015
Posts: 30
Rep Power: 11 |
Quote:
|
||
April 23, 2015, 22:25 |
|
#9 | |
Member
Join Date: Mar 2015
Posts: 30
Rep Power: 11 |
Quote:
|
||
April 27, 2015, 03:31 |
|
#10 | |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Quote:
Were you expecting more than one particle? Are you using steady (tracking from results or during the simulation) or unsteady? What file were you expecting to be generated? |
||
April 27, 2015, 03:38 |
|
#11 |
Member
Join Date: Mar 2015
Posts: 30
Rep Power: 11 |
yes, i'm expecting several particles, say 50. I'm using steady state to simulate my case and tracking from the results. the file which i'm expecting is the position and velocity details recording the particle when hitting on the wall.
|
|
April 27, 2015, 05:15 |
|
#12 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Are you skipping any particle streams (or tracking a single stream)? Perhaps attach a screenshot of the settings you're using?
What UDF are you using and have you enabled this user-defined boundary condition under the DPM boundary conditions? |
|
April 27, 2015, 21:24 |
|
#13 | |
Member
Join Date: Mar 2015
Posts: 30
Rep Power: 11 |
Quote:
Code:
/**reflect*boundary*condition*for*inert*particles**/ #include "udf.h" #include <stdio.h> #include "dpm.h" #include "random.h" #include "surf.h" DEFINE_DPM_BC(bc_reflect,p,t,f,f_normal,dim) { real alpha; /* angle*of*particle*path*with*face*normal */ real vn = 0.0; real nor_coeff = 0.8; real tan_coeff = 0.8; real normal[3]; /* Array that contains the unit vector which is normal to the face */ real d; real ke = 0.0; real NV_VEC(x); /* defines a vector */ int i, idim = dim; int particle_trap = 0; FILE *fp = fopen("particle_data.dat","a"); /* open a file named data.txt in read-only mode and assign it to fp */ if(p->type==DPM_TYPE_INERT) { alpha = M_PI/2. - acos(MAX(-1.,MIN(1.,NV_DOT(normal,P_VEL(p)) / MAX(NV_MAG(P_VEL(p)),DPM_SMALL)))); if ((NNULLP(t))&&(THREAD_TYPE(t)==THREAD_F_WALL)) F_CENTROID(x,f,t); for(i=0; i<idim; i++) { normal[i] = f_normal[i]; // normal velocity vn += P_VEL(p)[i]*normal[i]; /*set the particle diameter in microns*/ d = P_DIAM(p); // normal velocity P_VEL(p)[i] -= vn*normal[i]; // tangential coefficient of restitution P_VEL(p)[i] *= tan_coeff; // reflected normal velocity P_VEL(p)[i]-=nor_coeff*vn*normal[i]; // new velocity in P_VEL0 of particle P_VEL0(p)[i]=P_VEL(p)[i]; } /*calculate the kinetic energy*/ ke = 0.24544 * vn * vn * d * d * d; ke *= 1e+6; /* apply the trap condition */ if (ke <= 0.000000001) { particle_trap = 1; //record the informations fprintf(fp,"%11.8lf\t%11.8lf\t%11.8lf\t%11.8lf\t%11.8lf\t%11.8lf\t%11.8lf\t%11.8lf\t%11.8lf\t%d\t%d\n", P_POS(p)[0], P_POS(p)[1], P_POS(p)[2], alpha,vn, P_VEL(p)[0], P_VEL(p)[1], P_VEL(p)[2], ke, p->part_id, particle_trap); fclose(fp); return PATH_ABORT; /*trap the particle*/ } else { particle_trap = 0; //record the informations fprintf(fp,"%11.8lf\t%11.8lf\t%11.8lf\t%11.8lf\t%11.8lf\t%11.8lf\t%11.8lf\t%11.8lf\t%11.8lf\t%d\t%d\n", P_POS(p)[0], P_POS(p)[1], P_POS(p)[2], alpha,vn, P_VEL(p)[0], P_VEL(p)[1], P_VEL(p)[2], ke, p->part_id, particle_trap); fclose(fp); return PATH_ACTIVE; } } return PATH_ABORT; } The problem is when i use normal particle injection method (surface injection), everything works fine, particle hitting on the wall several times (record as "0") and finally trapped (record as "1"). (single particle tracking) However, when I use "file" injection, as follows: Code:
((x y z u v w diameter temperature mass-flow) name) ((0.0 0.0 0.0 0.0 0.0 -5.95 0.00002 293.0 1.0) injection-0:0) Please tell me if you need any more information. Really appreciate! |
||
April 28, 2015, 02:30 |
|
#14 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Don't include the syntax line within your code:
Code:
((x y z u v w diameter temperature mass-flow) name) Where are the particles which become trapped originate and how do these positions compare with your injection file stream of x = y = z = 0 m? |
|
June 11, 2017, 23:27 |
|
#15 | |
New Member
Join Date: Oct 2016
Posts: 6
Rep Power: 10 |
Quote:
I don't quite understand when you say injection lines. Do you mean multiple injection points? By using the above code are we just defining an injection point or is there more to it ? |
||
June 12, 2017, 07:27 |
|
#16 |
Senior Member
Kal-El
Join Date: Apr 2017
Location: Finland
Posts: 150
Rep Power: 9 |
Hi Sankaranand
File = custom atomizer. one line on the file = one parcel. 50 lines on the file = 50 parcels. 10000 lines on the file = 10000 parcels. DPM parcel concept |
|
June 12, 2017, 16:47 |
|
#17 | |
New Member
Join Date: Oct 2016
Posts: 6
Rep Power: 10 |
Quote:
Thanks for the response. I am working on a pressure swirl atomizer. I would like to specify the initial diameter of a droplet based on a formula developed by my Professor. I would like to compare the results with the experiment ones. But, Fluent does not allow me to specify initial diameter for pressure swirl atomizer. If we're using file for injection, one injection line equals injection-0 in fluent? I am confused. I would appreciate your help in this regard. |
||
June 13, 2017, 04:03 |
|
#18 |
Senior Member
Kal-El
Join Date: Apr 2017
Location: Finland
Posts: 150
Rep Power: 9 |
Yes. The first line is injection-0. On each line you have a parcel that has it's own injection location, velocity components, diameter, mass etc.
You need several lines for swirl atomizer, because you have several parcels with different injection directions. Also if you want parcels with different diameters, you need even more lines. etc. |
|
July 8, 2017, 11:55 |
particle injection file
|
#19 |
New Member
Join Date: Jan 2017
Posts: 25
Rep Power: 9 |
hallo guys,
I ant to make a particle injection file in Microsoft visual studio.But I can not compile this in fluent and read it. I ainm is to change the absorption coefficient if the particles that I'm injecting using DPM. I totally confuse my can someone tell me how to do it, please explain step by step. thank you very much |
|
July 12, 2017, 04:03 |
|
#20 | |
New Member
Join Date: Oct 2016
Posts: 6
Rep Power: 10 |
Quote:
Doesn't inputting diameters defeat the purpose? Please let me know if I am missing anything. I cannot get anywhere with this. Thank You. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF for deleting particles in DPM | imanmirzaii | Fluent UDF and Scheme Programming | 12 | November 25, 2020 20:27 |
Conditional Release of DPM Particles in Fluent - UDF | nvschandra | Fluent UDF and Scheme Programming | 0 | December 16, 2013 21:32 |
Conditional Release of DPM particles - UDF | nvschandra | Fluent UDF and Scheme Programming | 0 | December 10, 2013 12:02 |
[OpenFOAM] Paraview 3.98 - errors when saving geometry file | pajot | ParaView | 1 | September 28, 2013 11:45 |
DPM - do the particles affect the liquid? | Nikhil Dani | FLUENT | 0 | January 1, 2009 12:58 |