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

Can not access to the user variable of particle (DPM)

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By swtbkim
  • 1 Post By swtbkim

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 15, 2018, 06:26
Default Can not access to the user variable of particle (DPM)
  #1
Senior Member
 
Sangwoo Kim
Join Date: Jul 2014
Location: Seoul, South Korea
Posts: 115
Rep Power: 11
swtbkim is on a distinguished road
Hello.
I am working with DPM, and some scalar values would be updated along the particle track. That is, "DEFINE_DPM_SCALAR_UPDATE" will be used.
After facing some trouble, now I am trying to test this simple code below.

DEFINE_DPM_SCALAR_UPDATE(name_test, c, t, initialize, tp)
{
if (initialize)
{
p->user[0]=0;
}
}
This is all of my udf; just initializing the user variable as zero.

In Results > Graphics > Particle Tracks, I can draw the particle track colored by "Particle Residence Time" like so far.
However, when I try to draw the particle track colored by "User Value 0", then it shows an error;

Error: CAR: invalid argument [1]: wrong type [not a pair]
Error Object: ()

I tried using P_USER_REAL(tp, 0), TP_USER_REAL(tp, 0), PP_USER_REAL(tp,0), instead of p->user[0], but they gave the same error.
I did not forget to specify the number of dpm scalar in DPM panel in Fluent.

I am using ANSYS Fluent r18.0
I am not sure but I guess this was not a problem when I used version r16.x, but I cannot test it now.

How can I solve this problem?

Thank you in advance.
zhao Q likes this.
__________________
Best regards

Last edited by swtbkim; January 15, 2018 at 19:10.
swtbkim is offline   Reply With Quote

Old   January 15, 2018, 19:30
Default
  #2
Senior Member
 
Sangwoo Kim
Join Date: Jul 2014
Location: Seoul, South Korea
Posts: 115
Rep Power: 11
swtbkim is on a distinguished road
I could test the udf with ANSYS Fluent r17.2
It works well and I can draw particle track colored by "User Value"
With the same *.cas file and udf code, why does it cause a problem in r18.0?

Any idea??
Thank you.
zhao Q likes this.
__________________
Best regards
swtbkim is offline   Reply With Quote

Reply


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 particle interception with pt_termination fortran routine abcdefgh CFX 6 October 6, 2019 13:30
DPM particle tracking sajeesh FLUENT 0 May 12, 2013 02:29
DPM particle traCKING sajeesh FLUENT 1 April 27, 2013 23:12
how to access a variable in DPM within a UDF patrick FLUENT 13 September 15, 2010 08:38
error in COMSOL:'ERROR:6164 Duplicate Variable' bhushas COMSOL 1 May 30, 2008 04:35


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