|
[Sponsors] |
October 17, 2013, 00:19 |
Define_dpm_source
|
#1 |
New Member
Anthony
Join Date: Jul 2013
Posts: 15
Rep Power: 13 |
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; } |
|
January 31, 2018, 14:43 |
|
#2 |
New Member
Thomas F
Join Date: Aug 2012
Location: Germany
Posts: 6
Rep Power: 14 |
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 |
|
Tags |
dpm, fluent, udf |
|
|