|
[Sponsors] |
June 9, 2015, 23:37 |
DEFINE_PROPERTY for particle data
|
#1 |
New Member
Luleå tekniska universitet
Join Date: May 2015
Location: LTU, Luleå, Sweden
Posts: 11
Rep Power: 11 |
Hello all,
I want to calculate the material properties using the particle data. Is it possible? For checking, I am trying to calculate the no.of particles in each cell using the DEFINE_PROPERTY MACRO. #include "udf.h" #include "pdf_transport.h" #include "dpm.h" #include "cl_dpm.h" FILE *fp; DEFINE_PROPERTY(cell_abs_coeff, c, t) { Particle *p; Domain *d=Get_Domain(1); int iter = 0; Alloc_Storage_Vars(d, SV_DPM_PARTICLE_BIN, SV_NULL); FLUENT_EXPORT void bin_particles_in_cells(Domain *d, cxboolean true); begin_particle_cell_loop(p,c,t) { iter++; } end_particle_cell_loop(p,c,t) Free_Storage_Vars(d, SV_DPM_PARTICLE_BIN, SV_NULL); fp = fopen("results.dat", "a"); fprintf(fp,"%d\t\n",iter); fclose(fp); return 0; } But it seems like, it does not enter into the particles loop. I am just keep getting zero for each cell. Can anyone please tell me what I am missing? Thanks in advanced. Regards: MAC |
|
Tags |
define_property, particles |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFD by anderson, chp 10.... supersonic flow over flat plate | varunjain89 | Main CFD Forum | 18 | May 11, 2018 08:31 |
[OpenFOAM] Paraview doesn't seem to be picking up data generated by icofoam | MikeHersee | ParaView | 2 | January 6, 2015 09:27 |
Data Produced From Fine Marine Cant Match with The Experimental Data | PeiSan | Fidelity CFD | 4 | August 23, 2014 06:33 |
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem | Attesz | OpenFOAM Meshing & Mesh Conversion | 12 | May 2, 2013 11:52 |
How to update polyPatchbs localPoints | liu | OpenFOAM Running, Solving & CFD | 6 | December 30, 2005 18:27 |