UDF to extract particle positions and velocities at outlet
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? :( |
any idea anyone? :(
|
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...).
|
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]); } } } |
Are you compiling or interpreting this UDF? Compiling UDFs is generally the more stable and reliable method.
|
Thanks compiled finally after installing visual studio etc. Seems to be working!
|
All times are GMT -4. The time now is 18:45. |