|
[Sponsors] |
May 31, 2018, 11:58 |
inject particles from the curved surface
|
#1 |
New Member
Join Date: Apr 2018
Posts: 1
Rep Power: 0 |
Hello everyone,
I want to inject particles from the curved surface ,and set the particles velocity in a direction perpendicular to the curved surface. I write a udf but it doesn't work. Is there anyone who can help me modify this UDF, or is there any other way to solve this problem? Any help is highly appreciated. #include "udf.h" DEFINE_DPM_INJECTION_INIT(Init_V_T,I) { Thread *t; face_t f; Particle *p; cell_t cell; Thread *cthread; real A[ND_ND]; real AMag,AMag0,AMag1; loop(p,I->p) /* Standard Fluent Looping Macro to get particle streams in an Injection */ { begin_f_loop(f,t) { F_AREA(A,f,t); AMag = NV_MAG(A); AMag0= sqrt(pow(A[0],2)); AMag1= sqrt(pow(A[1],2)); cell = P_CELL(p); /* Get the cell and thread that the particle is currently in */ cthread = P_CELL_THREAD(p); P_VEL(p)[0]=10*AMag0/AMag; /* x velocity */ P_VEL(p)[1]=10*AMag1/AMag; /* y velocity */ } end_f_loop(f,t) } } |
|
Tags |
dpm udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] help with missing elements of curved surface | siw | ANSYS Meshing & Geometry | 7 | August 19, 2018 09:05 |
How to inject particles from specific points with different injection rate | bijan darbari | OpenFOAM Running, Solving & CFD | 1 | March 7, 2018 14:14 |
oscilated wallHeatFlux on a curved surface | nucat | OpenFOAM Running, Solving & CFD | 2 | April 16, 2015 20:28 |
trying to simulate two-phase jet flow with particles in surface injection | ajkratos | FLUENT | 5 | March 3, 2015 22:33 |
Post-processing of a curved surface | alex | FLUENT | 1 | December 5, 2006 04:32 |