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

Looping over cells in DPM

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   November 8, 2018, 11:28
Default Looping over cells in DPM
  #1
New Member
 
Roozbeh Khodaverdian
Join Date: Nov 2018
Posts: 3
Rep Power: 7
Roozbeh is on a distinguished road
Hi all

I want to write a UDF for modifying my DPM phase, using the data of the cell that the particle is currently in.

I chose the DEFINE_DPM_LAW macro for this purpose and for looping over the cells i went with:

begin_particle_cell_loop(pi, c, t) { } end_particle_cell_loop(pi, c, t)

macro.

The final code was:

#include "udf.h"
#include "dpm.h"
#include "dpm_types.h"
#include "dpm_laws.h"
#include "surf.h"

DEFINE_DPM_LAW(LawTryTwentyfour, tp, ci)
{
cell_t c = TP_CELL(tp);
Thread *t = TP_CELL_THREAD(tp);
Particle *pi;


begin_particle_cell_loop(pi, c, t)
{

TP_DIAM(pi) = TP_INIT_DIAM(pi)*(1. - ((C_T(c, t) - 290.) / 20.));

}
end_particle_cell_loop(pi, c, t)

}

Fluent 18.2 compiled it with seemingly no problem. however when i run the case using this law it gives me follwing error:

Node 5: Process xxxx: Received signal SIGSEGV
The fl process could not be started

It also corruptes program as such i cant even reopen my DPM Injection again and i have to close the software and start all over again.

any suggestion about the nature of this error?
or better how could i solve it?

thanks
Roozbeh is offline   Reply With Quote

 

Tags
define_dpm_law, fluent, udf


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
[snappyHexMesh] snappyHexMesh sticking point natty_king OpenFOAM Meshing & Mesh Conversion 11 February 20, 2024 09:12
[ICEM] Error in mesh writing helios ANSYS Meshing & Geometry 21 August 19, 2021 14:18
[ICEM] Problem with prism cells sidharath ANSYS Meshing & Geometry 0 September 1, 2015 07:09
snappyhexmesh remove blockmesh geometry philipp1 OpenFOAM Running, Solving & CFD 2 December 12, 2014 10:58
looping over cells Chrisi1984 OpenFOAM Running, Solving & CFD 4 August 5, 2010 02:44


All times are GMT -4. The time now is 15:43.