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

UDS Flux Boundary Condition

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 15, 2013, 21:25
Default UDS Flux Boundary Condition
  #1
Member
 
Shashank
Join Date: Apr 2011
Posts: 70
Rep Power: 6
shashank312 is on a distinguished road
The gradient of the UDS is zero at the boundary. How to implement this using DEFINE_PROFILE? Would C_UDSI_G work?
shashank312 is offline   Reply With Quote

Old   May 15, 2013, 21:33
Default
  #2
Senior Member
 
Join Date: Aug 2011
Posts: 315
Rep Power: 12
blackmask will become famous soon enough
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.
blackmask is offline   Reply With Quote

Old   May 15, 2013, 21:34
Default
  #3
Member
 
Shashank
Join Date: Apr 2011
Posts: 70
Rep Power: 6
shashank312 is on a distinguished road
I overlooked the menu. I can specify the flux on the GUI. My bad.
shashank312 is offline   Reply With Quote

Old   May 15, 2013, 21:39
Default
  #4
Member
 
Shashank
Join Date: Apr 2011
Posts: 70
Rep Power: 6
shashank312 is on a distinguished road
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.
shashank312 is offline   Reply With Quote

Old   May 15, 2013, 22:26
Default
  #5
Senior Member
 
Join Date: Aug 2011
Posts: 315
Rep Power: 12
blackmask will become famous soon enough
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?
blackmask is offline   Reply With Quote

Old   May 15, 2013, 22:33
Default
  #6
Member
 
Shashank
Join Date: Apr 2011
Posts: 70
Rep Power: 6
shashank312 is on a distinguished road
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!
shashank312 is offline   Reply With Quote

Old   May 15, 2013, 22:49
Default
  #7
Senior Member
 
Join Date: Aug 2011
Posts: 315
Rep Power: 12
blackmask will become famous soon enough
Then I do not find any problem in your last post.
blackmask is offline   Reply With Quote

Old   May 15, 2013, 22:51
Default
  #8
Member
 
Shashank
Join Date: Apr 2011
Posts: 70
Rep Power: 6
shashank312 is on a distinguished road
Okay. Do you know how to implement it though on FLUENT in correct order, with the correct usage of macros?
shashank312 is offline   Reply With Quote

Old   September 21, 2015, 09:35
Default
  #9
Member
 
Join Date: Nov 2014
Posts: 42
Rep Power: 3
Maryam-A is on a distinguished road
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)
}
Maryam-A is offline   Reply With Quote

Old   September 21, 2015, 09:42
Default
  #10
Member
 
Bruno Machado
Join Date: May 2014
Posts: 87
Rep Power: 3
Bruno Machado is on a distinguished road
Maryam-A, you asked the same question in 5 different topics. Do not expect people to help you with this kind of behavior.
Bruno Machado is offline   Reply With Quote

Old   September 21, 2015, 12:27
Default
  #11
Member
 
Join Date: Nov 2014
Posts: 42
Rep Power: 3
Maryam-A is on a distinguished road
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.

1-creating Gradient of UDSI for calculating Laplacian of T by using DEFINE_ ADJUST
2-returning derivative of UDSI instead of value boundary of UDSI by using DEFINE_PROFILE
3-recieved" fatal signal" while initializing and even at start of run
4-facing with N_UDS not found by using DEFINE_ ADJUST

So sorry again
Maryam-A is offline   Reply With Quote

Old   September 22, 2015, 04:31
Default
  #12
Member
 
Bruno Machado
Join Date: May 2014
Posts: 87
Rep Power: 3
Bruno Machado is on a distinguished road
Quote:
Originally Posted by Maryam-A View Post
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.

1-creating Gradient of UDSI for calculating Laplacian of T by using DEFINE_ ADJUST
2-returning derivative of UDSI instead of value boundary of UDSI by using DEFINE_PROFILE
3-recieved" fatal signal" while initializing and even at start of run
4-facing with N_UDS not found by using DEFINE_ ADJUST

So sorry again
It is ok, we will try to help you, but ask same question in many topics ends up polluting the forum.

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.
Bruno Machado is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 15:40.