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

Define_dpm_source

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 17, 2013, 00:19
Talking Define_dpm_source
  #1
New Member
 
Anthony
Join Date: Jul 2013
Posts: 15
Rep Power: 13
anthony05 is on a distinguished road
I am trying to add mass to the continuous phase from particles using DEFINE_DPM_SOURCE.

The compound I want to add to the continuous phase is part of a mixture and the amount released is governed by particle temperature and a user defined scalar.

Currently the code adds co2 to the continuous phase but not the amount I have calculated. Does anyone have any ideas of how to solve this? Maybe something to do with the units of C_DPMS_YI.

Thanks in advance.

The code for the transfer to the continuous phase is:

DEFINE_DPM_SOURCE(dpm_source, c, t, S, strength, p)
{

Material *m = THREAD_MATERIAL(t);
char *name = "co2";
int i;
i = mixture_specie_index(m,name);

k=150000.0*exp(-200000.0/(P_T(p)*8.314));

mass1=k*P_USER_REAL(p,0);

C_DPMS_YI(c, t, i) += mass1*udf_dpm_relax*strength;
}
anthony05 is offline   Reply With Quote

Old   January 31, 2018, 14:43
Default
  #2
New Member
 
Thomas F
Join Date: Aug 2012
Location: Germany
Posts: 6
Rep Power: 14
habo is on a distinguished road
Status Ansys Fluent 17.2

Most C_ function are not designed to assign values (see UDF user guide 17.2 p. 279)
Therefor C_DPMS_YI(c, t, i) is not suitable to add CO2.

Looking in the manual for the definition of DEFINE_DPM_SOURCE (p. 203) you see that S is the so called source structure point to the cell which can be used to assign values.

On page 207 you can see an example using the source pointer like:

S->species[h2o_index] += mp_dot;

you may also assign
S->mass
S->energy
S->species_concentration
...

cheers
habo is offline   Reply With Quote

Reply

Tags
dpm, 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



All times are GMT -4. The time now is 17:12.