# Time dependant BC's

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

 July 12, 2005, 09:28 Time dependant BC's #1 cfd help Guest   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?

 July 12, 2005, 11:39 Re: Time dependant BC's #2 major Guest   Posts: n/a yes,you can use UDF to specify the BC.

 July 12, 2005, 12:09 Re: Time dependant BC's #3 Evan Rosenbaum Guest   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.

 July 12, 2005, 16:01 Re: Time dependant BC's #4 cfd help Guest   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.

 July 12, 2005, 16:40 Re: Time dependant BC's #5 Quak Guest   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.; 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) }

 July 13, 2005, 04:17 Re: Time dependant BC's #6 cfd help Guest   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.

 Thread Tools Display Modes Linear Mode

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

 Similar Threads Thread Thread Starter Forum Replies Last Post Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20 Lord Kelvin OpenFOAM 6 April 12, 2011 11:24 zhajingjing OpenFOAM 0 April 28, 2010 04:35 en51nm STAR-CCM+ 1 July 15, 2009 07:20 Sanjay Padhiar Main CFD Forum 1 March 31, 1999 12:32

All times are GMT -4. The time now is 20:27.