
[Sponsors] 
May 15, 2013, 21:25 
UDS Flux Boundary Condition

#1 
Member
Shashank
Join Date: Apr 2011
Posts: 74
Rep Power: 8 
The gradient of the UDS is zero at the boundary. How to implement this using DEFINE_PROFILE? Would C_UDSI_G work?


May 15, 2013, 21:33 

#2 
Senior Member
Join Date: Aug 2011
Posts: 315
Rep Power: 13 
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.


May 15, 2013, 21:34 

#3 
Member
Shashank
Join Date: Apr 2011
Posts: 74
Rep Power: 8 
I overlooked the menu. I can specify the flux on the GUI. My bad.


May 15, 2013, 21:39 

#4 
Member
Shashank
Join Date: Apr 2011
Posts: 74
Rep Power: 8 
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. 

May 15, 2013, 22:26 

#5 
Senior Member
Join Date: Aug 2011
Posts: 315
Rep Power: 13 
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? 

May 15, 2013, 22:33 

#6 
Member
Shashank
Join Date: Apr 2011
Posts: 74
Rep Power: 8 
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! 

May 15, 2013, 22:49 

#7 
Senior Member
Join Date: Aug 2011
Posts: 315
Rep Power: 13 
Then I do not find any problem in your last post.


May 15, 2013, 22:51 

#8 
Member
Shashank
Join Date: Apr 2011
Posts: 74
Rep Power: 8 
Okay. Do you know how to implement it though on FLUENT in correct order, with the correct usage of macros?


September 21, 2015, 09:35 

#9 
Member
Join Date: Nov 2014
Posts: 42
Rep Power: 4 
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) } 

September 21, 2015, 09:42 

#10 
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 6 
MaryamA, you asked the same question in 5 different topics. Do not expect people to help you with this kind of behavior.


September 21, 2015, 12:27 

#11 
Member
Join Date: Nov 2014
Posts: 42
Rep Power: 4 
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 

September 22, 2015, 04:31 

#12  
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 6 
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. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Boundary condition to UDS  ramesh  FLUENT  2  September 20, 2015 12:56 
UDS Neumann Boundary Condition  Richard Parker  FLUENT  2  August 1, 2013 06:44 
Error finding variable "THERMX"  sunilpatil  CFX  8  April 26, 2013 07:00 
flux boundary Condition  tmu  OpenFOAM  2  April 23, 2013 08:22 