CFD Online Logo CFD Online URL
Home > Forums > FLUENT

Time dependant BC's

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

LinkBack Thread Tools Display Modes
Old   July 12, 2005, 09:28
Default Time dependant BC's
cfd help
Posts: n/a
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?

  Reply With Quote

Old   July 12, 2005, 11:39
Default Re: Time dependant BC's
Posts: n/a
yes,you can use UDF to specify the BC.
  Reply With Quote

Old   July 12, 2005, 12:09
Default Re: Time dependant BC's
Evan Rosenbaum
Posts: n/a
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.
  Reply With Quote

Old   July 12, 2005, 16:01
Default Re: Time dependant BC's
cfd help
Posts: n/a
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.

  Reply With Quote

Old   July 12, 2005, 16:40
Default Re: Time dependant BC's
Posts: n/a
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.;



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;


F_PROFILE(f,t,i) = 373;


end_f_loop(f,t) }
  Reply With Quote

Old   July 13, 2005, 04:17
Default Re: Time dependant BC's
cfd help
Posts: n/a
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.

  Reply With Quote


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
Extrusion with OpenFoam problem No. Iterations 0 Lord Kelvin OpenFOAM Running, Solving & CFD 8 March 28, 2016 11:08
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
calculation diverge after continue to run zhajingjing OpenFOAM 0 April 28, 2010 04:35
Time dependant velocity profile en51nm STAR-CCM+ 1 July 15, 2009 07:20
unsteady calcs in FLUENT Sanjay Padhiar Main CFD Forum 1 March 31, 1999 12:32

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