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

How to inject DPM particles using DEFINE_EXECUTE_AT_END(name) ?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 3, 2013, 20:53
Default How to inject DPM particles using DEFINE_EXECUTE_AT_END(name) ?
  #1
New Member
 
Join Date: Sep 2013
Posts: 1
Rep Power: 0
bawammo is on a distinguished road
Dear all,

I'm using DEFINE_EXECUTE_AT_END(name) to calculate the mass to be injected.
I'm performing the calculations in each time and on each cell.
I need to inject solid particles at each end of calculation if the mass resulted from this calculations is higher than 0.

This is my code:
========================================
#include "udf.h"

DEFINE_EXECUTE_AT_END(injection_1)
{
Domain *d;
Thread *t;
cell_t c;

float mass_to_inject;
real centroid_cell[ND_ND]; /* to capture centroid coordinates of the cell */

d = Get_Domain(1);
thread_loop_c(t,d)
{
begin_c_loop(c,t)
{
mass_to_inject = ...; /* some calculations are made here */

if(mass_to_inject > 0)
{
C_CENTROID(centroid_cell,c,t) /* captures centroid coordinates of current cell */

/* I need to inject the mass of solid particles (or equivalent flow rate):
diameter: 1 mm; temperature: 373.15 K; velocity: 0.1 m (only X direction); density: 1500 kg/m³;
position: X = centroid_cell[0], Y = centroid_cell[1], Z = centroid_cell[2] */

}
}
end_c_loop(c,t)
}
}
============================================

Muchas gracias!!!
bawammo is offline   Reply With Quote

Old   October 30, 2017, 13:20
Default
  #2
New Member
 
Pengze Yang
Join Date: Sep 2017
Posts: 2
Rep Power: 0
Pengze Yang is on a distinguished road
Have you by any chances got the solution? I run into similar problem.
Pengze Yang is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
UDF for deleting particles in DPM imanmirzaii Fluent UDF and Scheme Programming 12 November 25, 2020 19:27
Injection of specific number of particles in DPM DH FLUENT 12 March 16, 2016 21:04
Fluent DPM deleting particles during iteration civilcfd FLUENT 0 August 7, 2013 11:53
DPM for steady flow with unsteady particles tracking yahya FLUENT 0 March 28, 2013 13:28
DPM - do the particles affect the liquid? Nikhil Dani FLUENT 0 January 1, 2009 11:58


All times are GMT -4. The time now is 05:57.