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 plot or to make a contour of P_USER_REAL?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 4, 2016, 04:48
Default how to plot or to make a contour of P_USER_REAL?
  #1
Senior Member
 
Sangwoo Kim
Join Date: Jul 2014
Location: Seoul, South Korea
Posts: 115
Rep Power: 12
swtbkim is on a distinguished road
Hi all.

I'm writing a code for situation of particle impact on the wall.
When a particle hit the wall, if some criterion is satisfied, then particle is trapped and if not, then particle is reflected.
I want to know the mass flux of trapped particles on the wall.
So the code is written in this way:

Quote:
#include "udf.h"

DEFINE_DPM_BC(BC,p,t,f,normal,dim)
{

// some calculations here //

if(force1 <= force2){

F_AREA(A,f,t);
area = NV_MAG(A);

c0 = F_C0(f,t);
t0 = THREAD_T0(t);
P_USER_REAL(p,0) = P_FLOW_RATE(p)/area;
C_UDMI(c0,t0,0) = P_FLOW_RATE(p)/area;

return PATH_ABORT;
}
else
return PATH_ACTIVE;
}

Here, the flow field converged well. That is, residual and other monitors converge to a constant, and DPM concentration at outlet also converges.
So I expected that C_UDMI(c0,t0,0) will also converge to a constant, because it is mass flux trapped at the wall and steady state solution is obtained.
But C_UDMI keeps increasing with nearly constant slope.. It looks like that C_UDMI is accumulated with the value of C_UDMI at the previous iteration!
Am I understanding right? And how can I fix this problem??
I am not good at UDF actually, so any fundamental advice will also be helpful to me.

Second question is about P_USER_REAL(p,0). I heard that I should use P_USER_REAL(p,0) for storing particle-related value when I use parallel solver.
Here, how can I see P_USER_REAL?
For example, I expect that the value of mass flux will be stored in P_USER_REAL, so I may be able to make a contour of P_USER_REAL so that I can show where particles are trapped more.
But there is no option about it in Results > Graphics > Contours > Contours of..

Any comment will be very helpful to me.

Thank you.
__________________
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
[swak4Foam] Foam warnings - related to swak4Foam Salam-H OpenFOAM Community Contributions 20 August 2, 2015 16:40
plot contour on a plane 1988 FLUENT 9 August 14, 2014 07:03
[swak4Foam] Installing swak4Foam to OpenFOAM in mac Kaquesang OpenFOAM Community Contributions 22 January 21, 2013 12:51
Installation OF1.5-dev ttdtud OpenFOAM Installation 46 May 5, 2009 03:32
contour plot of stream function liu FLUENT 6 August 19, 2003 23:30


All times are GMT -4. The time now is 19:52.