CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Time dependant BC's (http://www.cfd-online.com/Forums/fluent/37238-time-dependant-bcs.html)

cfd help July 12, 2005 10:28

Time dependant BC's
 
I want to look at transient flow in a simple rectangle chamber. The flow will be driven from an inlet and will leave the chamber via a single outlet.

I would like to change the mass flow rate entering the chamber and set it as a function of time. For now lets say 0.1kg/s for the first 10 secs and then 0.2 kg/s for the next 50 secs.

Any pointers on how to set up this time dependant BC's.

Do I need to look at UDF's?


major July 12, 2005 12:39

Re: Time dependant BC's
 
yes,you can use UDF to specify the BC.

Evan Rosenbaum July 12, 2005 13:09

Re: Time dependant BC's
 
If it is a step change like you describe, just run the transient for ten seconds, change the BC, and pick up the transient where you left off for the remaining 50 seconds.

cfd help July 12, 2005 17:01

Re: Time dependant BC's
 
Thank you both for your responding. The simple case I described was given to help give me an insight into the process of setting up and running UDF's. And so that's why I didn't just run, change and then re-run.

I will do more trialling and then come back with questions, as/if they arise.


Quak July 12, 2005 17:40

Re: Time dependant BC's
 
Hi, this is an example from my UDF to change the inlet temperature as a function of time. You can do the same thing as this.

/* Define boundary profiles */ DEFINE_PROFILE(heating_rate,t,i) {

float rate, T;

real factor;

real flow_time = RP_Get_Real("flow-time");

face_t f;

rate = 0.0125; /* deg per sec */

factor = 1000.;

begin_f_loop(f,t)

{

if (flow_time > 4)

F_PROFILE(f,t,i) = 443;

else if (flow_time > 3.3)

F_PROFILE(f,t,i) = 420;

else if (flow_time > 1)

F_PROFILE(f,t,i) = 400;

else if (flow_time >0.1)

F_PROFILE(f,t,i) = 393;

else

F_PROFILE(f,t,i) = 373;

}

end_f_loop(f,t) }

cfd help July 13, 2005 05:17

Re: Time dependant BC's
 
Thanks Quak,

A few 'follow-up' questions, if I may,

What is the role the variables 'factor' and 'rate' in your UDF?

You set 'T' to be a real.

since 'C' is case sensitive what also is this variable used for.



All times are GMT -4. The time now is 18:10.