|
[Sponsors] |
UDF to extract particle positions and velocities at outlet |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 29, 2016, 08:11 |
UDF to extract particle positions and velocities at outlet
|
#1 |
Member
Anonymous
Join Date: Mar 2014
Posts: 84
Rep Power: 12 |
I have two individual runs where the DPM particle's velocities and positions at outlet in first run are to be used as an input DPM file injection (.inj) at the inlet of second run.
Can anybody suggest a method to extract the particle profile at the outlet surface required to create the injection file? |
|
February 29, 2016, 23:58 |
|
#2 |
Member
Anonymous
Join Date: Mar 2014
Posts: 84
Rep Power: 12 |
any idea anyone?
|
|
March 1, 2016, 00:39 |
|
#3 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Write the particle positions (P_POS) and velocities (P_VEL) to a text file called say myOutletParticles.inj and then use this file for your second run. Ensure you use the proper format for the injection file (x y z u v w...).
|
|
March 1, 2016, 01:15 |
|
#4 | |
Member
Anonymous
Join Date: Mar 2014
Posts: 84
Rep Power: 12 |
Quote:
P_POS: undeclared variable code: #include "udf.h" DEFINE_DPM_OUTPUT(history,header,fp,p,t,plane) { if(header) printf("This is a test\n"); else { if(p==NULL) ; else{ printf("%10.6f %10.6f %10.6f \n",P_VEL(p)[0],P_VEL(p)[1],P_POS(p)[0]); } } } |
||
March 1, 2016, 05:09 |
|
#5 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Are you compiling or interpreting this UDF? Compiling UDFs is generally the more stable and reliable method.
|
|
March 1, 2016, 13:33 |
|
#6 |
Member
Anonymous
Join Date: Mar 2014
Posts: 84
Rep Power: 12 |
Thanks compiled finally after installing visual studio etc. Seems to be working!
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Particle Injection induced from a UDF | Peter023 | Fluent UDF and Scheme Programming | 3 | November 26, 2018 04:55 |
advancing velocities and positions in pimpleDyMFoam | fsaltara | OpenFOAM | 0 | January 4, 2014 12:17 |
DPM UDF particle position using the macro P_POS(p)[i] | dm2747 | FLUENT | 0 | April 17, 2009 02:29 |
DEFINE_DPM_OUTPUT macro UDF HELP | Puneet | FLUENT | 3 | November 28, 2003 11:55 |
DPM - Particle velocities | Umesh Shah | FLUENT | 2 | April 3, 2003 13:55 |