UDS Flux Boundary Condition
The gradient of the UDS is zero at the boundary. How to implement this using DEFINE_PROFILE? Would C_UDSI_G work?

Do I misunderstand your question or did you overlook the menu items? You can set the boundary condition for UDS from the b.c. menu.

I overlooked the menu. I can specify the flux on the GUI. My bad.

On a different note, can I do the following?
Set C_UDSI_M1(c,t,0) = C_UDMI(c,t,0); where C_UDMI(c,t,0) is a product of some constants, temperature and volume fraction gradient. Solve for C_UDSI(c,t,0) using the DEFINE_UDS_UNSTEADY and DEFINE_DIFFUSIVITY. Then do this: C_UDMI(c,t,1) = C_UDSI(c,t,0)*C_T(c,t); Is yes, please let me know how. 
I am not quite sure what you want to do.
Could not you solve the equation for (temperature X volume fraction gradient) instead of the volume fraction gradient? Correct me if I am wrong. When you use DEFINE_UDS_UNSTEADY, the C_UDSI_M1 is not used. Why do you have to assign a value to it? 
Okay, this is what I want to do. Maybe a diverted a little bit.
I find the interfacial mass source term (interfacial means where the vof of one of the phase is neither 1, nor zero and the vof gradient is not zero) and then I store that term in UDMI(c,t,0). I need to solve the unsteady diffusion equation for the above mass source term, so that I get a "diffused" or "smeared" mass source term which I can store in a new location and use to specify my energy source term. I hope you get what I am trying to do here. Please help me out! 
Then I do not find any problem in your last post.

Okay. Do you know how to implement it though on FLUENT in correct order, with the correct usage of macros?

Hi every body.
I wanted to return gradient of UDS ( scalar is volume fraction of nanoparticle in my case) as boundary value. by simplifying transport equation , my boundary condition on the wall is: d(phi)/dx=(DT/DB)*(dT/dx) that UDS(c,t,0) is phi. As you see I wanted to return derivative not value of phi. I'm beginner at UDF . Could you please give me some advise.If following function is true to use why didn't work properly? It has problem by initializing! I face with "fatal signal" while initializing. DEFINE_PROFILE(alpha_bc1,thread,position) { Thread *t; cell_t c; face_t f; ... ... begin_f_loop(f,thread) { C_UDSI_G(c,t,0)[0]=(D_T/D_B)*C_T_G(c,t)[0]; F_PROFILE(f,thread,position)=C_UDSI_G(c,t,0)[0];*/ } end_f_loop(f,t) } 
MaryamA, you asked the same question in 5 different topics. Do not expect people to help you with this kind of behavior.

I am so sorry.
That's all because of not knowing how to ask good question. I'm beginner at UDF and having many problem in different tasks, but I think my explanation wasn't enough to ask in a good way :( All following options are my problems and dont know how to ask well. 1creating Gradient of UDSI for calculating Laplacian of T by using DEFINE_ ADJUST 2returning derivative of UDSI instead of value boundary of UDSI by using DEFINE_PROFILE 3recieved" fatal signal" while initializing and even at start of run 4facing with N_UDS not found by using DEFINE_ ADJUST So sorry again:( 
Quote:
1 You will face problems if you use gradient macros in the DEFINE_ADJUST because in the first iteration it is not calculated yet. Consider using the gradients in the DEFINE_EXECUTE_AT_END(name) macro. 2 Create a profile that returns the value you want in a variable and use it to define the value of the gradient in the boundary conditions tab in fluent. Do not use something like C_UDSI_G(c,t,0) = 1.0; for example. It might cause you problem. Be careful because boundary conditions are not defined in the cell but in the faces. So face macros must be used. 3 This is probably because you are trying to use gradients in the DEFINE_ADJUST. If they are needed for the first iteration, you can put something like C_UDMI(c,t,grad_0)=C_UDSI(c,t,0)[0] (or [1] or [2] depending of the direction of your gradient) and in the DEFINE_ADJUST you can use the UDMI. Do not forget to initialize the UDMIs. 4 I advised you already how I would do this. Since you are a beginner in UDF, I would recommend you to read the UDF manual. Do simple UDF's to see how it works, otherwise you won't be able to learn it properly and also will not solve your problem. 
All times are GMT 4. The time now is 17:18. 