# The initial value of User Defined Scalars

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

 July 18, 2013, 10:41 The initial value of User Defined Scalars #1 New Member   Leon Chen Join Date: Aug 2012 Location: ShenZhen, China Posts: 9 Rep Power: 13 Hi everyone, I defined several UDSs in FLUENT, does someone know the default initial value of UDSs ? I really need help here. Thanks in advance.

 September 23, 2015, 04:55 #2 Member   Join Date: Nov 2014 Posts: 42 Rep Power: 11 Hi. How did you solve your problem. maybe this is my mistake, too. I set 0.02 for UDS(0) in inlet , but while initializing it wasn't shown! So. how can I defined a initial value as UDS ?

September 23, 2015, 05:20
#3
Senior Member

Join Date: May 2014
Posts: 271
Rep Power: 13
Quote:
 Originally Posted by Maryam-A Hi. How did you solve your problem. maybe this is my mistake, too. I set 0.02 for UDS(0) in inlet , but while initializing it wasn't shown! So. how can I defined a initial value as UDS ?
Are you referring to boundary condition or initial values?

To initialize values you can define it either through the fluent menu or using a DEFINE_INIT macro. Another way yet not most correct is to initialize your code and then patch it with the values you want in the regions you want.

Boundary condition for the UDS should be imposed in the boundary menu accordingly.

 September 23, 2015, 14:58 #4 Member   Join Date: Nov 2014 Posts: 42 Rep Power: 11 Hi thankyou for quick reply. to say I have many questions again: 1- for setting initial value for UDS I can only use DEFINE_INIT macro? 2- what does patch exactly do (I couldnt understand from fluent help) 3- I know my uds vale change in domain but not very much ( its volume fraction concentration) so for example when I want to investigate (bulk volume fraction=0.02) Where I should set it? 4- for boundary condition at inlet I use T=300 and Re=51.3 so I calculate velocity By using phi=0.02 at viscosity(phi,T), So should I set UDs=0.02 at inlet again? sorry for grammar. Regards

September 23, 2015, 17:22
#5
Senior Member

Join Date: May 2014
Posts: 271
Rep Power: 13
Quote:
 Originally Posted by Maryam-A Hi thankyou for quick reply. to say I have many questions again: 1- for setting initial value for UDS I can only use DEFINE_INIT macro? 2- what does patch exactly do (I couldnt understand from fluent help) 3- I know my uds vale change in domain but not very much ( its volume fraction concentration) so for example when I want to investigate (bulk volume fraction=0.02) Where I should set it? 4- for boundary condition at inlet I use T=300 and Re=51.3 so I calculate velocity By using phi=0.02 at viscosity(phi,T), So should I set UDs=0.02 at inlet again? sorry for grammar. Regards
1- You can define in the same place where you define other initial conditions as well.
2- when you patch some variable, you give the value you want to the variable. you can start a simulation, run a few iterations for example, and define some value different than the one computed so far.
3- i didn't get you question.
4- not sure of what you mean. in your inlet boundary you should define how much of phi are you inputting. This value may change side your domain if you have source terms in this UDS.

 Tags initial value, udf, uds