CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   The initial value of User Defined Scalars (http://www.cfd-online.com/Forums/fluent-udf/120976-initial-value-user-defined-scalars.html)

759599290 July 18, 2013 10:41

The initial value of User Defined Scalars
 
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.

Maryam-A September 23, 2015 04:55

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 ?

Bruno Machado September 23, 2015 05:20

Quote:

Originally Posted by Maryam-A (Post 565255)
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.

Maryam-A September 23, 2015 14:58

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

Bruno Machado September 23, 2015 17:22

Quote:

Originally Posted by Maryam-A (Post 565341)
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.


All times are GMT -4. The time now is 06:08.