CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

DEFINE_PROPERTY for particle data

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 9, 2015, 23:37
Unhappy DEFINE_PROPERTY for particle data
  #1
New Member
 
Luleå tekniska universitet
Join Date: May 2015
Location: LTU, Luleå, Sweden
Posts: 11
Rep Power: 11
mac_09 is on a distinguished road
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
mac_09 is offline   Reply With Quote

Reply

Tags
define_property, particles


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 11:40.