|
[Sponsors] |
Itīs possible to use this in unsteady dpm tracking? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 25, 2011, 16:26 |
Itīs possible to use this in unsteady dpm tracking?
|
#1 |
New Member
Join Date: Feb 2011
Posts: 16
Rep Power: 15 |
Hello everyone.
Itīs possible to use this in unsteady dpm tracking? I have a problem with this UDF using unsteady particle tracking, because the scalar is updated to a new value and will not retain the last. I want to measure the total U.V. dose in each particle on the output boundary, but I only get the last value of UV dose, and not the total. Iīm a beginner user to UDF but there is any way to change this, to retain the values of UV dose each dpm time step? /************************************************** *********************/ /* UDF for computing the UV dosage along a particle trajectory */ /************************************************** *********************/ #include "udf.h" #include "dpm.h" #include "sg_disco.h" #define fileuv "output.dpm" #define C_DO(c,t)C_STORAGE_R_XV(c,t,SV_DO_IRRAD,0) static real uv_intensity_0; static real x0, y00, z0; FILE *fuv; DEFINE_DPM_SCALAR_UPDATE(uv_dosage, cell, thread, initialize, p) { cphase_state_t *c = &(p->cphase); if (initialize) { p->user[0] = 0.; uv_intensity_0 = C_DO(cell,thread); x0=p->state.pos[0]; y00=p->state.pos[1]; z0=p->state.pos[2]; } else { p->user[0] += P_DT(p) * .5 * (uv_intensity_0 + C_DO(cell,thread)); uv_intensity_0 = C_DO(cell,thread); } } DEFINE_DPM_OUTPUT(uv_output, header, fp, p, thread, plane) { char name[100]; if (header) { fuv = fopen(fileuv,"w"); if (NNULLP(thread)) { fprintf(fuv,"(%s %d)\n",thread->head->dpm_summary.sort_file_name,14); } else fprintf(fuv,"(%s %d)\n",plane->sort_file_name,14); fprintf(fuv,"(%10s %10s %10s %10s %10s %10s %10s" " %10s %10s %10s %10s %10s %10s %10s %s)\n", "X0","Y0","Z0", "X","Y","Z","U","V","W","diameter","T","mass-flow", "time","UV-Dosage","name"); fclose(fuv); } else { fuv = fopen(fileuv,"a"); sprintf(name,"%s:%d",p->injection->name,p->part_id); fprintf(fuv, "((%10.6g %10.6g %10.6g %10.6g %10.6g %10.6g " "%10.6g %10.6g %10.6g %10.6g %10.6g %10.6g %10.6g %10.6g) %s)\n", x0,y00,z0, p->state.pos[0], p->state.pos[1], p->state.pos[2], p->state.V[0], p->state.V[1], p->state.V[2], p->state.diam, p->state.temp, p->flow_rate, p->state.time, p->user[0], name); fclose(fuv); } } |
|
May 26, 2011, 11:08 |
|
#2 |
New Member
Join Date: Feb 2011
Posts: 16
Rep Power: 15 |
Hello fluent users,
Sorry to ask again, but i think that i wasnīt very explicit. In first figure you see the particles recording the total uv radiation . In second figure youīll see particles recording only instant uv radiation. I want to change the UDF so i can have results as first figure. Anyone nows how to do that? Thanks http://imageshack.us/photo/my-images/851/pata.jpg/ http://imageshack.us/photo/my-images/543/16044862.jpg/ Last edited by wyldckat; September 3, 2015 at 18:48. Reason: disabled embedded images |
|
June 9, 2011, 09:53 |
|
#3 |
New Member
Lauri Parviainen
Join Date: Jul 2010
Posts: 8
Rep Power: 16 |
Hi, I'm modelling UV and particles my self too. Have you visited this site?
http://www.sandia.gov/cfd-water/uvdisinfection.htm It might help you a bit. At least there is an UDF file that can calculate the total UV dose what a particle gets. |
|
June 9, 2011, 11:41 |
|
#4 | |
New Member
Join Date: Feb 2011
Posts: 16
Rep Power: 15 |
Quote:
Thanks anyway. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Trouble: Sandia UV UDF on FLUENT 12.0.16 | RPJones | Fluent UDF and Scheme Programming | 31 | May 25, 2011 12:15 |
particle tracking in unsteady flow | peterchen | FLUENT | 1 | July 22, 2010 23:18 |
steady or unsteady DPM ??? | Marina | FLUENT | 5 | July 5, 2006 05:52 |
steady or unsteady? (in dpm) | winnie | FLUENT | 1 | April 28, 2003 12:30 |
CFX- Particle tracking in Unsteady flow | faithkim | Main CFD Forum | 3 | September 14, 1999 21:57 |