CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   concentration gradient (https://www.cfd-online.com/Forums/fluent/182834-concentration-gradient.html)

mahayheidari January 20, 2017 02:37

concentration gradient
 
1 Attachment(s)
hello
i enter mass transfer equation by using uds
and at inlet boundary condition i want concentration gradient that i enter it with a udf
but when i see concentration gradient at inlet in graphics its not correct
for example top of it must be red color but its green
what should i do

pakk January 20, 2017 06:25

Your UDF is not doing what you expect. You have two possibilities:

1. Change your expectations.
2. Change your UDF.

mahayheidari January 20, 2017 07:18

Quote:

Originally Posted by pakk (Post 634086)
Your UDF is not doing what you expect. You have two possibilities:

1. Change your expectations.
2. Change your UDF.

Can you say me the udf that i should use

pakk January 20, 2017 09:13

Can you give me the UDF that you used, then maybe I can explain why it is not doing what you expect.

mahayheidari January 20, 2017 11:21

Quote:

Originally Posted by pakk (Post 634115)
Can you give me the UDF that you used, then maybe I can explain why it is not doing what you expect.



#include "udf.h"


DEFINE_PROFILE(inlet_concentration, face_thread, i)
{
face_t face;
real r[ND_ND];



begin_f_loop(face,face_thread)
{
F_CENTROID(r, face, face_thread);
F_PROFILE(face, face_thread, i) = 3.3*100000*r[1]+5;
}
end_f_loop(face,face_thread)

}

LuckyTran January 20, 2017 17:50

Is it just a simply interpolation and graphical bug? In your UDF you specify face values, but you selected node values in the graphics. Your UDF doesn't specify the values at the other boundaries, the other walls?

mahayheidari January 21, 2017 01:18

Quote:

Originally Posted by LuckyTran (Post 634168)
Is it just a simply interpolation and graphical bug? In your UDF you specify face values, but you selected node values in the graphics. Your UDF doesn't specify the values at the other boundaries, the other walls?

first question:yes
once i didnt select node values but the result was not ok
second question: no

pakk January 23, 2017 03:08

And how do you apply this UDF? Exactly which property is set to this UDF in Fluent?

pakk January 23, 2017 03:47

To speed things up: what do you want your gradient to be?

If you want it to be 3.3*100000, you are doing it the wrong way...


All times are GMT -4. The time now is 14:30.