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

Please help - Assign volatile mass fraction to particle

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 14, 2022, 10:29
Default Please help - Assign volatile mass fraction to particle
  #1
New Member
 
Benjamin Ortner
Join Date: Oct 2021
Location: Graz, Austria
Posts: 4
Rep Power: 3
ortb is on a distinguished road
Hello everyone!

I am using the DEFINE_DPM_INJECTION_INIT from the UDF guide because I need to assign initial char and volatile massfractions to my particles - additionaly to the standard properties - but I just cant get it to work.

The UDF from the manual is fine, I can even assign the volatile fraction from a file to the USER_REAL which they describe in the documentation, but fluent does not let me write to the DPM_VOLATILE_FRACTION(p). So I know reading from the file is not the problem. What am I doing wrong here? Fluent ignores my code and after initialization the particles have the same volatile and char mass fraction according to the material definition.

This works:
/* From the rest of the line, determine the volatile mass fraction,
* add assign to the new particle’s user real
*/
sscanf(strchr(rest, ':')+1, "%lg", &(PP_USER_REAL(p, 0)));

This does not:

/* From the rest of the line, determine the volatile mass fraction,
* add assign to DPM_VOLATILE_FRACTION
*/
sscanf(strchr(rest, ':')+1, "%lg", &(DPM_VOLATILE_FRACTION(p)));


Thank you in advance!
ortb is offline   Reply With Quote

Old   July 14, 2022, 22:31
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,194
Rep Power: 31
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
from my point of view, problem could be in initialization macro you are using,
VOLATILE_FRACTION could be not determined yet, howeve, you are trying to access the data
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Reply

Tags
dpm, fluent, initialization, udf, volatile

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
Filtering particle incident mass flux by particle velocity magnitude Patrick_M STAR-CCM+ 0 March 11, 2020 22:57
particle velocity field from twoPhaseEulerFoam when particle volume fraction is low openfoammaofnepo OpenFOAM 0 June 28, 2017 19:51
Conversion of mass fraction to mole fraction in FLUENT prince_pahariaa FLUENT 0 August 26, 2014 09:08
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32
DPM UDF particle position using the macro P_POS(p)[i] dm2747 FLUENT 0 April 17, 2009 02:29


All times are GMT -4. The time now is 18:29.